From 117ca41b8a0fb2e9b61b19e1b006f3f68a7c96b7 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Thu, 14 Aug 2025 08:51:36 -0400 Subject: [PATCH] Corrected an error in the substrate generation for extraction, where non-manhattan geometry was not being transformed into the parent orientation. This went unnoticed for some time due to testing on PDKs where substrate and well were not allowed to have non-orthogonal edges. --- VERSION | 2 +- database/DBcellcopy.c | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/VERSION b/VERSION index 600ba498..9fd09bcb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.540 +8.3.541 diff --git a/database/DBcellcopy.c b/database/DBcellcopy.c index 3a173c6b..9ff7cd72 100644 --- a/database/DBcellcopy.c +++ b/database/DBcellcopy.c @@ -974,7 +974,7 @@ dbEraseSubFunc(tile, cxp) SearchContext *scx; Rect sourceRect, targetRect; int pNum; - TileType type, loctype, subType; + TileType dinfo, loctype, subType; Plane *plane; struct dbCopySubData *csd; /* Client data */ @@ -983,11 +983,12 @@ dbEraseSubFunc(tile, cxp) plane = csd->csd_plane; pNum = csd->csd_pNum; subType = csd->csd_subtype; - type = TiGetTypeExact(tile); + dinfo = TiGetTypeExact(tile); if (IsSplit(tile)) { loctype = (SplitSide(tile)) ? SplitRightType(tile) : SplitLeftType(tile); if (loctype == TT_SPACE) return 0; + dinfo = DBTransformDiagonal(dinfo, &scx->scx_trans); } /* Construct the rect for the tile */ @@ -998,7 +999,7 @@ dbEraseSubFunc(tile, cxp) csd->csd_modified = TRUE; - return DBNMPaintPlane(plane, type, &targetRect, DBStdEraseTbl(subType, pNum), + return DBNMPaintPlane(plane, dinfo, &targetRect, DBStdEraseTbl(subType, pNum), (PaintUndoInfo *)NULL); } @@ -1017,7 +1018,7 @@ dbPaintSubFunc(tile, cxp) SearchContext *scx; Rect sourceRect, targetRect; int pNum; - TileType type, loctype, subType; + TileType dinfo, loctype, subType; Plane *plane; struct dbCopySubData *csd; /* Client data */ @@ -1026,11 +1027,12 @@ dbPaintSubFunc(tile, cxp) plane = csd->csd_plane; pNum = csd->csd_pNum; subType = csd->csd_subtype; - type = TiGetTypeExact(tile); + dinfo = TiGetTypeExact(tile); if (IsSplit(tile)) { loctype = (SplitSide(tile)) ? SplitRightType(tile) : SplitLeftType(tile); if (loctype == TT_SPACE) return 0; + dinfo = DBTransformDiagonal(dinfo, &scx->scx_trans); } /* Construct the rect for the tile */ @@ -1041,7 +1043,7 @@ dbPaintSubFunc(tile, cxp) csd->csd_modified = TRUE; - return DBNMPaintPlane(plane, type, &targetRect, DBStdPaintTbl(subType, pNum), + return DBNMPaintPlane(plane, dinfo, &targetRect, DBStdPaintTbl(subType, pNum), (PaintUndoInfo *)NULL); } @@ -1061,7 +1063,7 @@ dbEraseNonSub(tile, cxp) SearchContext *scx; Rect sourceRect, targetRect; Plane *plane; /* Plane of target data */ - TileType type, loctype, subType; + TileType dinfo, loctype, subType; struct dbCopySubData *csd; int pNum; @@ -1072,11 +1074,12 @@ dbEraseNonSub(tile, cxp) scx = cxp->tc_scx; - type = TiGetTypeExact(tile); + dinfo = TiGetTypeExact(tile); if (IsSplit(tile)) { loctype = (SplitSide(tile)) ? SplitRightType(tile) : SplitLeftType(tile); if (loctype == TT_SPACE) return 0; + dinfo = DBTransformDiagonal(dinfo, &scx->scx_trans); } /* Construct the rect for the tile */ @@ -1086,7 +1089,7 @@ dbEraseNonSub(tile, cxp) GEOTRANSRECT(&scx->scx_trans, &sourceRect, &targetRect); /* Erase the substrate type from the area of this tile in the target plane. */ - return DBNMPaintPlane(plane, type, &targetRect, DBStdEraseTbl(subType, pNum), + return DBNMPaintPlane(plane, dinfo, &targetRect, DBStdEraseTbl(subType, pNum), (PaintUndoInfo *)NULL); }