Skip to content

Commit 328efee

Browse files
remove unused is_flat argument from alloc_and_load_rr_node_indices() and load_block_rr_indices()
1 parent 1a911ec commit 328efee

File tree

3 files changed

+13
-21
lines changed

3 files changed

+13
-21
lines changed

vpr/src/route/rr_graph.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1254,8 +1254,7 @@ static void build_rr_graph(e_graph_type graph_type,
12541254
grid,
12551255
&num_rr_nodes,
12561256
chan_details_x,
1257-
chan_details_y,
1258-
is_flat);
1257+
chan_details_y);
12591258

12601259
size_t expected_node_count = num_rr_nodes;
12611260
if (clock_modeling == DEDICATED_NETWORK) {

vpr/src/route/rr_graph2.cpp

+11-17
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ static void load_chan_rr_indices(const int max_chan_width,
4747
*/
4848
static void load_block_rr_indices(RRGraphBuilder& rr_graph_builder,
4949
const DeviceGrid& grid,
50-
int* index,
51-
bool is_flat);
50+
int* index);
51+
5252

5353
static void add_pins_spatial_lookup(RRGraphBuilder& rr_graph_builder,
5454
t_physical_tile_type_ptr physical_type_ptr,
@@ -1091,6 +1091,7 @@ void dump_track_to_pin_map(t_track_to_pin_lookup& track_to_pin_map,
10911091
}
10921092
}
10931093
}
1094+
10941095
static void load_chan_rr_indices(const int max_chan_width,
10951096
const DeviceGrid& grid,
10961097
const int chan_len,
@@ -1106,11 +1107,12 @@ static void load_chan_rr_indices(const int max_chan_width,
11061107
if (!device_ctx.inter_cluster_prog_routing_resources.at(layer)) {
11071108
continue;
11081109
}
1110+
11091111
for (int chan = 0; chan < num_chans - 1; ++chan) {
11101112
for (int seg = 1; seg < chan_len - 1; ++seg) {
11111113
/* Assign an inode to the starts of tracks */
1112-
int x = (type == e_rr_type::CHANX ? seg : chan);
1113-
int y = (type == e_rr_type::CHANX ? chan : seg);
1114+
int x = type == e_rr_type::CHANX ? seg : chan;
1115+
int y = type == e_rr_type::CHANX ? chan : seg;
11141116
const t_chan_seg_details* seg_details = chan_details[x][y].data();
11151117

11161118
/* Reserve nodes in lookup to save memory */
@@ -1130,8 +1132,7 @@ static void load_chan_rr_indices(const int max_chan_width,
11301132
std::swap(node_x, node_y);
11311133
}
11321134

1133-
/* If the start of the wire doesn't have an inode,
1134-
* assign one to it. */
1135+
// If the start of the wire doesn't have an inode, assign one to it.
11351136
RRNodeId inode = rr_graph_builder.node_lookup().find_node(layer, node_x, node_y, type, track);
11361137
if (!inode) {
11371138
inode = RRNodeId(*index);
@@ -1268,8 +1269,7 @@ void alloc_and_load_inter_die_rr_node_indices(RRGraphBuilder& rr_graph_builder,
12681269
*/
12691270
static void load_block_rr_indices(RRGraphBuilder& rr_graph_builder,
12701271
const DeviceGrid& grid,
1271-
int* index,
1272-
bool /*is_flat*/) {
1272+
int* index) {
12731273
//Walk through the grid assigning indices to SOURCE/SINK IPIN/OPIN
12741274
for (int layer = 0; layer < grid.get_num_layers(); layer++) {
12751275
for (int x = 0; x < (int)grid.width(); x++) {
@@ -1457,20 +1457,14 @@ void alloc_and_load_rr_node_indices(RRGraphBuilder& rr_graph_builder,
14571457
const DeviceGrid& grid,
14581458
int* index,
14591459
const t_chan_details& chan_details_x,
1460-
const t_chan_details& chan_details_y,
1461-
bool is_flat) {
1462-
1460+
const t_chan_details& chan_details_y) {
14631461
/* Alloc the lookup table */
14641462
for (e_rr_type rr_type : RR_TYPES) {
1465-
if (rr_type == e_rr_type::CHANX) {
1466-
rr_graph_builder.node_lookup().resize_nodes(grid.get_num_layers(), grid.height(), grid.width(), rr_type, NUM_2D_SIDES);
1467-
} else {
1468-
rr_graph_builder.node_lookup().resize_nodes(grid.get_num_layers(), grid.width(), grid.height(), rr_type, NUM_2D_SIDES);
1469-
}
1463+
rr_graph_builder.node_lookup().resize_nodes(grid.get_num_layers(), grid.width(), grid.height(), rr_type, NUM_2D_SIDES);
14701464
}
14711465

14721466
/* Assign indices for block nodes */
1473-
load_block_rr_indices(rr_graph_builder, grid, index, is_flat);
1467+
load_block_rr_indices(rr_graph_builder, grid, index);
14741468

14751469
/* Load the data for x and y channels */
14761470
load_chan_rr_indices(nodes_per_chan.x_max, grid, grid.width(), grid.height(),

vpr/src/route/rr_graph2.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ void alloc_and_load_rr_node_indices(RRGraphBuilder& rr_graph_builder,
2525
const DeviceGrid& grid,
2626
int* index,
2727
const t_chan_details& chan_details_x,
28-
const t_chan_details& chan_details_y,
29-
bool is_flat);
28+
const t_chan_details& chan_details_y);
3029

3130

3231
/**

0 commit comments

Comments
 (0)