Co-authored-by: Matthias Koefferlein <matthias@klayout.de>
This commit is contained in:
Matthias Köfferlein 2024-02-11 10:36:44 +01:00 committed by GitHub
parent 8d4da8b374
commit 3ab442bfc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 58 additions and 1 deletions

View File

@ -702,7 +702,8 @@ module DRC
@l2n = RBA::LayoutToNetlist::new(@engine._dss)
else
layout = @engine.source.layout
@l2n = RBA::LayoutToNetlist::new(layout.top_cell.name, layout.dbu)
cell_name = @engine.source.cell_name
@l2n = RBA::LayoutToNetlist::new(cell_name, layout.dbu)
end
@l2n.name = "DRC"

View File

@ -1617,3 +1617,39 @@ TEST(89_deep_with_mag_cop_size_aniso)
run_test (_this, "89", true);
}
TEST(90_issue1594_dual_top)
{
std::string rs = tl::testdata ();
rs += "/drc/issue_1594.drc";
std::string input = tl::testdata ();
input += "/drc/issue_1594.gds";
std::string au = tl::testdata ();
au += "/drc/issue_1594_au.cir";
std::string output = this->tmp_file ("tmp.cir");
{
// Set some variables
lym::Macro config;
config.set_text (tl::sprintf (
"$drc_force_gc = true\n"
"$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);
// verify
CHECKPOINT ();
compare_netlists (_this, output, au);
}

15
testdata/drc/issue_1594.drc vendored Normal file
View File

@ -0,0 +1,15 @@
source($drc_test_source, "TOP1")
# This is just a smoke test without actual devices
l1 = input(1, 0)
l2 = input(2, 0)
l3 = input(3, 0)
connect(l1, l2)
connect(l2, l3)
writer = RBA::NetlistSpiceWriter::new
netlist.write($drc_test_target, writer, "netlist")

BIN
testdata/drc/issue_1594.gds vendored Normal file

Binary file not shown.

5
testdata/drc/issue_1594_au.cir vendored Normal file
View File

@ -0,0 +1,5 @@
* netlist
* cell TOP1
.SUBCKT TOP1
.ENDS TOP1