From 92f6f2fb67595ca1c4e61e3df7f8865a75d2648e Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 26 Dec 2021 21:20:58 +0100 Subject: [PATCH 1/2] New tests --- testdata/drc/drcGenericTests_1.gds | Bin 1020 -> 1118 bytes testdata/drc/drcGenericTests_au1.gds | Bin 10542 -> 11986 bytes testdata/drc/drcGenericTests_au1d.gds | Bin 6020 -> 6742 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/testdata/drc/drcGenericTests_1.gds b/testdata/drc/drcGenericTests_1.gds index 18c6261a138332ab52f1f70c58ab1464a815dc84..263f094b5de28f6ef8b45bc93b363fa7a7741b52 100644 GIT binary patch delta 236 zcmeyvevd=GLfsWVRg%fzk0 zz#y!`z`(r&Lh~+F42lzf=XcCv`oABZT)5;jhem~nYziS`VpRxLbfZ^azvp}4Ge4e} z``T?86RYj^=kadz>gyx@_kETSNq!0Kcrm#m#KH0S|d(Yg4#G)TnjO> z7#-?ci770m$Wo|Rs85kK$UMnBN!B1)NwO5OSZfTCm7;ctEUtw?vKSreTPdvDP?DmP+kmvbYv9WHCC_w^Xvi76O_X?|rzYX2pA-jupHu zYlvy8;*CLf9OSop-u;H3BM#<_&c5C;X=<~G>N*~4YSYjq3iVNY1!VcCaQk{tIUJkf1>E308mw~;e7cA;Y~TT#6E z?ar}_?Y)aEHM2J6M>Sm5H9XH%c{dxY**KhH0$bU0Skx<6E9mZb>4`k*^q4$G!^?d2 z-(wWRyRzp3qK4OMBLA=F;9mBBjb_{K^}K(jt0CLiCQkks>P_xFdU9velXmX4F7Dvr|0 zH9Eh2vy!>xslk{@=dd>BkHkafslp2muS_wtEh{QUHV0CivU%MEBU=0qs zh$zoiI&^lZO5|`*aC9hI+{F$$3LS57=yO*U2ZxvEeZTK{fA9N!U#{$4G$lnE8M!1) z$Rp7ok}M^pf@DaO|K`ul>B4_6USD35hrT?Jhi^}8%IKZEJ8UTDWO(royl4kKh8J7G zulNFbu@2n$BP=Et;m6LvW$h)F(N1*GPj=u_efry})3}*94?lSp@3ITr`t-LM{UFbhRUj)z-zl;f-WXXqvc|~DkyRjTj4ak( zo~%533+$!(^tT!PATN+rBCAN>I9Uu&C96o5N>-7q5?Lx)tUZk^jlCuIQhoZ{jDC=p z$VysJCJY=37lWpPCuJ4s2?4tz@RIt88q{-kpc-yX>7ib$=yEPbkrSEi2p6^*+b>z{qr zr?tO#dlfh2tWO7gf%1&T{x&vdTpTzNd~B%r%AMZKy4dEezXzWtTL+1QpAl?!^ok8(W`9WWr!#5$_|@{f;aW7eLQ%Y z`3IEAN*Psmkm1pz|AB%R*`e$(aQLP%{wNdj@&0(e_j%tu@Aqi=bGJz<$?_&GNV4{Y zOsbPl9^Lrcf7ZP0pAX!=bw2Rs!&M1CJflTaxk6+dWY$iIYDARVJZ~Iet8x)jX$KE0 zX_31^q#tG0eNI%Lvj5BGdHo1?lueA}H9U~}7!+bmlx2J?+{B3-BUECH3q6dAF{Wya zZgCAKN*|{jPm~DTD%Y_;W-L^D=$2w^>oG&(aTL}xyO>)0PN78=Y~xDLfy#CLNQi3ng=0p2+QUYfzsn}yew?%74_sigh2y zwvG3d0LNy4SJpb7S_%%G8v8R6HZzi3PdhPg8+L1MlN5P2OIF&ujQDR|*Jmo%b<;(uT6{;szrp$^q$ z0ga_dG&V$IQ*%p8QA3D>L-bP#8f<#L&*%H&^Zej>wp(j?7GR>d&(eY@zcPV^n89)^ z`!}EF=Z)FL!S3wh`hHQsvgqO1SA*j#q3L(Qr43xsedKpw`zz=Z8;WH#0xkwp6?akz zL&{t#!wyt&B0J~>D&Vq3E`9kCik&iMD zkuOZX2>HU~i;$1lz_*H)nnzvba8w(jT7+U)SkVr}uRY|nCA?`iZnPI%*;-GnSVA{hw~#s0-*M$E&B{nVHGCZ5DBBI%g>z#bh3zCdbR1 OHCb`T Date: Sun, 26 Dec 2021 21:23:58 +0100 Subject: [PATCH 2/2] Fixed generic DRC checks with == operations - this was sometimes not capturing the relevant cases. --- .../drc/built-in-macros/_drc_complex_ops.rb | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/drc/drc/built-in-macros/_drc_complex_ops.rb b/src/drc/drc/built-in-macros/_drc_complex_ops.rb index 48b534a37..8b9628842 100644 --- a/src/drc/drc/built-in-macros/_drc_complex_ops.rb +++ b/src/drc/drc/built-in-macros/_drc_complex_ops.rb @@ -1903,9 +1903,12 @@ class DRCOpNodeCheck < DRCOpNodeWithCompare end if self.gt || self.ge - dmax = self.ge ? @engine._make_value(self.ge) : @engine._make_value(self.gt) + 1 - max_check = RBA::CompoundRegionOperationNode::send(factory, *(oargs + [ dmax ] + self.args + [ true ])) - if res + if ! res + dmax = self.ge ? @engine._make_value(self.ge) : @engine._make_value(self.gt) + 1 + res = RBA::CompoundRegionOperationNode::send(factory, *(oargs + [ dmax ] + self.args + [ true ])) + elsif self.mode_or + dmax = self.ge ? @engine._make_value(self.ge) : @engine._make_value(self.gt) + 1 + max_check = RBA::CompoundRegionOperationNode::send(factory, *(oargs + [ dmax ] + self.args + [ true ])) if self.check == :width || self.check == :notch # Same polygon check - we need to take both edges of the result other = RBA::CompoundRegionOperationNode::new_edges(res) @@ -1913,13 +1916,18 @@ class DRCOpNodeCheck < DRCOpNodeWithCompare other = RBA::CompoundRegionOperationNode::new_edge_pair_to_first_edges(res) end res_max = RBA::CompoundRegionOperationNode::new_edge_pair_to_first_edges(max_check) - if self.mode_or - res = RBA::CompoundRegionOperationNode::new_join([ other, res_max ]) - else - res = RBA::CompoundRegionOperationNode::new_geometrical_boolean(RBA::CompoundRegionOperationNode::GeometricalOp::And, other, res_max) - end + res = RBA::CompoundRegionOperationNode::new_join([ other, res_max ]) else - res = max_check + dmax = self.ge ? @engine._make_value(self.ge) : @engine._make_value(self.gt) + 1 + max_check_for_not = RBA::CompoundRegionOperationNode::send(factory, *(oargs + [ dmax ] + self.args)) + if self.check == :width || self.check == :notch + # Same polygon check - we need to take both edges of the result + other = RBA::CompoundRegionOperationNode::new_edges(res) + else + other = RBA::CompoundRegionOperationNode::new_edge_pair_to_first_edges(res) + end + res_max_for_not = RBA::CompoundRegionOperationNode::new_edges(max_check_for_not) + res = RBA::CompoundRegionOperationNode::new_geometrical_boolean(RBA::CompoundRegionOperationNode::GeometricalOp::Not, other, res_max_for_not) end end