Corrected an error that was causing disconnects in the hierarchical

SPICE netlist output that appears to have come from flags created
for writing DEF that inappropriately got set during ext2spice.
A redundant call to efAddNodes() was adding confusion by appearing
to handle most cases but actually missing some.  With the corrected
flag, the redundant call is really redundant and can be removed.
It has not been tested whether DEF output is affected by the change
(DEF output from magic is rarely used, anyway).
This commit is contained in:
Tim Edwards 2021-03-01 11:08:25 -05:00
parent 114b9a59f7
commit 83808dcf79
2 changed files with 14 additions and 10 deletions

View File

@ -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)
{

View File

@ -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;
}