diff --git a/ext2spice/ext2hier.c b/ext2spice/ext2hier.c index b8dff398..90fc6404 100644 --- a/ext2spice/ext2hier.c +++ b/ext2spice/ext2hier.c @@ -81,6 +81,7 @@ ESGenerateHierarchy(inName, flags) hc.hc_hierName = NULL; hc.hc_trans = GeoIdentityTransform; hc.hc_x = hc.hc_y = 0; + EFHierSrDefs(&hc, esMakePorts, NULL); EFHierSrDefs(&hc, NULL, NULL); /* Clear processed */ @@ -1637,8 +1638,11 @@ esMakePorts(hc, cdata) *tptr = '/'; portname = tptr + 1; - // Find the net of portname in the subcell and - // make it a port if it is not already. + /* Find the net of portname in the subcell and make it a + * port if it is not already. It is possible that the + * preferred node name is in the merge list, so the merging + * code may need to replace it with another name. + */ if (portdef) { diff --git a/extflat/EFflat.c b/extflat/EFflat.c index 3c333dd1..516c1f50 100644 --- a/extflat/EFflat.c +++ b/extflat/EFflat.c @@ -204,7 +204,7 @@ EFFlatBuildOneLevel(def, flags) efFlatRootUse.use_def = efFlatRootDef; /* Record all nodes down the hierarchy from here */ - flatnodeflags = FLATNODE_STDCELL; /* No FLATDNODE_DOWARN flag */ + flatnodeflags = 0; /* No FLATNODE_DOWARN */ efFlatNodes(&efFlatContext, (ClientData)flatnodeflags); /* Expand all subcells that contain connectivity information but */ @@ -219,10 +219,6 @@ EFFlatBuildOneLevel(def, flags) if ((usecount == 0) && (HashGetNumEntries(&efFlatRootUse.use_def->def_devs) == 0)) efFlatRootUse.use_def->def_flags |= DEF_NODEVICES; - /* Record all local nodes */ - efAddNodes(&efFlatContext, FALSE); - efAddConns(&efFlatContext, TRUE); - efFlatKills(&efFlatContext); if (!(flags & EF_NONAMEMERGE)) efFlatGlob(); @@ -297,6 +293,9 @@ EFFlatDone() * Adds node names to the table of flattened node names efNodeHashTable. * May merge nodes from the list efNodeList as per the connection * list hc->hc_use->use_def->def_conns. + * + * Note: + * stdcell = TRUE is only used when writing DEF files. * * ---------------------------------------------------------------------------- */ @@ -499,15 +498,15 @@ efAddNodes(hc, stdcell) newnode->efnode_loc.r_ybot = (int)((float)(newnode->efnode_loc.r_ybot) * scale); newnode->efnode_loc.r_ytop = (int)((float)(newnode->efnode_loc.r_ytop) * scale); + /* Add each name for this node to the hash table */ + newnode->efnode_name = (EFNodeName *) NULL; + /* Prepend to global node list */ newnode->efnode_next = efNodeList.efnode_next; newnode->efnode_prev = (EFNodeHdr *) &efNodeList; efNodeList.efnode_next->efnhdr_prev = (EFNodeHdr *) newnode; efNodeList.efnode_next = (EFNodeHdr *) newnode; - /* Add each name for this node to the hash table */ - newnode->efnode_name = (EFNodeName *) NULL; - for (nn = node->efnode_name; nn; nn = nn->efnn_next) { /* @@ -557,6 +556,7 @@ efAddNodes(hc, stdcell) newnode->efnode_name = newname; } } + } return 0; }