@@ -88,11 +88,12 @@ static bool timing_driven_route_sink(
8888 unsigned itarget,
8989 int target_pin,
9090 const t_conn_cost_params cost_params,
91- int high_fanout_threshold ,
91+ const t_router_opts& router_opts ,
9292 t_rt_node* rt_root,
9393 t_rt_node** rt_node_of_sink,
9494 SpatialRouteTreeLookup& spatial_rt_lookup,
95- RouterStats& router_stats);
95+ RouterStats& router_stats,
96+ const RoutingPredictor& routing_predictor);
9697
9798template <typename ConnectionRouter>
9899static bool timing_driven_pre_route_to_clock_root (
@@ -425,7 +426,8 @@ bool try_timing_driven_route_tmpl(const t_router_opts& router_opts,
425426 route_timing_info,
426427 pin_timing_invalidator.get (),
427428 budgeting_inf,
428- was_rerouted);
429+ was_rerouted,
430+ routing_predictor);
429431 if (!is_routable) {
430432 return (false ); // Impossible to route
431433 }
@@ -772,7 +774,8 @@ bool try_timing_driven_route_net(ConnectionRouter& router,
772774 std::shared_ptr<SetupTimingInfo> timing_info,
773775 ClusteredPinTimingInvalidator* pin_timing_invalidator,
774776 route_budgets& budgeting_inf,
775- bool & was_rerouted) {
777+ bool & was_rerouted,
778+ const RoutingPredictor& routing_predictor) {
776779 auto & cluster_ctx = g_vpr_ctx.clustering ();
777780 auto & route_ctx = g_vpr_ctx.mutable_routing ();
778781
@@ -803,7 +806,8 @@ bool try_timing_driven_route_net(ConnectionRouter& router,
803806 netlist_pin_lookup,
804807 timing_info,
805808 pin_timing_invalidator,
806- budgeting_inf);
809+ budgeting_inf,
810+ routing_predictor);
807811
808812 profiling::net_fanout_end (cluster_ctx.clb_nlist .net_sinks (net_id).size ());
809813
@@ -927,7 +931,8 @@ bool timing_driven_route_net(ConnectionRouter& router,
927931 const ClusteredPinAtomPinsLookup& netlist_pin_lookup,
928932 std::shared_ptr<SetupTimingInfo> timing_info,
929933 ClusteredPinTimingInvalidator* pin_timing_invalidator,
930- route_budgets& budgeting_inf) {
934+ route_budgets& budgeting_inf,
935+ const RoutingPredictor& routing_predictor) {
931936 /* Returns true as long as found some way to hook up this net, even if that *
932937 * way resulted in overuse of resources (congestion). If there is no way *
933938 * to route this net, even ignoring congestion, it returns false. In this *
@@ -1060,10 +1065,11 @@ bool timing_driven_route_net(ConnectionRouter& router,
10601065 itarget,
10611066 target_pin,
10621067 cost_params,
1063- router_opts. high_fanout_threshold ,
1068+ router_opts,
10641069 rt_root, rt_node_of_sink,
10651070 spatial_route_tree_lookup,
1066- router_stats))
1071+ router_stats,
1072+ routing_predictor))
10671073 return false ;
10681074
10691075 profiling::conn_finish (route_ctx.net_rr_terminals [net_id][0 ],
@@ -1205,11 +1211,12 @@ static bool timing_driven_route_sink(
12051211 unsigned itarget,
12061212 int target_pin,
12071213 const t_conn_cost_params cost_params,
1208- int high_fanout_threshold ,
1214+ const t_router_opts& router_opts ,
12091215 t_rt_node* rt_root,
12101216 t_rt_node** rt_node_of_sink,
12111217 SpatialRouteTreeLookup& spatial_rt_lookup,
1212- RouterStats& router_stats) {
1218+ RouterStats& router_stats,
1219+ const RoutingPredictor& routing_predictor) {
12131220 /* Build a path from the existing route tree rooted at rt_root to the target_node
12141221 * add this branch to the existing route tree and update pathfinder costs and rr_node_route_inf to reflect this */
12151222 auto & route_ctx = g_vpr_ctx.mutable_routing ();
@@ -1229,15 +1236,15 @@ static bool timing_driven_route_sink(
12291236 t_bb bounding_box = route_ctx.route_bb [net_id];
12301237
12311238 bool net_is_global = cluster_ctx.clb_nlist .net_is_global (net_id);
1232- bool high_fanout = is_high_fanout (cluster_ctx.clb_nlist .net_sinks (net_id).size (), high_fanout_threshold);
1239+ bool high_fanout = is_high_fanout (cluster_ctx.clb_nlist .net_sinks (net_id).size (), router_opts. high_fanout_threshold );
12331240 constexpr float HIGH_FANOUT_CRITICALITY_THRESHOLD = 0.9 ;
12341241 bool sink_critical = (cost_params.criticality > HIGH_FANOUT_CRITICALITY_THRESHOLD);
12351242 bool net_is_clock = route_ctx.is_clock_net [net_id] != 0 ;
12361243
12371244 // We normally route high fanout nets by only adding spatially close-by routing to the heap (reduces run-time).
12381245 // However, if the current sink is 'critical' from a timing perspective, we put the entire route tree back onto
12391246 // the heap to ensure it has more flexibility to find the best path.
1240- if (high_fanout && !sink_critical && !net_is_global && !net_is_clock) {
1247+ if (high_fanout && !sink_critical && !net_is_global && !net_is_clock && -routing_predictor. get_slope () > router_opts. high_fanout_max_slope ) {
12411248 std::tie (found_path, cheapest) = router.timing_driven_route_connection_from_route_tree_high_fanout (rt_root,
12421249 sink_node,
12431250 cost_params,
0 commit comments