Skip to content

Commit 5ebbed4

Browse files
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.
1 parent 37dfe07 commit 5ebbed4

File tree

4 files changed

+55
-18
lines changed

4 files changed

+55
-18
lines changed

VERSION

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

drc/DRCbasic.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@ areaCheck(tile, arg)
161161
if ((rect.r_xbot >= rect.r_xtop) || (rect.r_ybot >= rect.r_ytop))
162162
return 0;
163163

164+
/* Run-length rules are ignored unless the width of the error
165+
* exceeds the run-length distance (which is held in the
166+
* drcc_cdist entry for the rule).
167+
*/
168+
if (arg->dCD_cptr->drcc_flags & DRC_RUNLENGTH)
169+
if (((rect.r_xtop - rect.r_xbot) < arg->dCD_cptr->drcc_cdist) &&
170+
((rect.r_ytop - rect.r_ybot) < arg->dCD_cptr->drcc_cdist))
171+
return 0;
172+
164173
/*
165174
* When Euclidean distance checks are enabled, check for error tiles
166175
* outside of the perimeter of the circle in the corner extension area
@@ -716,7 +725,6 @@ drcTile (tile, arg)
716725
for (i = 0; i < mrd->entries; i++)
717726
{
718727
lr = &mrd->rlist[i];
719-
GeoClip(lr, arg->dCD_clip);
720728
if ((lr->r_ytop - lr->r_ybot) > cptr->drcc_cdist)
721729
{
722730
triggered = mrd->entries;
@@ -1067,7 +1075,7 @@ drcTile (tile, arg)
10671075

10681076
/* Find the rule distances according to the scale factor */
10691077
dist = cptr->drcc_dist;
1070-
cdist = cptr->drcc_cdist;
1078+
cdist = (cptr->drcc_flags & DRC_RUNLENGTH) ? 0 : cptr->drcc_cdist;
10711079
trigpending = (cptr->drcc_flags & DRC_TRIGGER) ? TRUE : FALSE;
10721080

10731081
/* drcc_edgeplane is used to avoid checks on edges */
@@ -1119,7 +1127,6 @@ drcTile (tile, arg)
11191127
for (i = 0; i < mrd->entries; i++)
11201128
{
11211129
lr = &mrd->rlist[i];
1122-
GeoClip(lr, arg->dCD_clip);
11231130
if ((lr->r_xtop - lr->r_xbot) > cptr->drcc_cdist)
11241131
{
11251132
triggered = mrd->entries;

drc/DRCtech.c

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,13 +2135,27 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
21352135
/* reverse order due to the stack property of */
21362136
/* the linked list. */
21372137

2138-
drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2,
2139-
why, distance, DRC_FORWARD, plane2, plane);
2140-
dptrig = (DRCCookie *) mallocMagic((unsigned)
2141-
(sizeof (DRCCookie)));
2142-
drcAssign(dptrig, wwidth, dpnew, set1, set1, why,
2143-
runlength, DRC_REVERSE | DRC_MAXWIDTH |
2144-
DRC_TRIGGER | DRC_BENDS, plane2, plane);
2138+
if (runlength > 0)
2139+
{
2140+
drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2,
2141+
why, runlength, DRC_RUNLENGTH |
2142+
DRC_FORWARD, plane2, plane);
2143+
dptrig = (DRCCookie *) mallocMagic((unsigned)
2144+
(sizeof (DRCCookie)));
2145+
drcAssign(dptrig, wwidth, dpnew, set1, set1, why,
2146+
runlength, DRC_REVERSE | DRC_MAXWIDTH |
2147+
DRC_TRIGGER | DRC_BENDS, plane2, plane);
2148+
}
2149+
else
2150+
{
2151+
drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2,
2152+
why, distance, DRC_FORWARD, plane2, plane);
2153+
dptrig = (DRCCookie *) mallocMagic((unsigned)
2154+
(sizeof (DRCCookie)));
2155+
drcAssign(dptrig, wwidth, dpnew, set1, set1, why,
2156+
distance, DRC_REVERSE | DRC_MAXWIDTH |
2157+
DRC_TRIGGER | DRC_BENDS, plane2, plane);
2158+
}
21452159

21462160
dp->drcc_next = dptrig;
21472161
}
@@ -2189,14 +2203,28 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
21892203

21902204
/* Assign two coupled rules (see above) */
21912205

2192-
drcAssign(dpnew, distance, dp->drcc_next, &tmp1,
2193-
&tmp2, why, distance,
2206+
if (runlength > 0)
2207+
{
2208+
drcAssign(dpnew, distance, dp->drcc_next, &tmp1,
2209+
&tmp2, why, runlength, DRC_RUNLENGTH |
21942210
DRC_REVERSE | DRC_BOTHCORNERS, plane2, plane);
2195-
dptrig = (DRCCookie *) mallocMagic((unsigned)
2211+
dptrig = (DRCCookie *) mallocMagic((unsigned)
21962212
(sizeof (DRCCookie)));
2197-
drcAssign(dptrig, wwidth, dpnew, set1, set1, why,
2213+
drcAssign(dptrig, wwidth, dpnew, set1, set1, why,
21982214
runlength, DRC_FORWARD | DRC_MAXWIDTH |
21992215
DRC_TRIGGER | DRC_BENDS, plane2, plane);
2216+
}
2217+
else
2218+
{
2219+
drcAssign(dpnew, distance, dp->drcc_next, &tmp1,
2220+
&tmp2, why, distance,
2221+
DRC_REVERSE | DRC_BOTHCORNERS, plane2, plane);
2222+
dptrig = (DRCCookie *) mallocMagic((unsigned)
2223+
(sizeof (DRCCookie)));
2224+
drcAssign(dptrig, wwidth, dpnew, set1, set1, why,
2225+
distance, DRC_FORWARD | DRC_MAXWIDTH |
2226+
DRC_TRIGGER | DRC_BENDS, plane2, plane);
2227+
}
22002228
dp->drcc_next = dptrig;
22012229
}
22022230
else if (needtrigger)
@@ -2474,7 +2502,7 @@ drcSpacing(argc, argv)
24742502
{
24752503
layers2 = argv[3];
24762504
distance = atoi(argv[4]);
2477-
runlength = distance;
2505+
runlength = -1;
24782506
adjacency = argv[5];
24792507
why = drcWhyCreate(argv[6]);
24802508
}
@@ -2488,7 +2516,7 @@ drcSpacing(argc, argv)
24882516
adjacency = argv[4];
24892517
wwidth = distance;
24902518
why = drcWhyCreate(argv[5]);
2491-
runlength = distance;
2519+
runlength = -1;
24922520
if (argc >= 7)
24932521
{
24942522
TechError("Unknown argument in spacing line.\n");

drc/drc.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ typedef struct drccookie
5959
* DRC_BOTHCORNERS: Must make corner extensions in both directions.
6060
* DRC_OUTSIDE: Rule applies only to the outside edge of the rule area.
6161
* DRC_TRIGGER: Violation of rule triggers a secondary rule.
62+
* DRC_RUNLENGTH: "cdist" encodes runlength distance, not corner distance.
6263
*
6364
* All other flags denote special DRC rules that do not use the standard 4-way
6465
* edge processing.
@@ -78,11 +79,12 @@ typedef struct drccookie
7879
#define DRC_ANGLES_45 0x0400
7980
#define DRC_ANGLES_90 0x0800
8081
#define DRC_SPLITTILE 0x1000
82+
#define DRC_RUNLENGTH 0x2000
8183
#define DRC_NONSTANDARD (DRC_AREA|DRC_MAXWIDTH|DRC_RECTSIZE\
8284
|DRC_ANGLES_90|DRC_OFFGRID)
8385

8486
/* More flags for indicating what the rule type represents */
85-
#define DRC_CIFRULE 0x2000
87+
#define DRC_CIFRULE 0x4000
8688

8789
#define DRC_PENDING 0
8890
#define DRC_UNPROCESSED CLIENTDEFAULT

0 commit comments

Comments
 (0)