Skip to content

Commit

Permalink
mpl2: comments
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Koucher <arthurckoucher@gmail.com>
  • Loading branch information
AcKoucher committed May 25, 2024
1 parent fab7667 commit eb73985
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mpl2/src/hier_rtlmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6195,6 +6195,8 @@ void HierRTLMP::updateMacrosOnDb()
}
}

// We don't lock the macros here, because we'll attempt to improve
// orientation next.
void HierRTLMP::updateMacroOnDb(const HardMacro* hard_macro)
{
odb::dbInst* inst = hard_macro->getInst();
Expand All @@ -6206,11 +6208,10 @@ void HierRTLMP::updateMacroOnDb(const HardMacro* hard_macro)
const int x = block_->micronsToDbu(hard_macro->getRealX());
const int y = block_->micronsToDbu(hard_macro->getRealY());

// Orientation must be set before location so we don't end up flipping
// and misplacing the macro.
inst->setOrient(hard_macro->getOrientation());
inst->setLocation(x, y);

// We don't lock the macros here, because we'll attempt to improve
// orientation next.
inst->setPlacementStatus(odb::dbPlacementStatus::PLACED);
}

Expand Down
2 changes: 2 additions & 0 deletions src/mpl2/src/rtl_mp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ void MacroPlacer2::placeMacro(odb::dbInst* inst,
"place macro outside of the core.");
}

// Orientation must be set before location so we don't end up flipping
// and misplacing the macro.
inst->setOrient(orientation);
inst->setLocation(x1, y1);

Expand Down

0 comments on commit eb73985

Please sign in to comment.