Made a small change to the "cifmaxwidth" rule check implementation

to ignore non-Manhattan (split) tiles.  This avoids creating false-
positive DRC results on split tiles which are larger in X and Y
than the max-width distance.  False negatives are possible but
correctly implementing a "maxwidth" rule for non-orthogonal areas
requires a completely different algorithm.
This commit is contained in:
R. Timothy Edwards 2025-08-11 12:10:09 -04:00
parent b4912fd550
commit 5791ae3701
2 changed files with 79 additions and 70 deletions

View File

@ -1 +1 @@
8.3.538 8.3.539

View File

@ -1468,7 +1468,8 @@ drcCheckCifMaxwidth(starttile,arg,cptr)
rect.r_ybot /= scale; rect.r_ybot /= scale;
rect.r_ytop /= scale; rect.r_ytop /= scale;
GeoClip(&rect, arg->dCD_clip); GeoClip(&rect, arg->dCD_clip);
if (!GEO_RECTNULL(&rect)) { if (!GEO_RECTNULL(&rect))
{
(*(arg->dCD_function)) (arg->dCD_celldef, &rect, (*(arg->dCD_function)) (arg->dCD_celldef, &rect,
arg->dCD_cptr, arg->dCD_clientData); arg->dCD_cptr, arg->dCD_clientData);
(*(arg->dCD_errors))++; (*(arg->dCD_errors))++;
@ -1479,7 +1480,15 @@ drcCheckCifMaxwidth(starttile,arg,cptr)
else if (cptr->drcc_flags & DRC_BENDS) else if (cptr->drcc_flags & DRC_BENDS)
{ {
Rect rect; Rect rect;
/* Ignore split tiles; this is a limitation but another
* algorithm is needed to check for maximum width in a
* non-Manhattan area.
*/
if (IsSplit(starttile)) return;
TiToRect(starttile, &rect); TiToRect(starttile, &rect);
if (rect.r_xtop-rect.r_xbot > edgelimit && if (rect.r_xtop-rect.r_xbot > edgelimit &&
rect.r_ytop-rect.r_ybot > edgelimit) rect.r_ytop-rect.r_ybot > edgelimit)
{ {
@ -1488,7 +1497,8 @@ drcCheckCifMaxwidth(starttile,arg,cptr)
rect.r_ybot /= scale; rect.r_ybot /= scale;
rect.r_ytop /= scale; rect.r_ytop /= scale;
GeoClip(&rect, arg->dCD_clip); GeoClip(&rect, arg->dCD_clip);
if (!GEO_RECTNULL(&rect)) { if (!GEO_RECTNULL(&rect))
{
(*(arg->dCD_function)) (arg->dCD_celldef, &rect, (*(arg->dCD_function)) (arg->dCD_celldef, &rect,
arg->dCD_cptr, arg->dCD_clientData); arg->dCD_cptr, arg->dCD_clientData);
(*(arg->dCD_errors))++; (*(arg->dCD_errors))++;
@ -1544,13 +1554,13 @@ drcCheckCifMaxwidth(starttile,arg,cptr)
rect.r_ybot /= scale; rect.r_ybot /= scale;
rect.r_ytop /= scale; rect.r_ytop /= scale;
GeoClip(&rect, arg->dCD_clip); GeoClip(&rect, arg->dCD_clip);
if (!GEO_RECTNULL(&rect)) { if (!GEO_RECTNULL(&rect))
{
(*(arg->dCD_function)) (arg->dCD_celldef, &rect, (*(arg->dCD_function)) (arg->dCD_celldef, &rect,
arg->dCD_cptr, arg->dCD_clientData); arg->dCD_cptr, arg->dCD_clientData);
(*(arg->dCD_errors))++; (*(arg->dCD_errors))++;
} }
} }
} }
/* reset the tiles */ /* reset the tiles */
TiSetClient(starttile, DRC_UNPROCESSED); TiSetClient(starttile, DRC_UNPROCESSED);
@ -1590,7 +1600,6 @@ drcCheckCifMaxwidth(starttile,arg,cptr)
TiSetClient(tp, DRC_UNPROCESSED); TiSetClient(tp, DRC_UNPROCESSED);
STACKPUSH(tp, DRCstack); STACKPUSH(tp, DRCstack);
} }
} }
} }