Skip to content

Commit

Permalink
mpl2: use proper method when setting the shape of a macro cluster.
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Koucher <arthurckoucher@gmail.com>
  • Loading branch information
AcKoucher committed Nov 1, 2024
1 parent 8ad3ac8 commit 2d84b13
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/mpl2/src/SACoreSoftMacro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,16 @@ void SACoreSoftMacro::run()

for (const int macro_id : pos_seq_) {
SoftMacro& macro = macros_[macro_id];
macro.setWidth(best_valid_result_->macro_id_to_width.at(macro_id));
const float valid_result_width
= best_valid_result_->macro_id_to_width.at(macro_id);

if (macro.isMacroCluster()) {
const float area = macro.getArea();
const float valid_result_height = area / valid_result_width;
macro.setShapeF(valid_result_width, valid_result_height);
} else {
macro.setWidth(valid_result_width);
}
}

packFloorplan();
Expand Down

0 comments on commit 2d84b13

Please sign in to comment.