From bc98336d2a57a98f2da0ae48b7406a9f13d74087 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Tue, 22 Sep 2020 19:19:26 +0200 Subject: [PATCH] Added DRC test for interact with count --- src/drc/unit_tests/drcSimpleTests.cc | 40 +++++++++++++++++++ testdata/drc/drcSimpleTests_20.drc | 56 +++++++++++++++++++++++++++ testdata/drc/drcSimpleTests_20.gds | Bin 0 -> 1018 bytes testdata/drc/drcSimpleTests_au20.gds | Bin 0 -> 4730 bytes 4 files changed, 96 insertions(+) create mode 100644 testdata/drc/drcSimpleTests_20.drc create mode 100644 testdata/drc/drcSimpleTests_20.gds create mode 100644 testdata/drc/drcSimpleTests_au20.gds diff --git a/src/drc/unit_tests/drcSimpleTests.cc b/src/drc/unit_tests/drcSimpleTests.cc index dd3d15e4a..2547f4e9b 100644 --- a/src/drc/unit_tests/drcSimpleTests.cc +++ b/src/drc/unit_tests/drcSimpleTests.cc @@ -876,3 +876,43 @@ TEST(19_shielding) db::compare_layouts (_this, layout, au, db::NoNormalization); } +TEST(20_interact_with_count) +{ + std::string rs = tl::testsrc (); + rs += "/testdata/drc/drcSimpleTests_20.drc"; + + std::string input = tl::testsrc (); + input += "/testdata/drc/drcSimpleTests_20.gds"; + + std::string au = tl::testsrc (); + au += "/testdata/drc/drcSimpleTests_au20.gds"; + + std::string output = this->tmp_file ("tmp.gds"); + + { + // Set some variables + lym::Macro config; + config.set_text (tl::sprintf ( + "$drc_test_source = '%s'\n" + "$drc_test_target = '%s'\n" + , input, output) + ); + config.set_interpreter (lym::Macro::Ruby); + EXPECT_EQ (config.run (), 0); + } + + lym::Macro drc; + drc.load_from (rs); + EXPECT_EQ (drc.run (), 0); + + db::Layout layout; + + { + tl::InputStream stream (output); + db::Reader reader (stream); + reader.read (layout); + } + + db::compare_layouts (_this, layout, au, db::NoNormalization); +} + diff --git a/testdata/drc/drcSimpleTests_20.drc b/testdata/drc/drcSimpleTests_20.drc new file mode 100644 index 000000000..9bd481a5e --- /dev/null +++ b/testdata/drc/drcSimpleTests_20.drc @@ -0,0 +1,56 @@ + +# Hierarchical antenna check + +source($drc_test_source, "TOP") +target($drc_test_target) + +l1 = input(1, 0) +l2 = input(2, 0) + +l1.output(1, 0) +l2.output(2, 0) + +l1.interacting(l2, 1).output(100, 0) +l1.interacting(l2, 2).output(101, 0) +l1.interacting(l2, 1..2).output(102, 0) +l1.interacting(l2, 2..).output(103, 0) +l1.interacting(l2, 1, 2).output(104, 0) + +l = l1.dup +l.select_interacting(l2, 1) +l.output(200, 0) +l = l1.dup +l.select_interacting(l2, 2) +l.output(201, 0) +l = l1.dup +l.select_interacting(l2, 1..2) +l.output(202, 0) +l = l1.dup +l.select_interacting(l2, 2..) +l.output(203, 0) +l = l1.dup +l.select_interacting(l2, 1, 2) +l.output(204, 0) + +l1.not_interacting(l2, 1).output(300, 0) +l1.not_interacting(l2, 2).output(301, 0) +l1.not_interacting(l2, 1..2).output(302, 0) +l1.not_interacting(l2, 2..).output(303, 0) +l1.not_interacting(l2, 1, 2).output(304, 0) + +l = l1.dup +l.select_not_interacting(l2, 1) +l.output(400, 0) +l = l1.dup +l.select_not_interacting(l2, 2) +l.output(401, 0) +l = l1.dup +l.select_not_interacting(l2, 1..2) +l.output(402, 0) +l = l1.dup +l.select_not_interacting(l2, 2..) +l.output(403, 0) +l = l1.dup +l.select_not_interacting(l2, 1, 2) +l.output(404, 0) + diff --git a/testdata/drc/drcSimpleTests_20.gds b/testdata/drc/drcSimpleTests_20.gds new file mode 100644 index 0000000000000000000000000000000000000000..08618beb29e1d98948c2253666cad239cab4535b GIT binary patch literal 1018 zcmbW0y-EW?6ot>u{v~KML1iOGM6eMA8$m=76${0H7Ab;t9w3jQy`4=u8y_GKAl7++ zloly1wi0oivy;oLl3m0!-*RWZy=U%D5J9OfTAqsEP{j%o9HN)^tS^?sT-F1%t@cQ=?kS^mfuUYPA_WlSBdW{E1`qTA7f30itlia`FcI5e{>jl1@LpZi% ff6hZF^%-6o%iK*_~aYC>xAu#26DB6A%j$V?u}+3XCLLP!MbUDES%M`9ViRXX6jx z2M~fE1wVk&f|6n@LKyG6cTeV?fnAw%+2-AxxzC()-g729S>#C5RZJ#n>n}!d6XWPW zeMdXZmtQ;wZe-2*g-=gj?tVXdy0|^FwfSZRlTCFtya(EOzVhld&}aksXo>{+wG_bA zSOz3r_sxB%t$pCicBv9~+UN}7$&era=y_3zI~~Yh-(nVk%KW$2N|m_Nf&9H^JOxn6 zKWvmLai>Fh)=8dqlNXivu=8Gf~EA_8MJ`ajF?6cwx`>c3+ z#J#QYJSv{~W$)!V5S4i4d3YP?pW+SvDc;ckyRd#ke#IN+r})_V4fA^+_RswMP%rp< zpm>9SiZ}HCA*|n!U-5?dDL%G-!~FKb{tfd}yum-k8~jte!9T?t{QDW{pW+SvDc;ck zudseYe#IN+r})_V4fFdQ_HWpK#T)!nyrKU;Vf}{uiZ{$p@v-&SpI243a{r4o@DIber@R0F literal 0 HcmV?d00001