Moved the substrate plane/restore further out so that planes are

not restored until after all cells have been processed through
extraction.  Otherwise, top-down connections can end up with
different generated names for the same node, resulting in a
disconnect in the netlist.
This commit is contained in:
Tim Edwards
2021-04-05 16:03:54 -04:00
parent fca21c8fc0
commit f84de3676a
7 changed files with 51 additions and 14 deletions
+29 -1
View File
@@ -616,6 +616,16 @@ closeit:
return (ret);
}
/* Linked list structure to use to store the substrate plane from each */
/* extracted CellDef so that they can be returned to the original after */
/* extraction. */
struct saveList {
Plane *sl_plane;
CellDef *sl_def;
struct saveList *sl_next;
};
/*
* ----------------------------------------------------------------------------
*
@@ -645,7 +655,9 @@ extExtractStack(stack, doExtract, rootDef)
{
int fatal = 0, warnings = 0;
bool first = TRUE;
Plane *savePlane;
CellDef *def;
struct saveList *newsl, *sl = (struct saveList *)NULL;
while (def = (CellDef *) StackPop(stack))
{
@@ -654,7 +666,16 @@ extExtractStack(stack, doExtract, rootDef)
{
if (doExtract)
{
ExtCell(def, (char *) NULL, (def == rootDef));
savePlane = ExtCell(def, (char *) NULL, (def == rootDef));
if (savePlane != NULL)
{
newsl = (struct saveList *)mallocMagic(sizeof(struct saveList));
newsl->sl_plane = savePlane;
newsl->sl_def = def;
newsl->sl_next = sl;
sl = newsl;
}
fatal += extNumFatal;
warnings += extNumWarnings;
}
@@ -668,6 +689,13 @@ extExtractStack(stack, doExtract, rootDef)
}
}
/* Replace any modified substrate planes */
for (; sl; sl = sl->sl_next)
{
ExtRevertSubstrate(sl->sl_def, sl->sl_plane);
freeMagic(sl);
}
if (!doExtract)
{
TxPrintf("\n");