From 6369c44821091ad52ead0fae52f3e4f6b1701174 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 18 Nov 2022 22:28:20 -0500 Subject: [PATCH] One correction to the last commit, to avoid missing output of port nets in "def write". --- extflat/EFbuild.c | 14 ++++++++++++++ extflat/extflat.h | 6 ++++++ lef/defWrite.c | 6 ------ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/extflat/EFbuild.c b/extflat/EFbuild.c index 3a0a53c1..41731f60 100644 --- a/extflat/EFbuild.c +++ b/extflat/EFbuild.c @@ -187,6 +187,16 @@ efBuildNode(def, isSubsnode, isDevSubsnode, nodeName, nodeCap, x, y, layerName, if (isSubsnode == TRUE) newnode->efnode_flags |= EF_GLOB_SUBS_NODE; + /* For tracking unique nodes (see below), the first + * node entry for a port is not considered unique, + * since the port itself is not a node. + */ + if (newnode->efnode_flags & EF_PORT_NONODE) + { + newnode->efnode_flags &= ~EF_PORT_NONODE; + return; + } + /* If tracking unique nodes (for "def write", for example), * collect unique node positions in the client data so that * all of them can be visited. @@ -1117,6 +1127,10 @@ efBuildPortNode(def, name, idx, x, y, layername, toplevel) layername, (char **) NULL, 0); nn = (EFNodeName *) HashGetValue(he); + + /* Flag this as a port where the corresponding node has not been seen. */ + if (nn != (EFNodeName *) NULL) + nn->efnn_node->efnode_flags |= EF_PORT_NONODE; } if (nn != (EFNodeName *) NULL) { diff --git a/extflat/extflat.h b/extflat/extflat.h index 585ae40d..d7f847fd 100644 --- a/extflat/extflat.h +++ b/extflat/extflat.h @@ -221,6 +221,12 @@ typedef struct efnhdr * location is maintained so that the net fragment can be found. */ #define EF_UNIQUE_NODE 0x100 + /* + * EF_PORT_NONODE is used to mark a port for which no "node" + * record has been seen. When a corresponding node record is + * found, this flag is cleared. + */ +#define EF_PORT_NONODE 0x200 extern int efNumResistClasses; /* Number of resistance classes in efResists */ diff --git a/lef/defWrite.c b/lef/defWrite.c index 4a2b9334..7f091cfd 100644 --- a/lef/defWrite.c +++ b/lef/defWrite.c @@ -295,9 +295,6 @@ defnodeCount(node, res, cap, total) char ndn[256]; char *cp, clast; - /* Ignore ports---use the unique node entries instead */ - if (node->efnode_flags & EF_TOP_PORT) return 0; - /* Ignore the substrate node if it is not connected to any routing */ if (node->efnode_type == TT_SPACE) return 0; @@ -672,9 +669,6 @@ defnodeVisit(node, res, cap, defdata) EFNodeName *thisnn; int defNetGeometryFunc(); /* Forward declaration */ - /* Ignore ports---use the unique node entries instead */ - if (node->efnode_flags & EF_TOP_PORT) return 0; - /* For regular nets, only count those nodes having port */ /* connections. For special nets, only count those nodes */ /* that were marked with the EF_SPECIAL flag while counting */