From d3eb03d19a4be03bb64c63140237fbb5508fe42a Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sun, 17 Nov 2019 19:08:47 -0500 Subject: [PATCH] Additional correction to extraction, still part of the effort to remove redundant ports. A comment that I left in the code at the last commit asked if it was necessary to call efAddNodes and efAddConns recursively. An example came up in which the answer is apparently "yes". These routines have been replaced by efFlatNodes(), which appears to solve the problem. There is now a question of whether efFlatNodesDeviceless() does anything, and should its main behavior (to flag deviceless subcircuits) be folded into efFlatNodes. --- extflat/EFflat.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/extflat/EFflat.c b/extflat/EFflat.c index 8708259f..239edb25 100644 --- a/extflat/EFflat.c +++ b/extflat/EFflat.c @@ -127,7 +127,7 @@ EFFlatBuild(name, flags) if (flags & EF_NOFLATSUBCKT) efFlatNodesStdCell(&efFlatContext); else - efFlatNodes(&efFlatContext); + efFlatNodes(&efFlatContext, FALSE, TRUE); efFlatKills(&efFlatContext); if (!(flags & EF_NONAMEMERGE)) efFlatGlob(); @@ -194,11 +194,8 @@ EFFlatBuildOneLevel(def, flags) efFlatContext.hc_x = efFlatContext.hc_y = 0; efFlatRootUse.use_def = efFlatRootDef; - /* NOTE: Do the following two routines need to be deeper than one level? */ - /* Record all nodes of the next level in the hierarchy */ - efHierSrUses(&efFlatContext, efAddNodes, (ClientData)TRUE); - /* Record those connections as well. */ - efHierSrUses(&efFlatContext, efAddConns, (ClientData)FALSE); + /* Record all nodes down the hierarchy from here */ + efFlatNodes(&efFlatContext, (ClientData)TRUE, (ClientData)FALSE); /* Expand all subcells that contain connectivity information but */ /* no active devices (including those in subcells). */ @@ -295,16 +292,16 @@ EFFlatDone() */ int -efFlatNodes(hc) +efFlatNodes(hc, stdcell, doWarn) HierContext *hc; { (void) efHierSrUses(hc, efFlatNodes); /* Add all our own nodes to the table */ - efAddNodes(hc, FALSE); + efAddNodes(hc, stdcell); /* Process our own connections and adjustments */ - (void) efAddConns(hc, TRUE); + (void) efAddConns(hc, doWarn); return (0); }