Repository navigation
Conversation
DIE_AREA, CORE_AREA, CORE_UTILIZATION, FLOORPLAN_DEF, FOOTPRINT and FOOTPRINT_TCL now default to "" in variables.yaml. floorplan.tcl tells the methods apart with `$::env(X) ne ""` instead of env_var_exists_and_non_empty, and keeps its check that exactly one is given; global_place_skip_io.tcl reads FLOORPLAN_DEF the same way. FOOTPRINT and FOOTPRINT_TCL are also read at place (global_place.tcl, pins_fixed_in_floorplan in util.tcl), where their stages: list does not reach yet; those reads keep the helper until `place` is on their list. test_global_connections.py runs floorplan.tcl with an environment of its own: it gives the methods it does not use as "". No behavior change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Øyvind Harboe <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request defines explicit empty string defaults for several floorplan-related variables in flow/scripts/variables.yaml and updates the test environment in test_global_connections.py accordingly. This allows the Tcl scripts floorplan.tcl and global_place_skip_io.tcl to safely use direct $::env(VAR) ne "" checks instead of the env_var_exists_and_non_empty helper, adhering to the repository's style guidelines. There are no review comments, and I have no feedback to provide.
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Commit 62 design(s) checked — 0 with regression(s), 0 without a comparable baseline. ✅ QoR is compared against the master build at this PR's merge base |
What
A design picks one floorplan method:
CORE_UTILIZATION,DIE_AREAwithCORE_AREA,FLOORPLAN_DEF, orFOOTPRINT;FOOTPRINT_TCLadds pad placement on top. The six variables now havedefault: ""invariables.yaml, and:floorplan.tcltells the methods apart with$::env(X) ne ""instead ofenv_var_exists_and_non_empty. Its check stays as it is: more than one method is an error ("mutually exclusive"), none is an error ("No floorplan initialization method specified").global_place_skip_io.tclreadsFLOORPLAN_DEFthe same way (placeis on itsstages:list).test_global_connections.pyrunsfloorplan.tclwith an environment of its own; it now gives the methods it does not use as"".Left as they are:
FOOTPRINTandFOOTPRINT_TCLare also read atplace(global_place.tcl,pins_fixed_in_floorplaninutil.tcl), but theirstages:lists do not haveplaceyet, so the staged flow erases them there and a plain read would fail. #4917 addsplaceto both; those reads can go plain after it.source_env_var_if_exists FOOTPRINT_TCLstays with its helper.FlowVariables.mdrendersdefault: ""as it renders no default, so it is unchanged. The platform configs that testFOOTPRINT_TCLin make (ihp-sg13g2) are read before the defaults are exported, so they see what they saw before. The rule is already proposed in #4912 (a variable with a default is read as$::env(X)) and #4918/#4919 (ne ""where emptiness skips a step), so no newTclContract.mdline.No behavior change.
Why
ne ""tests in a row say "which of these is set".CORE_AREAis unset rather than empty?" has one answer now.Test
Full flows, master vs this branch, logs (runtimes, memory and paths dropped) and every stage metric compared, one design per method in the tree:
CORE_UTILIZATIONKEEP_VARS=1, to6_reportCORE_UTILIZATIONKEEP_VARS=1, to6_reportDIE_AREA+CORE_AREAKEEP_VARS=1, to6_reportDIE_AREA+CORE_AREA+FOOTPRINT_TCL(pad.tclsourced)KEEP_VARS=1, to6_reportFLOORPLAN_DEF(read_def -floorplan_initialize, and "FLOORPLAN_DEF is set. Skipping global placement without IOs" at place)KEEP_VARS=1, toplaceNo configuration in the tree sets
FOOTPRINT, so that branch is not run.The check stays, rerunning
2_1_floorplanon nangate45/gcd, master and this branch alike:CORE_UTILIZATION=):Error: No floorplan initialization method specified, exit 1.CORE_UTILIZATIONplusDIE_AREAandCORE_AREA):Error: Floorplan initialization methods are mutually exclusive, pick one., exit 1.DIE_AREAwithoutCORE_AREAnext toCORE_UTILIZATION: the utilization method, as before.Unset (
FLOORPLAN_DEFremoved from OpenROAD's environment): master runs on; this branch stops at the read,can't read "::env(FLOORPLAN_DEF)": no such variable,floorplan.tclline 57.test_global_connections.py(withload_stage_inputstubbed, which it lacks on master too) passes on master and on this branch; without its newCORE_UTILIZATIONentry it stops at the read,floorplan.tclline 60.tclint/tclfmt0.9.0 are clean on the changed files,blackon the test; this merges cleanly with #4910-#4923.🤖 Generated with Claude Code