Skip to content

Commit

Permalink
Corrected an extraction error that can cause an infinite loop
Browse files Browse the repository at this point in the history
depending on the order of extraction devices.  Specifically, the
case of a source-drain tied FET was breaking out of a loop when
it should have been breaking out of a double loop.
  • Loading branch information
RTimothyEdwards committed Oct 27, 2023
1 parent 7a9445e commit 22ea7a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.441
8.3.442
7 changes: 4 additions & 3 deletions extract/ExtBasic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,7 @@ extOutputDevices(def, transList, outFile)
int nsd, length, width, n, i, ntiles, corners, tn, rc, termcount;
double dres, dcap;
char mesg[256];
bool isAnnular, hasModel;
bool isAnnular, hasModel, sd_is_tied;

for (reg = transList; reg && !SigInterruptPending; reg = reg->treg_next)
{
Expand Down Expand Up @@ -2134,6 +2134,7 @@ extOutputDevices(def, transList, outFile)
{
if (devptr == NULL) break; /* Bad device */
nsd = devptr->exts_deviceSDCount;
sd_is_tied = FALSE;
for (termcount = 0; termcount < nsd; termcount++)
{
TileTypeBitMask *tmask;
Expand All @@ -2144,11 +2145,10 @@ extOutputDevices(def, transList, outFile)
tmask = &devptr->exts_deviceSDTypes[termcount];
if (TTMaskIsZero(tmask)) {
if (termcount < nsd) {
ExtDevice *devcheck;

/* Not finding another device record just means that */
/* terminals are tied together on the same net, such as */
/* with a MOS cap. Accept this fact and move on. */
sd_is_tied = TRUE;
}
break; /* End of SD terminals */
}
Expand Down Expand Up @@ -2219,6 +2219,7 @@ extOutputDevices(def, transList, outFile)
}
if (termcount == nsd) break; /* All terminals accounted for */
if (devptr == deventry) break; /* No other device records available */
if (sd_is_tied) break; /* Legal case of tied source and drain */
/* Try again with a different device record */
}
extTransRec.tr_nterm = termcount;
Expand Down

0 comments on commit 22ea7a9

Please sign in to comment.