Skip to content

Commit 52a60bf

Browse files
committed
final comments and rr_graph argument has been added
1 parent bccca16 commit 52a60bf

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

vpr/src/route/router_lookahead_extended_map.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ std::pair<float, int> ExtendedMapLookahead::run_dijkstra(RRNodeId start_node,
399399
path_count++;
400400
this->add_paths<Entry>(start_node, current, *paths, routing_costs);
401401
} else {
402-
util::expand_dijkstra_neighbours(current, paths, node_expanded, &pq);
402+
util::expand_dijkstra_neighbours(rr_graph, current, paths, node_expanded, &pq);
403403
(*node_expanded)[size_t(node)] = true;
404404
}
405405
}

vpr/src/route/router_lookahead_map_utils.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,13 @@ util::Cost_Entry util::Expansion_Cost_Entry::get_median_entry() const {
252252
}
253253

254254
template<typename Entry>
255-
void expand_dijkstra_neighbours(const Entry& parent_entry,
255+
void expand_dijkstra_neighbours(const RRGraphView& rr_graph,
256+
const Entry& parent_entry,
256257
std::vector<util::Search_Path>* paths,
257258
std::vector<bool>* node_expanded,
258259
std::priority_queue<Entry,
259260
std::vector<Entry>,
260261
std::greater<Entry>>* pq) {
261-
auto& device_ctx = g_vpr_ctx.device();
262-
const auto& rr_graph = device_ctx.rr_graph;
263262
RRNodeId parent = parent_entry.rr_node;
264263

265264
for (int iedge = 0; iedge < rr_graph.num_edges(parent); iedge++) {
@@ -285,13 +284,15 @@ void expand_dijkstra_neighbours(const Entry& parent_entry,
285284
}
286285
}
287286

288-
template void expand_dijkstra_neighbours(const PQ_Entry_Delay& parent_entry,
287+
template void expand_dijkstra_neighbours(const RRGraphView& rr_graph,
288+
const PQ_Entry_Delay& parent_entry,
289289
std::vector<Search_Path>* paths,
290290
std::vector<bool>* node_expanded,
291291
std::priority_queue<PQ_Entry_Delay,
292292
std::vector<PQ_Entry_Delay>,
293293
std::greater<PQ_Entry_Delay>>* pq);
294-
template void expand_dijkstra_neighbours(const PQ_Entry_Base_Cost& parent_entry,
294+
template void expand_dijkstra_neighbours(const RRGraphView& rr_graph,
295+
const PQ_Entry_Base_Cost& parent_entry,
295296
std::vector<Search_Path>* paths,
296297
std::vector<bool>* node_expanded,
297298
std::priority_queue<PQ_Entry_Base_Cost,

vpr/src/route/router_lookahead_map_utils.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "vpr_types.h"
2424
#include "vtr_geometry.h"
2525
#include "rr_node.h"
26+
#include "rr_graph_view.h"
2627

2728
namespace util {
2829

@@ -238,7 +239,8 @@ struct Search_Path {
238239

239240
/* iterates over the children of the specified node and selectively pushes them onto the priority queue */
240241
template<typename Entry>
241-
void expand_dijkstra_neighbours(const Entry& parent_entry,
242+
void expand_dijkstra_neighbours(const RRGraphView& rr_graph,
243+
const Entry& parent_entry,
242244
std::vector<Search_Path>* paths,
243245
std::vector<bool>* node_expanded,
244246
std::priority_queue<Entry,

vpr/src/route/rr_node.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ short t_rr_node::length() const {
1010
storage_->node_yhigh(id_) - storage_->node_ylow(id_),
1111
storage_->node_xhigh(id_) - storage_->node_xlow(id_));
1212
}
13-
13+
/* TODO: This API should be reworked once rr_switch APIs are in RRGraphView. */
1414
bool t_rr_node::edge_is_configurable(t_edge_size iedge) const {
1515
auto& device_ctx = g_vpr_ctx.device();
1616
const auto& rr_graph = device_ctx.rr_graph;

0 commit comments

Comments
 (0)