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.
This commit is contained in:
R. Timothy Edwards 2026-06-07 20:30:33 -04:00
parent 65f034777e
commit 83569da8b3
1 changed files with 15 additions and 2 deletions

View File

@ -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;
}