Skip to content

Commit 6aded0d

Browse files
committed
Assigning pin criticality to virtual clock sink + Renaming and refactoring for two stage routing
1 parent 62797c4 commit 6aded0d

File tree

9 files changed

+113
-118
lines changed

9 files changed

+113
-118
lines changed

vpr/src/base/SetupVPR.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ static void SetupRouterOpts(const t_options& Options, t_router_opts* RouterOpts)
340340
RouterOpts->congested_routing_iteration_threshold_frac = Options.congested_routing_iteration_threshold_frac;
341341
RouterOpts->route_bb_update = Options.route_bb_update;
342342
RouterOpts->clock_modeling = Options.clock_modeling;
343-
RouterOpts->two_stage_routing = Options.two_stage_routing;
343+
RouterOpts->two_stage_clock_routing = Options.two_stage_clock_routing;
344344
RouterOpts->high_fanout_threshold = Options.router_high_fanout_threshold;
345345
RouterOpts->router_debug_net = Options.router_debug_net;
346346
RouterOpts->router_debug_sink_rr = Options.router_debug_sink_rr;

vpr/src/base/read_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& arg
915915
.default_value("ideal")
916916
.show_in(argparse::ShowIn::HELP_ONLY);
917917

918-
gen_grp.add_argument<bool, ParseOnOff>(args.two_stage_routing, "--two_stage_routing")
918+
gen_grp.add_argument<bool, ParseOnOff>(args.two_stage_clock_routing, "--two_stage_clock_routing")
919919
.help(
920920
"Routes clock nets in two stages if using a dedicated clock network.\n"
921921
" * First stage: From the Net source to a dedicated clock network source\n"

vpr/src/base/read_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct t_options {
4949
argparse::ArgValue<float> target_device_utilization;
5050
argparse::ArgValue<e_constant_net_method> constant_net_method;
5151
argparse::ArgValue<e_clock_modeling> clock_modeling;
52-
argparse::ArgValue<bool> two_stage_routing;
52+
argparse::ArgValue<bool> two_stage_clock_routing;
5353
argparse::ArgValue<bool> exit_before_pack;
5454
argparse::ArgValue<bool> strict_checks;
5555
argparse::ArgValue<std::string> disable_errors;

vpr/src/base/vpr_api.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void vpr_init_with_options(const t_options* options, t_vpr_setup* vpr_setup, t_a
217217
vpr_setup->device_layout = options->device_layout;
218218
vpr_setup->constant_net_method = options->constant_net_method;
219219
vpr_setup->clock_modeling = options->clock_modeling;
220-
vpr_setup->two_stage_routing = options->two_stage_routing;
220+
vpr_setup->two_stage_clock_routing = options->two_stage_clock_routing;
221221
vpr_setup->exit_before_pack = options->exit_before_pack;
222222

223223
VTR_LOG("\n");

vpr/src/base/vpr_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ struct DeviceContext : public Context {
165165
// Useful for two stage clock routing
166166
// XXX: currently only one place to source the clock networks so only storing
167167
// a single value
168-
int virtual_clock_network_sink_idx;
168+
int virtual_clock_network_root_idx;
169169

170170
/** Attributes for each rr_node.
171171
* key: rr_node index

vpr/src/base/vpr_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ struct t_router_opts {
944944
float congested_routing_iteration_threshold_frac;
945945
e_route_bb_update route_bb_update;
946946
enum e_clock_modeling clock_modeling; //How clock pins and nets should be handled
947-
bool two_stage_routing; //How clock nets on dedicated networks should be routed
947+
bool two_stage_clock_routing; //How clock nets on dedicated networks should be routed
948948
int high_fanout_threshold;
949949
int router_debug_net;
950950
int router_debug_sink_rr;
@@ -1299,7 +1299,7 @@ struct t_vpr_setup {
12991299
std::string device_layout;
13001300
e_constant_net_method constant_net_method; //How constant nets should be handled
13011301
e_clock_modeling clock_modeling; //How clocks should be handled
1302-
bool two_stage_routing; //How clocks should be routed in the presence of a dedicated clock network
1302+
bool two_stage_clock_routing; //How clocks should be routed in the presence of a dedicated clock network
13031303
bool exit_before_pack; //Exits early before starting packing (useful for collecting statistics without running/loading any stages)
13041304
};
13051305

vpr/src/route/clock_connection_builders.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ void RoutingToClockConnection::create_switches(const ClockRRGraphBuilder& clock_
4949
auto& rr_nodes = device_ctx.rr_nodes;
5050
auto& rr_node_indices = device_ctx.rr_node_indices;
5151

52-
int virtual_clock_network_sink_idx =
52+
int virtual_clock_network_root_idx =
5353
create_virtual_clock_network_sink_node(switch_location.x, switch_location.y);
54-
device_ctx.virtual_clock_network_sink_idx = virtual_clock_network_sink_idx;
54+
device_ctx.virtual_clock_network_root_idx = virtual_clock_network_root_idx;
5555

5656
// rr_node indices for x and y channel routing wires and clock wires to connect to
5757
auto x_wire_indices = get_rr_node_chan_wires_at_location(
@@ -80,7 +80,7 @@ void RoutingToClockConnection::create_switches(const ClockRRGraphBuilder& clock_
8080

8181
// Connect to virtual clock sink node
8282
// used by the two stage router
83-
rr_nodes[clock_index].add_edge(virtual_clock_network_sink_idx, rr_switch_idx);
83+
rr_nodes[clock_index].add_edge(virtual_clock_network_root_idx, rr_switch_idx);
8484
}
8585
}
8686

vpr/src/route/route_common.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,11 @@ void node_to_heap(int inode, float total_cost, int prev_node, int prev_edge, flo
802802
}
803803

804804
void drop_traceback_tail(ClusterNetId net_id) {
805+
/* Removes the tail node from the routing traceback and updates
806+
it with the previous node from the traceback.
807+
This funtion is primarily called to remove the virtual clock
808+
sink from the routing traceback and replace it with the clock
809+
network root. */
805810
auto& route_ctx = g_vpr_ctx.mutable_routing();
806811

807812
auto* tail_ptr = route_ctx.trace[net_id].tail;

0 commit comments

Comments
 (0)