Repository navigation
flow: simplify global_route.tcl, clean out the obsolete GENERATE_ARTIFACTS_ON_FAILURE - #4796
Conversation
…ILURE A global route that fails writes 5_1_grt-failed.odb and stops with the error, as the other steps that fail do. GENERATE_ARTIFACTS_ON_FAILURE=1 used to make it write 5_1_grt.odb instead and exit 0; the variable is removed. global_route_helper existed only to allow the early returns that path needed; it goes, and run_global_route_and_catch_failures no longer returns a value. detail_route.tcl's grt::have_routes check could only fire on such a 5_1_grt.odb, so it goes too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
There was a problem hiding this comment.
Code Review
This pull request removes the GENERATE_ARTIFACTS_ON_FAILURE configuration variable and its associated logic across the flow scripts and documentation. Specifically, the global_route_helper wrapper in global_route.tcl has been flattened, and run_global_route_and_catch_failures now consistently writes a failed database and errors out on failure instead of conditionally generating successful artifacts. Additionally, the check for existing routes in detail_route.tcl has been removed. I have no feedback to provide as there are no review comments.
|
@maliberty A nice cleanup. Note! View with hide whitespace changes, there's less churn here than the number of lines indicate. |
🔍 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. |
…s-hard global_route.tcl: master's estimate_parasitics without -global_routing (The-OpenROAD-Project#4691) taken into the unwrapped script; master's change to the GENERATE_ARTIFACTS_ON_FAILURE branch goes with the branch. FlowVariables.md, variables.json: GLOBAL_CONNECT_TCL kept, GENERATE_ARTIFACTS_ON_FAILURE dropped; generate-variables-docs.py reproduces both files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PFLaCzFtFbnWE4nPTDwpC Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Before,
global_route.tclthreaded early returns and return codes through aglobal_route_helperwrapper so thatGENERATE_ARTIFACTS_ON_FAILURE=1could turn a failed global route into a5_1_grt.odband exit 0, anddetail_route.tclhad to catch that a step later.Now the code is simpler: a failed global route writes
5_1_grt-failed.odband fails like every other step, and the obsolete use case is cleaned out.The obsolete use case
The variable was added for bazel-orfs: a failed Bazel action leaves no outputs behind, and back then carrying a patch in bazel-orfs to get one was expensive. Today bazel-orfs is never patch-free, and a feature like this would be carried there as a patch. A failed step is debugged in bazel-orfs's dirty lane, a plain ORFS tree driven by make, where
5_1_grt-failed.odbsimply appears. Nothing needs the variable, and bazel-orfs drops it at its next bump.Removing it also takes away the only failure path that writes the file a successful step writes (TclContract: "a failing step never writes the file a successful step writes").
Changes
global_route.tcl: on failure, write5_1_grt-failed.odb, thenerror. The early-return plumbing goes, and with it theglobal_route_helperwrapper, which existed only to allow those returns (the rest of the diff is the body losing one level of indentation).detail_route.tcl: thegrt::have_routescheck could only fire on a5_1_grt.odbwritten by a failed route, and it pointed at a stalemake gui_grt. Removed.variables.yaml:GENERATE_ARTIFACTS_ON_FAILUREremoved;variables.jsonandFlowVariables.mdregenerated.-failed.odbwriters (pdn,global_place,detail_place) andmake gui_5_1_grt-failedare unchanged.Behaviour
At the default (0), nothing changes. With the variable set to 1, a failed global route now exits non-zero and leaves
5_1_grt-failed.odbinstead of5_1_grt.odb. No design, test or CI in ORFS sets it.Testing
asap7/gcdthroughroute, on master and on this branch:5_1_grt.odband5_route.odbare byte-identical.make do-5_1_grt GLOBAL_ROUTE_ARGS=-no_such_option(global_routeitself errors): exit code 2,5_1_grt-failed.odbwritten, no5_1_grt.odb.tclint/tclfmtclean;variables.jsonandFlowVariables.mdregenerated with the pinned requirements.🤖 Generated with Claude Code