Repository navigation
Conversation
CORNERS selects multi-corner analysis: empty means one unnamed scene from LIB_FILES, a list names the scenes. It now defaults to "" in variables.yaml, and the six tests of it in read_liberty.tcl, generate_abstract.tcl, report_metrics.tcl and write_binary_libs.tcl read it as `$::env(CORNERS) ne ""` instead of through env_var_exists_and_non_empty. The AUTO_MEMORIES loop in read_liberty.tcl iterates the list without a test: foreach over an empty list does nothing. No behavior change: an unset CORNERS and an empty one already took the same branch. 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 a default empty string value for the CORNERS variable in flow/scripts/variables.yaml. In accordance with the repository style guide, it replaces the redundant env_var_exists_and_non_empty checks with direct environment variable checks ($::env(CORNERS) ne '') in generate_abstract.tcl, read_liberty.tcl, report_metrics.tcl, and write_binary_libs.tcl. I have no further feedback to provide as the changes are correct and adhere to the guidelines.
🔍 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
CORNERSselects multi-corner analysis: empty means one unnamed scene fromLIB_FILES, a list such asslow fastnames one scene per corner. It now hasdefault: ""invariables.yaml(stages stayAll stages), and the scripts read it plainly:read_liberty.tcl(2),generate_abstract.tcl,report_metrics.tcl,write_binary_libs.tcl:[env_var_exists_and_non_empty CORNERS]becomes$::env(CORNERS) ne "". Each picks one of two branches (per-corner scenes, or the single scene), so the test stays.read_liberty.tcl, theAUTO_MEMORIESloop: the test aroundforeach corner $::env(CORNERS)is gone; a loop over an empty list does nothing.FlowVariables.mdrendersdefault: ""as it renders no default, so it is unchanged. The rule this follows is already proposed in #4912 (a variable with a default is read as$::env(X)) and #4920 (an optional list is iterated without a test; one whose emptiness selects a step is tested withne ""), so no newTclContract.mdline.No behavior change: an unset
CORNERSand an empty one already took the same branch. The two in-tree designs that set it (ihp-sg13g2/i2c-gpio-expanderand itsI2cDeviceCtrlblock) take the per-corner branch as before.Why
$::env(CORNERS) ne ""says what it tests, and the helper call does not.CORNERSfails at the line that reads it, instead of quietly falling back to the single-scene analysis.variables.yaml.Test
Full flows, master vs this branch, logs (runtimes, memory and paths dropped) and every stage metric compared:
CORNERS = slow fast; itsI2cDeviceCtrlblock,slow typ fastKEEP_VARS=1define_sceneper corner, per-corner power in the reports,write_timing_model -scenefor the block's abstract; the abstract's_slow/_typ/_fast.liband.lefand all 23 reports byte-identicalKEEP_VARS=1KEEP_VARS=1Unset (removed from OpenROAD's environment, ihp-sg13g2/gcd): master runs on as if it were empty; this branch stops at the read,
can't read "::env(CORNERS)": no such variable, inread_liberty.tclline 5 (floorplan) and inwrite_binary_libs.tclline 5.tclint/tclfmt0.9.0 are clean on the changed files; this merges cleanly with #4910-#4920.🤖 Generated with Claude Code