Skip to content

use CUGR on sky130hd and sky130hs designs - #4862

Open
eder-matheus wants to merge 5 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:cugr-sky130
Open

eder-matheus wants to merge 5 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:cugr-sky130

Conversation

@eder-matheus

Copy link
Copy Markdown
Member

Makes CUGR the global router for every sky130hd and sky130hs design. All other platforms keep FastRoute.

Changes

  • GLOBAL_ROUTE_USE_CUGR ?= 1 in the sky130hd and sky130hs platform config.mk. A design or the command line can still set it to 0.
  • New GLOBAL_ROUTE_CUGR_ADJUSTMENT_SCALE, default 0.5. When CUGR routes, it multiplies every layer's global routing adjustment (from FASTROUTE_TCL or ROUTING_LAYER_ADJUSTMENT) before the first global_route.
    • CUGR keeps fractional edge capacity, where FastRoute rounds it down, and it charges via demand, so it needs less capacity held back.
    • The scaled values are saved in 5_1_grt.odb, so antenna repair after detailed routing uses them too.
  • When CUGR ends global routing congested, global_route.tcl runs report_congestion after antenna repair, so the log shows the remaining overflow.

Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
@eder-matheus eder-matheus self-assigned this Nov 19, 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 introduces a new flow variable, GLOBAL_ROUTE_CUGR_ADJUSTMENT_SCALE, which scales routing layer adjustments when using the CUGR global router. It also enables CUGR by default for the sky130hd and sky130hs platforms and adds congestion reporting for CUGR. A review comment identifies a critical issue in scale_layer_adjustments where fully blocked layers (adjustment of 1.0) would be incorrectly scaled and partially opened, and suggests restricting scaling to adjustments strictly between 0 and 1.

Comment on lines +37 to +43
foreach layer [[ord::get_db_tech] getLayers] {
set adjustment [$layer getLayerAdjustment]
if { $adjustment != 0 } {
log_cmd set_global_routing_layer_adjustment [$layer getName] \
[expr { $adjustment * $scale }]
}
}

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.

high

If a routing layer has an adjustment of 1 (or 1.0), it means the layer is completely blocked for global routing (e.g., met1 is often fully blocked to prevent global routing on it). Scaling this adjustment by a factor less than 1 (e.g., 0.5) would reduce the adjustment to 0.5, which partially opens the layer for global routing. This can lead to unexpected global routing on blocked layers, causing routing issues or detailed routing failures.

To prevent this, we should only scale adjustments that are strictly between 0 and 1 (exclusive).

  foreach layer [[ord::get_db_tech] getLayers] {
    set adjustment [$layer getLayerAdjustment]
    if { $adjustment > 0 && $adjustment < 1 } {
      log_cmd set_global_routing_layer_adjustment [$layer getName] \\
        [expr { $adjustment * $scale }]
    }
  }

@openroad-ci

Copy link
Copy Markdown
Member

🔍 QoR check

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

Commit 83e1bca · Jenkins build #1 · Baseline: build · View build on dashboard

62 design(s) checked — 4 with regression(s), 0 without a comparable baseline.

❌ sky130hd/chameleon base — 1 failing metric(s)
Metric target base delta limit band
globalroute__antenna_diodes_count 104.000 99.000 5.051% 100.000 Metric 0.100%
❌ sky130hd/ibex base — 1 failing metric(s)
Metric target base delta limit band
globalroute__timing__setup__tns -9.464 -7.527 -25.733% -9.127 PeriodPadding 20.000%
❌ sky130hd/riscv32i base — 1 failing metric(s)
Metric target base delta limit band
finish__timing__setup__tns -25.111 -19.053 -31.797% -22.863 PeriodPadding 20.000%
❌ sky130hs/jpeg base — 1 failing metric(s)
Metric target base delta limit band
detailedroute__antenna__violating__nets 1.000 0.000 — 0.000 Padding 30.000%

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.

2 participants