Skip to content

Commit

Permalink
Merge branch 'rcm_Arthur' of github.com:eclufsc/OpenROAD_ecl into rcm…
Browse files Browse the repository at this point in the history
…_Arthur
  • Loading branch information
arthurjolo committed Sep 18, 2024
2 parents a320609 + aca00ae commit 18457ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/rcm/include/rcm/CellMoveRouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ class CellMoveRouter {
bool debug_ = false;
bool use_steiner_ = true;
bool compare_stiener_ = true;
int candidate_percentage_ = 0.05;
bool limit_candidate_size_ = false;
Abacus abacus_;
stt::SteinerTreeBuilder *stt_ = nullptr;
};
Expand Down
15 changes: 7 additions & 8 deletions src/rcm/src/CellMoveRouter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,16 @@ CellMoveRouter::Cell_Move_Rerout(){
int total_regected = 0;
int total_worse = 0;
int iterations = 0;
int n_move_cells = std::floor(cells_weight_.size() * 5/100);
int n_move_cells = 0;
for(int j = 0; j < 20; j++) {
InitCellsWeight();
int n_cells = cells_weight_.size();
if(limit_candidate_size_) {
n_move_cells = std::floor(cells_weight_.size() * candidate_percentage_);
}

for(int i = cells_weight_.size() - 1; i >=0; i--) {
if(cells_to_move_.size() == n_move_cells || cells_weight_[i].weight <= 0) {
if((limit_candidate_size_ && cells_to_move_.size() == n_move_cells) ||
(!limit_candidate_size_ && cells_weight_[i].weight <= 0)) {
break;
}
cells_to_move_.push_back(cells_weight_[i]);
Expand Down Expand Up @@ -867,17 +870,13 @@ CellMoveRouter::InitCellsWeight()
cell->getLocation(original_x, original_y);

median cell_nets_median = compute_cells_nets_median(cell);
if(cell->getName() == "inst35975") {
logger_->report("Median computed during wight: ({}, {})", cell_nets_median.first, cell_nets_median.second);
}
cell->setLocation(cell_nets_median.first, cell_nets_median.second);
if(cell_nets_median.first == 0 && cell_nets_median.second == 0) {
cells_weight_.push_back({cell, 0, 0, 0,{0,0}});
continue;
}
}
//logger_->report("Cell: {}", cell->getName());
//logger_->report("Original pos: {}, {}\nMoved pos: {}, {}", original_x, original_y, cell_nets_median.first, cell_nets_median.second);

for (auto pin : cell->getITerms()) {
auto net = pin->getNet();
if(net != nullptr) {
Expand Down

0 comments on commit 18457ab

Please sign in to comment.