Skip to content

Commit

Permalink
Do not include 'purge_devices' in Netlist#simplify as such devices ma…
Browse files Browse the repository at this point in the history
…y be intentionally included as spare or dummy devices. If you want to remove them, use 'purge_devices' on 'netlist' and/or 'schematic'
  • Loading branch information
Matthias Koefferlein committed Sep 8, 2024
1 parent ac2d20a commit 074238b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/db/db/dbNetlist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,6 @@ void Netlist::purge ()

Circuit *circuit = c.operator-> ();

// purge invalid devices
circuit->purge_devices ();

// purge floating, disconnected nets
circuit->purge_nets ();

Expand Down
2 changes: 1 addition & 1 deletion src/db/db/gsiDeclDbNetlist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,7 @@ Class<db::Netlist> decl_dbNetlist ("db", "Netlist",
) +
gsi::method ("simplify", &db::Netlist::simplify,
"@brief Convenience method that combines the simplification.\n"
"This method is a convenience method that runs \\make_top_level_pins, \\purge, \\combine_devices, \\purge_devices and \\purge_nets."
"This method is a convenience method that runs \\make_top_level_pins, \\purge, \\combine_devices and \\purge_nets."
) +
gsi::method_ext ("read", &read_netlist, gsi::arg ("file"), gsi::arg ("reader"),
"@brief Writes the netlist to the given file using the given reader object to parse the file\n"
Expand Down
2 changes: 1 addition & 1 deletion src/db/unit_tests/dbNetlistTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2034,7 +2034,7 @@ TEST(28_EliminateShortedDevices)
"end;\n"
);

nl.simplify ();
nl.purge_devices ();

EXPECT_EQ (nl.to_string (),
"circuit TOP (p1=n1,p2=n2);\n"
Expand Down
6 changes: 6 additions & 0 deletions src/lvs/unit_tests/lvsTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ TEST(12_private)
run_test (_this, "test_12.lvs", "test_12b.cir.gz", "test_12.gds.gz", true);
}

TEST(121_private)
{
// test_is_long_runner ();
run_test (_this, "test_121.lvs", "test_121.cir.gz", "test_121.gds.gz", true);
}

TEST(13_private)
{
// test_is_long_runner ();
Expand Down

0 comments on commit 074238b

Please sign in to comment.