From 5308c352686d1359d036ecd473250fcc4997db8e Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 21 Sep 2020 20:23:37 -0400 Subject: [PATCH] Corrected one final case of extracting an extended-drain pFET because the opposite type (pwell) is not directly underneath the gate, but touches it on the plane below. Because the pwell may be represented by space tiles on the well plane, it was also necessary to deal with the space type in the bitmask. --- extract/ExtBasic.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index 7af8f295..17b41ae0 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -2262,7 +2262,7 @@ extTransFindSubs(tile, t, mask, def, sn, layerptr) NodeRegion **sn; TileType *layerptr; { - Rect tileArea; + Rect tileArea, tileAreaPlus; int pNum; int extTransFindSubsFunc1(); /* Forward declaration */ NodeAndType noderec; @@ -2271,11 +2271,16 @@ extTransFindSubs(tile, t, mask, def, sn, layerptr) noderec.layer = TT_SPACE; TiToRect(tile, &tileArea); + + /* Expand tile area by 1 in all directions. This catches terminals */ + /* on certain extended drain MOSFET devices. */ + GEO_EXPAND(&tileArea, 1, &tileAreaPlus); + for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) { if (TTMaskIntersect(&DBPlaneTypes[pNum], mask)) { - if (DBSrPaintArea((Tile *) NULL, def->cd_planes[pNum], &tileArea, + if (DBSrPaintArea((Tile *) NULL, def->cd_planes[pNum], &tileAreaPlus, mask, extTransFindSubsFunc1, (ClientData)&noderec)) { *sn = noderec.region; @@ -3041,7 +3046,12 @@ extSpecialPerimFunc(bp, sense) { for (i = 0; !TTMaskIsZero(&devptr->exts_deviceSDTypes[i]); i++) { - PlaneMask pmask = DBTechTypesToPlanes(&devptr->exts_deviceSDTypes[i]); + TileTypeBitMask mmask; + PlaneMask pmask; + + mmask = devptr->exts_deviceSDTypes[i]; + if (toutside != TT_SPACE) TTMaskClearType(&mmask, TT_SPACE); + pmask = DBTechTypesToPlanes(&mmask); if (!PlaneMaskHasPlane(pmask, DBPlane(tinside))) {