From 2db6c3e01f0ff61955f1c5a3947385d49cf2c5f1 Mon Sep 17 00:00:00 2001 From: Eder Monteiro Date: Tue, 30 Jun 2026 10:41:46 -0300 Subject: [PATCH 1/5] add GLOBAL_ROUTE_USE_CUGR variable to enable CUGR during global routing Signed-off-by: Eder Monteiro --- docs/user/FlowVariables.md | 2 ++ flow/scripts/global_route.tcl | 9 ++++++--- flow/scripts/variables.json | 7 +++++++ flow/scripts/variables.yaml | 8 ++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index 8a63255b49..3f7a777186 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -157,6 +157,7 @@ configuration file. | 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| | GLOBAL_PLACEMENT_ARGS| Use additional tuning parameters during global placement other than default args defined in global_place.tcl.| | | GLOBAL_ROUTE_ARGS| Replaces default arguments for global route.| -congestion_iterations 30 -congestion_report_iter_step 5 -verbose| +| 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| | GND_NETS_VOLTAGES| Used for IR Drop calculation.| | | GPL_KEEP_OVERFLOW| Passed as -keep_resize_below_overflow to global_placement. Only used when GPL_TIMING_DRIVEN is enabled.| | | GPL_ROUTABILITY_DRIVEN| Specifies whether the placer should use routability driven placement.| 1| @@ -536,6 +537,7 @@ configuration file. - [DETAILED_METRICS](#DETAILED_METRICS) - [ENABLE_RESISTANCE_AWARE](#ENABLE_RESISTANCE_AWARE) - [GLOBAL_ROUTE_ARGS](#GLOBAL_ROUTE_ARGS) +- [GLOBAL_ROUTE_USE_CUGR](#GLOBAL_ROUTE_USE_CUGR) - [HOLD_SLACK_MARGIN](#HOLD_SLACK_MARGIN) - [MAX_REPAIR_ANTENNAS_ITER_GRT](#MAX_REPAIR_ANTENNAS_ITER_GRT) - [MAX_REPAIR_TIMING_ITER](#MAX_REPAIR_TIMING_ITER) diff --git a/flow/scripts/global_route.tcl b/flow/scripts/global_route.tcl index 3534fde65f..4f51a6bcb6 100644 --- a/flow/scripts/global_route.tcl +++ b/flow/scripts/global_route.tcl @@ -11,10 +11,13 @@ proc global_route_helper { } { set res_aware "" append_env_var res_aware ENABLE_RESISTANCE_AWARE -resistance_aware 0 - proc do_global_route { res_aware } { + set use_cugr "" + append_env_var use_cugr GLOBAL_ROUTE_USE_CUGR -use_cugr 0 + + proc do_global_route { res_aware use_cugr } { set all_args [concat [list \ -congestion_report_file $::global_route_congestion_report] \ - $::env(GLOBAL_ROUTE_ARGS) {*}$res_aware] + $::env(GLOBAL_ROUTE_ARGS) {*}$res_aware {*}$use_cugr] log_cmd global_route {*}$all_args } @@ -25,7 +28,7 @@ proc global_route_helper { } { log_cmd pin_access {*}$additional_args - set result [catch { do_global_route $res_aware } errMsg] + set result [catch { do_global_route $res_aware $use_cugr } errMsg] if { $result != 0 } { if { !$::env(GENERATE_ARTIFACTS_ON_FAILURE) } { diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json index 188102f5f0..ba73620b62 100644 --- a/flow/scripts/variables.json +++ b/flow/scripts/variables.json @@ -394,6 +394,13 @@ "grt" ] }, + "GLOBAL_ROUTE_USE_CUGR": { + "default": 0, + "description": "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.\n", + "stages": [ + "grt" + ] + }, "GND_NETS_VOLTAGES": { "description": "Used for IR Drop calculation.\n", "stages": [ diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index 4fdafd2d98..3f05862f90 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -1322,6 +1322,14 @@ GLOBAL_ROUTE_ARGS: stages: - grt default: -congestion_iterations 30 -congestion_report_iter_step 5 -verbose +GLOBAL_ROUTE_USE_CUGR: + description: > + 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. + stages: + - grt + default: 0 ENABLE_RESISTANCE_AWARE: description: > Passed as -resistance_aware to global_route. From a63e6520ba7b1b07113dfab9b36181588d19e64a Mon Sep 17 00:00:00 2001 From: Eder Monteiro Date: Tue, 30 Jun 2026 10:51:58 -0300 Subject: [PATCH 2/5] use latest openroad Signed-off-by: Eder Monteiro --- tools/OpenROAD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/OpenROAD b/tools/OpenROAD index 4c26918f5a..7304ba78ad 160000 --- a/tools/OpenROAD +++ b/tools/OpenROAD @@ -1 +1 @@ -Subproject commit 4c26918f5a77392910939b51b9c2490b7e7e3201 +Subproject commit 7304ba78ade7cb9f78466c6d0231432d72dadd3b From 30cdebc645261176d8b0b933469beac0e29145f5 Mon Sep 17 00:00:00 2001 From: Eder Monteiro Date: Tue, 30 Jun 2026 10:58:10 -0300 Subject: [PATCH 3/5] add missing -use_cugr to the incremental global route calls Signed-off-by: Eder Monteiro --- flow/scripts/global_route.tcl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flow/scripts/global_route.tcl b/flow/scripts/global_route.tcl index 4f51a6bcb6..3e743c61ae 100644 --- a/flow/scripts/global_route.tcl +++ b/flow/scripts/global_route.tcl @@ -66,10 +66,10 @@ proc global_route_helper { } { # Run to get modified net by DPL set dpl_args {} append_env_var dpl_args USE_NEGOTIATION -use_negotiation 0 - log_cmd global_route -start_incremental + log_cmd global_route -start_incremental {*}$use_cugr log_cmd detailed_placement {*}$dpl_args # Route only the modified net by DPL - log_cmd global_route -end_incremental {*}$res_aware \ + log_cmd global_route -end_incremental {*}$res_aware {*}$use_cugr \ -congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_design.rpt # Repair timing using global route parasitics @@ -84,19 +84,19 @@ proc global_route_helper { } { # Running DPL to fix overlapped instances # Run to get modified net by DPL - log_cmd global_route -start_incremental + log_cmd global_route -start_incremental {*}$use_cugr log_cmd detailed_placement {*}$dpl_args check_placement -verbose # Route only the modified net by DPL - log_cmd global_route -end_incremental {*}$res_aware \ + log_cmd global_route -end_incremental {*}$res_aware {*}$use_cugr \ -congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_timing.rpt } - log_cmd global_route -start_incremental + log_cmd global_route -start_incremental {*}$use_cugr recover_power_helper # Route the modified nets by rsz journal restore - log_cmd global_route -end_incremental {*}$res_aware \ + log_cmd global_route -end_incremental {*}$res_aware {*}$use_cugr \ -congestion_report_file $::env(REPORTS_DIR)/congestion_post_recover_power.rpt if { From 6ef05ad0c26f822dfaabd1d23899ac14d1b5a300 Mon Sep 17 00:00:00 2001 From: Eder Monteiro Date: Tue, 30 Jun 2026 12:19:42 -0300 Subject: [PATCH 4/5] remove redundant use_cugr flags Signed-off-by: Eder Monteiro --- flow/scripts/global_route.tcl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flow/scripts/global_route.tcl b/flow/scripts/global_route.tcl index 3e743c61ae..4f51a6bcb6 100644 --- a/flow/scripts/global_route.tcl +++ b/flow/scripts/global_route.tcl @@ -66,10 +66,10 @@ proc global_route_helper { } { # Run to get modified net by DPL set dpl_args {} append_env_var dpl_args USE_NEGOTIATION -use_negotiation 0 - log_cmd global_route -start_incremental {*}$use_cugr + log_cmd global_route -start_incremental log_cmd detailed_placement {*}$dpl_args # Route only the modified net by DPL - log_cmd global_route -end_incremental {*}$res_aware {*}$use_cugr \ + log_cmd global_route -end_incremental {*}$res_aware \ -congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_design.rpt # Repair timing using global route parasitics @@ -84,19 +84,19 @@ proc global_route_helper { } { # Running DPL to fix overlapped instances # Run to get modified net by DPL - log_cmd global_route -start_incremental {*}$use_cugr + log_cmd global_route -start_incremental log_cmd detailed_placement {*}$dpl_args check_placement -verbose # Route only the modified net by DPL - log_cmd global_route -end_incremental {*}$res_aware {*}$use_cugr \ + log_cmd global_route -end_incremental {*}$res_aware \ -congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_timing.rpt } - log_cmd global_route -start_incremental {*}$use_cugr + log_cmd global_route -start_incremental recover_power_helper # Route the modified nets by rsz journal restore - log_cmd global_route -end_incremental {*}$res_aware {*}$use_cugr \ + log_cmd global_route -end_incremental {*}$res_aware \ -congestion_report_file $::env(REPORTS_DIR)/congestion_post_recover_power.rpt if { From 61f1a39c9644677ecc4bb34f92c02085630adea3 Mon Sep 17 00:00:00 2001 From: Eder Monteiro Date: Tue, 30 Jun 2026 12:32:49 -0300 Subject: [PATCH 5/5] set different congestion iterations value for CUGR Signed-off-by: Eder Monteiro --- docs/user/FlowVariables.md | 2 +- flow/scripts/global_route.tcl | 7 ++++++- flow/scripts/variables.json | 4 ++-- flow/scripts/variables.yaml | 6 ++++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index 3f7a777186..9bd08318bc 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -156,7 +156,7 @@ configuration file. | GDS_FILES| Path to platform GDS files.| | | 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| | GLOBAL_PLACEMENT_ARGS| Use additional tuning parameters during global placement other than default args defined in global_place.tcl.| | -| GLOBAL_ROUTE_ARGS| Replaces default arguments for global route.| -congestion_iterations 30 -congestion_report_iter_step 5 -verbose| +| 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| | 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| | GND_NETS_VOLTAGES| Used for IR Drop calculation.| | | GPL_KEEP_OVERFLOW| Passed as -keep_resize_below_overflow to global_placement. Only used when GPL_TIMING_DRIVEN is enabled.| | diff --git a/flow/scripts/global_route.tcl b/flow/scripts/global_route.tcl index 4f51a6bcb6..d8e75580b5 100644 --- a/flow/scripts/global_route.tcl +++ b/flow/scripts/global_route.tcl @@ -15,9 +15,14 @@ proc global_route_helper { } { append_env_var use_cugr GLOBAL_ROUTE_USE_CUGR -use_cugr 0 proc do_global_route { res_aware use_cugr } { + # CUGR runs a full 3D maze pass per iteration; use a tighter default. + set cong_iters "-congestion_iterations 30" + if { $use_cugr ne "" } { + set cong_iters "-congestion_iterations 10" + } set all_args [concat [list \ -congestion_report_file $::global_route_congestion_report] \ - $::env(GLOBAL_ROUTE_ARGS) {*}$res_aware {*}$use_cugr] + $cong_iters $::env(GLOBAL_ROUTE_ARGS) {*}$res_aware {*}$use_cugr] log_cmd global_route {*}$all_args } diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json index ba73620b62..815de49e82 100644 --- a/flow/scripts/variables.json +++ b/flow/scripts/variables.json @@ -388,8 +388,8 @@ ] }, "GLOBAL_ROUTE_ARGS": { - "default": "-congestion_iterations 30 -congestion_report_iter_step 5 -verbose", - "description": "Replaces default arguments for global route.\n", + "default": "-congestion_report_iter_step 5 -verbose", + "description": "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.\n", "stages": [ "grt" ] diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index 3f05862f90..5110b25df5 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -1318,10 +1318,12 @@ PRE_GLOBAL_ROUTE_TCL: - grt GLOBAL_ROUTE_ARGS: description: > - Replaces default arguments for global route. + 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. stages: - grt - default: -congestion_iterations 30 -congestion_report_iter_step 5 -verbose + default: -congestion_report_iter_step 5 -verbose GLOBAL_ROUTE_USE_CUGR: description: > Passed as -use_cugr to global_route. Uses CUGR as the global routing