From 1b887dbbb3c7ecfc92db265a99b12584aecfb78d Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 24 Jan 2024 19:02:44 +0100 Subject: [PATCH] Simple test for collinear mode feature --- src/drc/drc/built-in-macros/_drc_engine.rb | 6 ++++ src/drc/drc/built-in-macros/_drc_layer.rb | 30 +++++++++++++++--- src/drc/unit_tests/drcSimpleTests.cc | 9 ++++++ testdata/drc/drcSimpleTests_90.drc | 34 +++++++++++++++++++++ testdata/drc/drcSimpleTests_90.gds | Bin 0 -> 618 bytes testdata/drc/drcSimpleTests_au90.gds | Bin 0 -> 3818 bytes testdata/drc/drcSimpleTests_au90d.gds | Bin 0 -> 3818 bytes 7 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 testdata/drc/drcSimpleTests_90.drc create mode 100644 testdata/drc/drcSimpleTests_90.gds create mode 100644 testdata/drc/drcSimpleTests_au90.gds create mode 100644 testdata/drc/drcSimpleTests_au90d.gds diff --git a/src/drc/drc/built-in-macros/_drc_engine.rb b/src/drc/drc/built-in-macros/_drc_engine.rb index 279e67c46..c765367bc 100644 --- a/src/drc/drc/built-in-macros/_drc_engine.rb +++ b/src/drc/drc/built-in-macros/_drc_engine.rb @@ -328,6 +328,12 @@ module DRC end end + def without_coincident(f = true) + self._context("without_coincident") do + DRCCollinearMode::new(f ? RBA::Region::NeverIncludeCollinear : RBA::Region::IncludeCollinearWhenTouch) + end + end + def euclidian DRCMetrics::new(RBA::Region::Euclidian) end diff --git a/src/drc/drc/built-in-macros/_drc_layer.rb b/src/drc/drc/built-in-macros/_drc_layer.rb index 738f60904..3fa5c0bf2 100644 --- a/src/drc/drc/built-in-macros/_drc_layer.rb +++ b/src/drc/drc/built-in-macros/_drc_layer.rb @@ -3689,6 +3689,9 @@ CODE # Double-bounded ranges are also available, like: "0.5 <= projecting < 2.0". @/li # @li @b without_touching @/b: With this option present, touching corners (aka "kissing # corners") will not yield errors. The default is to produce errors in these cases. @/li + # @li @b without_coincident @/b: With this option present, coincident edges will not yield errors. + # This is a stronger version of "without_touching" and makes sense only for two-layer checks + # or raw-mode input layers. It is listed here for completeness. @/li # @li @b transparent @/b: Performs the check without shielding (polygon layers only) @/li # @li @b shielded @/b: Performs the check with shielding (polygon layers only) @/li # @li @b props_eq @/b, @b props_ne @/b, @b props_copy @/b: (only props_copy applies to width check) - @@ -3796,12 +3799,12 @@ CODE # # @h3 Touching shapes @/h3 # - # The \without_touching option will turn off errors that arise due to + # The "without_touching" option will turn off errors that arise due to # the "kissing corner" configuration (or "checkerboard pattern"). Formally # this is a width violation across the diagonal, but when considering this # configuration as disconnected boxes, no error should be reported. # - # The following images illustrate the effect of the \without_touching option: + # The following images illustrate the effect of the "without_touching" option: # # @table # @tr @@ -3809,7 +3812,6 @@ CODE # @td @img(/images/drc_width6.png) @/td # @/tr # @/table - # # %DRC% # @name space @@ -3932,14 +3934,14 @@ CODE # # @h3 Touching shapes @/h3 # - # Like \width and \space, the separation check also supports the \without_touching option. + # Like \width and \space, the separation check also supports the "without_touching" option. # # This option will turn off errors that arise due to # collinear edges touching in one corner (the "kissing corners" configuration). # By default, such edges will yield an error, as they # form a zero-distance situation. With this option in place, no errors will be reported. # - # The following images illustrate the effect of the \without_touching option: + # The following images illustrate the effect of the "without_touching" option: # # @table # @tr @@ -3948,6 +3950,24 @@ CODE # @/tr # @/table # + # Another option is "without_coincident" which turns off errors that arise + # at coincident edges. Formally such edges represent a zero-distance situation, hence + # are flagged by default. Turning off the check in this case can be helpful when + # separating a layer into two parts (e.g. thin/wide metal separation) and an error + # between touching regions is not desired. + # + # The "without_coincident" option is a stronger version of "without_touching" and + # makes sense only for two-layer checks. + # + # The following images illustrate the effect of the "without_coincident" option: + # + # @table + # @tr + # @td @img(/images/drc_separation14.png) @/td + # @td @img(/images/drc_separation15.png) @/td + # @/tr + # @/table + # # @h3 Opposite and rectangle error filtering @/h3 # # The options for the separation check are those available for the \width or \space diff --git a/src/drc/unit_tests/drcSimpleTests.cc b/src/drc/unit_tests/drcSimpleTests.cc index 62d620168..74c614201 100644 --- a/src/drc/unit_tests/drcSimpleTests.cc +++ b/src/drc/unit_tests/drcSimpleTests.cc @@ -1617,3 +1617,12 @@ TEST(89_deep_with_mag_cop_size_aniso) run_test (_this, "89", true); } +TEST(90_collinear_mode) +{ + run_test (_this, "90", false); +} + +TEST(90d_collinear_mode) +{ + run_test (_this, "90", true); +} diff --git a/testdata/drc/drcSimpleTests_90.drc b/testdata/drc/drcSimpleTests_90.drc new file mode 100644 index 000000000..c0e50e5ca --- /dev/null +++ b/testdata/drc/drcSimpleTests_90.drc @@ -0,0 +1,34 @@ + +source $drc_test_source +target $drc_test_target + +if $drc_test_deep + deep +end + +l1 = input(1, 0) +l1_raw = input(1, 0).raw +l2 = input(2, 0) + +l1.output(1, 0) +l2.output(2, 0) + +l1.width(600.nm).output(100, 0) +l1.width(600.nm, without_touching).output(101, 0) +l1.width(600.nm, without_coincident).output(102, 0) + +l1.space(600.nm).output(200, 0) +l1.space(600.nm, without_touching).output(201, 0) +l1.space(600.nm, without_coincident).output(202, 0) +l1_raw.space(600.nm).output(210, 0) +l1_raw.space(600.nm, without_touching).output(211, 0) +l1_raw.space(600.nm, without_coincident).output(212, 0) + +l1.sep(l2, 600.nm).output(300, 0) +l1.sep(l2, 600.nm, without_touching).output(301, 0) +l1.sep(l2, 600.nm, without_coincident).output(302, 0) + +l1.drc(space < 600.nm).output(400, 0) +l1.drc(space(without_touching) < 600.nm).output(401, 0) +l1.drc(space(without_coincident) < 600.nm).output(402, 0) + diff --git a/testdata/drc/drcSimpleTests_90.gds b/testdata/drc/drcSimpleTests_90.gds new file mode 100644 index 0000000000000000000000000000000000000000..1fedad706c32c963eec1188c546577fcf8ab60db GIT binary patch literal 618 zcmaKpKMnyw6vn@u-JK=kKZ(K-By^&Y5RH&fD8yMDfL^EBPU8R$AZiD20Hs1HVLoFr z(~L=Gf0OUM@4cC~kPu>tW+0L~0yI!T2VM7!jF8ju5U7Q5f3WRNE{8{NbZV#j)dJ1< zk59_QYz{;jK<0(2E(-!cs}!oQv%)*zZYLC#J^t)jXOZ;gkCu%5;$DAzd%s@|Aimi; z+Gq4Hy?*u!p1Ln>)eKX(F>D?oA=Q%j>Ox_;r#k3IQrlKFhEq0tq+e%_OL dBz^U@rP2TSi>aOy@6A=+7#iKqFH!$6!UxG^SC{|* literal 0 HcmV?d00001 diff --git a/testdata/drc/drcSimpleTests_au90.gds b/testdata/drc/drcSimpleTests_au90.gds new file mode 100644 index 0000000000000000000000000000000000000000..42058a4a862b0579528253e5818fbce29e7d00d9 GIT binary patch literal 3818 zcmbuCJ#W-N5QfLTvwf%BM~;A$BKZdaDuiev1<@ctAdv!SXn=;lKt}@=-&KlSsuUp= zO{hZ<(D2!j6jTXCq)0%41ekemcI6$=M%uNdyRl~W*_nNJJ-(xy()1EdC26rk2~E-j zf4AIwYNh$v(K7alKQL{yqcT=7>@1;aE zGv45D=W6T_xgRIg9C-Nl3mF9qw)?cQh?uyS&o;~Q*CbK4SxRX6tk+uWXY1urC&s~oJ9MkE*1sR$ zABs+>8`s1gYpwr3{jRz7x7SO)IOk2~60UzkY-d{hChpd+`Hiytz091Mr@c;;Uasb8 zOWezMS2*oAqRv&;;VbXss@UF7@te5IUw7+|;BVCAU%7m?RhECAan0MJS7V#&KF8-_ zOLR1Gw|>Q2-2(L2e7OFKhkn^-(Z6`l=YNUM0^9Lj@te3?|LdCTSA0bNH#PGsJ|h2z zn)wwUvHzM6-+#q-SLNJ72Rw%(J^1X}=g`F6{nvc>`T1B=KgCDXulex$Kh>;X@!{t$ znQ`-@-=quZKhihRcd}#Be?~ruJNu`3^y}mv`nT}t|M{HsZ}2AW<TK0<%Z zhwHES2>lfwq5qMZ`YS#{Kh1~hr}zl{6d$4AeOJHm_g|v<;P;>A!+*bNKB9j=aMvG^ UU-1$7AJ)vT_>lYs|A%bSU&@rvH2?qr literal 0 HcmV?d00001 diff --git a/testdata/drc/drcSimpleTests_au90d.gds b/testdata/drc/drcSimpleTests_au90d.gds new file mode 100644 index 0000000000000000000000000000000000000000..42058a4a862b0579528253e5818fbce29e7d00d9 GIT binary patch literal 3818 zcmbuCJ#W-N5QfLTvwf%BM~;A$BKZdaDuiev1<@ctAdv!SXn=;lKt}@=-&KlSsuUp= zO{hZ<(D2!j6jTXCq)0%41ekemcI6$=M%uNdyRl~W*_nNJJ-(xy()1EdC26rk2~E-j zf4AIwYNh$v(K7alKQL{yqcT=7>@1;aE zGv45D=W6T_xgRIg9C-Nl3mF9qw)?cQh?uyS&o;~Q*CbK4SxRX6tk+uWXY1urC&s~oJ9MkE*1sR$ zABs+>8`s1gYpwr3{jRz7x7SO)IOk2~60UzkY-d{hChpd+`Hiytz091Mr@c;;Uasb8 zOWezMS2*oAqRv&;;VbXss@UF7@te5IUw7+|;BVCAU%7m?RhECAan0MJS7V#&KF8-_ zOLR1Gw|>Q2-2(L2e7OFKhkn^-(Z6`l=YNUM0^9Lj@te3?|LdCTSA0bNH#PGsJ|h2z zn)wwUvHzM6-+#q-SLNJ72Rw%(J^1X}=g`F6{nvc>`T1B=KgCDXulex$Kh>;X@!{t$ znQ`-@-=quZKhihRcd}#Be?~ruJNu`3^y}mv`nT}t|M{HsZ}2AW<TK0<%Z zhwHES2>lfwq5qMZ`YS#{Kh1~hr}zl{6d$4AeOJHm_g|v<;P;>A!+*bNKB9j=aMvG^ UU-1$7AJ)vT_>lYs|A%bSU&@rvH2?qr literal 0 HcmV?d00001