Skip to content

mpl: pin-aware macro halos - #10558

Merged
eder-matheus merged 39 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:mpl-halo-on-pins
Jul 24, 2026
Merged

mpl: pin-aware macro halos#10558
eder-matheus merged 39 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:mpl-halo-on-pins

Conversation

@joaomai

@joaomai joaomai commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • This PR introduces a pin-aware halo assignment for MPL. Instead of applying a halo on all four sides of every macro, MPL now only assigns them to macro sides with signal pins.
  • Sides with no signal pins get a smaller halo derived from the minimum spacing rules from layers occupied by macros. This is required to avoid macros from being abutted, allowing snapping to be done correctly and finishing without DRCs at the end of the flow.
  • Orientation improvement requires a special treatment when using pin-aware halos, since it is possible to create deadzones/notches when flipping macros individually. To fix this issue, a new row-/column-wise orientation improvement is used.
  • The default behavior is to use pin-aware halo assignment, but the feature can be disabled using the -use_full_halo flag.
  • Behavior change for the use of smallest tiling when setting the pin access depth minimum distance, from using the smallest between proportional individually to only using smallest tiling values if both are smaller than the proportional value (lengthy explanation here).

Type of Change

  • New feature
  • Refactoring

Impact

MPL now assigns proper halos only on sides with signal pins, those without are assigned a smaller halo size based on minimum spacing rules. Old behavior can be restored using the -use_full_halo flag.

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

Misc

MPL will undergo nomenclature changes (using channel instead of halo and others) and some commands related to halos will be removed/revamped. Since this PR was deep in development when the changes were proposed, it was decided to finish this work first and then follow it up with necessary changes along with any other changes required in MPL.

@joaomai joaomai self-assigned this May 29, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new -use_full_halo option to the RTL macro placer, allowing users to disable pin-awareness during halo assignment and restore uniform halo behavior. The implementation adds pin-aware halo construction logic, cluster-based macro orientation correction, and updates corresponding tests. The review feedback identifies a high-severity risk of null pointer dereferences and undefined behavior when querying pin geometries in buildMacroHalo. Additionally, it suggests performance optimizations, such as caching the macro halo object and using a set to track visited masters in getMinimumSpacing to avoid redundant scans on large designs.

Comment thread src/mpl/src/clusterEngine.cpp Outdated
Comment thread src/mpl/src/clusterEngine.cpp
Comment thread src/mpl/src/clusterEngine.cpp
@joaomai
joaomai requested a review from eder-matheus May 29, 2026 21:55
Comment thread src/mpl/src/clusterEngine.cpp
@oharboe

oharboe commented May 30, 2026

Copy link
Copy Markdown
Collaborator

🥳

joaomai added 22 commits June 25, 2026 14:14
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
@joaomai
joaomai marked this pull request as ready for review June 29, 2026 13:33
@gadfort
gadfort removed their request for review July 3, 2026 17:51
joaomai added 8 commits July 6, 2026 13:43
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
@eder-matheus

Copy link
Copy Markdown
Member

@joaomai What's the status of this PR?

@joaomai

joaomai commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

About commit c20c4cc.

This change is required to avoid a fatal on ng45/bp_fe_top, where the smallest tiling of the design is tall and thin due to the removed halos on some sides of macros.
Screenshot_20260709_191851
This results in a really big "tiling_min_width" and a really small "tiling_min_height". The former isn't a problem since it is way bigger than the percent based, but the latter is smaller than the proportional, while having just about the right size to lead to a fatal during PDN.
Screenshot_20260709_192014

Since the original intention of using tiling dimensions was to avoid failures in tight designs, I think the current approach (only using the tiling sizes if both are smaller than proportional) still serves its original purpose.

Maybe it should be its own PR, but since it only happens on this branch, I think it is also fine to merge it along the halo changes.

@AcKoucher AcKoucher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, summarize the content of your last comment in the description so that if we revisit this PR we can easily see what changed.

The same for what happens with the fixed macros.

Comment thread src/mpl/src/clusterEngine.cpp Outdated
Comment thread src/mpl/src/clusterEngine.cpp Outdated
Comment thread src/mpl/src/clusterEngine.cpp
@openroad-ci
openroad-ci requested a review from a team as a code owner July 22, 2026 21:07
@AcKoucher
AcKoucher self-requested a review July 23, 2026 19:09

@AcKoucher AcKoucher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eder-matheus Merge waiting on new metrics.

@joaomai

joaomai commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Paired with #4351 on ORFS.

@eder-matheus
eder-matheus merged commit 09a62d8 into The-OpenROAD-Project:master Jul 24, 2026
16 of 17 checks passed
@eder-matheus
eder-matheus deleted the mpl-halo-on-pins branch July 24, 2026 14:26
@oharboe

oharboe commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants