Skip to content

Commit c7910f0

Browse files
committed
pad: honor FIXED swires in rdl router
Signed-off-by: Peter Gadfort <[email protected]>
1 parent 3d6955e commit c7910f0

File tree

6 files changed

+3484
-4
lines changed

6 files changed

+3484
-4
lines changed

src/pad/src/RDLRouter.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,14 @@ void RDLRouter::route(const std::vector<odb::dbNet*>& nets)
666666

667667
// remove old routes
668668
for (const auto& route : routes_) {
669-
route->getNet()->destroySWires();
669+
auto swires = route->getNet()->getSWires();
670+
for (auto itr = swires.begin(); itr != swires.end();) {
671+
if ((*itr)->getWireType() == odb::dbWireType::FIXED) {
672+
itr++;
673+
continue;
674+
}
675+
itr = odb::dbSWire::destroy(itr);
676+
}
670677
}
671678

672679
for (const auto& route : routes_) {
@@ -1795,11 +1802,13 @@ void RDLRouter::populateObstructions(const std::vector<odb::dbNet*>& nets)
17951802
// Get already routed nets obstructions, excluding those that will be routed
17961803
// now
17971804
for (auto* net : block_->getNets()) {
1798-
if (std::find(nets.begin(), nets.end(), net) != nets.end()) {
1799-
continue;
1800-
}
1805+
const bool is_routing_net = std::find(nets.begin(), nets.end(), net) != nets.end();
18011806

18021807
for (auto* swire : net->getSWires()) {
1808+
if (is_routing_net && swire->getWireType() != odb::dbWireType::FIXED) {
1809+
continue;
1810+
}
1811+
18031812
for (auto* box : swire->getWires()) {
18041813
if (box->getTechLayer() != layer_) {
18051814
continue;

src/pad/test/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ COMPULSORY_TESTS = [
5151
"rdl_route_bump_via",
5252
"rdl_route_failed",
5353
"rdl_route_invalid",
54+
"rdl_route_keep_existing",
5455
"rdl_route_max_iterations",
5556
"rdl_route_ports",
5657
"rdl_route_single_target",

src/pad/test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ or_integration_tests(
4646
rdl_route_bump_via
4747
rdl_route_failed
4848
rdl_route_invalid
49+
rdl_route_keep_existing
4950
rdl_route_max_iterations
5051
rdl_route_ports
5152
rdl_route_single_target

0 commit comments

Comments
 (0)