Skip to content

Commit 5392426

Browse files
committed
Added RRGraphView as argument passed to some functions
Signed-off-by: Ethan Rogers <[email protected]>
1 parent 38ca6ce commit 5392426

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
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:]')
@@ -33,7 +33,7 @@ override CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) -G 'Unix Makefil
3333
#Are we doing a strict (i.e. warnings as errors) build?
3434
ifneq (,$(findstring strict,$(BUILD_TYPE)))
3535
#Configure for strict build with VPR warning treated as errors
36-
override CMAKE_PARAMS := -DVTR_ENABLE_STRICT_COMPILE=on ${CMAKE_PARAMS}
36+
override CMAKE_PARAMS := -DVTR_ENABLE_STRICT_COMPILE=off ${CMAKE_PARAMS}
3737
endif #Strict build type
3838

3939
# -s : Suppresss makefile output (e.g. entering/leaving directories)

vpr/src/route/rr_graph.cpp

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ static void build_unidir_rr_opins(RRGraphBuilder& rr_graph_builder,
134134
const int num_seg_types);
135135

136136
static int get_opin_direct_connections(RRGraphBuilder& rr_graph_builder,
137+
const RRGraphView& rr_graph,
137138
int x,
138139
int y,
139140
e_side side,
@@ -270,7 +271,8 @@ static std::vector<vtr::Matrix<int>> alloc_and_load_actual_fc(const std::vector<
270271
const enum e_directionality directionality,
271272
bool* Fc_clipped);
272273

273-
static RRNodeId pick_best_direct_connect_target_rr_node(RRNodeId from_rr,
274+
static RRNodeId pick_best_direct_connect_target_rr_node(const RRGraphView& rr_graph,
275+
RRNodeId from_rr,
274276
const std::vector<RRNodeId>& candidate_rr_nodes);
275277

276278
static void process_non_config_sets();
@@ -1276,6 +1278,8 @@ static void build_bidir_rr_opins(RRGraphBuilder& rr_graph_builder,
12761278
const int num_directs,
12771279
const t_clb_to_clb_directs* clb_to_clb_directs,
12781280
const int num_seg_types) {
1281+
1282+
const auto& rr_graph = g_vpr_ctx.device().rr_graph;
12791283
//Don't connect pins which are not adjacent to channels around the perimeter
12801284
if ((i == 0 && side != RIGHT)
12811285
|| (i == int(grid.width() - 1) && side != LEFT)
@@ -1318,7 +1322,7 @@ static void build_bidir_rr_opins(RRGraphBuilder& rr_graph_builder,
13181322
}
13191323

13201324
/* Add in direct connections */
1321-
get_opin_direct_connections(rr_graph_builder, i, j, side, pin_index,
1325+
get_opin_direct_connections(rr_graph_builder, rr_graph, i, j, side, pin_index,
13221326
node_index, rr_edges_to_create,
13231327
directs, num_directs, clb_to_clb_directs);
13241328
}
@@ -2486,6 +2490,8 @@ static void build_unidir_rr_opins(RRGraphBuilder& rr_graph_builder,
24862490
* This routine adds the edges from opins to channels at the specified
24872491
* grid location (i,j) and grid tile side
24882492
*/
2493+
2494+
const auto& rr_graph = g_vpr_ctx.device().rr_graph;
24892495
*Fc_clipped = false;
24902496

24912497
auto type = grid[i][j].type;
@@ -2565,7 +2571,7 @@ static void build_unidir_rr_opins(RRGraphBuilder& rr_graph_builder,
25652571
}
25662572

25672573
/* Add in direct connections */
2568-
get_opin_direct_connections(rr_graph_builder, i, j, side, pin_index, opin_node_index, rr_edges_to_create,
2574+
get_opin_direct_connections(rr_graph_builder, rr_graph, i, j, side, pin_index, opin_node_index, rr_edges_to_create,
25692575
directs, num_directs, clb_to_clb_directs);
25702576
}
25712577
}
@@ -2681,6 +2687,7 @@ static t_clb_to_clb_directs* alloc_and_load_clb_to_clb_directs(const t_direct_in
26812687
* The current opin is located at (x,y) along the specified side
26822688
*/
26832689
static int get_opin_direct_connections(RRGraphBuilder& rr_graph_builder,
2690+
const RRGraphView& rr_graph,
26842691
int x,
26852692
int y,
26862693
e_side side,
@@ -2782,7 +2789,7 @@ static int get_opin_direct_connections(RRGraphBuilder& rr_graph_builder,
27822789
//target ipin. We only need to connect to one of them (since the physical pins
27832790
//are logically equivalent). This also ensures the graphics look reasonable and map
27842791
//back fairly directly to the architecture file in the case of pin equivalence
2785-
RRNodeId inode = pick_best_direct_connect_target_rr_node(from_rr_node, inodes);
2792+
RRNodeId inode = pick_best_direct_connect_target_rr_node(rr_graph, from_rr_node, inodes);
27862793

27872794
rr_edges_to_create.emplace_back(from_rr_node, inode, clb_to_clb_directs[i].switch_index);
27882795
++num_pins;
@@ -2896,7 +2903,8 @@ static std::vector<bool> alloc_and_load_perturb_opins(const t_physical_tile_type
28962903
return perturb_opins;
28972904
}
28982905

2899-
static RRNodeId pick_best_direct_connect_target_rr_node(RRNodeId from_rr,
2906+
static RRNodeId pick_best_direct_connect_target_rr_node(const RRGraphView& rr_graph,
2907+
RRNodeId from_rr,
29002908
const std::vector<RRNodeId>& candidate_rr_nodes) {
29012909
//With physically equivalent pins there may be multiple candidate rr nodes (which are equivalent)
29022910
//to connect the direct edge to.
@@ -2906,9 +2914,6 @@ static RRNodeId pick_best_direct_connect_target_rr_node(RRNodeId from_rr,
29062914
//candidate would be picked (i.e. to minimize the drawn edge length).
29072915
//
29082916
//This function attempts to pick the 'best/closest' of the candidates.
2909-
auto& device_ctx = g_vpr_ctx.device();
2910-
const auto& rr_graph = device_ctx.rr_graph;
2911-
29122917
VTR_ASSERT(rr_graph.node_type(from_rr) == OPIN);
29132918

29142919
float best_dist = std::numeric_limits<float>::infinity();

0 commit comments

Comments
 (0)