Skip to content

Commit 37dfe07

Browse files
Extended the "cifmaxwidth" function to include the option "both",
which has the same meaning as the "maxwidth" function ("both" checks either tile dimension to see if it exceeds the maximum). This is a simple per-tile check and assumes that violations do not occur across multiple tiles. This should be sufficient for most checks.
1 parent dc87a8c commit 37dfe07

File tree

2 files changed

+36
-8
lines changed

2 files changed

+36
-8
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.3.504
1+
8.3.505

drc/DRCcif.c

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,11 +1268,12 @@ drcCifMaxwidth(argc, argv)
12681268
return (0);
12691269
}
12701270

1271-
if (strcmp(bends,"bend_illegal") == 0) bend =0;
1272-
else if (strcmp(bends,"bend_ok") == 0) bend =DRC_BENDS;
1271+
if (strcmp(bends, "bend_illegal") == 0) bend = 0;
1272+
else if (strcmp(bends, "bend_ok") == 0) bend = DRC_BENDS;
1273+
else if (strcmp(bends, "both") == 0) bend = DRC_MAXWIDTH_BOTH;
12731274
else
12741275
{
1275-
TechError("unknown bend option %s\n",bends);
1276+
TechError("unknown bend option %s\n", bends);
12761277
return (0);
12771278
}
12781279

@@ -1447,10 +1448,35 @@ drcCheckCifMaxwidth(starttile,arg,cptr)
14471448
if (DRCstack == (Stack *) NULL)
14481449
DRCstack = StackNew(64);
14491450

1450-
/* if bends are allowed, just check on a tile-by-tile basis that
1451-
one dimension is the max. This is pretty stupid, but it correctly
1452-
calculates the trench width rule. dcs 12.06.89 */
1453-
if (cptr->drcc_flags & DRC_BENDS)
1451+
/* If bends are allowed, just check on a tile-by-tile basis that
1452+
* both dimensions exceed the max. This is pretty stupid, but it
1453+
* correctly calculates, e.g., the trench width rule. dcs 12.06.89
1454+
*
1455+
* Do the same for the "both" case, checking on a tile-by-tile basis
1456+
* that either dimension exceeds the max.
1457+
*/
1458+
1459+
if (cptr->drcc_flags & DRC_MAXWIDTH_BOTH)
1460+
{
1461+
Rect rect;
1462+
TiToRect(starttile,&rect);
1463+
if ((rect.r_xtop-rect.r_xbot > edgelimit) ||
1464+
(rect.r_ytop-rect.r_ybot > edgelimit))
1465+
{
1466+
rect.r_xbot /= scale;
1467+
rect.r_xtop /= scale;
1468+
rect.r_ybot /= scale;
1469+
rect.r_ytop /= scale;
1470+
GeoClip(&rect, arg->dCD_clip);
1471+
if (!GEO_RECTNULL(&rect)) {
1472+
(*(arg->dCD_function)) (arg->dCD_celldef, &rect,
1473+
arg->dCD_cptr, arg->dCD_clientData);
1474+
(*(arg->dCD_errors))++;
1475+
}
1476+
}
1477+
return;
1478+
}
1479+
else if (cptr->drcc_flags & DRC_BENDS)
14541480
{
14551481
Rect rect;
14561482
TiToRect(starttile,&rect);
@@ -1470,7 +1496,9 @@ drcCheckCifMaxwidth(starttile,arg,cptr)
14701496
}
14711497
return;
14721498
}
1499+
14731500
/* Mark this tile as pending and push it */
1501+
14741502
PUSHTILE(starttile);
14751503
TiToRect(starttile,&boundrect);
14761504

0 commit comments

Comments
 (0)