diff --git a/database/DBio.c b/database/DBio.c index 73286bbb..b384307b 100644 --- a/database/DBio.c +++ b/database/DBio.c @@ -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++) { diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index b1fa2032..8047275e 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -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; } diff --git a/extract/ExtCell.c b/extract/ExtCell.c index 025b4e52..14b9faa0 100644 --- a/extract/ExtCell.c +++ b/extract/ExtCell.c @@ -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); diff --git a/extract/ExtMain.c b/extract/ExtMain.c index 27b9e2d1..96588810 100644 --- a/extract/ExtMain.c +++ b/extract/ExtMain.c @@ -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); } diff --git a/extract/ExtRegion.c b/extract/ExtRegion.c index 658d272c..798c69b8 100644 --- a/extract/ExtRegion.c +++ b/extract/ExtRegion.c @@ -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)) diff --git a/extract/ExtYank.c b/extract/ExtYank.c index 05eb7e5a..ace872ee 100644 --- a/extract/ExtYank.c +++ b/extract/ExtYank.c @@ -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); } diff --git a/extract/extractInt.h b/extract/extractInt.h index 568df727..f258b207 100644 --- a/extract/extractInt.h +++ b/extract/extractInt.h @@ -100,19 +100,19 @@ typedef struct ll */ } LabelList; -#define LL_NOATTR -1 /* Value for ll_attr above if the label is +#define LL_NOATTR -1 /* Value for ll_attr above if the label is * not a transistor attribute. */ -#define LL_GATEATTR -2 /* Value for ll_attr if the label is a gate +#define LL_GATEATTR -2 /* Value for ll_attr if the label is a gate * attribute, rather than one of the diffusion * terminals' attributes. */ -#define LL_SORTATTR -3 /* value for ll_attr used in +#define LL_SORTATTR -3 /* value for ll_attr used in * ExtBasic.c/ExtSortTerminals() to swap * the attributes as well as the regions * -- Stefanos 5/96 */ -#define LL_PORTATTR -4 /* value for ll_attr used to declare +#define LL_PORTATTR -4 /* value for ll_attr used to declare * the label to be a subcircuit port * -- Tim 5/02 */