Repository navigation
Conversation
…plainly - KEPLER_FORMAL_EXE gets a variables.yaml entry. variables.mk keeps supplying it, so it has no default there; check_kepler_formal drops its `info exists` and keeps the hard error for a missing executable. - REMOVE_LIBS_FOR_LEC gets an entry with default "", and write_lec_script filters LIB_FILES without a test: an empty list removes nothing. - flow.sh exports the RUN_CMD it defaults, as variables.mk already does, and run_kepler_formal reads $::env(RUN_CMD) instead of carrying its own copy of that default. test_flow_sh.py checks that the stage sees it. 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 exports the RUN_CMD environment variable in flow.sh and defines KEPLER_FORMAL_EXE and REMOVE_LIBS_FOR_LEC in variables.yaml with default values. Consequently, the conditional checks for these variables in formal_check.tcl have been simplified, relying on their guaranteed existence. Additionally, documentation for these variables has been added to FlowVariables.md, and a new test has been introduced in test_flow_sh.py to verify RUN_CMD propagation. I have no feedback to provide as the changes are clean, correct, and align with the repository's style 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
Three variables
formal_check.tclreads, made plain:KEPLER_FORMAL_EXEgets avariables.yamlentry (stagessynth,cts,final).variables.mkkeeps supplying it with?=, so the entry has no default.check_kepler_formaldrops itsinfo existsand keeps the hard error for a missing executable.REMOVE_LIBS_FOR_LECgets an entry withdefault: ""(stagescts,final, wherewrite_lec_scriptruns).write_lec_scriptfiltersLIB_FILESwithout a test: an empty list removes nothing.RUN_CMD:flow.shexports theRUN_CMDit defaults, asvariables.mkalready does, andrun_kepler_formalreads$::env(RUN_CMD)instead of carrying its own copy of that default ($PYTHON_EXE $SCRIPTS_DIR/run_command.py, the same in all three places).RUN_CMDstays out ofvariables.yaml: it is the Makefile's (MakefileContract.md).test_flow_sh.pygets a test that the stage sees it; it fails on master.FlowVariables.mdis regenerated for the two new entries. The rules are already proposed in #4912 (a variable the flow guarantees is read as$::env(X)) and #4920 (an optional list is iterated without a test), so no newTclContract.mdline.No behavior change.
Why
run_kepler_formalis three lines, and the default forRUN_CMDlives in one place per entry point.RUN_CMDorREMOVE_LIBS_FOR_LECfails at the read, instead of a fallback no CI run exercises.KEPLER_FORMAL_EXEwas read by the scripts and named inLEC_CHECK's default without being declared anywhere an agent looks for variables.Test
formal_check.tcl's procs on their own, in OpenROAD, with a stand-inkepler-formal(records its arguments, writes a check log with no differences):RUN_CMDas make sets it,REMOVE_LIBS_FOR_LEC="")RUN_CMDa wrapperREMOVE_LIBS_FOR_LECone libraryRUN_CMDunsetcan't read "::env(RUN_CMD)": no such variableREMOVE_LIBS_FOR_LECunsetcan't read "::env(REMOVE_LIBS_FOR_LEC)": no such variableKEPLER_FORMAL_EXEunsetcan't read "::env(KEPLER_FORMAL_EXE)": no such variableKEPLER_FORMAL_EXEnot executableFlows, master vs this branch, logs (runtimes, memory and paths dropped) and every stage metric compared:
KEEP_VARS=1, to6_reportLEC_CHECK=0(no kepler-formal installed):write_lec_verilogonlyLEC_CHECK=1, stand-in kepler-formalKEEP_VARS=1run_lec_testat cts and final throughRUN_CMD: "passed lec test" twiceLEC_CHECK=1, stand-inThe one log line that differs, in the
KEEP_VARS=1run's6_report.log, is the elapsed-time summary row of a sub-second step. WithREMOVE_LIBS_FOR_LECnaming one asap7 library, both write 4 of the 5 libraries into the cts and final configs. WithRUN_CMDremoved from OpenROAD's environment at cts, master falls back and passes, this branch stops at the read.flow.shrun by hand, the waymake varssets it up (vars.shleaves out*_CMD, soRUN_CMDis unset):source vars.sh; flow.sh 4_1_cts ctswithLEC_CHECK=1passes on master and on this branch. As a negative control, master'sflow.shwith this branch's scripts stops at$::env(RUN_CMD): the export is what carries it.test_flow_sh.py's new test fails on master'sflow.shand passes here; the other three still pass.tclint/tclfmt0.9.0 are clean on the changed file,blackon the test; this merges cleanly with #4910-#4924 and #4927.🤖 Generated with Claude Code