Skip to content

Commit 46ac27e

Browse files
Added non_configurable_edges() API
1 parent 5795252 commit 46ac27e

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

vpr/src/device/rr_graph_view.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,16 @@ class RRGraphView {
259259
return node_storage_.num_non_configurable_edges(node);
260260
}
261261

262-
/** @brief Get ID range for edges. This function is inlined for runtime optimization. */
262+
/** @brief Get ID range for configurable edges. This function is inlined for runtime optimization. */
263263
inline edge_idx_range configurable_edges(RRNodeId node) const {
264264
return node_storage_.configurable_edges(node);
265265
}
266266

267+
/** @brief Get ID range for non-configurable edges. This function is inlined for runtime optimization. */
268+
inline edge_idx_range non_configurable_edges(RRNodeId node) const {
269+
return node_storage_.non_configurable_edges(node);
270+
}
271+
267272
/** @brief Get ID range for edges. This function is inlined for runtime optimization. */
268273
inline edge_idx_range edges(RRNodeId node) const {
269274
return node_storage_.edges(node);

vpr/src/route/check_rr_graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void check_rr_graph(const t_graph_type graph_type,
191191
}
192192
}
193193

194-
for (auto edge : device_ctx.rr_nodes[inode].non_configurable_edges()) {
194+
for (auto edge : rr_graph.non_configurable_edges(RRNodeId(inode))) {
195195
if (device_ctx.rr_nodes[inode].edge_is_configurable(edge)) {
196196
VPR_FATAL_ERROR(VPR_ERROR_ROUTE, "in check_rr_graph: node %d edge %d is configurable, but in non-configurable edges",
197197
inode, edge);

vpr/src/route/route_common.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,8 @@ static std::pair<t_trace*, t_trace*> add_trace_non_configurable_recurr(int node,
627627
//Record the non-configurable out-going edges
628628
std::vector<t_edge_size> unvisited_non_configurable_edges;
629629
auto& device_ctx = g_vpr_ctx.device();
630-
for (auto iedge : device_ctx.rr_nodes[node].non_configurable_edges()) {
630+
const auto& rr_graph = device_ctx.rr_graph;
631+
for (auto iedge : rr_graph.non_configurable_edges(RRNodeId(node))) {
631632
VTR_ASSERT_SAFE(!device_ctx.rr_nodes[node].edge_is_configurable(iedge));
632633

633634
int to_node = device_ctx.rr_nodes[node].edge_sink_node(iedge);

vpr/src/route/route_tree_timing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ static t_rt_node* add_non_configurable_to_route_tree(const int rr_node, const bo
418418
VTR_ASSERT(rt_node->inode == rr_node);
419419
}
420420
}
421-
for (int iedge : device_ctx.rr_nodes[rr_node].non_configurable_edges()) {
421+
for (int iedge : rr_graph.non_configurable_edges(RRNodeId(rr_node))) {
422422
//Recursive case: expand children
423423
VTR_ASSERT(!device_ctx.rr_nodes[rr_node].edge_is_configurable(iedge));
424424

vpr/src/route/rr_node_impl.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ inline t_rr_node t_rr_graph_storage::back() {
7171
return t_rr_node(this, RRNodeId(size() - 1));
7272
}
7373

74-
inline edge_idx_range t_rr_node::non_configurable_edges() const {
75-
return storage_->non_configurable_edges(id_);
76-
}
77-
7874
inline int t_rr_node::edge_sink_node(t_edge_size iedge) const {
7975
size_t inode = (size_t)storage_->edge_sink_node(id_, iedge);
8076
return inode;

0 commit comments

Comments
 (0)