Skip to content

Commit eaa4a92

Browse files
committed
grt: enable res-aware for all nets during incremental grt
Signed-off-by: Jonas Gava <[email protected]>
1 parent 1177304 commit eaa4a92

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

src/grt/src/GlobalRouter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5253,6 +5253,8 @@ std::vector<Net*> GlobalRouter::updateDirtyRoutes(bool save_guides)
52535253
}
52545254
}
52555255

5256+
fastroute_->setIncrementalGrt(false);
5257+
52565258
return dirty_nets;
52575259
}
52585260

@@ -5292,6 +5294,7 @@ void GlobalRouter::initFastRouteIncr(std::vector<Net*>& nets)
52925294
{
52935295
initNetlist(nets);
52945296
fastroute_->initAuxVar();
5297+
fastroute_->setIncrementalGrt(true);
52955298
}
52965299

52975300
GRouteDbCbk::GRouteDbCbk(GlobalRouter* grouter) : grouter_(grouter)

src/grt/src/fastroute/include/FastRoute.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ class FastRouteCore
274274
NetRouteMap getPlanarRoutes();
275275
void getPlanarRoute(odb::dbNet* db_net, GRoute& route);
276276
void get3DRoute(odb::dbNet* db_net, GRoute& route);
277+
void setIncrementalGrt(bool is_incremental);
277278

278279
private:
279280
int getEdgeCapacity(FrNet* net, int x1, int y1, EdgeDirection direction);
@@ -617,6 +618,7 @@ class FastRouteCore
617618
bool resistance_aware_ = false;
618619
bool enable_resistance_aware_ = false;
619620
bool is_3d_step_ = false;
621+
bool is_incremental_grt_ = false;
620622
int num_adjust_;
621623
int v_capacity_;
622624
int h_capacity_;

src/grt/src/fastroute/src/utility.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,10 @@ int FastRouteCore::getViaResistance(const int from_layer, const int to_layer)
563563
return std::ceil(total_via_resistance / default_res);
564564
}
565565

566+
void FastRouteCore::setIncrementalGrt(bool is_incremental) {
567+
is_incremental_grt_ = is_incremental;
568+
}
569+
566570
// Update and sort the nets by the worst slack. Finally pick a percentage of the
567571
// nets to use the resistance-aware strategy
568572
void FastRouteCore::updateSlacks(float percentage)
@@ -584,6 +588,9 @@ void FastRouteCore::updateSlacks(float percentage)
584588

585589
const float slack = getNetSlack(net->getDbNet());
586590
net->setSlack(slack);
591+
592+
// Enable res-aware for clock nets by default
593+
// net->setIsResAware(net->isClock());
587594
net->setIsResAware(false);
588595

589596
// Skip positive slacks above threshold
@@ -601,6 +608,9 @@ void FastRouteCore::updateSlacks(float percentage)
601608

602609
std::stable_sort(res_aware_list.begin(), res_aware_list.end(), compareSlack);
603610

611+
if(is_incremental_grt_) {
612+
percentage = 1;
613+
}
604614
// Decide the percentage of nets that will use resistance aware
605615
for (int i = 0; i < res_aware_list.size() * percentage; i++) {
606616
nets_[res_aware_list[i].first]->setIsResAware(true);

0 commit comments

Comments
 (0)