Skip to content

est: a design knows its parasitics, so estimate_parasitics needs no flag - #11788

Merged
eder-matheus merged 3 commits into
The-OpenROAD-Project:masterfrom
oharboe:est-parasitics-auto
Oct 19, 2026
Merged

eder-matheus merged 3 commits into
The-OpenROAD-Project:masterfrom
oharboe:est-parasitics-auto

Conversation

@oharboe

@oharboe oharboe commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

A design now knows which parasitics apply to it, so estimate_parasitics can pick them itself. The -placement / -global_routing flag was needed when a design loaded from a database couldn't tell whether it had global routes. Now it can: the guides load from the database, and whether their congestion was accepted is saved with them. So a flow can just say when to estimate, estimate_parasitics, and OpenROAD says what. The choice is made in one place, the same for every flow, and a script no longer carries its own copy of it.

ORFS uses this to drop the per-script choice in open.tcl, generate_abstract.tcl, its endpoint-slack writer and final_outputs.tcl, and to read a SPEF only where its configuration says one was extracted (The-OpenROAD-Project/OpenROAD-flow-scripts#4691, a draft that depends on this one). On ORFS's gcd (asap7 and nangate45), the two changes together reproduce today's flow byte for byte: every .odb from place through final, the abstract's .lib and .lef, and the SPEF apart from its date (The-OpenROAD-Project/bazel-orfs#1284).

Without a flag, when estimate_parasitics
read_spef has read parasitics keeps them
the design is not placed EST-0009
the global routes are congested and were not accepted EST-0020
the design has global routes estimates from them
the placement has no wire RC EST-0014
otherwise estimates from placement

-placement and -global_routing behave as before.

  • grt: tell congested routes from no routes: grt::have_congested_routes. With congested routes that weren't accepted, estimate_parasitics -global_routing now fails with EST-0008, which names the congestion and global_route -allow_congestion.
  • est: estimate_parasitics without a flag picks the source: the table above, plus grt::design_is_placed and est::parasitics_source (spef, placement, global_routing or none), so a flow can ask.
  • test: the SPEF comparisons skip the *DATE line literally: from review.

The tests are pass/fail checks, with no new .ok files:

  • est/test/estimate_parasitics_source: no wire RC, placement chosen (its SPEF equals -placement's), parasitics kept after read_spef, an explicit estimate afterwards, and an unplaced design.
  • grt/test/congested_routes_are_reported: congested routes that weren't accepted (EST-0008 and EST-0020), then accepted ones the flagless call estimates from (its SPEF equals -global_routing's and differs from -placement's).

The grt, rsz, cts, est, gpl and dpl suites and //:dup_id_test pass: 785 tests, 4 skipped.

🤖 Generated with Claude Code

oharboe and others added 2 commits October 16, 2026 14:04
A global route that finished congested, and was not accepted with
global_route -allow_congestion, leaves routes that have_routes does not
count. estimate_parasitics -global_routing then failed with EST-0005,
"Run global_route before estimating parasitics for global routing",
after global_route had run.

grt::have_congested_routes reports such routes, and
estimate_parasitics -global_routing fails with EST-0008, which names
the congestion and the flag that accepts it. Both are still errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
A flow that times a design has to say -placement or -global_routing,
so every flow script that loads a design re-derives which one applies:
from a stage number, from grt::have_routes, from whether a .spef file
is on disk. Each copy can get it wrong, and a missing piece fails
quietly: estimate_parasitics -placement without wire RC only warns
(EST-0018) and estimates nothing.

OpenROAD knows which applies. Without a flag, estimate_parasitics
estimates from the global routes when there are any, else from
placement, and does nothing once read_spef has read parasitics, until
an estimate with a flag replaces them. An unplaced design (EST-0009),
global routes that are congested and were not accepted (EST-0020) and
a placement estimate without wire RC (EST-0014) are errors.
-placement and -global_routing behave as before.

grt::design_is_placed lets a flow ask before it estimates, and
est::parasitics_source says where the parasitics came from: spef,
placement, global_routing or none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>

@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 introduces a more robust mechanism for estimating parasitics by allowing the system to automatically determine the source (placement or global routing) and properly handling SPEF-annotated parasitics. It adds logic to detect congested global routes and ensures that parasitics are not incorrectly estimated when SPEF data is present. The reviewer identified several issues: a potential Tcl runtime error in the trace callback due to incorrect boolean evaluation, the need to support resetting the SPEF read state when parasitics are cleared, and a Tcl string matching issue where literal asterisks were being treated as wildcards.

Comment thread src/est/src/EstimateParasitics.tcl
Comment thread src/est/include/est/EstimateParasitics.h
Comment thread src/est/src/EstimateParasitics.i
Comment thread src/est/test/estimate_parasitics_source.tcl
Comment thread src/grt/test/congested_routes_are_reported.tcl
In double quotes "\*DATE*" is *DATE*, which skips any line containing
DATE. Braces keep the backslash, so only the *DATE header line is
skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe oharboe changed the title est: estimate_parasitics without a flag picks the source est: a design knows its parasitics, so estimate_parasitics needs no flag Oct 16, 2026
@oharboe

oharboe commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

@jfgava @maliberty This whole thing started with Gemini suggesting things that would have lead to sucker-punch bugs... Less iffy ORFS code and fewer choices where the only thing that ORFS can do with that choice is to get it wrong: The-OpenROAD-Project/OpenROAD-flow-scripts#4691

@eder-matheus

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T21:30:31.761674Z ef355fe Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef355feed4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/est/test/CMakeLists.txt
Comment thread src/est/src/EstimateParasitics.tcl
Comment thread src/est/src/EstimateParasitics.cpp
@eder-matheus
eder-matheus merged commit 99bd626 into The-OpenROAD-Project:master Oct 19, 2026
20 checks passed
@oharboe

oharboe commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

😌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants