From 0f45014d1896591d99683dae70e5686a02b3a1d7 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 1 Nov 2019 10:16:43 -0400 Subject: [PATCH 1/3] Corrected an erroneous scalefactor used when reading geometry attached to a label in a GDS input file; the scalefactor that was being used is reset at the beginning of a GDS read, and so becomes invalid after a database rescaling, resulting in improperly scaled label geometry if "gds read" is used more than once. --- calma/CalmaRdpt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/calma/CalmaRdpt.c b/calma/CalmaRdpt.c index 61e6e87f..f0edac74 100644 --- a/calma/CalmaRdpt.c +++ b/calma/CalmaRdpt.c @@ -291,10 +291,10 @@ calmaElementBoundary() /* Convert rp to magic database units to compare to label rects */ rpc = rp->r_r; - rpc.r_xbot /= calmaReadScale1; - rpc.r_xtop /= calmaReadScale1; - rpc.r_ybot /= calmaReadScale1; - rpc.r_ytop /= calmaReadScale1; + rpc.r_xbot /= cifCurReadStyle->crs_scaleFactor; + rpc.r_xtop /= cifCurReadStyle->crs_scaleFactor; + rpc.r_ybot /= cifCurReadStyle->crs_scaleFactor; + rpc.r_ytop /= cifCurReadStyle->crs_scaleFactor; if ((ciftype >= 0) && (cifCurReadStyle->crs_labelSticky[ciftype] != LABEL_TYPE_NONE)) From 8e85c3a96e1af4a4de2dda680c6ec3f28250f8d4 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 1 Nov 2019 12:01:07 -0400 Subject: [PATCH 2/3] Corrected a long-standing error in the "widespacing" rule implementation that was intended to avoid computing maxwidth more than necessary, but ended up causing the widespacing rule to not be checked in certain situations. --- drc/DRCbasic.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drc/DRCbasic.c b/drc/DRCbasic.c index a3d2cbbf..78afd398 100644 --- a/drc/DRCbasic.c +++ b/drc/DRCbasic.c @@ -484,6 +484,7 @@ drcTile (tile, arg) int edgeX = LEFT(tile); firsttile = TRUE; + mrd = NULL; for (tpleft = BL(tile); BOTTOM(tpleft) < top; tpleft = RT(tpleft)) { /* Get the tile types to the left and right of the edge */ @@ -554,8 +555,6 @@ drcTile (tile, arg) mrd = drcCanonicalMaxwidth(tpleft, GEO_WEST, arg, cptr); else if (firsttile) mrd = drcCanonicalMaxwidth(tile, GEO_EAST, arg, cptr); - else - mrd = NULL; if (!trigpending || (DRCCurStyle->DRCFlags & DRC_FLAGS_WIDEWIDTH_NONINCLUSIVE)) cptr->drcc_dist--; @@ -610,7 +609,6 @@ drcTile (tile, arg) drcCheckMaxwidth(tile, arg, cptr); continue; } - else if (!triggered) mrd = NULL; if (cptr->drcc_flags & DRC_RECTSIZE) { @@ -870,6 +868,7 @@ checkbottom: /* Go right across bottom of tile */ firsttile = TRUE; + mrd = NULL; for (tpbot = LB(tile); LEFT(tpbot) < right; tpbot = TR(tpbot)) { /* Get the tile types to the top and bottom of the edge */ @@ -936,8 +935,6 @@ checkbottom: mrd = drcCanonicalMaxwidth(tpbot, GEO_SOUTH, arg, cptr); else if (firsttile) mrd = drcCanonicalMaxwidth(tile, GEO_NORTH, arg, cptr); - else - mrd = NULL; if (!trigpending || (DRCCurStyle->DRCFlags & DRC_FLAGS_WIDEWIDTH_NONINCLUSIVE)) cptr->drcc_dist--; @@ -992,7 +989,6 @@ checkbottom: if (trigpending) cptr = cptr->drcc_next; continue; } - else if (!triggered) mrd = NULL; result = 0; arg->dCD_radial = 0; From 0aca80dbc2dee73fe9c1d800322430804499f0ad Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 1 Nov 2019 13:23:31 -0400 Subject: [PATCH 3/3] Corrected problem that can cause magic to crash on a "lef read" command due to an uninitialized variable. --- lef/lefWrite.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lef/lefWrite.c b/lef/lefWrite.c index 282b1bda..8e2106c4 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -121,6 +121,8 @@ lefFileOpen(def, file, suffix, mode, prealfile) else locsuffix = NULL; } + else + locsuffix = suffix; /* Try once as-is, and if this fails, try stripping any leading */ /* path information in case cell is in a read-only directory (mode */