diff --git a/calma/CalmaRead.c b/calma/CalmaRead.c index 9421a9af..0f4cab1d 100644 --- a/calma/CalmaRead.c +++ b/calma/CalmaRead.c @@ -227,7 +227,7 @@ done: if (mw != NULL) { if (calmaLookCell(libname, NULL) != (CellDef *)NULL) - DBWloadWindow(mw, libname, FALSE); + DBWloadWindow(mw, libname, FALSE, FALSE); } freeMagic(libname); } diff --git a/calma/CalmaWrite.c b/calma/CalmaWrite.c index 8a8842f3..0480238f 100644 --- a/calma/CalmaWrite.c +++ b/calma/CalmaWrite.c @@ -746,7 +746,7 @@ calmaProcessDef(def, outf) /* Read the cell in if it is not already available. */ if ((def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return (0); /* diff --git a/cif/CIFwrite.c b/cif/CIFwrite.c index 59ff26a5..147be067 100644 --- a/cif/CIFwrite.c +++ b/cif/CIFwrite.c @@ -312,7 +312,7 @@ cifOut(outf) /* Read the cell in if it is not already available. */ if ((def->cd_flags & CDAVAILABLE) == 0) { - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) continue; + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) continue; } /* Add any subcells to the stack. This must be done before diff --git a/commands/CmdCD.c b/commands/CmdCD.c index 88607b96..6fdcb4ad 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -3079,7 +3079,7 @@ CmdDown(w, cmd) GeoTransRect(&EditToRootTransform, &(EditCellUse->cu_def->cd_bbox), &area); (void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL, cmdEditRedisplayFunc, (ClientData) &area); - DBWloadWindow(w, EditCellUse->cu_def->cd_name, TRUE, FALSE); + DBWloadWindow(w, EditCellUse->cu_def->cd_name, TRUE, FALSE, FALSE); } /* Search function to find the new edit cell: look for a cell use @@ -3777,7 +3777,7 @@ cmdDumpParseArgs(cmdName, w, cmd, dummy, scx) * looked for then no new error message will be printed. */ def->cd_flags &= ~CDNOTFOUND; - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return (FALSE); DBReComputeBbox(def); dummy->cu_def = def; diff --git a/commands/CmdE.c b/commands/CmdE.c index 7be73fe8..57883c25 100644 --- a/commands/CmdE.c +++ b/commands/CmdE.c @@ -130,7 +130,7 @@ CmdEdit(w, cmd) return; } else if (!(EditCellUse->cu_def->cd_flags & CDAVAILABLE)) - DBCellRead(EditCellUse->cu_def, (char *)NULL, TRUE, NULL); + DBCellRead(EditCellUse->cu_def, (char *)NULL, TRUE, FALSE, NULL); if (EditCellUse->cu_def->cd_flags & CDNOEDIT) { diff --git a/commands/CmdLQ.c b/commands/CmdLQ.c index 02c04b6f..8427fb8d 100644 --- a/commands/CmdLQ.c +++ b/commands/CmdLQ.c @@ -318,7 +318,7 @@ CmdLabel(w, cmd) * Implement the "load" command. * * Usage: - * load [name [scaled n [d]]] [-force] [-nowindow] + * load [name [scaled n [d]]] [-force] [-nowindow] [-dereference] * * If name is supplied, then the window containing the point tool is * remapped so as to edit the cell with the given name. @@ -331,6 +331,13 @@ CmdLabel(w, cmd) * An input file can be scaled by specifying the "scaled" option, for * which the geometry of the input file is multiplied by n/d. * + * Magic saves the path to instances to ensure correct versioning. But + * this interferes with attempts to re-link instances from a different + * location (such as an abstract view instead of a full view, or vice + * versa). So the "-dereference" option strips the instance paths from + * the input file and relies only on the search locations set up by the + * "path" command to find the location of instances. + * * Results: * None. * @@ -350,6 +357,7 @@ CmdLoad(w, cmd) int locargc = cmd->tx_argc; bool ignoreTech = FALSE; bool noWindow = FALSE; + bool dereference = FALSE; int keepGoing(); /* forward declaration */ if (locargc > 2) @@ -359,6 +367,11 @@ CmdLoad(w, cmd) locargc--; noWindow = TRUE; } + if (!strncmp(cmd->tx_argv[locargc - 1], "-deref", 5)) + { + locargc--; + dereference = TRUE; + } if (!strncmp(cmd->tx_argv[locargc - 1], "-force", 6)) { locargc--; @@ -372,7 +385,8 @@ CmdLoad(w, cmd) d = atoi(cmd->tx_argv[4]); else if (locargc != 4) { - TxError("Usage: %s name scaled n [d] [-force] [-nowindow]\n", + TxError("Usage: %s name scaled n [d] [-force] " + "[-nowindow] [-dereference]\n", cmd->tx_argv[0]); return; } @@ -380,9 +394,10 @@ CmdLoad(w, cmd) DBLambda[1] *= n; ReduceFraction(&DBLambda[0], &DBLambda[1]); } - else if (!ignoreTech && !noWindow) + else if (!ignoreTech && !noWindow && !dereference) { - TxError("Usage: %s name [scaled n [d]] [-force] [-nowindow]\n", + TxError("Usage: %s name [scaled n [d]] [-force] " + "[-nowindow] [-dereference]\n", cmd->tx_argv[0]); return; } @@ -408,7 +423,7 @@ CmdLoad(w, cmd) } #endif DBWloadWindow((noWindow == TRUE) ? NULL : w, cmd->tx_argv[1], - ignoreTech, FALSE); + ignoreTech, FALSE, dereference); if ((n > 1) || (d > 1)) { @@ -441,7 +456,7 @@ CmdLoad(w, cmd) ReduceFraction(&DBLambda[0], &DBLambda[1]); } } - else DBWloadWindow(w, (char *) NULL, TRUE, FALSE); + else DBWloadWindow(w, (char *) NULL, TRUE, FALSE, FALSE); } /* diff --git a/commands/CmdSubrs.c b/commands/CmdSubrs.c index bdb34cce..ec63be1c 100644 --- a/commands/CmdSubrs.c +++ b/commands/CmdSubrs.c @@ -309,7 +309,7 @@ cmdFlushCell(def) } DBCellClearDef(def); DBCellClearAvail(def); - (void) DBCellRead(def, (char *) NULL, TRUE, NULL); + (void) DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL); DBCellSetAvail(def); DBReComputeBbox(def); DBCellSetModified(def, FALSE); diff --git a/commands/CmdTZ.c b/commands/CmdTZ.c index ff9559d9..d21e3cbb 100644 --- a/commands/CmdTZ.c +++ b/commands/CmdTZ.c @@ -1885,9 +1885,9 @@ CmdXload(w, cmd) { if (CmdIllegalChars(cmd->tx_argv[1], "[],", "Cell name")) return; - DBWloadWindow(w, cmd->tx_argv[1], FALSE, TRUE); + DBWloadWindow(w, cmd->tx_argv[1], FALSE, TRUE, FALSE); } - else DBWloadWindow(w, (char *) NULL, FALSE, TRUE); + else DBWloadWindow(w, (char *) NULL, FALSE, TRUE, FALSE); } /* diff --git a/database/DBcellsrch.c b/database/DBcellsrch.c index 5590f230..e1dae80d 100644 --- a/database/DBcellsrch.c +++ b/database/DBcellsrch.c @@ -188,7 +188,7 @@ dbCellTileSrFunc(scx, fp) if (!DBDescendSubcell(scx->scx_use, fp->tf_xmask)) return 0; if ((def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) return 0; + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return 0; context.tc_scx = scx; context.tc_filter = fp; @@ -307,7 +307,7 @@ dbCellUniqueTileSrFunc(scx, fp) if (!DBDescendSubcell(scx->scx_use, fp->tf_xmask)) return 0; if ((def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) return 0; + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return 0; context.tc_scx = scx; context.tc_filter = fp; @@ -418,7 +418,7 @@ DBNoTreeSrTiles(scx, mask, xMask, func, cdarg) return 0; if ((def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) return 0; + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return 0; filter.tf_func = func; filter.tf_arg = cdarg; @@ -526,7 +526,7 @@ DBTreeSrLabels(scx, mask, xMask, tpath, flags, func, cdarg) ASSERT(def != (CellDef *) NULL, "DBTreeSrLabels"); if (!DBDescendSubcell(cellUse, xMask)) return 0; if ((def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) return 0; + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return 0; for (lab = def->cd_labels; lab; lab = lab->lab_next) { @@ -627,7 +627,7 @@ dbCellLabelSrFunc(scx, fp) ASSERT(def != (CellDef *) NULL, "dbCellLabelSrFunc"); if (!DBDescendSubcell(scx->scx_use, fp->tf_xmask)) return 0; if ((def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) return 0; + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return 0; if (fp->tf_tpath != (TerminalPath *) NULL) { @@ -741,7 +741,7 @@ DBTreeSrCells(scx, xMask, func, cdarg) if (!DBDescendSubcell(cellUse, xMask)) return 0; if ((cellUse->cu_def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(cellUse->cu_def, (char *) NULL, TRUE, NULL)) + if (!DBCellRead(cellUse->cu_def, (char *) NULL, TRUE, FALSE, NULL)) return 0; context.tc_scx = scx; @@ -787,7 +787,7 @@ dbTreeCellSrFunc(scx, fp) else { if ((use->cu_def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(use->cu_def, (char *) NULL, TRUE, NULL)) + if (!DBCellRead(use->cu_def, (char *) NULL, TRUE, FALSE, NULL)) return 0; result = DBCellSrArea(scx, dbTreeCellSrFunc, (ClientData) fp); } @@ -1039,7 +1039,7 @@ DBCellSrArea(scx, func, cdarg) context.tc_scx = scx; if ((scx->scx_use->cu_def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(scx->scx_use->cu_def, (char *) NULL, TRUE, NULL)) + if (!DBCellRead(scx->scx_use->cu_def, (char *) NULL, TRUE, FALSE, NULL)) return 0; /* In order to make this work with zero-size areas, we first expand @@ -1215,7 +1215,7 @@ DBCellEnum(cellDef, func, cdarg) filter.tf_func = func; filter.tf_arg = cdarg; if ((cellDef->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(cellDef, (char *) NULL, TRUE, NULL)) return 0; + if (!DBCellRead(cellDef, (char *) NULL, TRUE, FALSE, NULL)) return 0; if (TiSrArea((Tile *) NULL, cellDef->cd_planes[PL_CELL], &TiPlaneRect, dbEnumFunc, (ClientData) &filter)) return 1; diff --git a/database/DBcellsubr.c b/database/DBcellsubr.c index 4b9f96a8..9eaabcac 100644 --- a/database/DBcellsubr.c +++ b/database/DBcellsubr.c @@ -73,7 +73,7 @@ DBDescendSubcell(use, xMask) case CU_DESCEND_NO_SUBCKT: if ((use->cu_def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(use->cu_def, (char *) NULL, TRUE, NULL)) + if (!DBCellRead(use->cu_def, (char *) NULL, TRUE, FALSE, NULL)) return FALSE; return (DBIsSubcircuit(use->cu_def)) ? FALSE : TRUE; diff --git a/database/DBexpand.c b/database/DBexpand.c index 981748c8..db0548f6 100644 --- a/database/DBexpand.c +++ b/database/DBexpand.c @@ -81,7 +81,7 @@ DBExpand(cellUse, expandMask, expandFlag) def = cellUse->cu_def; if ((def->cd_flags & CDAVAILABLE) == 0) { - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return; /* Note: we don't have to recompute the bbox here, because * if it changed, then a timestamp violation must have occurred @@ -144,7 +144,7 @@ DBExpandAll(rootUse, rootRect, expandMask, expandFlag, func, cdarg) struct expandArg arg; if ((rootUse->cu_def->cd_flags & CDAVAILABLE) == 0) - (void) DBCellRead(rootUse->cu_def, (char *) NULL, TRUE, NULL); + (void) DBCellRead(rootUse->cu_def, (char *) NULL, TRUE, FALSE, NULL); /* * Walk through the area and set the expansion state @@ -193,7 +193,7 @@ dbExpandFunc(scx, arg) /* If the cell is unavailable, then don't expand it. */ if ((childUse->cu_def->cd_flags & CDAVAILABLE) == 0) - if(!DBCellRead(childUse->cu_def, (char *) NULL, TRUE, NULL)) + if(!DBCellRead(childUse->cu_def, (char *) NULL, TRUE, FALSE, NULL)) { TxError("Cell %s is unavailable. It could not be expanded.\n", childUse->cu_def->cd_name); @@ -303,7 +303,7 @@ dbReadAreaFunc(scx) if ((def->cd_flags & CDAVAILABLE) == 0) { - (void) DBCellRead(def, (char *) NULL, TRUE, NULL); + (void) DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL); /* Note: we don't have to invoke DBReComputeBbox here because * if the bbox changed then there was a timestamp mismatch and * the timestamp code will take care of the bounding box later. diff --git a/database/DBio.c b/database/DBio.c index 9afe30f3..f27e8d18 100644 --- a/database/DBio.c +++ b/database/DBio.c @@ -264,7 +264,7 @@ file_is_not_writeable(name) */ bool -dbCellReadDef(f, cellDef, name, ignoreTech) +dbCellReadDef(f, cellDef, name, ignoreTech, dereference) FILE *f; /* The file, already opened by the caller */ CellDef *cellDef; /* Pointer to definition of cell to be read in */ char *name; /* Name of file from which to read definition. @@ -279,6 +279,7 @@ dbCellReadDef(f, cellDef, name, ignoreTech) * names do not match, but an attempt will be * made to read the file anyway. */ + bool dereference; /* If TRUE, ignore path references in the input */ { int cellStamp = 0, rectCount = 0, rectReport = 10000; char line[2048], tech[50], layername[50]; @@ -437,7 +438,7 @@ dbCellReadDef(f, cellDef, name, ignoreTech) */ if (sscanf(line, "<< %s >>", layername) != 1) { - if (!dbReadUse(cellDef, line, sizeof line, f, n, d)) + if (!dbReadUse(cellDef, line, sizeof line, f, n, d, dereference)) goto badfile; continue; } @@ -863,7 +864,7 @@ DBReadBackup(name) cellDef->cd_flags &= ~CDNOTFOUND; cellDef->cd_flags |= CDAVAILABLE; - if (dbCellReadDef(f, cellDef, filename, TRUE) == FALSE) + if (dbCellReadDef(f, cellDef, filename, TRUE, FALSE) == FALSE) return FALSE; if (dbFgets(line, sizeof(line), f) == NULL) @@ -919,7 +920,7 @@ DBReadBackup(name) */ bool -DBCellRead(cellDef, name, ignoreTech, errptr) +DBCellRead(cellDef, name, ignoreTech, dereference, errptr) CellDef *cellDef; /* Pointer to definition of cell to be read in */ char *name; /* Name of file from which to read definition. * If NULL, then use cellDef->cd_file; if that @@ -933,6 +934,7 @@ DBCellRead(cellDef, name, ignoreTech, errptr) * names do not match, but an attempt will be * made to read the file anyway. */ + bool dereference; /* If TRUE, ignore path references in the input */ int *errptr; /* Copy of errno set by file reading routine * is placed here, unless NULL. */ @@ -950,7 +952,7 @@ DBCellRead(cellDef, name, ignoreTech, errptr) else { - result = (dbCellReadDef(f, cellDef, name, ignoreTech)); + result = (dbCellReadDef(f, cellDef, name, ignoreTech, dereference)); #ifdef FILE_LOCKS /* Close files that were locked by another user */ @@ -1193,13 +1195,14 @@ DBTestOpen(name, fullPath) */ bool -dbReadUse(cellDef, line, len, f, scalen, scaled) +dbReadUse(cellDef, line, len, f, scalen, scaled, dereference) CellDef *cellDef; /* Cell whose cells are being read */ char *line; /* Line containing "use ..." */ int len; /* Size of buffer pointed to by line */ FILE *f; /* Input file */ int scalen; /* Multiply values in file by this */ int scaled; /* Divide values in file by this */ + bool dereference; /* If TRUE, ignore path references */ { int xlo, xhi, ylo, yhi, xsep, ysep, childStamp; int absa, absb, absd, abse, nconv; @@ -1230,7 +1233,7 @@ dbReadUse(cellDef, line, len, f, scalen, scaled) pathptr = &path[0]; while (*pathptr == ' ' || *pathptr == '\t') pathptr++; - if (*pathptr == '\n') *pathptr = '\0'; + if ((dereference == TRUE) || (*pathptr == '\n')) *pathptr = '\0'; locked = (useid[0] == CULOCKCHAR) ? TRUE : FALSE; @@ -2840,7 +2843,7 @@ DBCellWrite(cellDef, fileName) #ifdef FILE_LOCKS else /* Re-aquire the lock on the new file by opening it. */ - DBCellRead(cellDef, NULL, TRUE, NULL); + DBCellRead(cellDef, NULL, TRUE, FALSE, NULL); #endif } diff --git a/database/DBlabel2.c b/database/DBlabel2.c index 9ddba125..8fda3f99 100644 --- a/database/DBlabel2.c +++ b/database/DBlabel2.c @@ -294,7 +294,7 @@ DBTreeFindUse(name, use, scx) * is read in from disk. */ if ((def->cd_flags & CDAVAILABLE) == 0) - (void) DBCellRead(def, (char *) NULL, TRUE, NULL); + (void) DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL); cp = name; he = HashLookOnly(&def->cd_idHash, name); @@ -343,7 +343,7 @@ DBTreeFindUse(name, use, scx) /* Ensure that the leaf cell is read in */ def = use->cu_def; if ((def->cd_flags & CDAVAILABLE) == 0) - (void) DBCellRead(def, (char *) NULL, TRUE, NULL); + (void) DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL); scx->scx_use = use; } diff --git a/database/DBtimestmp.c b/database/DBtimestmp.c index d33b20fa..516135c1 100644 --- a/database/DBtimestmp.c +++ b/database/DBtimestmp.c @@ -137,7 +137,7 @@ DBFixMismatch() mismatch = mismatch->mm_next; if (cellDef->cd_flags & CDPROCESSED) continue; - (void) DBCellRead(cellDef, (char *) NULL, TRUE, NULL); + (void) DBCellRead(cellDef, (char *) NULL, TRUE, FALSE, NULL); /* Jimmy up the cell's current bounding box, so the following * procedure call will absolutely and positively know that diff --git a/dbwind/DBWprocs.c b/dbwind/DBWprocs.c index aab82f5a..56578625 100644 --- a/dbwind/DBWprocs.c +++ b/dbwind/DBWprocs.c @@ -127,10 +127,10 @@ DBWcreate(window, argc, argv) window->w_clientData = (ClientData) crec; if (argc > 0) - DBWloadWindow(window, argv[0], TRUE, FALSE); + DBWloadWindow(window, argv[0], TRUE, FALSE, FALSE); else if (ToolGetBox(&boxDef, &box)) { - DBWloadWindow(window, boxDef->cd_name, TRUE, FALSE); + DBWloadWindow(window, boxDef->cd_name, TRUE, FALSE, FALSE); /* Zoom in on the box, leaving a 10% border or at least 2 units * on each side. @@ -148,7 +148,7 @@ DBWcreate(window, argc, argv) } else { - DBWloadWindow(window, (char *) NULL, TRUE, FALSE); + DBWloadWindow(window, (char *) NULL, TRUE, FALSE, FALSE); } return TRUE; } @@ -249,7 +249,7 @@ dbwReloadFunc(w, name) MagWindow *w; char *name; { - DBWloadWindow(w, name, TRUE, FALSE); + DBWloadWindow(w, name, TRUE, FALSE, FALSE); return (0); } @@ -274,18 +274,20 @@ dbwReloadFunc(w, name) * cell doesn't change. * * If "expand" is true, unexpands all subcells of the root cell. + * If "dereference" is true, ignore path reference in the input file. * * ---------------------------------------------------------------------------- */ void -DBWloadWindow(window, name, ignoreTech, expand) +DBWloadWindow(window, name, ignoreTech, expand, dereference) MagWindow *window; /* Identifies window to which cell is to be bound */ char *name; /* Name of new cell to be bound to this window */ bool ignoreTech; /* If FALSE, indicates that the technology of * the layout must match the current technology. */ bool expand; /* Indicates whether or not to expand the cell */ + bool dereference; /* If TRUE, ignore path references in the input */ { CellDef *newEditDef; CellUse *newEditUse; @@ -383,7 +385,7 @@ DBWloadWindow(window, name, ignoreTech, expand) if (newEditDef == (CellDef *) NULL) newEditDef = DBCellNewDef(rootname, (char *) NULL); - if (!DBCellRead(newEditDef, name, ignoreTech, &error_val)) + if (!DBCellRead(newEditDef, name, ignoreTech, dereference, &error_val)) { if (error_val == ENOENT) { diff --git a/drc/DRCmain.c b/drc/DRCmain.c index 8b2d0a8c..b1906713 100644 --- a/drc/DRCmain.c +++ b/drc/DRCmain.c @@ -969,7 +969,7 @@ drcFindFunc(scx, finddata) if (HashGetValue(h) != 0) return 0; HashSetValue(h, 1); - (void) DBCellRead(def, (char *) NULL, TRUE, NULL); + (void) DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL); if (DBSrPaintArea((Tile *) NULL, def->cd_planes[PL_DRC_ERROR], &def->cd_bbox, &DBAllButSpaceBits, drcFindFunc2, diff --git a/extflat/EFflat.c b/extflat/EFflat.c index bd02d9c9..8708259f 100644 --- a/extflat/EFflat.c +++ b/extflat/EFflat.c @@ -59,7 +59,8 @@ bool efFlatGlobCmp(HierName *, HierName *); char *efFlatGlobCopy(HierName *); void efFlatGlobError(EFNodeName *, EFNodeName *); int efAddNodes(HierContext *, bool); -int efAddOneConn(HierContext *, char *, char *, Connection *); +int efAddConns(HierContext *, bool); +int efAddOneConn(HierContext *, char *, char *, Connection *, bool); /* @@ -193,8 +194,11 @@ EFFlatBuildOneLevel(def, flags) efFlatContext.hc_x = efFlatContext.hc_y = 0; efFlatRootUse.use_def = efFlatRootDef; + /* NOTE: Do the following two routines need to be deeper than one level? */ /* Record all nodes of the next level in the hierarchy */ efHierSrUses(&efFlatContext, efAddNodes, (ClientData)TRUE); + /* Record those connections as well. */ + efHierSrUses(&efFlatContext, efAddConns, (ClientData)FALSE); /* Expand all subcells that contain connectivity information but */ /* no active devices (including those in subcells). */ @@ -210,7 +214,7 @@ EFFlatBuildOneLevel(def, flags) /* Record all local nodes */ efAddNodes(&efFlatContext, FALSE); - efAddConns(&efFlatContext); + efAddConns(&efFlatContext, TRUE); efFlatKills(&efFlatContext); if (!(flags & EF_NONAMEMERGE)) @@ -300,7 +304,7 @@ efFlatNodes(hc) efAddNodes(hc, FALSE); /* Process our own connections and adjustments */ - (void) efAddConns(hc); + (void) efAddConns(hc, TRUE); return (0); } @@ -352,7 +356,7 @@ efFlatNodesStdCell(hc) /* Process our own connections and adjustments */ if (!(hc->hc_use->use_def->def_flags & DEF_SUBCIRCUIT)) - (void) efAddConns(hc); + (void) efAddConns(hc, TRUE); return (0); } @@ -378,7 +382,7 @@ efFlatNodesDeviceless(hc, cdata) efAddNodes(hc, TRUE); /* Process our own connections and adjustments */ - efAddConns(hc); + efAddConns(hc, TRUE); /* Mark this definition as having no devices, so it will not be visited */ hc->hc_use->use_def->def_flags |= DEF_NODEVICES; @@ -562,8 +566,9 @@ efAddNodes(hc, stdcell) */ int -efAddConns(hc) +efAddConns(hc, doWarn) HierContext *hc; + bool doWarn; { Connection *conn; @@ -576,9 +581,9 @@ efAddConns(hc) { /* Special case for speed when no array info is present */ if (conn->conn_1.cn_nsubs == 0) - efAddOneConn(hc, conn->conn_name1, conn->conn_name2, conn); + efAddOneConn(hc, conn->conn_name1, conn->conn_name2, conn, doWarn); else - efHierSrArray(hc, conn, efAddOneConn, (ClientData) NULL); + efHierSrArray(hc, conn, efAddOneConn, (ClientData)doWarn); } return (0); @@ -605,16 +610,17 @@ efAddConns(hc) */ int -efAddOneConn(hc, name1, name2, conn) +efAddOneConn(hc, name1, name2, conn, doWarn) HierContext *hc; char *name1, *name2; /* These are strings, not HierNames */ Connection *conn; + bool doWarn; { HashEntry *he1, *he2; EFNode *node, *newnode; int n; - he1 = EFHNLook(hc->hc_hierName, name1, "connect(1)"); + he1 = EFHNLook(hc->hc_hierName, name1, (doWarn) ? "connect(1)" : NULL); if (he1 == NULL) return 0; @@ -630,7 +636,7 @@ efAddOneConn(hc, name1, name2, conn) /* Merge this node with conn_name2 if one was specified */ if (name2) { - he2 = EFHNLook(hc->hc_hierName, name2, "connect(2)"); + he2 = EFHNLook(hc->hc_hierName, name2, (doWarn) ? "connect(2)" : NULL); if (he2 == NULL) return 0; newnode = ((EFNodeName *) HashGetValue(he2))->efnn_node; diff --git a/extract/ExtInter.c b/extract/ExtInter.c index e0626faa..604e54f3 100644 --- a/extract/ExtInter.c +++ b/extract/ExtInter.c @@ -424,7 +424,7 @@ extTreeSrPaintArea(scx, func, cdarg) int pNum; if ((def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) return 0; + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return 0; filter.tf_func = func; filter.tf_arg = cdarg; @@ -461,7 +461,7 @@ extTreeSrFunc(scx, fp) int pNum; if ((def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) return (0); + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return (0); context.tc_scx = scx; context.tc_filter = fp; @@ -548,7 +548,7 @@ extCellSrArea(scx, func, cdarg) filter.tf_arg = cdarg; if ((scx->scx_use->cu_def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(scx->scx_use->cu_def, (char *) NULL, TRUE, NULL)) + if (!DBCellRead(scx->scx_use->cu_def, (char *) NULL, TRUE, FALSE, NULL)) return 0; /* diff --git a/graphics/W3Dmain.c b/graphics/W3Dmain.c index 55c561df..90a4e205 100644 --- a/graphics/W3Dmain.c +++ b/graphics/W3Dmain.c @@ -1394,7 +1394,7 @@ W3DloadWindow(window, name) if (newEditDef == (CellDef *)NULL) return FALSE; - if (!DBCellRead(newEditDef, (char *)NULL, TRUE, NULL)) + if (!DBCellRead(newEditDef, (char *)NULL, TRUE, FALSE, NULL)) return FALSE; DBReComputeBbox(newEditDef); diff --git a/lef/defRead.c b/lef/defRead.c index a9026263..f890b3ca 100644 --- a/lef/defRead.c +++ b/lef/defRead.c @@ -1491,7 +1491,7 @@ DefReadComponents(f, rootDef, sname, oscale, total) /* magic .mag layout file. */ defMacro = DBCellNewDef(token, (char *)NULL); defMacro->cd_flags &= ~CDNOTFOUND; - if (!DBCellRead(defMacro, (char *)NULL, TRUE, NULL)) + if (!DBCellRead(defMacro, (char *)NULL, TRUE, FALSE, NULL)) { LefError(DEF_ERROR, "Cell %s is not defined. Maybe you " "have not read the corresponding LEF file?\n", diff --git a/sim/SimDBstuff.c b/sim/SimDBstuff.c index 72092caf..05a89a4c 100644 --- a/sim/SimDBstuff.c +++ b/sim/SimDBstuff.c @@ -789,7 +789,7 @@ SimCellTileSrFunc(scx, fp) if (!DBDescendSubcell(scx->scx_use, fp->tf_xmask)) return 0; if ((def->cd_flags & CDAVAILABLE) == 0) - if (!DBCellRead(def, (char *) NULL, TRUE, NULL)) return 0; + if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return 0; context.tc_scx = scx; context.tc_filter = fp; diff --git a/windows/windView.c b/windows/windView.c index e535dcc9..eefff34e 100644 --- a/windows/windView.c +++ b/windows/windView.c @@ -95,7 +95,7 @@ WindUnload(surfaceID) for (mw = windTopWindow; mw != NULL; mw = mw->w_nextWindow) if (mw->w_surfaceID == surfaceID) - DBWloadWindow(mw, (char *)NULL, TRUE, FALSE); + DBWloadWindow(mw, (char *)NULL, TRUE, FALSE, FALSE); } /*