From 0503ce0ebf05768ef8ba91ecb662c0a0e311c240 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 4 Jun 2021 12:26:11 -0400 Subject: [PATCH] Corrected the "surround_ok" spacing rule, which did not prevent the layers2->layers1 swapped case from being implemented; the surround_ok rule type is by definition asymmetric and the two layer sets cannot just be swapped. --- VERSION | 2 +- drc/DRCtech.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 49b7564b..bd9847a9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.172 +8.3.173 diff --git a/drc/DRCtech.c b/drc/DRCtech.c index c61c68a8..5a8aa999 100644 --- a/drc/DRCtech.c +++ b/drc/DRCtech.c @@ -1836,6 +1836,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, bool needtrigger = FALSE; bool touchingok = TRUE; bool cornerok = FALSE; + bool surroundok = FALSE; if (!strcmp(adjacency, "surround_ok")) { @@ -1858,6 +1859,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, needtrigger = TRUE; touchingok = FALSE; needReverse = TRUE; + surroundok = TRUE; } else { @@ -2077,10 +2079,11 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency, /* * Now, if set1 and set2 are distinct apply the rule for LHS in set1 - * and RHS in set2. + * and RHS in set2. HOWEVER, "surround_ok" rules are asymmetrically + * triggered and cannot be reversed between set1 and set2. */ - if (pset = (DBTypesOnSamePlane(i, j) & pmask2)) + if ((!surroundok) && (pset = (DBTypesOnSamePlane(i, j) & pmask2))) { plane = LowestMaskBit(pset);