Skip to content

Commit 7566065

Browse files
authored
Merge pull request #9023 from gadfort/pdn-no-swire
pdn: cleanup swires if no boxes created
2 parents 3d6955e + 46d217c commit 7566065

File tree

6 files changed

+2211
-0
lines changed

6 files changed

+2211
-0
lines changed

src/pdn/src/PdnGen.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,15 @@ void PdnGen::writeToDb(bool add_pins, const std::string& report_file) const
813813
}
814814
}
815815

816+
// Remove empty swires
817+
for (auto& [net, swire] : net_map) {
818+
if (swire->getWires().empty()) {
819+
odb::dbSWire::destroy(swire);
820+
logger_->warn(
821+
utl::PDN, 213, "No shapes were created for net {}.", net->getName());
822+
}
823+
}
824+
816825
// remove stale results
817826
odb::dbMarkerCategory* category = block->findMarkerCategory("PDN");
818827
if (category != nullptr) {

src/pdn/test/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ COMPULSORY_TESTS = [
6666
"core_grid_with_rings_with_straps",
6767
"core_grid_with_rings_with_straps_rings_over_core",
6868
"core_grid_with_routing_obstructions",
69+
"core_grid_with_secondary_no_shapes",
6970
"core_grid_with_single_edge_pins",
7071
"core_grid_with_single_layer_rings",
7172
"design_width",

src/pdn/test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ or_integration_tests(
6363
core_grid_with_rings_with_straps
6464
core_grid_with_rings_with_straps_rings_over_core
6565
core_grid_with_routing_obstructions
66+
core_grid_with_secondary_no_shapes
6667
core_grid_with_single_edge_pins
6768
core_grid_with_single_layer_rings
6869
design_width

0 commit comments

Comments
 (0)