@@ -101,6 +101,7 @@ static vtr::NdMatrix<std::vector<int>, 4> alloc_and_load_track_to_pin_lookup(vtr
101
101
const int num_seg_types);
102
102
103
103
static void build_bidir_rr_opins (RRGraphBuilder& rr_graph_builder,
104
+ const RRGraphView& rr_graph,
104
105
const int i,
105
106
const int j,
106
107
const e_side side,
@@ -116,6 +117,7 @@ static void build_bidir_rr_opins(RRGraphBuilder& rr_graph_builder,
116
117
const int num_seg_types);
117
118
118
119
static void build_unidir_rr_opins (RRGraphBuilder& rr_graph_builder,
120
+ const RRGraphView& rr_graph,
119
121
const int i,
120
122
const int j,
121
123
const e_side side,
@@ -147,6 +149,7 @@ static int get_opin_direct_connections(RRGraphBuilder& rr_graph_builder,
147
149
148
150
static std::function<void (t_chan_width*)> alloc_and_load_rr_graph (RRGraphBuilder& rr_graph_builder,
149
151
t_rr_graph_storage& L_rr_node,
152
+ const RRGraphView& rr_graph,
150
153
const int num_seg_types,
151
154
const t_chan_details& chan_details_x,
152
155
const t_chan_details& chan_details_y,
@@ -677,7 +680,7 @@ static void build_rr_graph(const t_graph_type graph_type,
677
680
bool Fc_clipped = false ;
678
681
auto update_chan_width = alloc_and_load_rr_graph (
679
682
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 (),
681
684
chan_details_x, chan_details_y,
682
685
track_to_pin_lookup, opin_to_track_map,
683
686
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,
1125
1128
* appropriate values. Everything up to this was just a prelude! */
1126
1129
static std::function<void (t_chan_width*)> alloc_and_load_rr_graph (RRGraphBuilder& rr_graph_builder,
1127
1130
t_rr_graph_storage& L_rr_node,
1131
+ const RRGraphView& rr_graph,
1128
1132
const int num_seg_types,
1129
1133
const t_chan_details& chan_details_x,
1130
1134
const t_chan_details& chan_details_y,
@@ -1185,14 +1189,14 @@ static std::function<void(t_chan_width*)> alloc_and_load_rr_graph(RRGraphBuilder
1185
1189
for (size_t j = 0 ; j < grid.height (); ++j) {
1186
1190
for (e_side side : SIDES) {
1187
1191
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,
1189
1193
opin_to_track_map, Fc_out, rr_edges_to_create, chan_details_x, chan_details_y,
1190
1194
grid,
1191
1195
directs, num_directs, clb_to_clb_directs, num_seg_types);
1192
1196
} else {
1193
1197
VTR_ASSERT (UNI_DIRECTIONAL == directionality);
1194
1198
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,
1196
1200
chan_details_x, chan_details_y, Fc_xofs, Fc_yofs,
1197
1201
rr_edges_to_create, &clipped,
1198
1202
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
1265
1269
}
1266
1270
1267
1271
static void build_bidir_rr_opins (RRGraphBuilder& rr_graph_builder,
1272
+ const RRGraphView& rr_graph,
1268
1273
const int i,
1269
1274
const int j,
1270
1275
const e_side side,
@@ -1278,7 +1283,6 @@ static void build_bidir_rr_opins(RRGraphBuilder& rr_graph_builder,
1278
1283
const int num_directs,
1279
1284
const t_clb_to_clb_directs* clb_to_clb_directs,
1280
1285
const int num_seg_types) {
1281
- const auto & rr_graph = g_vpr_ctx.device ().rr_graph ;
1282
1286
// Don't connect pins which are not adjacent to channels around the perimeter
1283
1287
if ((i == 0 && side != RIGHT)
1284
1288
|| (i == int (grid.width () - 1 ) && side != LEFT)
@@ -2469,6 +2473,7 @@ std::string describe_rr_node(int inode) {
2469
2473
}
2470
2474
2471
2475
static void build_unidir_rr_opins (RRGraphBuilder& rr_graph_builder,
2476
+ const RRGraphView& rr_graph,
2472
2477
const int i,
2473
2478
const int j,
2474
2479
const e_side side,
@@ -2490,7 +2495,6 @@ static void build_unidir_rr_opins(RRGraphBuilder& rr_graph_builder,
2490
2495
* grid location (i,j) and grid tile side
2491
2496
*/
2492
2497
2493
- const auto & rr_graph = g_vpr_ctx.device ().rr_graph ;
2494
2498
*Fc_clipped = false ;
2495
2499
2496
2500
auto type = grid[i][j].type ;
0 commit comments