-
Notifications
You must be signed in to change notification settings - Fork 728
mpl: blockages as fixed macros #8438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mpl: blockages as fixed macros #8438
Conversation
Signed-off-by: Arthur Koucher <[email protected]>
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
|
clang-tidy review says "All clean, LGTM! 👍" |
src/mpl/src/graphics.cpp
Outdated
| return macro.getCluster() != nullptr | ||
| && macro.getCluster()->isClusterOfUnplacedIOPins(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way we're not skipping fixed terminals.
I think we should use the is_blockage_ flag and have something like:
if (macro.isBlockage()) {
return false;
}
Cluster* cluster = macro.getCluster();
return !cluster || cluster->isClusterOfUnplacedIOPins();
src/mpl/src/graphics.cpp
Outdated
| void Graphics::setSoftMacroBrush(gui::Painter& painter, | ||
| const SoftMacro& soft_macro) | ||
| { | ||
| if (soft_macro.getCluster() == nullptr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
soft_macro.isBlockage()
src/mpl/src/hier_rtlmp.cpp
Outdated
| if (macro_array->getNumMacro() % divider == 0) { | ||
| columns = macro_array->getNumMacro() / divider; | ||
| rows = divider; | ||
| const auto outline = tree_->root->getBBox(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using auto.
src/mpl/src/hier_rtlmp.cpp
Outdated
| const float proportional_min_width = min_depth_proportion * die.getWidth(); | ||
| const float proportional_min_height = min_depth_proportion * die.getHeight(); | ||
|
|
||
| const auto tiling = tree_->root->getTilings().front(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using auto.
src/mpl/src/hier_rtlmp.cpp
Outdated
| // We model blockages as macro clusters (SoftMacros) constrained to fences. | ||
| // The rationale of this model comes from the fact that the area occupied | ||
| // by blockages should be empty, i.e., with neither macros or std cells. | ||
| void HierRTLMP::blockagesAsFixedSoftMacros( | ||
| const std::vector<Rect>& blockages, | ||
| std::map<std::string, int>& soft_macro_id_map, | ||
| std::vector<SoftMacro>& macros) | ||
| { | ||
| for (const Rect& blockage : blockages) { | ||
| const int macro_id = static_cast<int>(macros.size()); | ||
| std::string macro_name = fmt::format("blockage_{}", macro_id); | ||
| soft_macro_id_map[macro_name] = macro_id; | ||
|
|
||
| macros.emplace_back(blockage, macro_name); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The comment is not accurate. We should remove it as the approach is reasonably simpler now.
- Blockages don't need to be part of
soft_macro_id_map. - I think that this function would be clearer if named as
createSoftMacrosForBlockages()
| // Interfaces with hard macro | ||
| Cluster* cluster_ = nullptr; | ||
| bool fixed_ = false; // if the macro is fixed | ||
| bool is_blockage_ = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is useful for debugging. See other comments.
|
Subsequent work:
|
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: João Mai <[email protected]>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
Requires PR #3516 from ORFS. |
src/mpl/src/hier_rtlmp.cpp
Outdated
| // We model blockages as macro clusters (SoftMacros) constrained to fences. | ||
| // The rationale of this model comes from the fact that the area occupied | ||
| // by blockages should be empty, i.e., with neither macros or std cells. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this comment is a leftover from the previous attempted approach. It is not accurate and should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add the rationale to the PR description.
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
Signed-off-by: João Mai <[email protected]>
|
I'm not sure I understand the problem with clang-tidy. |
|
Holding pending other metric updates in the queue. Will pair with The-OpenROAD-Project/OpenROAD-flow-scripts#3516 |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
Should be paired with PR #3583 from ORFS. |
This PR changes how blockages are treated inside MPL simulated annealing, going from special objects to fixed macros. This changes the behavior of blockages from a soft constraint to a hard constraint, but simplifies the use of blockages in general, since they are objects within the sequence pair of the annealer.
The change from soft to hard constraint required changes in the creation of pin access blockages too, since it was causing troubles in design such as mock-array due to lack of space to fit everything.