Skip to content

Commit acf960e

Browse files
committed
gpl: routability save minRcTargetDensity_ by region
Signed-off-by: LucasYuki <[email protected]>
1 parent 4d903af commit acf960e

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/gpl/src/routeBase.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ RouteBase::RouteBase(RouteBaseVars rbVars,
250250
nbc_ = std::move(nbc);
251251
log_ = log;
252252
nbVec_ = std::move(nbVec);
253+
minRcTargetDensity_.resize(nbVec.size());
253254
init();
254255
}
255256

@@ -275,14 +276,14 @@ void RouteBase::revertToMinCongestion()
275276

276277
// revert
277278
nbc_->revertGCellSizeToMinRc();
278-
for (auto& nb : nbVec_) {
279+
for (int j = 0; j < nbVec_.size(); j++) {
279280
log_->info(GPL,
280281
58,
281282
"\t{}\t: {:.4f}",
282-
nb->group()->getName(), minRcTargetDensity_);
283-
nb->setTargetDensity(minRcTargetDensity_);
284-
nb->restoreRemovedFillers();
285-
nb->updateDensitySize();
283+
nbVec_[j]->group()->getName(), minRcTargetDensity_[j]);
284+
nbVec_[j]->setTargetDensity(minRcTargetDensity_[j]);
285+
nbVec_[j]->restoreRemovedFillers();
286+
nbVec_[j]->updateDensitySize();
286287
}
287288
resetRoutabilityResources();
288289
}
@@ -584,9 +585,11 @@ std::pair<bool, bool> RouteBase::routability(
584585
curRc,
585586
minRc_);
586587
minRc_ = curRc;
587-
minRcTargetDensity_ = nbVec_[0]->getTargetDensity();
588588
min_RC_violated_cnt_ = 0;
589-
nbVec_[0]->clearRemovedFillers();
589+
for (int i = 0; i < nbVec_.size(); i++) {
590+
minRcTargetDensity_[i] = nbVec_[i]->getTargetDensity();
591+
nbVec_[i]->clearRemovedFillers();
592+
}
590593

591594
// save cell size info
592595
nbc_->updateMinRcCellSize();

src/gpl/src/routeBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class RouteBase
192192
// minRcInflationSize_ will store
193193
// GCell's width and height
194194
float minRc_ = 1e30;
195-
float minRcTargetDensity_ = 0;
195+
std::vector<float> minRcTargetDensity_;
196196
int min_RC_violated_cnt_ = 0;
197197
int max_routability_no_improvement_ = 3;
198198
int max_routability_revert_ = 50;

0 commit comments

Comments
 (0)