Skip to content

Commit 452d087

Browse files
committed
global route: add policy on iteration reporting on hard runs
The default behavior if the user didn't specify GLOBAL_ROUTE_ARGS is to first make an attempt with a few iterations, if this is a hard global route, start from scratch, try harder and logging. The goal here is to make ORFS handle the simple cases without fuzz and to make the harder cases more easily debuggable without having to go spelunking in Tcl. If GLOBAL_ROUTE_ARGS is specified, then we do only what the GLOBAL_ROUTE_ARGS specifies. Signed-off-by: Øyvind Harboe <[email protected]>
1 parent f03b5fa commit 452d087

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

flow/scripts/global_route.tcl

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,34 @@ if {[info exist env(FASTROUTE_TCL)]} {
1616
}
1717
}
1818

19-
global_route -guide_file $env(RESULTS_DIR)/route.guide \
20-
-congestion_report_file $env(REPORTS_DIR)/congestion.rpt \
21-
{*}[expr {[info exists ::env(GLOBAL_ROUTE_ARGS)] ? $::env(GLOBAL_ROUTE_ARGS) : {-congestion_iterations 20 -verbose}}]
19+
# The default behavior if the user didn't specify GLOBAL_ROUTE_ARGS is to
20+
# first make an attempt with a few iterations, if this is a hard global
21+
# route, start from scratch, try harder and logging. The goal here is to make
22+
# ORFS handle the simple cases without fuzz and to make the harder
23+
# cases more easily debuggable without having to go spelunking in Tcl.
24+
#
25+
# If GLOBAL_ROUTE_ARGS is specified, then we do only what the
26+
# GLOBAL_ROUTE_ARGS specifies.
27+
set common_args [list -guide_file $env(RESULTS_DIR)/route.guide \
28+
-congestion_report_file $env(REPORTS_DIR)/congestion.rpt]
29+
if {[info exists ::env(GLOBAL_ROUTE_ARGS)]} {
30+
global_route {*}$common_args {*}$::env(GLOBAL_ROUTE_ARGS)
31+
} else {
32+
for {set i 0} {$i < 2} {incr i} {
33+
set congestion_args [list -verbose]
34+
if {$i == 1} {
35+
global_route {*}$common_args {*}$congestion_args -congestion_iterations 20 -congestion_report_iter_step 1
36+
break
37+
} else {
38+
try {
39+
global_route {*}$common_args {*}$congestion_args -congestion_iterations 5
40+
break
41+
} catch {
42+
puts "First attempt failed. Retrying, reporting each iteration..."
43+
}
44+
}
45+
}
46+
}
2247

2348
set_propagated_clock [all_clocks]
2449
estimate_parasitics -global_routing

0 commit comments

Comments
 (0)