From 3aa09725cb517e5e1b43d61b0f40f9d921db07cb Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 19 Nov 2019 11:39:59 -0500 Subject: [PATCH] Changed extraction to avoid generating an error message for devices like resistors where a tile other than space may border the resistor device on its non-terminal sides (which is handled correctly, and should not be considered an error). --- cif/CIFrdcl.c | 9 +++++++-- cif/CIFrdutils.c | 10 ++++++++-- extract/ExtBasic.c | 10 ++++++++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/cif/CIFrdcl.c b/cif/CIFrdcl.c index 23321977..a35797d3 100644 --- a/cif/CIFrdcl.c +++ b/cif/CIFrdcl.c @@ -1508,13 +1508,18 @@ CIFReadCellCleanup(filetype) freeMagic((char *)def->cd_client); def->cd_client = (ClientData)CLIENTDEFAULT; +#if 0 /* If the CDFLATTENED flag was not set, then this geometry */ - /* was never instantiated, and should generate a warning. */ + /* was never instantiated, and should generate a message. */ + /* However, this is not an error condition as there are a */ + /* number of useful reasons to copy lots of information up */ + /* the GDS hierarchy for "just in case" scenarios. */ if (!(def->cd_flags & CDFLATTENED)) - CIFReadError("%s read error: Unresolved geometry in cell" + CIFReadWarning("%s read: Unresolved geometry in cell" " %s maps to no magic layers\n", (filetype == FILE_CIF) ? "CIF" : "GDS", def->cd_name); +#endif #if 0 /* Remove the cell if it has no parents, no children, and no geometry */ diff --git a/cif/CIFrdutils.c b/cif/CIFrdutils.c index 9da32840..1e3a8fdd 100644 --- a/cif/CIFrdutils.c +++ b/cif/CIFrdutils.c @@ -120,7 +120,10 @@ CIFReadError(char *format, ...) if (CIFWarningLevel == CIF_WARN_NONE) return; if ((cifTotalErrors < 100) || (CIFWarningLevel != CIF_WARN_LIMIT)) { - TxError("Error at line %d of CIF file: ", cifLineNumber); + if (cifLineNumber > 0) + TxError("Error at line %d of CIF file: ", cifLineNumber); + else + TxError("CIF file read error: ", cifLineNumber); va_start(args, format); Vfprintf(stderr, format, args); va_end(args); @@ -141,7 +144,10 @@ CIFReadWarning(char *format, ...) if (CIFWarningLevel == CIF_WARN_NONE) return; if ((cifTotalWarnings < 100) || (CIFWarningLevel != CIF_WARN_LIMIT)) { - TxError("Warning at line %d of CIF file: ", cifLineNumber); + if (cifLineNumber > 0) + TxError("Warning at line %d of CIF file: ", cifLineNumber); + else + TxError("CIF file read warning: "); va_start(args, format); Vfprintf(stderr, format, args); va_end(args); diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index 1894d30e..d783f19c 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -2800,10 +2800,16 @@ extTransPerimFunc(bp) devptr = extDevFindMatch(devptr, tinside); if (devptr == deventry) devptr = NULL; } + if (devptr == NULL) { - TxError("Error: Cannot find valid terminals on device %s!\n", - DBTypeLongNameTbl[tinside]); + /* Outside type is not a terminal, so return to the original */ + /* device record. NOTE: Should probably check if this device */ + /* type is a FET, as being here would indicate an error. */ + /* However, failure to find all terminals will be flagged as an */ + /* error elsewhere. */ + + extTransRec.tr_devrec = deventry; } /*