From 83569da8b3716d67b36a23ed3cd25f29462b45fc Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Sun, 7 Jun 2026 20:30:33 -0400 Subject: [PATCH] I hope this is the last change to the "extresist" code for a while. Corrected an error that was caused by moving the handling of the "Short"-type device from "extract" to "ext2spice". When running with "ext2spice extresist on", the "Short" device is read twice. Since it's being treated like an "equiv" statement, it's very important to do the node merge only for the device as it appears in the ".res.ext" file, and ignore the entry in ".ext", or the wrong nodes may get merged. This appears to be the last major error lurking in the "extresist" code, as I am now able to run full R-C extraction on an entire chip, in reasonable time. --- extflat/EFread.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/extflat/EFread.c b/extflat/EFread.c index 9abc979c..fbd77096 100644 --- a/extflat/EFread.c +++ b/extflat/EFread.c @@ -340,18 +340,31 @@ readfile: * short between the first two terminals. Consequently, * it acts like an "equiv" statement. However, unlike * regular "equiv" statements, it should always merge - * the nodes, so do not pass "resis" to efBuildEquiv(). + * the nodes, so do not pass "resist" to efBuildEquiv(). */ int argstart = 7; + /* "Short" devices should not have parameters, but just in * case, skip over any that are found. */ while (strchr(argv[argstart], '=') != NULL) argstart++; + + /* Tricky---Since "Short" devices are treated like "equiv" + * statements, then when doing full R-C extraction, it's + * important *not* to merge the nodes when reading the + * .ext file, but only when reading the .res.ext file. + * Otherwise the wrong nodes may get merged. "resist" is + * TRUE when "ext2spice extresist on" is selected, and + * DoResist is set to FALSE when the .res.ext file is + * opened for reading. + */ if (argstart + 4 >= argc) efReadError("Bad terminal description for Short device\n"); - else + else if ((!resist) || (resist && (!(DoResist)))) + { efBuildEquiv(def, argv[argstart + 1], argv[argstart + 4], FALSE, isspice); + } break; }