Modified the extraction code to work around a problem created some
time ago by cleaning up excess usage of "equiv" lines in the .ext file output. The hierarchical extraction code did not distinguish between node names which were output and those that were not, requiring a setting "extract do aliases" to force all node aliases to be output with "equiv" statements. So hierarchical names might be any alias, whether output or not, and "merge" and "cap" lines might contain references to nodes that were not output, causing them to be disconnected nodes. This fix handles the "extract no aliases" (default) case by flagging node names that are redundant and not output, and not creating hierarchical names with them.
This commit is contained in:
parent
453d276f20
commit
d4961f244d
|
|
@ -2409,7 +2409,7 @@ dbReadLabels(cellDef, line, len, f, scalen, scaled)
|
|||
else if (line[0] == 'p')
|
||||
{
|
||||
char ppos[5], *pptr;
|
||||
int idx;
|
||||
int idx = 0;
|
||||
Label *lab;
|
||||
|
||||
if (((lab = cellDef->cd_lastLabel) == NULL) ||
|
||||
|
|
@ -2421,7 +2421,6 @@ dbReadLabels(cellDef, line, len, f, scalen, scaled)
|
|||
TxError("Skipping bad \"port\" line: %s", line);
|
||||
goto nextlabel;
|
||||
}
|
||||
/* lab->lab_flags &= ~LABEL_STICKY; */
|
||||
lab->lab_port = idx;
|
||||
for (pptr = &ppos[0]; *pptr != '\0'; pptr++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -777,6 +777,13 @@ extOutputNodes(nodeList, outFile)
|
|||
if (!isPort && (ll->ll_attr == LL_PORTATTR))
|
||||
portname = ll->ll_label->lab_text;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Label is not recorded an an alias, so */
|
||||
/* mark the label so that it will not be */
|
||||
/* used for extracting merges or caps. */
|
||||
ll->ll_label->lab_port = INFINITY;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -384,12 +384,18 @@ extCellFile(def, f, doLength)
|
|||
{
|
||||
NodeRegion *reg;
|
||||
Plane *saveSub;
|
||||
Label *lab;
|
||||
|
||||
UndoDisable();
|
||||
|
||||
/* Prep any isolated substrate areas */
|
||||
saveSub = extPrepSubstrate(def);
|
||||
|
||||
/* Remove any label markers that were made by a previous extraction */
|
||||
for (lab = def->cd_labels; lab; lab = lab->lab_next)
|
||||
if (lab->lab_port == INFINITY)
|
||||
lab->lab_port = 0;
|
||||
|
||||
/* Output the header: timestamp, technology, calls on cell uses */
|
||||
if (!SigInterruptPending) extHeader(def, f);
|
||||
|
||||
|
|
|
|||
|
|
@ -703,9 +703,6 @@ extExtractStack(stack, doExtract, rootDef)
|
|||
for (; sl; sl = sl->sl_next)
|
||||
{
|
||||
ExtRevertSubstrate(sl->sl_def, sl->sl_plane);
|
||||
// DBFreePaintPlane(sl->sl_plane);
|
||||
// TiFreePlane(sl->sl_plane);
|
||||
|
||||
freeMagic(sl);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -215,6 +215,13 @@ ExtLabelRegions(def, connTo, nodeList, clipArea)
|
|||
pNum = DBPlane(lab->lab_type);
|
||||
if (lab->lab_type == TT_SPACE || pNum < PL_TECHDEPBASE)
|
||||
continue;
|
||||
/*
|
||||
* See ExtBasic.c: Labels that do not get output as "equiv"
|
||||
* records in the .ext file cannot be used for merges and
|
||||
* caps.
|
||||
*/
|
||||
if (lab->lab_port == INFINITY) continue;
|
||||
|
||||
for (quad = 0; quad < 4; quad++)
|
||||
{
|
||||
/*
|
||||
|
|
@ -247,11 +254,11 @@ ExtLabelRegions(def, connTo, nodeList, clipArea)
|
|||
}
|
||||
if ((found == FALSE) && (nodeList != NULL))
|
||||
{
|
||||
// Unconnected node label. This may be a "sticky label".
|
||||
// If it is not connected to TT_SPACE, then create a new
|
||||
// node region for it.
|
||||
// (3/24/2015---changed from GEO_LABEL_IN_AREA to GEO_SURROUND)
|
||||
|
||||
/* Unconnected node label. This may be a "sticky label".
|
||||
* If it is not connected to TT_SPACE, then create a new
|
||||
* node region for it.
|
||||
* (3/24/2015---changed from GEO_LABEL_IN_AREA to GEO_SURROUND)
|
||||
*/
|
||||
if ((GEO_SURROUND(&lab->lab_rect, clipArea) ||
|
||||
GEO_TOUCH(&lab->lab_rect, clipArea))
|
||||
&& (lab->lab_type != TT_SPACE))
|
||||
|
|
|
|||
|
|
@ -181,7 +181,6 @@ extHierYankFunc(use, trans, x, y, hy)
|
|||
scx.scx_y = y;
|
||||
|
||||
/* Yank the paint */
|
||||
// if (!DBIsSubcircuit(use->cu_def))
|
||||
DBCellCopyAllPaint(&scx, &DBAllButSpaceBits, 0, hy->hy_target);
|
||||
|
||||
/* Yank the labels */
|
||||
|
|
@ -232,6 +231,7 @@ extHierLabelFunc(scx, label, tpath, targetDef)
|
|||
newlab->lab_just = GeoTransPos(&scx->scx_trans, label->lab_just);
|
||||
newlab->lab_type = label->lab_type;
|
||||
newlab->lab_flags = label->lab_flags;
|
||||
newlab->lab_port = label->lab_port;
|
||||
dstp = newlab->lab_text;
|
||||
for (srcp = tpath->tp_first; *dstp++ = *srcp++; )
|
||||
/* Nothing */;
|
||||
|
|
@ -241,24 +241,5 @@ extHierLabelFunc(scx, label, tpath, targetDef)
|
|||
newlab->lab_next = targetDef->cd_labels;
|
||||
targetDef->cd_labels = newlab;
|
||||
|
||||
/* Add paint inside label if this is a subcircuit */
|
||||
/* Caveat: If label has zero area, it will be extended by 1 unit */
|
||||
|
||||
// if (label->lab_flags & PORT_DIR_MASK)
|
||||
// {
|
||||
// int pNum;
|
||||
//
|
||||
// /* Is extending the label area valid in all cases? */
|
||||
// if (newlab->lab_rect.r_xbot == newlab->lab_rect.r_xtop)
|
||||
// newlab->lab_rect.r_xtop++;
|
||||
// if (newlab->lab_rect.r_ybot == newlab->lab_rect.r_ytop)
|
||||
// newlab->lab_rect.r_ytop++;
|
||||
//
|
||||
// pNum = DBPlane(newlab->lab_type);
|
||||
// DBPaintPlane(targetDef->cd_planes[pNum], &newlab->lab_rect,
|
||||
// DBStdPaintTbl(newlab->lab_type, pNum),
|
||||
// (PaintUndoInfo *) NULL);
|
||||
// }
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue