Skip to content

Commit e2fee6a

Browse files
authored
Merge pull request #4563 from oharboe/grt-incremental-allow-congestion
global_route.tcl: carry -allow_congestion into the incremental reroutes
2 parents bc334a4 + 32a7b94 commit e2fee6a

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

‎flow/scripts/global_route.tcl‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ proc global_route_helper { } {
1414
set use_cugr ""
1515
append_env_var use_cugr GLOBAL_ROUTE_USE_CUGR -use_cugr 0
1616

17+
# The flow's choice to accept congestion, from GLOBAL_ROUTE_ARGS, passed
18+
# to every incremental reroute and to repair_antennas: each call decides
19+
# for itself, and one without -allow_congestion reroutes a congested route
20+
# harder and then fails on it.
21+
set allow_congestion ""
22+
if { [lsearch -exact $::env(GLOBAL_ROUTE_ARGS) -allow_congestion] >= 0 } {
23+
set allow_congestion -allow_congestion
24+
}
25+
1726
proc set_grt_seed { } {
1827
set seed_arg [env_var_or_empty GRT_SEED]
1928
if { $seed_arg ne "" } {
@@ -84,11 +93,12 @@ proc global_route_helper { } {
8493

8594
# Running DPL to fix overlapped instances
8695
# Run to get modified net by DPL
87-
log_cmd global_route -start_incremental
96+
log_cmd global_route -start_incremental {*}$allow_congestion
8897
detailed_placement_helper
8998
# Route only the modified net by DPL
9099
if {
91100
![run_global_route_and_catch_failures -end_incremental {*}$res_aware \
101+
{*}$allow_congestion \
92102
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_design.rpt]
93103
} {
94104
return
@@ -104,12 +114,13 @@ proc global_route_helper { } {
104114
report_metrics 5 "global route post repair timing"
105115
}
106116

107-
log_cmd global_route -start_incremental
117+
log_cmd global_route -start_incremental {*}$allow_congestion
108118
detailed_placement_helper
109119
log_cmd check_placement -verbose
110120
# Route only the modified net by DPL
111121
if {
112122
![run_global_route_and_catch_failures -end_incremental {*}$res_aware \
123+
{*}$allow_congestion \
113124
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_timing.rpt]
114125
} {
115126
return
@@ -135,11 +146,12 @@ proc global_route_helper { } {
135146
}
136147

137148
if { !$::env(OPT_POST_GRT_WNS) } {
138-
log_cmd global_route -start_incremental
149+
log_cmd global_route -start_incremental {*}$allow_congestion
139150
recover_power_helper
140151
# Route the modified nets by rsz journal restore
141152
if {
142153
![run_global_route_and_catch_failures -end_incremental {*}$res_aware \
154+
{*}$allow_congestion \
143155
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_recover_power.rpt]
144156
} {
145157
return
@@ -151,7 +163,8 @@ proc global_route_helper { } {
151163
[env_var_exists_and_non_empty MAX_REPAIR_ANTENNAS_ITER_GRT]
152164
} {
153165
puts "Repair antennas..."
154-
repair_antennas -iterations $::env(MAX_REPAIR_ANTENNAS_ITER_GRT)
166+
repair_antennas -iterations $::env(MAX_REPAIR_ANTENNAS_ITER_GRT) \
167+
{*}$allow_congestion
155168
# repair antennas calls DPL internally
156169
check_placement -verbose
157170
check_antennas -report_file $::env(REPORTS_DIR)/grt_antennas.log

0 commit comments

Comments
 (0)