Skip to content

Commit 22ef443

Browse files
committed
Make the max slope for high fanout routing a flag.
Signed-off-by: Dustin DeWeese <[email protected]>
1 parent e770c1c commit 22ef443

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

vpr/src/base/SetupVPR.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ static void SetupRouterOpts(const t_options& Options, t_router_opts* RouterOpts)
373373
RouterOpts->clock_modeling = Options.clock_modeling;
374374
RouterOpts->two_stage_clock_routing = Options.two_stage_clock_routing;
375375
RouterOpts->high_fanout_threshold = Options.router_high_fanout_threshold;
376+
RouterOpts->high_fanout_max_slope = Options.router_high_fanout_max_slope;
376377
RouterOpts->router_debug_net = Options.router_debug_net;
377378
RouterOpts->router_debug_sink_rr = Options.router_debug_sink_rr;
378379
RouterOpts->router_debug_iteration = Options.router_debug_iteration;

vpr/src/base/read_options.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,6 +1984,13 @@ argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& arg
19841984
.default_value("64")
19851985
.show_in(argparse::ShowIn::HELP_ONLY);
19861986

1987+
route_timing_grp.add_argument<float>(args.router_high_fanout_max_slope, "--router_high_fanout_max_slope")
1988+
.help(
1989+
"Maximum routing predictor slope where high fanout routing is enabled.\n"
1990+
" -1.0 is normal progress, 0 is no progress.")
1991+
.default_value("-0.5")
1992+
.show_in(argparse::ShowIn::HELP_ONLY);
1993+
19871994
route_timing_grp.add_argument<e_router_lookahead, ParseRouterLookahead>(args.router_lookahead_type, "--router_lookahead")
19881995
.help(
19891996
"Controls what lookahead the router uses to calculate cost of completing a connection.\n"

vpr/src/base/read_options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ struct t_options {
163163
argparse::ArgValue<float> congested_routing_iteration_threshold_frac;
164164
argparse::ArgValue<e_route_bb_update> route_bb_update;
165165
argparse::ArgValue<int> router_high_fanout_threshold;
166+
argparse::ArgValue<float> router_high_fanout_max_slope;
166167
argparse::ArgValue<int> router_debug_net;
167168
argparse::ArgValue<int> router_debug_sink_rr;
168169
argparse::ArgValue<int> router_debug_iteration;

vpr/src/base/vpr_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,7 @@ struct t_router_opts {
10651065
enum e_clock_modeling clock_modeling; ///<How clock pins and nets should be handled
10661066
bool two_stage_clock_routing; ///<How clock nets on dedicated networks should be routed
10671067
int high_fanout_threshold;
1068+
float high_fanout_max_slope;
10681069
int router_debug_net;
10691070
int router_debug_sink_rr;
10701071
int router_debug_iteration;

vpr/src/route/route_timing.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static bool timing_driven_route_sink(
7878
unsigned itarget,
7979
int target_pin,
8080
const t_conn_cost_params cost_params,
81-
int high_fanout_threshold,
81+
const t_router_opts& router_opts,
8282
t_rt_node* rt_root,
8383
t_rt_node** rt_node_of_sink,
8484
SpatialRouteTreeLookup& spatial_rt_lookup,
@@ -1049,7 +1049,7 @@ bool timing_driven_route_net(ConnectionRouter& router,
10491049
itarget,
10501050
target_pin,
10511051
cost_params,
1052-
router_opts.high_fanout_threshold,
1052+
router_opts,
10531053
rt_root, rt_node_of_sink,
10541054
spatial_route_tree_lookup,
10551055
router_stats,
@@ -1189,7 +1189,7 @@ static bool timing_driven_route_sink(
11891189
unsigned itarget,
11901190
int target_pin,
11911191
const t_conn_cost_params cost_params,
1192-
int high_fanout_threshold,
1192+
const t_router_opts& router_opts,
11931193
t_rt_node* rt_root,
11941194
t_rt_node** rt_node_of_sink,
11951195
SpatialRouteTreeLookup& spatial_rt_lookup,
@@ -1215,15 +1215,15 @@ static bool timing_driven_route_sink(
12151215
t_bb bounding_box = route_ctx.route_bb[net_id];
12161216

12171217
bool net_is_global = cluster_ctx.clb_nlist.net_is_global(net_id);
1218-
bool high_fanout = is_high_fanout(cluster_ctx.clb_nlist.net_sinks(net_id).size(), high_fanout_threshold);
1218+
bool high_fanout = is_high_fanout(cluster_ctx.clb_nlist.net_sinks(net_id).size(), router_opts.high_fanout_threshold);
12191219
constexpr float HIGH_FANOUT_CRITICALITY_THRESHOLD = 0.9;
12201220
bool sink_critical = (cost_params.criticality > HIGH_FANOUT_CRITICALITY_THRESHOLD);
12211221
bool net_is_clock = route_ctx.is_clock_net[net_id] != 0;
12221222

12231223
//We normally route high fanout nets by only adding spatially close-by routing to the heap (reduces run-time).
12241224
//However, if the current sink is 'critical' from a timing perspective, we put the entire route tree back onto
12251225
//the heap to ensure it has more flexibility to find the best path.
1226-
if (high_fanout && !sink_critical && !net_is_global && !net_is_clock && !(routing_predictor.get_slope() > -0.5)) {
1226+
if (high_fanout && !sink_critical && !net_is_global && !net_is_clock && !(routing_predictor.get_slope() > router_opts.high_fanout_max_slope)) {
12271227
std::tie(found_path, cheapest) = router.timing_driven_route_connection_from_route_tree_high_fanout(rt_root,
12281228
sink_node,
12291229
cost_params,

0 commit comments

Comments
 (0)