Skip to content

Commit 91d7a09

Browse files
committed
mpl: consider root cluster location in coarse shaping
Signed-off-by: Arthur Koucher <[email protected]>
1 parent 9690c31 commit 91d7a09

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/mpl/src/hier_rtlmp.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ void HierRTLMP::calculateChildrenTilings(Cluster* parent)
440440
const float action_sum = pos_swap_prob_ + neg_swap_prob_ + double_swap_prob_
441441
+ exchange_swap_prob_ + resize_prob_;
442442

443-
const Rect outline(0, 0, tree_->root->getWidth(), tree_->root->getHeight());
443+
const Rect outline = tree_->root->getBBox();
444444

445445
const int num_perturb_per_step = (macros.size() > num_perturb_per_step_ / 10)
446446
? macros.size()
@@ -462,10 +462,10 @@ void HierRTLMP::calculateChildrenTilings(Cluster* parent)
462462
const int run_thread
463463
= graphics_ ? 1 : std::min(remaining_runs, num_threads_);
464464
for (int i = 0; i < run_thread; i++) {
465-
const Rect new_outline(0,
466-
0,
467-
outline.getWidth() * vary_factor_list[run_id++],
468-
outline.getHeight());
465+
Rect new_outline = outline;
466+
const float new_width = outline.getWidth() * vary_factor_list[run_id++];
467+
new_outline.setXMax(new_outline.xMin() + new_width);
468+
469469
if (graphics_) {
470470
graphics_->setOutline(micronsToDbu(block_, new_outline));
471471
}
@@ -520,10 +520,10 @@ void HierRTLMP::calculateChildrenTilings(Cluster* parent)
520520
const int run_thread
521521
= graphics_ ? 1 : std::min(remaining_runs, num_threads_);
522522
for (int i = 0; i < run_thread; i++) {
523-
const Rect new_outline(0,
524-
0,
525-
outline.getWidth(),
526-
outline.getHeight() * vary_factor_list[run_id++]);
523+
Rect new_outline = outline;
524+
const float new_height = outline.getHeight() * vary_factor_list[run_id++];
525+
new_outline.setYMax(new_outline.yMin() + new_height);
526+
527527
if (graphics_) {
528528
graphics_->setOutline(micronsToDbu(block_, new_outline));
529529
}

0 commit comments

Comments
 (0)