Skip to content

OpenROAD update sta to latest from upstream 07/10#10876

Open
dsengupta0628 wants to merge 18 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:or_update_sta_latest_0710
Open

OpenROAD update sta to latest from upstream 07/10#10876
dsengupta0628 wants to merge 18 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:or_update_sta_latest_0710

Conversation

@dsengupta0628

@dsengupta0628 dsengupta0628 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Update OpenSTA to latest upstream 7/10 The-OpenROAD-Project/OpenSTA#388

Type of Change

  • Bug fix
  • New feature

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@dsengupta0628 dsengupta0628 self-assigned this Jul 10, 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 updates the subproject commit for src/sta from 3ab3337d1b8f13bd15d80786ec771e1c6388d24a to 47f191d7370389a6fde18d7334fff06ba162012a. There are no review comments, and I have no feedback to provide.

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@github-actions github-actions Bot added size/M and removed size/XS labels Jul 13, 2026
@dsengupta0628

Copy link
Copy Markdown
Contributor Author

@dsengupta0628
dsengupta0628 marked this pull request as ready for review July 13, 2026 19:42
@dsengupta0628
dsengupta0628 requested a review from a team as a code owner July 13, 2026 19:42
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@github-actions github-actions Bot added size/XS and removed size/M labels Jul 15, 2026
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@openroad-ci
openroad-ci requested a review from a team as a code owner July 15, 2026 16:40
@openroad-ci
openroad-ci requested a review from maliberty July 15, 2026 16:40
@dsengupta0628

Copy link
Copy Markdown
Contributor Author

Does not need metric update: will close this PR The-OpenROAD-Project/OpenROAD-flow-scripts#4358

@dsengupta0628

Copy link
Copy Markdown
Contributor Author

Global routing aborted with a hard error on some designs-hence the CI fails in Bazel build (one regoldening was needed for Ubuntu build):

[ERROR GRT-0228] Horizontal edge usage exceeds the maximum allowed. (113, 83) usage=65535 limit=3400
usage=65535 (0xFFFF) is not real congestion — it is a uint16_t underflow. The check2DEdgesUsage sanity check reports the corrupted value; the corruption originates in Graph2D::getCostNDRAware.

Root cause

For NDR nets (edgeCost > 1), getCostNDRAware adds either an inflated cost (100 × edgeCost) or the normal cost, chosen by the edge's overflow state at the time the net is routed. On rip-up it decided inflated-vs-normal from the edge's current
ndr_overflow, which other nets could have changed in the meantime.

Sequence that underflows:

  1. Net A routed on an edge with capacity available → adds normal edgeCost, ndr_overflow = 0.
  2. Net B later routed on the same edge, no capacity → ndr_overflow++, adds inflated cost.
  3. Net A ripped up → sees ndr_overflow > 0 → subtracts the inflated 100 × edgeCost, though A only ever added edgeCost.

The over-subtraction wraps the unsigned usage (and ndr_overflow) below zero to 65535. The NDR-disable path (GRT-0273) triggers the rip-ups that expose it.

Fix

Record, per edge, whether each NDR net contributed the inflated cost, and subtract exactly that on rip-up — independent of how the edge's overflow state changed afterward. v_ndr_nets_/h_ndr_nets_ change from std::set<FrNet*> to std::map<FrNet*, bool> (the flag). Add/remove are now symmetric, so usage/ndr_overflow cannot underflow.

@openroad-ci
openroad-ci requested a review from a team as a code owner July 21, 2026 02:08
@openroad-ci
openroad-ci requested a review from eder-matheus July 21, 2026 02:08
@github-actions github-actions Bot added size/M and removed size/XS labels Jul 21, 2026
…lt QoR shift

The DPL negotiation legalizer became the default on master, shifting
placement and worsening DRT::max_slew_slack past the metric limit.
Regolden tinyRocket_nangate45.metrics and .metrics_limits to match.

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@openroad-ci
openroad-ci force-pushed the or_update_sta_latest_0710 branch from 6047cd6 to ce00f1f Compare July 21, 2026 02:50
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@dsengupta0628

dsengupta0628 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@jfgava this is the issue and the fix I did:

Problem:
graph2d.cpp + Graph2D.h (GRT-0228 underflow): getCostNDRAware added an NDR net's edge cost as inflated (100X) or normal based on the edge's overflow state at route time, but on rip-up re-derived that choice from the edge's current ndr_overflow - which other nets could have changed. A net that added the normal cost then got the inflated cost subtracted, underflowing the uint16_t usage to 65535.

Fix:
We track per-net whether each net added the inflated cost (std::set<FrNet*> --> std::map<FrNet*, bool>) and subtract exactly that on rip-up, so add/remove stay symmetric.

This fixed the Bazel crash I mentioned in Slack. And fixes the mismatch in ubuntu/bazel results

Test change:
soft_ndr_reset_cap.tcl: added suppress_message GRT 102 so the compiler-sensitive per-iteration GRT-0102 trace lines no longer appear in the log; -verbose is kept so the resource/congestion/final-result lines still get checked.

I regoldened soft_ndr_reset_cap.ok too: regenerated to match the suppressed output - 62 lines, no GRT-0102, still the 6 GRT-0273 NDR disables plus the routing-resource table, final congestion report, and WL/routed-nets result block.

@github-actions github-actions Bot added size/S and removed size/M labels Jul 21, 2026
@jfgava

jfgava commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@jfgava this is the issue and the fix I did:

Problem: graph2d.cpp + Graph2D.h (GRT-0228 underflow): getCostNDRAware added an NDR net's edge cost as inflated (100X) or normal based on the edge's overflow state at route time, but on rip-up re-derived that choice from the edge's current ndr_overflow - which other nets could have changed. A net that added the normal cost then got the inflated cost subtracted, underflowing the uint16_t usage to 65535.

Fix: We track per-net whether each net added the inflated cost (std::set<FrNet*> --> std::map<FrNet*, bool>) and subtract exactly that on rip-up, so add/remove stay symmetric.

This fixed the Bazel crash I mentioned in Slack. And fixes the mismatch in ubuntu/bazel results

Test change: soft_ndr_reset_cap.tcl: added suppress_message GRT 102 so the compiler-sensitive per-iteration GRT-0102 trace lines no longer appear in the log; -verbose is kept so the resource/congestion/final-result lines still get checked.

I regoldened soft_ndr_reset_cap.ok too: regenerated to match the suppressed output - 62 lines, no GRT-0102, still the 6 GRT-0273 NDR disables plus the routing-resource table, final congestion report, and WL/routed-nets result block.

Thanks Deepashree!
The GRT fix is fine. I wonder if we'll have a significant impact on the CI

@dsengupta0628

dsengupta0628 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@jfgava this is the issue and the fix I did:
Problem: graph2d.cpp + Graph2D.h (GRT-0228 underflow): getCostNDRAware added an NDR net's edge cost as inflated (100X) or normal based on the edge's overflow state at route time, but on rip-up re-derived that choice from the edge's current ndr_overflow - which other nets could have changed. A net that added the normal cost then got the inflated cost subtracted, underflowing the uint16_t usage to 65535.
Fix: We track per-net whether each net added the inflated cost (std::set<FrNet*> --> std::map<FrNet*, bool>) and subtract exactly that on rip-up, so add/remove stay symmetric.
This fixed the Bazel crash I mentioned in Slack. And fixes the mismatch in ubuntu/bazel results
Test change: soft_ndr_reset_cap.tcl: added suppress_message GRT 102 so the compiler-sensitive per-iteration GRT-0102 trace lines no longer appear in the log; -verbose is kept so the resource/congestion/final-result lines still get checked.
I regoldened soft_ndr_reset_cap.ok too: regenerated to match the suppressed output - 62 lines, no GRT-0102, still the 6 GRT-0273 NDR disables plus the routing-resource table, final congestion report, and WL/routed-nets result block.

Thanks Deepashree! The GRT fix is fine. I wonder if we'll have a significant impact on the CI

Yes rerunning the CI now- But the CI was clear even without this change : http://secure-ci:8080/view/My/job/SB/job/secure-or_update_sta_latest_0710/

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@github-actions github-actions Bot added size/M and removed size/S labels Jul 21, 2026
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
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