Skip to content

Commit

Permalink
Merge pull request #6271 from The-OpenROAD-Project-staging/gpl-fix-de…
Browse files Browse the repository at this point in the history
…ltaArea-bug

Fix gpl bug, account for area changes from new cells
  • Loading branch information
maliberty authored Dec 1, 2024
2 parents e8d6757 + 05f11ed commit 59239d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gpl/src/nesterovBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2822,6 +2822,10 @@ size_t NesterovBaseCommon::createGCell(odb::dbInst* db_inst)
GCell* gcell_ptr = &gCellStor_.back();
gCellMap_[gcell_ptr->instance()] = gcell_ptr;
db_inst_map_[db_inst] = gCellStor_.size() - 1;

int64_t areaChange = static_cast<int64_t>(gcell_ptr->dx())
* static_cast<int64_t>(gcell_ptr->dy());
deltaArea_ += areaChange;
return gCellStor_.size() - 1;
}

Expand Down Expand Up @@ -2892,6 +2896,7 @@ void NesterovBaseCommon::destroyGCell(size_t index_remove)
gCellStor_.pop_back();

log_->report("after destroy gCellStor_.size():{}", gCellStor_.size());
// TODO: update deltaArea_ after cell destruction.
}

void NesterovBase::destroyFillerGCell(size_t index_remove)
Expand Down

0 comments on commit 59239d9

Please sign in to comment.