Skip to content

Commit 403bcf0

Browse files
authored
Merge pull request #4318 from eder-matheus/global_route_cugr
add GLOBAL_ROUTE_USE_CUGR variable to enable CUGR during global routing
2 parents 6c7028f + 61f1a39 commit 403bcf0

5 files changed

Lines changed: 36 additions & 9 deletions

File tree

‎docs/user/FlowVariables.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ configuration file.
156156
| <a name="GDS_FILES"></a>GDS_FILES| Path to platform GDS files.| |
157157
| <a name="GENERATE_ARTIFACTS_ON_FAILURE"></a>GENERATE_ARTIFACTS_ON_FAILURE| For instance Bazel needs artifacts (.odb and .rpt files) on a failure to allow the user to save hours on re-running the failed step locally, but when working with a Makefile flow, it is more natural to fail the step and leave the user to manually inspect the logs and artifacts directly via the file system. Set to 1 to change the behavior to generate artifacts upon failure to e.g. do a global route. The exit code will still be non-zero on all other failures that aren't covered by the "useful to inspect the artifacts on failure" use-case. Example: just like detailed routing, a global route that fails with congestion, is not a build failure(as in exit code non-zero), it is a successful(as in zero exit code) global route that produce reports detailing the problem. Detailed route will not proceed, if there is global routing congestion This allows build systems, such as bazel, to create artifacts for global and detailed route, even if the operation had problems, without having know about the semantics between global and detailed route. Considering that global and detailed route can run for a long time and use a lot of memory, this allows inspecting results on a laptop for a build that ran on a server.| 0|
158158
| <a name="GLOBAL_PLACEMENT_ARGS"></a>GLOBAL_PLACEMENT_ARGS| Use additional tuning parameters during global placement other than default args defined in global_place.tcl.| |
159-
| <a name="GLOBAL_ROUTE_ARGS"></a>GLOBAL_ROUTE_ARGS| Replaces default arguments for global route.| -congestion_iterations 30 -congestion_report_iter_step 5 -verbose|
159+
| <a name="GLOBAL_ROUTE_ARGS"></a>GLOBAL_ROUTE_ARGS| Replaces default arguments for global route. The -congestion_iterations default is set by the flow (30 for FastRoute, 10 for CUGR); add -congestion_iterations here to override it.| -congestion_report_iter_step 5 -verbose|
160+
| <a name="GLOBAL_ROUTE_USE_CUGR"></a>GLOBAL_ROUTE_USE_CUGR| Passed as -use_cugr to global_route. Uses CUGR as the global routing solver instead of the default FastRoute solver. NOTE: CUGR is not ready for production.| 0|
160161
| <a name="GND_NETS_VOLTAGES"></a>GND_NETS_VOLTAGES| Used for IR Drop calculation.| |
161162
| <a name="GPL_KEEP_OVERFLOW"></a>GPL_KEEP_OVERFLOW| Passed as -keep_resize_below_overflow to global_placement. Only used when GPL_TIMING_DRIVEN is enabled.| |
162163
| <a name="GPL_ROUTABILITY_DRIVEN"></a>GPL_ROUTABILITY_DRIVEN| Specifies whether the placer should use routability driven placement.| 1|
@@ -536,6 +537,7 @@ configuration file.
536537
- [DETAILED_METRICS](#DETAILED_METRICS)
537538
- [ENABLE_RESISTANCE_AWARE](#ENABLE_RESISTANCE_AWARE)
538539
- [GLOBAL_ROUTE_ARGS](#GLOBAL_ROUTE_ARGS)
540+
- [GLOBAL_ROUTE_USE_CUGR](#GLOBAL_ROUTE_USE_CUGR)
539541
- [HOLD_SLACK_MARGIN](#HOLD_SLACK_MARGIN)
540542
- [MAX_REPAIR_ANTENNAS_ITER_GRT](#MAX_REPAIR_ANTENNAS_ITER_GRT)
541543
- [MAX_REPAIR_TIMING_ITER](#MAX_REPAIR_TIMING_ITER)

‎flow/scripts/global_route.tcl‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,18 @@ proc global_route_helper { } {
1111
set res_aware ""
1212
append_env_var res_aware ENABLE_RESISTANCE_AWARE -resistance_aware 0
1313

14-
proc do_global_route { res_aware } {
14+
set use_cugr ""
15+
append_env_var use_cugr GLOBAL_ROUTE_USE_CUGR -use_cugr 0
16+
17+
proc do_global_route { res_aware use_cugr } {
18+
# CUGR runs a full 3D maze pass per iteration; use a tighter default.
19+
set cong_iters "-congestion_iterations 30"
20+
if { $use_cugr ne "" } {
21+
set cong_iters "-congestion_iterations 10"
22+
}
1523
set all_args [concat [list \
1624
-congestion_report_file $::global_route_congestion_report] \
17-
$::env(GLOBAL_ROUTE_ARGS) {*}$res_aware]
25+
$cong_iters $::env(GLOBAL_ROUTE_ARGS) {*}$res_aware {*}$use_cugr]
1826

1927
log_cmd global_route {*}$all_args
2028
}
@@ -25,7 +33,7 @@ proc global_route_helper { } {
2533

2634
log_cmd pin_access {*}$additional_args
2735

28-
set result [catch { do_global_route $res_aware } errMsg]
36+
set result [catch { do_global_route $res_aware $use_cugr } errMsg]
2937

3038
if { $result != 0 } {
3139
if { !$::env(GENERATE_ARTIFACTS_ON_FAILURE) } {

‎flow/scripts/variables.json‎

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flow/scripts/variables.yaml‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,10 +1318,20 @@ PRE_GLOBAL_ROUTE_TCL:
13181318
- grt
13191319
GLOBAL_ROUTE_ARGS:
13201320
description: >
1321-
Replaces default arguments for global route.
1321+
Replaces default arguments for global route. The -congestion_iterations
1322+
default is set by the flow (30 for FastRoute, 10 for CUGR); add
1323+
-congestion_iterations here to override it.
13221324
stages:
13231325
- grt
1324-
default: -congestion_iterations 30 -congestion_report_iter_step 5 -verbose
1326+
default: -congestion_report_iter_step 5 -verbose
1327+
GLOBAL_ROUTE_USE_CUGR:
1328+
description: >
1329+
Passed as -use_cugr to global_route. Uses CUGR as the global routing
1330+
solver instead of the default FastRoute solver. NOTE: CUGR is not ready
1331+
for production.
1332+
stages:
1333+
- grt
1334+
default: 0
13251335
ENABLE_RESISTANCE_AWARE:
13261336
description: >
13271337
Passed as -resistance_aware to global_route.

‎tools/OpenROAD‎

Submodule OpenROAD updated 382 files

0 commit comments

Comments
 (0)