From e2673e4e36d9660dd0aa814f9ce05a5ce828f536 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Sun, 7 Jun 2026 12:35:45 -0400 Subject: [PATCH] Found what I think is the last major issue in extresist, which is that the check for the "starting device" was not checking if a terminal was substrate, and so was treating it as a terminal, which would cause the extraction starting point to be set on the wrong plane, along with probably other unwanted behavior. Ignoring substrate terminals when checking for current drivers solved the problem. Also: Removed some code that had been reworked but was still sitting in an "#ifdef 0" block. --- VERSION | 2 +- resis/ResBasic.c | 77 ------------------------------------------------ resis/ResMain.c | 7 +++++ resis/ResRex.c | 2 +- 4 files changed, 9 insertions(+), 79 deletions(-) diff --git a/VERSION b/VERSION index 4c3f6945..cafb4a15 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.659 +8.3.660 diff --git a/resis/ResBasic.c b/resis/ResBasic.c index 65c42644..378f3048 100644 --- a/resis/ResBasic.c +++ b/resis/ResBasic.c @@ -488,83 +488,6 @@ ResEachTile(tile, devNodeTable) HashSetValue(he, (char *)NULL); /* Done with hash record */ } -#if 0 - /* Deprecated: Searching through all devices for all tiles is - * irresponsibly slow. Do not do this. - */ - - if (TTMaskHasType(&ResTermTypesBitMask, t1)) - { - Rect r; - int pNum; - TileTypeBitMask devMask; - TileAndTerm tat; - ResDevTile *devtile; - ExtDevice *devptr; - - TiToRect(tile, &r); - - for (devtile = devTiles; devtile; devtile = devtile->nextDev) - { - Tile *tp; - TileType devtype = devtile->type; - - devptr = devtile->devptr; - for (i = 0; i < devptr->exts_deviceSDCount; i++) - { - if (TTMaskHasType(&devptr->exts_deviceSDTypes[i], t1)) - { - if (GEO_OVERLAP(&devtile->area, &r)) - { - Plane *plane = ResUse->cu_def->cd_planes[DBPlane(devtype)]; - xj = (r.r_xtop + r.r_xbot) / 2; - yj = (r.r_ytop + r.r_ybot) / 2; - tp = PlaneGetHint(plane); - GOTOPOINT(tp, &devtile->area.r_ll); - PlaneSetHint(plane, tp); - ResNewTermDevice(tile, tp, i, xj, yj, OTHERPLANE, &ResNodeQueue); - } - } - } - } - } - - /* Check for substrate under device */ - - if (TTMaskHasType(&ResSubTypesBitMask, t1)) - { - Rect r; - int pNum; - TileTypeBitMask devMask; - ResDevTile *devtile; - ExtDevice *devptr; - - TiToRect(tile, &r); - - for (devtile = devTiles; devtile; devtile = devtile->nextDev) - { - Tile *tp; - TileType devtype = devtile->type; - - devptr = devtile->devptr; - - if (TTMaskHasType(&devptr->exts_deviceSubstrateTypes, t1)) - { - if (GEO_OVERLAP(&devtile->area, &r)) - { - Plane *plane = ResUse->cu_def->cd_planes[DBPlane(devtype)]; - xj = (r.r_xtop + r.r_xbot) / 2; - yj = (r.r_ytop + r.r_ybot) / 2; - tp = PlaneGetHint(plane); - GOTOPOINT(tp, &devtile->area.r_ll); - PlaneSetHint(plane, tp); - ResNewSubDevice(tile, tp, xj, yj, OTHERPLANE, &ResNodeQueue); - } - } - } - } -#endif /* 0 */ - tstructs->ri_status |= RES_TILE_DONE; resMakePortBreakpoints(tile, &ResNodeQueue); diff --git a/resis/ResMain.c b/resis/ResMain.c index 62ba6d6d..e99905ee 100644 --- a/resis/ResMain.c +++ b/resis/ResMain.c @@ -1472,6 +1472,13 @@ ResExtractNet(node, resisdata, cellname) resdevList = (resDevTerm *)HashGetValue(he); while (resdevList) { + /* Diagnostic */ + Tile *tp; + tp = (Tile *)he->h_key.h_ptr; + TxError("Error: %s tile at (%d %d) not visited!\n", + (resdevList->rdt_term < 0) ? "Substrate" : "Terminal", + tp->ti_ll.p_x, tp->ti_ll.p_y); + resdevNext = resdevList->rdt_next; freeMagic((char *)resdevList); resdevList = resdevNext; diff --git a/resis/ResRex.c b/resis/ResRex.c index 168b5f1b..6d7756c4 100644 --- a/resis/ResRex.c +++ b/resis/ResRex.c @@ -1142,7 +1142,7 @@ ResProcessNode( */ if (ptr->terminal == GATE) break; - else + else if (ptr->terminal != SUBS) { /* Sorting has put all parallel devices together, so * combine their total W/L