Skip to content

Commit 20db4e4

Browse files
committed
Added RRGraphView as an argument to several functions
Signed-off-by: Ethan Rogers <[email protected]>
1 parent e5b9f79 commit 20db4e4

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# release #Build with compiler optimization
1818
# debug #Build with debug info and no compiler optimization
1919
# strict #Build VPR with warnings treated as errors
20-
BUILD_TYPE = release
20+
BUILD_TYPE ?= release
2121

2222
#Convert to lower case for consistency
2323
BUILD_TYPE := $(shell echo $(BUILD_TYPE) | tr '[:upper:]' '[:lower:]')

vpr/src/route/rr_graph.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ static vtr::NdMatrix<std::vector<int>, 4> alloc_and_load_track_to_pin_lookup(vtr
101101
const int num_seg_types);
102102

103103
static void build_bidir_rr_opins(RRGraphBuilder& rr_graph_builder,
104+
const RRGraphView& rr_graph,
104105
const int i,
105106
const int j,
106107
const e_side side,
@@ -116,6 +117,7 @@ static void build_bidir_rr_opins(RRGraphBuilder& rr_graph_builder,
116117
const int num_seg_types);
117118

118119
static void build_unidir_rr_opins(RRGraphBuilder& rr_graph_builder,
120+
const RRGraphView& rr_graph,
119121
const int i,
120122
const int j,
121123
const e_side side,
@@ -147,6 +149,7 @@ static int get_opin_direct_connections(RRGraphBuilder& rr_graph_builder,
147149

148150
static std::function<void(t_chan_width*)> alloc_and_load_rr_graph(RRGraphBuilder& rr_graph_builder,
149151
t_rr_graph_storage& L_rr_node,
152+
const RRGraphView& rr_graph,
150153
const int num_seg_types,
151154
const t_chan_details& chan_details_x,
152155
const t_chan_details& chan_details_y,
@@ -677,7 +680,7 @@ static void build_rr_graph(const t_graph_type graph_type,
677680
bool Fc_clipped = false;
678681
auto update_chan_width = alloc_and_load_rr_graph(
679682
device_ctx.rr_graph_builder,
680-
device_ctx.rr_nodes, segment_inf.size(),
683+
device_ctx.rr_nodes, device_ctx.rr_graph, segment_inf.size(),
681684
chan_details_x, chan_details_y,
682685
track_to_pin_lookup, opin_to_track_map,
683686
switch_block_conn, sb_conn_map, grid, Fs, unidir_sb_pattern,
@@ -1125,6 +1128,7 @@ static void free_type_track_to_pin_map(t_track_to_pin_lookup& track_to_pin_map,
11251128
* appropriate values. Everything up to this was just a prelude! */
11261129
static std::function<void(t_chan_width*)> alloc_and_load_rr_graph(RRGraphBuilder& rr_graph_builder,
11271130
t_rr_graph_storage& L_rr_node,
1131+
const RRGraphView& rr_graph,
11281132
const int num_seg_types,
11291133
const t_chan_details& chan_details_x,
11301134
const t_chan_details& chan_details_y,
@@ -1185,14 +1189,14 @@ static std::function<void(t_chan_width*)> alloc_and_load_rr_graph(RRGraphBuilder
11851189
for (size_t j = 0; j < grid.height(); ++j) {
11861190
for (e_side side : SIDES) {
11871191
if (BI_DIRECTIONAL == directionality) {
1188-
build_bidir_rr_opins(rr_graph_builder, i, j, side,
1192+
build_bidir_rr_opins(rr_graph_builder, rr_graph, i, j, side,
11891193
opin_to_track_map, Fc_out, rr_edges_to_create, chan_details_x, chan_details_y,
11901194
grid,
11911195
directs, num_directs, clb_to_clb_directs, num_seg_types);
11921196
} else {
11931197
VTR_ASSERT(UNI_DIRECTIONAL == directionality);
11941198
bool clipped;
1195-
build_unidir_rr_opins(rr_graph_builder, i, j, side, grid, Fc_out, max_chan_width,
1199+
build_unidir_rr_opins(rr_graph_builder, rr_graph, i, j, side, grid, Fc_out, max_chan_width,
11961200
chan_details_x, chan_details_y, Fc_xofs, Fc_yofs,
11971201
rr_edges_to_create, &clipped,
11981202
directs, num_directs, clb_to_clb_directs, num_seg_types);
@@ -1265,6 +1269,7 @@ static std::function<void(t_chan_width*)> alloc_and_load_rr_graph(RRGraphBuilder
12651269
}
12661270

12671271
static void build_bidir_rr_opins(RRGraphBuilder& rr_graph_builder,
1272+
const RRGraphView& rr_graph,
12681273
const int i,
12691274
const int j,
12701275
const e_side side,
@@ -1278,7 +1283,6 @@ static void build_bidir_rr_opins(RRGraphBuilder& rr_graph_builder,
12781283
const int num_directs,
12791284
const t_clb_to_clb_directs* clb_to_clb_directs,
12801285
const int num_seg_types) {
1281-
const auto& rr_graph = g_vpr_ctx.device().rr_graph;
12821286
//Don't connect pins which are not adjacent to channels around the perimeter
12831287
if ((i == 0 && side != RIGHT)
12841288
|| (i == int(grid.width() - 1) && side != LEFT)
@@ -2469,6 +2473,7 @@ std::string describe_rr_node(int inode) {
24692473
}
24702474

24712475
static void build_unidir_rr_opins(RRGraphBuilder& rr_graph_builder,
2476+
const RRGraphView& rr_graph,
24722477
const int i,
24732478
const int j,
24742479
const e_side side,
@@ -2490,7 +2495,6 @@ static void build_unidir_rr_opins(RRGraphBuilder& rr_graph_builder,
24902495
* grid location (i,j) and grid tile side
24912496
*/
24922497

2493-
const auto& rr_graph = g_vpr_ctx.device().rr_graph;
24942498
*Fc_clipped = false;
24952499

24962500
auto type = grid[i][j].type;

0 commit comments

Comments
 (0)