Skip to content

macro_place_util: apply macro base halos for fixed macros - #4415

Closed
oharboe wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:fix-macro-place-util-blockage
Closed

oharboe wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:fix-macro-place-util-blockage

Conversation

@oharboe

@oharboe oharboe commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

If macros are already fixed (e.g. by floorplan_anneal), rtl_macro_placer skips placement and never creates blockages. We must explicitly apply the base halo to fixed macros.

If macros are already fixed (e.g. by floorplan_anneal), rtl_macro_placer skips placement and never creates blockages. This explicitly applies the base halo to fixed macros to ensure blockages are generated correctly.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>

@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 updates flow/scripts/macro_place_util.tcl to explicitly apply the base halo and block macro channels for fixed macros when rtl_macro_placer skips placement. The review feedback correctly identifies a potential Tcl runtime error due to passing too many arguments to set_macro_base_halo and suggests utilizing the configured blockage_width in block_macro_channels.

Comment on lines +74 to +75
set_macro_base_halo $halo_x $halo_y $halo_x $halo_y
block_macro_channels

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.

high

There are two issues here:

  1. Incorrect arguments for set_macro_base_halo: In OpenROAD, set_macro_base_halo expects 2 arguments (halo_x and halo_y). Passing 4 arguments will cause a Tcl runtime error (wrong # args) and crash the flow.
  2. Unused blockage_width: The script defines blockage_width on lines 31 and 34 (to respect MACRO_BLOCKAGE_HALO if defined), but it is never used. We should pass -halo $blockage_width to block_macro_channels to ensure the user-configured blockage halo is respected.
    set_macro_base_halo $halo_x $halo_y
    block_macro_channels -halo $blockage_width

@oharboe

oharboe commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator Author

@maliberty I need some guidance here, our flow is broken without this patch we're carrying. What is it that needs to happen when we're running macro placement and we have placed macros before the macro placement stage runs

Why does macro_place.tcl have to set up these blockages?

@openroad-ci

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch. Advisory — results are log-only and do not affect build status. The authoritative QoR gate remains the local rules-file check.

Commit 0c138c0 · Jenkins build #1 · Baseline: build

61 design(s) checked — 4 with regression(s), 1 without a comparable baseline.
Design Variant Verdict local vs inline passed / failed / missing
asap7/aes base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/aes-block base ✅ pass ✅ MATCH 25 / 0 / 1
asap7/aes-mbff base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/aes_lvt base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/cva6 base ✅ pass ✅ MATCH 12 / 0 / 1
asap7/ethmac base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/ethmac_lvt base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/gcd-ccs base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/jpeg_lvt base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/mock-alu base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/mock-cpu base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 2
asap7/riscv32i-mock-sram base ❌ fail ⚠️ MISMATCH 24 / 1 / 1
asap7/swerv_wrapper — ➖ inconclusive ➖ N/A no metrics produced — flow may have failed before writing metadata.json
asap7/uart base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/aes base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/aes-hybrid base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/uart-blocks base ✅ pass ✅ MATCH 25 / 0 / 1
gt2n/aes base ✅ pass ✅ MATCH 25 / 0 / 0
gt2n/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
gt2n/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/aes base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/i2c-gpio-expander base ✅ pass ✅ MATCH 25 / 0 / 1
ihp-sg13g2/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/spi base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/aes base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/ariane133 base ❌ fail ✅ MATCH 22 / 3 / 1
nangate45/ariane136 base ✅ pass ✅ MATCH 25 / 0 / 1
nangate45/black_parrot base ✅ pass ✅ MATCH 25 / 0 / 1
nangate45/bp_be_top base ✅ pass ✅ MATCH 25 / 0 / 1
nangate45/bp_fe_top base ✅ pass ✅ MATCH 25 / 0 / 3
nangate45/bp_multi_top base ✅ pass ✅ MATCH 25 / 0 / 1
nangate45/dynamic_node base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/mempool_group base ❌ fail ⚠️ MISMATCH 10 / 2 / 1
nangate45/swerv base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/swerv_wrapper base ✅ pass ✅ MATCH 25 / 0 / 1
nangate45/tinyRocket base ✅ pass ✅ MATCH 25 / 0 / 1
sky130hd/aes base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/chameleon base ❌ fail ✅ MATCH 23 / 2 / 1
sky130hd/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/microwatt base ✅ pass ✅ MATCH 25 / 0 / 1
sky130hd/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/aes base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0
❌ asap7/riscv32i-mock-sram base — 1 failing metric(s)
Metric target base delta threshold
finish__timing__setup__tns -6864.42 -1888.2 263.5430568795678% 20%
❌ nangate45/ariane133 base — 3 failing metric(s)
Metric target base delta threshold
cts__timing__setup__tns -830.661 -611.956 35.73868055873298% 20%
finish__timing__setup__tns -815.549 -624.992 30.4895102657314% 20%
globalroute__timing__setup__tns -841.381 -599.609 40.32160958224443% 20%
❌ nangate45/mempool_group base — 2 failing metric(s)
Metric target base delta threshold
finish__timing__hold__tns -1.67608 -0.313244 435.0717012935603% 20%
globalroute__timing__setup__tns -12297.4 -12217 0.6580993697307032% 20%
❌ sky130hd/chameleon base — 2 failing metric(s)
Metric target base delta threshold
finish__timing__setup__tns -42.3948 -39.3269 7.801021692531067% 20%
globalroute__timing__setup__tns -67.3658 -42.3108 59.21655936545752% 20%

@maliberty

Copy link
Copy Markdown
Member

@joaomai @AcKoucher can mpl create the blockages even if it is otherwise skipping macro placement? It seems simpler than pushing it into the flow.

@oharboe

oharboe commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator Author

@joaomai @AcKoucher can mpl create the blockages even if it is otherwise skipping macro placement? It seems simpler than pushing it into the flow.

Thanks!

Please close this PR if this will be fixed in OpenROAD later, we'll just carry the patch for now.

@AcKoucher

Copy link
Copy Markdown
Contributor

@joaomai @AcKoucher can mpl create the blockages even if it is otherwise skipping macro placement? It seems simpler than pushing it into the flow.

@maliberty It actually can. I implemented block_macro_channels, that should work regardless.

@oharboe I expect the problem you're trying to address here to be resolved once we use block_macro_channels instead of creating the blockages from within MPL. @joaomai is working on the spec we came up with some months ago to clarify the differences between halos and channels. This should be part of the work there.

@oharboe

oharboe commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator Author

👍

Closing as moot: we're using something like this as a stopgap locally.

@oharboe oharboe closed this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants