Skip to content

mpl: update halo/channel naming and usage, pin-aware flag - #11292

Merged
eder-matheus merged 43 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:mpl-halo-channel-update
Sep 28, 2026
Merged

eder-matheus merged 43 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:mpl-halo-channel-update

Conversation

@joaomai

@joaomai joaomai commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Updates MPL's macro halo/channel configuration into two arguments for mpl::rtl_macro_placer:

  • halo_width/-halo_height→ -min_channel_size {width [height]} (height defaults to width if unset)
  • use_full_halo→ -pin_aware_channels (default has changed)

Creates odb::set_halo, now used to set halos for any instance (with a convenience flag to set to all macros).

MPL is still aware of halos set in ODB (be it from DEF or by user), however with a functional change: pin-aware channels don't apply to channels created by instance halos. This actually fixes a bug, where it was possible to have min_spacing channels on some sides without pins, and 0 on sides with pins (if -halo_width/-halo_height were unset), which also leads to changes in lots of tests that had this behavior.

Type of Change

  • Bug fix
  • Refactoring
  • Documentation update

Impact

MPL can't create nor update halos anymore, being only concerned with halos already set beforehand or with the new min_size_channel argument.

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).

Related Issues

#11062

joaomai added 16 commits August 31, 2026 20:47
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 self-assigned this Sep 1, 2026
@github-actions github-actions Bot added the size/L label Sep 1, 2026
@joaomai
joaomai marked this pull request as ready for review September 1, 2026 14:15
@joaomai
joaomai requested review from a team as code owners September 1, 2026 14:15

@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 refactors the macro halo handling in the MPL and ODB modules, replacing the deprecated halo commands with a new, unified channel-based interface (-min_channel_size and set_halo). It also introduces pin-aware channel trimming. The review identified a critical bug in the Tcl implementation of set_halo where the flag check was incorrectly formatted, and a high-severity issue in ClusteringEngine where the layer direction was incorrectly derived from the first geometry of a pin rather than the current box. These issues have been noted for correction.

Comment thread src/odb/src/swig/tcl/odb.tcl Outdated
Comment thread src/mpl/src/clusterEngine.cpp Outdated
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>

@gadfort gadfort 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.

I think you should add some testing for the new set_halo command

Comment thread src/odb/src/swig/tcl/odb.tcl Outdated
Comment thread src/odb/src/swig/tcl/odb.tcl Outdated

@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.

Just some nits to fix. I really like these changes!

Comment thread src/mpl/src/mpl.i Outdated
Comment thread src/mpl/src/mpl.tcl
Comment thread src/mpl/src/clusterEngine.cpp Outdated
Comment thread src/mpl/src/shapes.h Outdated
Comment thread src/mpl/test/halos3.tcl Outdated
Comment thread src/mpl/README.md
Comment thread src/odb/src/swig/tcl/odb.tcl Outdated
Comment thread src/odb/README.md Outdated
Signed-off-by: João Mai <jmai@precisioninno.com>

@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.

Code-wise LGTM.

Some problems in the checks though:

//test/orfs/mock-array:MockArray_4x4_base_cts_path_groups_test  FAILED TO BUILD
//test/orfs/mock-array:MockArray_4x4_base_final_path_groups_test FAILED TO BUILD
//test/orfs/mock-array:MockArray_4x4_base_macro_layout_test     FAILED TO BUILD
//test/orfs/mock-array:MockArray_4x4_base_test                  FAILED TO BUILD
//test/orfs/mock-array:MockArray_4x4_flat_cts_path_groups_test  FAILED TO BUILD
[...]
//src/mpl/test:mpl_readme_msgs_check-py_test                    FAILED in 0.1s
//src/odb/test:odb_readme_msgs_check-py_test                    FAILED in 0.2s

@joaomai

joaomai commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor Author
//test/orfs/mock-array:MockArray_4x4_base_cts_path_groups_test  FAILED TO BUILD
//test/orfs/mock-array:MockArray_4x4_base_final_path_groups_test FAILED TO BUILD
//test/orfs/mock-array:MockArray_4x4_base_macro_layout_test     FAILED TO BUILD
//test/orfs/mock-array:MockArray_4x4_base_test                  FAILED TO BUILD
//test/orfs/mock-array:MockArray_4x4_flat_cts_path_groups_test  FAILED TO BUILD

These tests require a bumping the commit from bazel-orfs, which can only be done after the feature itself is merged.

Signed-off-by: João Mai <jmai@precisioninno.com>
@AcKoucher
AcKoucher enabled auto-merge September 14, 2026 21:58
@AcKoucher
AcKoucher disabled auto-merge September 14, 2026 22:46
@joaomai

joaomai commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Paired with #4493 on ORFS.

Comment thread src/odb/src/swig/tcl/odb.tcl Outdated
Comment thread src/odb/src/swig/tcl/odb.tcl
Signed-off-by: João Mai <jmai@precisioninno.com>
…s used

Signed-off-by: João Mai <jmai@precisioninno.com>
@maliberty

Copy link
Copy Markdown
Member

//src/odb/test:set_halo-tcl_test failed

@AcKoucher

Copy link
Copy Markdown
Contributor
//src/mpl/test:mpl_readme_msgs_check-py_test                    FAILED TO BUILD

There's also some IT issue going on.

@eder-matheus
eder-matheus merged commit dd79899 into The-OpenROAD-Project:master Sep 28, 2026
20 checks passed
@eder-matheus
eder-matheus deleted the mpl-halo-channel-update branch September 28, 2026 22:19
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.

6 participants