Skip to content

flow: simplify global_route.tcl, clean out the obsolete GENERATE_ARTIFACTS_ON_FAILURE - #4796

Merged
maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:grt-fails-hard
Nov 6, 2026
Merged

maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:grt-fails-hard

Conversation

@oharboe

@oharboe oharboe commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Before, global_route.tcl threaded early returns and return codes through a global_route_helper wrapper so that GENERATE_ARTIFACTS_ON_FAILURE=1 could turn a failed global route into a 5_1_grt.odb and exit 0, and detail_route.tcl had to catch that a step later.
Now the code is simpler: a failed global route writes 5_1_grt-failed.odb and 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.odb simply 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, write 5_1_grt-failed.odb, then error. The early-return plumbing goes, and with it the global_route_helper wrapper, which existed only to allow those returns (the rest of the diff is the body losing one level of indentation).
  • detail_route.tcl: the grt::have_routes check could only fire on a 5_1_grt.odb written by a failed route, and it pointed at a stale make gui_grt. Removed.
  • variables.yaml: GENERATE_ARTIFACTS_ON_FAILURE removed; variables.json and FlowVariables.md regenerated.
  • The other -failed.odb writers (pdn, global_place, detail_place) and make gui_5_1_grt-failed are 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.odb instead of 5_1_grt.odb. No design, test or CI in ORFS sets it.

Testing

  • asap7/gcd through route, on master and on this branch: 5_1_grt.odb and 5_route.odb are byte-identical.
  • make do-5_1_grt GLOBAL_ROUTE_ARGS=-no_such_option (global_route itself errors): exit code 2, 5_1_grt-failed.odb written, no 5_1_grt.odb.
  • tclint/tclfmt clean; variables.json and FlowVariables.md regenerated with the pinned requirements.

🤖 Generated with Claude Code

…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>
@oharboe oharboe changed the title flow: a failed global route fails hard; drop GENERATE_ARTIFACTS_ON_FAILURE flow: simplify global_route.tcl, clean out the obsolete GENERATE_ARTIFACTS_ON_FAILURE Nov 6, 2026

@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 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.

@oharboe
oharboe requested a review from maliberty November 6, 2026 06:54
@oharboe

oharboe commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

@maliberty A nice cleanup.

Note! View with hide whitespace changes, there's less churn here than the number of lines indicate.

@openroad-ci

openroad-ci commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

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

Commit aaa4f49 · Jenkins build #2 · Baseline: build · View build on dashboard

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>
@maliberty
maliberty merged commit 8878630 into The-OpenROAD-Project:master Nov 6, 2026
12 checks passed
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