Corrected an error with perimeter calculation of a device that was

caused by other code that can move the plane of a device to match
the plane of a port.  Solved by retaining the original plane of the
node in the extTransRec structure, and using that to determine the
device plane for purposes of calculating perimeters and not double-
counting contacts.
This commit is contained in:
Tim Edwards 2022-08-30 10:13:18 -04:00
parent 2d4fb51ae6
commit 5d51e10fb9
2 changed files with 10 additions and 3 deletions

View File

@ -1 +1 @@
8.3.318
8.3.319

View File

@ -111,6 +111,7 @@ struct transRec
* non-rectangular geometries.
*/
int tr_perim; /* Total perimeter */
int tr_plane; /* Plane of device */
TermTilePos tr_termpos[MAXSD]; /* lowest tile connecting to term */
} extTransRec;
@ -1803,6 +1804,7 @@ extOutputDevices(def, transList, outFile)
extTransRec.tr_nterm = 0;
extTransRec.tr_gatelen = 0;
extTransRec.tr_perim = 0;
extTransRec.tr_plane = reg->treg_pnum; /* Save this value! */
extTransRec.tr_subsnode = (NodeRegion *)NULL;
arg.fra_def = def;
@ -3012,8 +3014,13 @@ extTransPerimFunc(bp)
*/
/* Don't double-count contact perimeters (added by Tim 1/9/07) */
/* 8/30/2022: The code at line 681 can reassign a transistor */
/* gate node off of the device plane, so the original plane of */
/* the gate node is saved in extTransRec.tr_plane and used here. */
/* Do *not* user extTransRec.tr_gatenode->nreg_pnum! */
if ((!DBIsContact(toutside) && !DBIsContact(tinside)) ||
(bp->b_plane == extTransRec.tr_gatenode->nreg_pnum))
(bp->b_plane == extTransRec.tr_plane))
extTransRec.tr_perim += len;
return (0);