diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index 8a63255b49..9bd08318bc 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -156,7 +156,8 @@ 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.| | | 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..d8e75580b5 100644 --- a/flow/scripts/global_route.tcl +++ b/flow/scripts/global_route.tcl @@ -11,10 +11,18 @@ 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 } { + # 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] + $cong_iters $::env(GLOBAL_ROUTE_ARGS) {*}$res_aware {*}$use_cugr] log_cmd global_route {*}$all_args } @@ -25,7 +33,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..815de49e82 100644 --- a/flow/scripts/variables.json +++ b/flow/scripts/variables.json @@ -388,8 +388,15 @@ ] }, "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" + ] + }, + "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" ] diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index 4fdafd2d98..5110b25df5 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -1318,10 +1318,20 @@ 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 + 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. 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