From 3a6f868efce5ac338fb4c85e7b8612378eacd1af Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 13 Nov 2019 13:05:03 -0500 Subject: [PATCH 1/3] Corrected an error in ext2spice caused by recent changes, that can generate an extra node in the extract output that comes out as a "(none)" node in the SPICE netlist from ext2spice. --- extflat/EFbuild.c | 4 ++-- extract/ExtBasic.c | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/extflat/EFbuild.c b/extflat/EFbuild.c index 6999f1af..f3ab37b5 100644 --- a/extflat/EFbuild.c +++ b/extflat/EFbuild.c @@ -606,7 +606,7 @@ efBuildDevice(def, class, type, r, argc, argv) Dev *newdev, devtmp; DevParam *newparm, *devp, *sparm; char ptype, *pptr, **av; - char devhash[24]; + char devhash[64]; int argstart = 1; /* start of terminal list in argv[] */ bool hasModel = strcmp(type, "None") ? TRUE : FALSE; @@ -749,7 +749,7 @@ efBuildDevice(def, class, type, r, argc, argv) /* Determine if this device has been seen before */ - sprintf(devhash, "%dx%d", r->r_xbot, r->r_ybot); + sprintf(devhash, "%dx%d%s", r->r_xbot, r->r_ybot, type); he = HashFind(&def->def_devs, devhash); newdev = (Dev *)HashGetValue(he); if (newdev) diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index e0503d20..c3067466 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -1686,6 +1686,7 @@ extOutputDevices(def, transList, outFile) while (TRUE) { + if (devptr == NULL) break; /* Bad device */ nsd = devptr->exts_deviceSDCount; for (termcount = 0; termcount < nsd; termcount++) { @@ -1726,6 +1727,7 @@ extOutputDevices(def, transList, outFile) devptr = extDevFindMatch(devptr, t); break; } + if (termcount == nsd) break; /* All terminals accounted for */ } if (termcount == nsd) break; /* All terminals accounted for */ if (devptr == deventry) break; /* No other device records available */ @@ -1771,6 +1773,11 @@ extOutputDevices(def, transList, outFile) /* It is not an error condition to have more terminals */ /* than the minimum. */ } + if (devptr == NULL) { + TxError("Warning: No matching extraction type for device at (%d %d)\n", + reg->treg_tile->ti_ll.p_x, reg->treg_tile->ti_ll.p_y); + continue; + } /* * Output the transistor record. From 8e22b1504ec6dfe1a598bc44ed4124769ccd62a2 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 13 Nov 2019 14:29:19 -0500 Subject: [PATCH 2/3] Corrected an error introduced with the extension of extraction methods to multiple entries per device; the resistor length and width calculating routine lost a break statement and would go into an infinite loop for resistors with bends in them. --- extract/ExtBasic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index c3067466..1894d30e 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -2919,7 +2919,8 @@ extResistorTileFunc(tile, pNum) extEnumTilePerim(tile, mask, pNum, extSpecialPerimFunc, (ClientData)FALSE); - if (extSpecialBounds[0] == NULL) devptr = devptr->exts_next; + if (extSpecialBounds[0] != NULL) break; + devptr = devptr->exts_next; } if (devptr != NULL) extTransRec.tr_devrec = devptr; From 5007f3f6026851a16aed9b0d0a30f3d19a548931 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 13 Nov 2019 15:10:01 -0500 Subject: [PATCH 3/3] Modified "lef write" so that if a cell has a bounding box declared by FIXED_BBOX derived from GDS and the new "boundary" cif input rule, then the bbox property values take precedence over the extent-of-geometry bounding box. --- lef/lefWrite.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lef/lefWrite.c b/lef/lefWrite.c index da03bacf..3adfc12a 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -778,6 +778,20 @@ lefWriteMacro(def, f, scale, hide) else boundary = def->cd_bbox; + /* If a bounding box has been declared with the FIXED_BBOX property */ + /* then it takes precedence over def->cd_bbox. */ + + if (def->cd_flags & CDFIXEDBBOX) + { + char *propvalue; + bool found; + + propvalue = (char *)DBPropGet(def, "FIXED_BBOX", &found); + if (found) + sscanf(propvalue, "%d %d %d %d", &boundary.r_xbot, + &boundary.r_ybot, &boundary.r_xtop, &boundary.r_ytop); + } + /* Write position and size information */ fprintf(f, " ORIGIN %.4f %.4f ;\n",