Corrected the run-length wide-spacing rule so that it correctly

identifies areas which meet the proper definition of run-length
(both edges are parallel for the run-length distance or more).
Previously, errors were getting triggered for geometry where
only one edge exceeded the run-length distance.
This commit is contained in:
Tim Edwards 2024-12-12 14:10:03 -05:00
parent 37dfe07edf
commit 5ebbed4c12
4 changed files with 55 additions and 18 deletions

View File

@ -1 +1 @@
8.3.505 8.3.506

View File

@ -161,6 +161,15 @@ areaCheck(tile, arg)
if ((rect.r_xbot >= rect.r_xtop) || (rect.r_ybot >= rect.r_ytop)) if ((rect.r_xbot >= rect.r_xtop) || (rect.r_ybot >= rect.r_ytop))
return 0; return 0;
/* Run-length rules are ignored unless the width of the error
* exceeds the run-length distance (which is held in the
* drcc_cdist entry for the rule).
*/
if (arg->dCD_cptr->drcc_flags & DRC_RUNLENGTH)
if (((rect.r_xtop - rect.r_xbot) < arg->dCD_cptr->drcc_cdist) &&
((rect.r_ytop - rect.r_ybot) < arg->dCD_cptr->drcc_cdist))
return 0;
/* /*
* When Euclidean distance checks are enabled, check for error tiles * When Euclidean distance checks are enabled, check for error tiles
* outside of the perimeter of the circle in the corner extension area * outside of the perimeter of the circle in the corner extension area
@ -716,7 +725,6 @@ drcTile (tile, arg)
for (i = 0; i < mrd->entries; i++) for (i = 0; i < mrd->entries; i++)
{ {
lr = &mrd->rlist[i]; lr = &mrd->rlist[i];
GeoClip(lr, arg->dCD_clip);
if ((lr->r_ytop - lr->r_ybot) > cptr->drcc_cdist) if ((lr->r_ytop - lr->r_ybot) > cptr->drcc_cdist)
{ {
triggered = mrd->entries; triggered = mrd->entries;
@ -1067,7 +1075,7 @@ drcTile (tile, arg)
/* Find the rule distances according to the scale factor */ /* Find the rule distances according to the scale factor */
dist = cptr->drcc_dist; dist = cptr->drcc_dist;
cdist = cptr->drcc_cdist; cdist = (cptr->drcc_flags & DRC_RUNLENGTH) ? 0 : cptr->drcc_cdist;
trigpending = (cptr->drcc_flags & DRC_TRIGGER) ? TRUE : FALSE; trigpending = (cptr->drcc_flags & DRC_TRIGGER) ? TRUE : FALSE;
/* drcc_edgeplane is used to avoid checks on edges */ /* drcc_edgeplane is used to avoid checks on edges */
@ -1119,7 +1127,6 @@ drcTile (tile, arg)
for (i = 0; i < mrd->entries; i++) for (i = 0; i < mrd->entries; i++)
{ {
lr = &mrd->rlist[i]; lr = &mrd->rlist[i];
GeoClip(lr, arg->dCD_clip);
if ((lr->r_xtop - lr->r_xbot) > cptr->drcc_cdist) if ((lr->r_xtop - lr->r_xbot) > cptr->drcc_cdist)
{ {
triggered = mrd->entries; triggered = mrd->entries;

View File

@ -2135,13 +2135,27 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
/* reverse order due to the stack property of */ /* reverse order due to the stack property of */
/* the linked list. */ /* the linked list. */
if (runlength > 0)
{
drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2, drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2,
why, distance, DRC_FORWARD, plane2, plane); why, runlength, DRC_RUNLENGTH |
DRC_FORWARD, plane2, plane);
dptrig = (DRCCookie *) mallocMagic((unsigned) dptrig = (DRCCookie *) mallocMagic((unsigned)
(sizeof (DRCCookie))); (sizeof (DRCCookie)));
drcAssign(dptrig, wwidth, dpnew, set1, set1, why, drcAssign(dptrig, wwidth, dpnew, set1, set1, why,
runlength, DRC_REVERSE | DRC_MAXWIDTH | runlength, DRC_REVERSE | DRC_MAXWIDTH |
DRC_TRIGGER | DRC_BENDS, plane2, plane); DRC_TRIGGER | DRC_BENDS, plane2, plane);
}
else
{
drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2,
why, distance, DRC_FORWARD, plane2, plane);
dptrig = (DRCCookie *) mallocMagic((unsigned)
(sizeof (DRCCookie)));
drcAssign(dptrig, wwidth, dpnew, set1, set1, why,
distance, DRC_REVERSE | DRC_MAXWIDTH |
DRC_TRIGGER | DRC_BENDS, plane2, plane);
}
dp->drcc_next = dptrig; dp->drcc_next = dptrig;
} }
@ -2189,14 +2203,28 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
/* Assign two coupled rules (see above) */ /* Assign two coupled rules (see above) */
if (runlength > 0)
{
drcAssign(dpnew, distance, dp->drcc_next, &tmp1, drcAssign(dpnew, distance, dp->drcc_next, &tmp1,
&tmp2, why, distance, &tmp2, why, runlength, DRC_RUNLENGTH |
DRC_REVERSE | DRC_BOTHCORNERS, plane2, plane); DRC_REVERSE | DRC_BOTHCORNERS, plane2, plane);
dptrig = (DRCCookie *) mallocMagic((unsigned) dptrig = (DRCCookie *) mallocMagic((unsigned)
(sizeof (DRCCookie))); (sizeof (DRCCookie)));
drcAssign(dptrig, wwidth, dpnew, set1, set1, why, drcAssign(dptrig, wwidth, dpnew, set1, set1, why,
runlength, DRC_FORWARD | DRC_MAXWIDTH | runlength, DRC_FORWARD | DRC_MAXWIDTH |
DRC_TRIGGER | DRC_BENDS, plane2, plane); DRC_TRIGGER | DRC_BENDS, plane2, plane);
}
else
{
drcAssign(dpnew, distance, dp->drcc_next, &tmp1,
&tmp2, why, distance,
DRC_REVERSE | DRC_BOTHCORNERS, plane2, plane);
dptrig = (DRCCookie *) mallocMagic((unsigned)
(sizeof (DRCCookie)));
drcAssign(dptrig, wwidth, dpnew, set1, set1, why,
distance, DRC_FORWARD | DRC_MAXWIDTH |
DRC_TRIGGER | DRC_BENDS, plane2, plane);
}
dp->drcc_next = dptrig; dp->drcc_next = dptrig;
} }
else if (needtrigger) else if (needtrigger)
@ -2474,7 +2502,7 @@ drcSpacing(argc, argv)
{ {
layers2 = argv[3]; layers2 = argv[3];
distance = atoi(argv[4]); distance = atoi(argv[4]);
runlength = distance; runlength = -1;
adjacency = argv[5]; adjacency = argv[5];
why = drcWhyCreate(argv[6]); why = drcWhyCreate(argv[6]);
} }
@ -2488,7 +2516,7 @@ drcSpacing(argc, argv)
adjacency = argv[4]; adjacency = argv[4];
wwidth = distance; wwidth = distance;
why = drcWhyCreate(argv[5]); why = drcWhyCreate(argv[5]);
runlength = distance; runlength = -1;
if (argc >= 7) if (argc >= 7)
{ {
TechError("Unknown argument in spacing line.\n"); TechError("Unknown argument in spacing line.\n");

View File

@ -59,6 +59,7 @@ typedef struct drccookie
* DRC_BOTHCORNERS: Must make corner extensions in both directions. * DRC_BOTHCORNERS: Must make corner extensions in both directions.
* DRC_OUTSIDE: Rule applies only to the outside edge of the rule area. * DRC_OUTSIDE: Rule applies only to the outside edge of the rule area.
* DRC_TRIGGER: Violation of rule triggers a secondary rule. * DRC_TRIGGER: Violation of rule triggers a secondary rule.
* DRC_RUNLENGTH: "cdist" encodes runlength distance, not corner distance.
* *
* All other flags denote special DRC rules that do not use the standard 4-way * All other flags denote special DRC rules that do not use the standard 4-way
* edge processing. * edge processing.
@ -78,11 +79,12 @@ typedef struct drccookie
#define DRC_ANGLES_45 0x0400 #define DRC_ANGLES_45 0x0400
#define DRC_ANGLES_90 0x0800 #define DRC_ANGLES_90 0x0800
#define DRC_SPLITTILE 0x1000 #define DRC_SPLITTILE 0x1000
#define DRC_RUNLENGTH 0x2000
#define DRC_NONSTANDARD (DRC_AREA|DRC_MAXWIDTH|DRC_RECTSIZE\ #define DRC_NONSTANDARD (DRC_AREA|DRC_MAXWIDTH|DRC_RECTSIZE\
|DRC_ANGLES_90|DRC_OFFGRID) |DRC_ANGLES_90|DRC_OFFGRID)
/* More flags for indicating what the rule type represents */ /* More flags for indicating what the rule type represents */
#define DRC_CIFRULE 0x2000 #define DRC_CIFRULE 0x4000
#define DRC_PENDING 0 #define DRC_PENDING 0
#define DRC_UNPROCESSED CLIENTDEFAULT #define DRC_UNPROCESSED CLIENTDEFAULT