Skip to content

Commit b977092

Browse files
committed
pad: redefine queue to allow for selective inclusion of routes
Signed-off-by: Peter Gadfort <[email protected]>
1 parent 54e7b7c commit b977092

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/pad/src/RDLRouter.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,17 @@ void RDLRouter::route(const std::vector<odb::dbNet*>& nets)
370370
auto route_compare
371371
= [](const std::shared_ptr<RDLRoute>& lhs,
372372
const std::shared_ptr<RDLRoute>& rhs) { return lhs->compare(rhs); };
373-
std::priority_queue route_queue(
374-
routes_.begin(), routes_.end(), route_compare);
373+
std::priority_queue<RDLRoutePtr,
374+
std::vector<RDLRoutePtr>,
375+
decltype(route_compare)>
376+
route_queue;
377+
for (const auto& route : routes_) {
378+
if (route->isRouted()) {
379+
continue;
380+
}
381+
// Only add routes that need to routed
382+
route_queue.push(route);
383+
}
375384

376385
logger_->info(utl::PAD, 5, "Routing {} nets", nets.size());
377386

0 commit comments

Comments
 (0)