-
Notifications
You must be signed in to change notification settings - Fork 521
global_route: catch failures to generate deterministic artifacts #4416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
maliberty
merged 1 commit into
The-OpenROAD-Project:master
from
oharboe:feat-global-route-catch-failures
Aug 12, 2026
+35
−16
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,21 @@ proc global_route_helper { } { | |
| } | ||
| } | ||
|
|
||
| proc run_global_route_and_catch_failures { args } { | ||
| set result [catch { log_cmd global_route {*}$args } errMsg] | ||
|
|
||
| if { $result != 0 } { | ||
| if { !$::env(GENERATE_ARTIFACTS_ON_FAILURE) } { | ||
| log_cmd write_db $::env(RESULTS_DIR)/5_1_grt-failed.odb | ||
| error $errMsg | ||
|
oharboe marked this conversation as resolved.
|
||
| } | ||
| orfs_write_sdc $::env(RESULTS_DIR)/5_1_grt.sdc | ||
| orfs_write_db $::env(RESULTS_DIR)/5_1_grt.odb | ||
|
oharboe marked this conversation as resolved.
|
||
| return 0 | ||
| } | ||
| return 1 | ||
| } | ||
|
oharboe marked this conversation as resolved.
|
||
|
|
||
| proc do_global_route { res_aware use_cugr } { | ||
| set_grt_seed | ||
| # CUGR runs a full 3D maze pass per iteration; use a tighter default. | ||
|
|
@@ -32,7 +47,7 @@ proc global_route_helper { } { | |
| -congestion_report_file $::global_route_congestion_report] \ | ||
| $cong_iters $::env(GLOBAL_ROUTE_ARGS) {*}$res_aware {*}$use_cugr] | ||
|
|
||
| log_cmd global_route {*}$all_args | ||
| return [run_global_route_and_catch_failures {*}$all_args] | ||
| } | ||
| set additional_args "" | ||
| append_env_var additional_args dbProcessNode -db_process_node 1 | ||
|
|
@@ -41,15 +56,7 @@ proc global_route_helper { } { | |
|
|
||
| log_cmd pin_access {*}$additional_args | ||
|
|
||
| set result [catch { do_global_route $res_aware $use_cugr } errMsg] | ||
|
|
||
| if { $result != 0 } { | ||
| if { !$::env(GENERATE_ARTIFACTS_ON_FAILURE) } { | ||
| orfs_write_db $::env(RESULTS_DIR)/5_1_grt-failed.odb | ||
| error $errMsg | ||
| } | ||
| orfs_write_sdc $::env(RESULTS_DIR)/5_1_grt.sdc | ||
| orfs_write_db $::env(RESULTS_DIR)/5_1_grt.odb | ||
| if { ![do_global_route $res_aware $use_cugr] } { | ||
| return | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Strange... why is global_route run after we have written the output, should the global route results below be thrown away? |
||
| } | ||
|
|
||
|
|
@@ -80,8 +87,12 @@ proc global_route_helper { } { | |
| log_cmd global_route -start_incremental | ||
| log_cmd detailed_placement | ||
| # Route only the modified net by DPL | ||
| log_cmd global_route -end_incremental {*}$res_aware \ | ||
| -congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_design.rpt | ||
| if { | ||
| ![run_global_route_and_catch_failures -end_incremental {*}$res_aware \ | ||
| -congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_design.rpt] | ||
| } { | ||
| return | ||
| } | ||
|
|
||
| # Repair timing using global route parasitics | ||
| puts "Repair setup and hold violations..." | ||
|
|
@@ -97,8 +108,12 @@ proc global_route_helper { } { | |
| log_cmd detailed_placement | ||
| log_cmd check_placement -verbose | ||
| # Route only the modified net by DPL | ||
| log_cmd global_route -end_incremental {*}$res_aware \ | ||
| -congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_timing.rpt | ||
| if { | ||
| ![run_global_route_and_catch_failures -end_incremental {*}$res_aware \ | ||
| -congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_timing.rpt] | ||
| } { | ||
| return | ||
| } | ||
|
|
||
| log_cmd estimate_parasitics -global_routing | ||
|
|
||
|
|
@@ -123,8 +138,12 @@ proc global_route_helper { } { | |
| 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 \ | ||
| -congestion_report_file $::env(REPORTS_DIR)/congestion_post_recover_power.rpt | ||
| if { | ||
| ![run_global_route_and_catch_failures -end_incremental {*}$res_aware \ | ||
| -congestion_report_file $::env(REPORTS_DIR)/congestion_post_recover_power.rpt] | ||
| } { | ||
| return | ||
| } | ||
| } | ||
|
|
||
| if { | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.