Skip to content

Commit 8dd84f0

Browse files
authored
Merge pull request #2777 from verilog-to-routing/turn_on_choke_point
Turn On Choke Point By Default [WIP]
2 parents 24b3bd3 + 53f3b3b commit 8dd84f0

File tree

15 files changed

+31
-34
lines changed

15 files changed

+31
-34
lines changed

libs/libarchfpga/src/physical_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ class t_pb_graph_pin {
13821382
float tco_max = std::numeric_limits<float>::quiet_NaN(); /* For sequential logic elements the maximum clock to output time */
13831383
t_pb_graph_pin* associated_clock_pin = nullptr; /* For sequentail elements, the associated clock */
13841384

1385-
/* This member is used when flat-routing and has_choking_spot are enabled.
1385+
/* This member is used when flat-routing and router_opt_choke_points are enabled.
13861386
* It is used to identify choke points.
13871387
* This is only valid for IPINs, and it only contain the pins that are reachable to the pin by a forwarding path.
13881388
* It doesn't take into account feed-back connection.

vpr/src/base/SetupVPR.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ void SetupVPR(const t_options* options,
318318
vtr::ScopedStartFinishTimer timer("Allocate intra-cluster resources");
319319
// The following two functions should be called when the data structured related to t_pb_graph_node, t_pb_type,
320320
// and t_pb_graph_edge are initialized
321-
alloc_and_load_intra_cluster_resources(routerOpts->has_choking_spot);
321+
alloc_and_load_intra_cluster_resources(routerOpts->has_choke_point);
322322
add_intra_tile_switches();
323323
}
324324

@@ -510,7 +510,7 @@ static void SetupRouterOpts(const t_options& Options, t_router_opts* RouterOpts)
510510
RouterOpts->max_logged_overused_rr_nodes = Options.max_logged_overused_rr_nodes;
511511
RouterOpts->generate_rr_node_overuse_report = Options.generate_rr_node_overuse_report;
512512
RouterOpts->flat_routing = Options.flat_routing;
513-
RouterOpts->has_choking_spot = Options.has_choking_spot;
513+
RouterOpts->has_choke_point = Options.router_opt_choke_points;
514514
RouterOpts->custom_3d_sb_fanin_fanout = Options.custom_3d_sb_fanin_fanout;
515515
RouterOpts->with_timing_analysis = Options.timing_analysis;
516516
}

vpr/src/base/ShowSetup.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,11 @@ static void ShowRouterOpts(const t_router_opts& RouterOpts) {
255255
VTR_LOG("false\n");
256256
}
257257

258-
VTR_LOG("RouterOpts.has_choking_spot: ");
259-
if (RouterOpts.has_choking_spot) {
260-
VTR_LOG("true\n");
258+
VTR_LOG("RouterOpts.choke_points: ");
259+
if (RouterOpts.has_choke_point) {
260+
VTR_LOG("on\n");
261261
} else {
262-
VTR_LOG("false\n");
262+
VTR_LOG("off\n");
263263
}
264264

265265
VTR_ASSERT(GLOBAL == RouterOpts.route_type || DETAILED == RouterOpts.route_type);

vpr/src/base/place_and_route.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ int binary_search_place_and_route(const Netlist<>& placement_net_list,
398398

399399
init_route_structs(router_net_list,
400400
router_opts.bb_factor,
401-
router_opts.has_choking_spot,
401+
router_opts.has_choke_point,
402402
is_flat);
403403

404404
restore_routing(best_routing,

vpr/src/base/read_options.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,13 +2491,13 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
24912491
.default_value("off")
24922492
.show_in(argparse::ShowIn::HELP_ONLY);
24932493

2494-
route_grp.add_argument(args.has_choking_spot, "--has_choking_spot")
2494+
route_grp.add_argument<bool, ParseOnOff>(args.router_opt_choke_points, "--router_opt_choke_points")
24952495
.help(
24962496
""
2497-
"Some FPGA architectures, due to the lack of full connectivity inside the cluster, may have"
2498-
" a choking spot inside the cluster. Thus, if routing doesn't converge, enabling this option may"
2499-
" help it.")
2500-
.default_value("false")
2497+
"Some FPGA architectures with limited fan-out options within a cluster (e.g. fracturable LUTs with shared pins) do"
2498+
" not converge well in routing unless these fan-out choke points are discovered and optimized for during net routing."
2499+
" This option helps router convergence for such architectures.")
2500+
.default_value("on")
25012501
.show_in(argparse::ShowIn::HELP_ONLY);
25022502

25032503

vpr/src/base/read_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ struct t_options {
218218
argparse::ArgValue<int> reorder_rr_graph_nodes_threshold;
219219
argparse::ArgValue<int> reorder_rr_graph_nodes_seed;
220220
argparse::ArgValue<bool> flat_routing;
221-
argparse::ArgValue<bool> has_choking_spot;
221+
argparse::ArgValue<bool> router_opt_choke_points;
222222
argparse::ArgValue<int> route_verbosity;
223223
argparse::ArgValue<int> custom_3d_sb_fanin_fanout;
224224

vpr/src/base/read_route.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ bool read_route(const char* route_file, const t_router_opts& router_opts, bool v
109109
const Netlist<>& router_net_list = (flat_router) ? (const Netlist<>&)g_vpr_ctx.atom().nlist : (const Netlist<>&)g_vpr_ctx.clustering().clb_nlist;
110110
init_route_structs(router_net_list,
111111
router_opts.bb_factor,
112-
router_opts.has_choking_spot,
112+
router_opts.has_choke_point,
113113
flat_router);
114114

115115
/*Check dimensions*/

vpr/src/base/vpr_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ struct t_router_opts {
13391339
bool generate_rr_node_overuse_report;
13401340

13411341
bool flat_routing;
1342-
bool has_choking_spot;
1342+
bool has_choke_point;
13431343

13441344
int custom_3d_sb_fanin_fanout = 1;
13451345

vpr/src/route/connection_router.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ void ConnectionRouter<Heap>::evaluate_timing_driven_node_costs(t_heap* to,
775775
//cost.
776776
cong_cost = 0.;
777777
}
778-
if (conn_params_->has_choking_spot_ && is_flat_ && rr_graph_->node_type(to_node) == IPIN) {
778+
if (conn_params_->router_opt_choke_points_ && is_flat_ && rr_graph_->node_type(to_node) == IPIN) {
779779
auto find_res = conn_params_->connection_choking_spots_.find(to_node);
780780
if (find_res != conn_params_->connection_choking_spots_.end()) {
781781
cong_cost = cong_cost / pow(2, (float)find_res->second);

vpr/src/route/route.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ bool route(const Netlist<>& net_list,
7171

7272
init_route_structs(net_list,
7373
router_opts.bb_factor,
74-
router_opts.has_choking_spot,
74+
router_opts.has_choke_point,
7575
is_flat);
7676

7777
IntraLbPbPinLookup intra_lb_pb_pin_lookup(device_ctx.logical_block_types);
@@ -80,7 +80,7 @@ bool route(const Netlist<>& net_list,
8080
auto choking_spots = set_nets_choking_spots(net_list,
8181
route_ctx.net_terminal_groups,
8282
route_ctx.net_terminal_group_num,
83-
router_opts.has_choking_spot,
83+
router_opts.has_choke_point,
8484
is_flat);
8585

8686
//Initially, the router runs normally trying to reduce congestion while

0 commit comments

Comments
 (0)