Skip to content

floorplan: make the global connections before anything is dont_touch - #4785

Open
oharboe wants to merge 4 commits into
The-OpenROAD-Project:masterfrom
oharboe:floorplan-global-connect-early
Open

oharboe wants to merge 4 commits into
The-OpenROAD-Project:masterfrom
oharboe:floorplan-global-connect-early

Conversation

@oharboe

@oharboe oharboe commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Before, the platform's global connections were made only in the PDN step, inside each platform's PDN script, and global_connect skips a dont_touch instance (ODB-0383), so an instance marked dont_touch before PDN kept its VDD and VSS pins on no net through final.
Now the connections are a file of their own, GLOBAL_CONNECT_TCL, which floorplan sources right after it loads the netlist, before the PRE_FLOORPLAN_TCL hook; the PDN scripts define the grids only.

This follows @gadfort's suggestions in #4782, which it replaces, and here: make the connections after the netlist is loaded, mark dont_touch after that, and keep the global connections and the PDN in separate files.

  • Platforms: asap7, nangate45, sky130hd, sky130hs, gf180, ihp-sg13g2 and gt2n each get a global_connect.tcl holding the add_global_connection lines their PDN scripts had; GLOBAL_CONNECT_TCL defaults to it in the platform's config.mk. asap7's BLOCK and BLOCKS strategies had the VDD/VSS subset of the default strategy's five rules; the other three match no asap7 pin.
  • PDN step: runs global_connect from the stored rules, for the tap and endcap cells made after floorplan, and for any rules a PDN_TCL of its own still adds. A platform with no GLOBAL_CONNECT_TCL keeps making its connections in PDN_TCL, as before.
  • Designs: nangate45/gcd and gf180/uart-blocks had the platform's rules in their own PDN scripts and drop them; ihp-sg13g2/i2c-gpio-expander adds macro rules and sets a global_connect.tcl of its own.
  • A later step that creates instances, as the register-file dissolve in AUTO_MEMORIES_REGFILES: register files of placed standard cells, built by generate_ram #4781 does after macro placement, connects them with global_connect before it marks them dont_touch: the rules are in the database from floorplan on.

Floorplan through PDN, against master (bazel-orfs synthesis, ORFS's floorplan scripts from each side):

design 2_4_floorplan_pdn.odb supply pins and nets at 2_4
asap7/gcd byte-identical identical
nangate45/gcd byte-identical identical
gf180/gcd byte-identical identical
gf180/uart-blocks uart, uart_rx byte-identical identical
sky130hd/gcd DEF identical; VDD/VSS net ids differ (made at floorplan) identical
ihp-sg13g2/gcd DEF identical; net ids differ identical
ihp-sg13g2/i2c-gpio-expander I2cDeviceCtrl, I2cGpioExpanderTop DEF identical; net ids differ identical
sky130hs/gcd DEF differs only in the order of ( * VPWR ) ( * VPB ) in the VDD and VSS SPECIALNETS identical

No ODB-0383 or PDN-0189 warning on either side. gt2n has no flow in bazel-orfs and was not run; its two rules moved as they were.

Tests: flow/test/test_global_connections.py (skipped without openroad) runs floorplan.tcl on a two-inverter nangate45 design with a PRE_FLOORPLAN_TCL hook that marks one dont_touch, then a later step that creates an instance. It checks both inverters' supply pins are connected at floorplan, and that the created instance is connected by global_connect from the stored rules. With the source line removed, all three tests fail; with the connections moved after the PRE_FLOORPLAN_TCL hook, the hooked instance's test fails.

🤖 Generated with Claude Code

global_connect skips a dont_touch instance (ODB-0383), and the
platform's global connections were made only in the PDN step, so an
instance a step marked dont_touch before PDN kept its supply pins on no
net through final.

floorplan.tcl now sources PDN_TCL at its end, before the POST FLOORPLAN
hook. Every instance's supply pins are connected there, and the rules
stay in the database: a later step that creates instances connects them
with global_connect before it marks them dont_touch. The grids PDN_TCL
defines are not kept in the database; the PDN step defines them again,
as before.

On asap7/gcd the 2_4_floorplan_pdn.odb is byte-identical to master's;
2_1 to 2_3 differ only in the VDD and VSS nets being there earlier.

Suggested by @gadfort in The-OpenROAD-Project#4782, which this replaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 the floorplan script to source the platform's global connections before any instances are marked as 'dont_touch', and introduces a new Python test suite to verify this behavior. The review feedback suggests enhancing the subprocess failure error message with more context, and refactoring the test cleanup logic to use 'addClassCleanup' for robust temporary directory management, which renders the 'tearDownClass' method redundant.

Comment thread flow/test/test_global_connections.py Resolved
Comment thread flow/test/test_global_connections.py Resolved
Comment thread flow/test/test_global_connections.py Resolved
…ean up after a failed setUpClass

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@gadfort

gadfort commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

@oharboe I think to make this work, the PDN and global connect should be separated into two files. I realize that is more invasive, but cleaner long term IMO

Each platform's add_global_connection rules move out of its PDN script
into global_connect.tcl, named by GLOBAL_CONNECT_TCL, which floorplan
sources right after it loads the netlist, before the PRE_FLOORPLAN_TCL
hook. The PDN scripts define the grids only. The PDN step runs
global_connect from the stored rules, for the tap and endcap cells made
after floorplan, and for any rules a PDN_TCL of its own still adds.

The design-level PDN scripts of nangate45/gcd and gf180/uart-blocks had
the platform's rules and drop them; ihp-sg13g2/i2c-gpio-expander adds
macro rules and gets a global_connect.tcl of its own. A platform with no
GLOBAL_CONNECT_TCL keeps making its connections in PDN_TCL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe

oharboe commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

the PDN and global connect should be separated into two files

Done in fe9cdce: each platform's add_global_connection rules are in global_connect.tcl, named by GLOBAL_CONNECT_TCL, sourced in floorplan right after the netlist is loaded; the PDN scripts define the grids only. The PDN step runs global_connect from the stored rules for the tap and endcap cells made after floorplan.

Floorplan through PDN against master, on gcd for asap7, nangate45, gf180, sky130hd, sky130hs and ihp-sg13g2, and on gf180/uart-blocks and ihp-sg13g2/i2c-gpio-expander: supply pins and nets at 2_4_floorplan_pdn identical; the .odb is byte-identical on asap7, nangate45 and gf180, the rest differ in supply net ids and the order of two SPECIALNETS entries. Table in the description.

@oharboe
oharboe requested a review from gadfort November 3, 2026 17:30
@openroad-ci

openroad-ci commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit 0be192b · Jenkins build #4 · Baseline: build · View build on dashboard

62 design(s) checked — 4 with regression(s), 0 without a comparable baseline.

❌ asap7/ibex base — 2 failing metric(s)
Metric target base delta limit band
finish__timing__setup__tns -1131.880 -704.768 -60.603% -884.768 PeriodPadding 20.000%
globalroute__timing__setup__tns -5389.390 -3861.920 -39.552% -4634.304 PeriodPadding 20.000%
❌ sky130hd/ibex base — 1 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -21.382 -8.157 -162.127% -9.789 PeriodPadding 20.000%
❌ sky130hd/microwatt base — 2 failing metric(s)
Metric target base delta limit band
detailedroute__antenna_diodes_count 2039.000 2031.000 0.394% 2033.031 Metric 0.100%
finish__timing__hold__tns -3.450 -0.123 -2700.295% -3.123 PeriodPadding 20.000%
❌ sky130hs/jpeg base — 3 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -4.482 -0.270 -1561.146% -0.970 PeriodPadding 20.000%
finish__timing__setup__tns -7.146 -2.671 -167.558% -3.371 PeriodPadding 20.000%
globalroute__timing__setup__tns -22.099 -14.239 -55.200% -17.087 PeriodPadding 20.000%

@oharboe

oharboe commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

@gadfort I dont know what to make of the QoR feedback. Thoughts?

@gadfort

gadfort commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@oharboe not sure, this shouldn't have changed anything (it's just changing when the power connections are made, not sure why that would change any metrics here).

@oharboe

oharboe commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

@oharboe not sure, this shouldn't have changed anything (it's just changing when the power connections are made, not sure why that would change any metrics here).

@maliberty Any ideas?

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
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.

3 participants