Added DRC tests for antenna check.

This commit is contained in:
Matthias Koefferlein 2019-03-02 11:23:40 +01:00
parent 5c9b652771
commit 9c75ee8c92
8 changed files with 212 additions and 0 deletions

View File

@ -181,3 +181,124 @@ TEST(4_Hierarchical)
db::compare_layouts (_this, layout, au, db::NoNormalization);
}
TEST(5_FlatAntenna)
{
std::string rs = tl::testsrc ();
rs += "/testdata/drc/drcSimpleTests_5.drc";
std::string input = tl::testsrc ();
input += "/testdata/drc/antenna_l1.gds";
std::string au = tl::testsrc ();
au += "/testdata/drc/drcSimpleTests_au5.oas";
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);
}
TEST(6_HierarchicalAntenna)
{
std::string rs = tl::testsrc ();
rs += "/testdata/drc/drcSimpleTests_6.drc";
std::string input = tl::testsrc ();
input += "/testdata/drc/antenna_l1.gds";
std::string au = tl::testsrc ();
au += "/testdata/drc/drcSimpleTests_au6.oas";
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);
}
TEST(7_AntennaWithDiodes)
{
std::string rs = tl::testsrc ();
rs += "/testdata/drc/drcSimpleTests_7.drc";
std::string input = tl::testsrc ();
input += "/testdata/drc/antenna_l1.gds";
std::string au = tl::testsrc ();
au += "/testdata/drc/drcSimpleTests_au7.oas";
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);
}

BIN
testdata/drc/antenna_l1.gds vendored Normal file

Binary file not shown.

26
testdata/drc/drcSimpleTests_5.drc vendored Normal file
View File

@ -0,0 +1,26 @@
# Hierarchical antenna check
source($drc_test_source, "RINGO")
target($drc_test_target)
diff = input(2, 0)
poly = input(3, 0)
contact = input(4, 0)
poly_cont = input(5, 0)
metal1 = input(6, 0)
via1 = input(7, 0)
metal2 = input(8, 0)
gate = diff & poly
connect(gate, poly)
connect(poly, poly_cont)
connect(poly_cont, metal1)
connect(metal1, via1)
connect(via1, metal2)
antenna_check(gate, metal2, 1.0).output(101)
antenna_check(gate, metal2, 5.0).output(105)
antenna_check(gate, metal2, 10.0).output(110)
antenna_check(gate, metal2, 50.0).output(150)

28
testdata/drc/drcSimpleTests_6.drc vendored Normal file
View File

@ -0,0 +1,28 @@
# Hierarchical antenna check
source($drc_test_source, "RINGO")
target($drc_test_target)
deep
diff = input(2, 0)
poly = input(3, 0)
contact = input(4, 0)
poly_cont = input(5, 0)
metal1 = input(6, 0)
via1 = input(7, 0)
metal2 = input(8, 0)
gate = diff & poly
connect(gate, poly)
connect(poly, poly_cont)
connect(poly_cont, metal1)
connect(metal1, via1)
connect(via1, metal2)
antenna_check(gate, metal2, 1.0).output(101)
antenna_check(gate, metal2, 5.0).output(105)
antenna_check(gate, metal2, 10.0).output(110)
antenna_check(gate, metal2, 50.0).output(150)

37
testdata/drc/drcSimpleTests_7.drc vendored Normal file
View File

@ -0,0 +1,37 @@
# Hierarchical antenna check
source($drc_test_source, "RINGO")
target($drc_test_target)
deep
diff = input(2, 0)
poly = input(3, 0)
diff_cont = input(4, 0)
poly_cont = input(5, 0)
metal1 = input(6, 0)
via1 = input(7, 0)
metal2 = input(8, 0)
diode = input(2, 10)
gate = diff & poly
connect(gate, poly)
connect(poly, poly_cont)
connect(diode, diff_cont)
connect(diff_cont, metal1)
connect(poly_cont, metal1)
connect(metal1, via1)
connect(via1, metal2)
antenna_check(gate, metal2, 1.0, diode).output(101)
antenna_check(gate, metal2, 5.0, diode).output(105)
antenna_check(gate, metal2, 10.0, diode).output(110)
antenna_check(gate, metal2, 50.0, diode).output(150)
antenna_check(gate, metal2, 1.0, [ diode, 0.5 ]).output(201)
antenna_check(gate, metal2, 1.0, [ diode, 5.0 ]).output(202)
antenna_check(gate, metal2, 5.0, [ diode, 5.0 ]).output(205)
antenna_check(gate, metal2, 10.0, [ diode, 5.0 ]).output(210)
antenna_check(gate, metal2, 50.0, [ diode, 5.0 ]).output(250)

BIN
testdata/drc/drcSimpleTests_au5.oas vendored Normal file

Binary file not shown.

BIN
testdata/drc/drcSimpleTests_au6.oas vendored Normal file

Binary file not shown.

BIN
testdata/drc/drcSimpleTests_au7.oas vendored Normal file

Binary file not shown.