Skip to content

RRGraphView edges(), num_edges(), configurable_edges(), non_configurable_edges(), num_configurable_edges(), num_non_configurable_edges() Implementation #1917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
91eb4b5
Added API for num_configurable_edges
behzadmehmood-rs Nov 18, 2021
f0210f1
Updated formatting for rr_node.cpp
behzadmehmood-rs Nov 19, 2021
0ae6368
Removed num_configurable_edges function from rr_node_impl.h
behzadmehmood-rs Nov 19, 2021
1f22e38
Added comment for num_configurable_edges
behzadmehmood-rs Nov 19, 2021
cad8da6
API added for edges()
behzadmehmood-rs Nov 22, 2021
cac4434
Added comment for edges() API
behzadmehmood-rs Nov 22, 2021
6164123
Removed edges() from rr_node_impl.h
behzadmehmood-rs Nov 22, 2021
25ec80c
Adding num_edges() API
behzadmehmood-rs Nov 24, 2021
83fbf86
Added num_edges() API
behzadmehmood-rs Nov 24, 2021
8d77256
removed num_edges() from rr_node_impl.h
behzadmehmood-rs Nov 24, 2021
5527733
Merge branch 'master' into api_num_configurable_edges
behzadmehmood-rs Nov 25, 2021
dc4a62f
num_non_configurable_edges() API added
behzadmehmood-rs Nov 26, 2021
5795252
configurable_edges() API added
behzadmehmood-rs Nov 26, 2021
46ac27e
Added non_configurable_edges() API
behzadmehmood-rs Nov 29, 2021
6d14f83
Removed globals from rr_graph_uxsdcxx_serializer.h
behzadmehmood-rs Dec 2, 2021
8efc261
Updated formatting for rr_graph_uxsdcxx_serializer.h
behzadmehmood-rs Dec 2, 2021
88c5785
Typo fixed in rr_graph.cpp
behzadmehmood-rs Dec 7, 2021
09bbfab
A cached version of RRGraphView added in rr_graph_uxsdcxx_serializer.h.
behzadmehmood-rs Dec 7, 2021
95ca4bd
formatting has been set
umariqbal-rs Dec 7, 2021
0e8ff51
rr_graph made constant in EdgeWalker()
behzadmehmood-rs Dec 8, 2021
6b834d8
Changes reverted for validate()
behzadmehmood-rs Dec 14, 2021
a4a5abf
Formatting updated
behzadmehmood-rs Dec 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion utils/fasm/test/test_fasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ TEST_CASE("fasm_integration_test", "[fasm]") {
auto &device_ctx = g_vpr_ctx.mutable_device();
const auto& rr_graph = device_ctx.rr_graph;
for(size_t inode = 0; inode < device_ctx.rr_nodes.size(); ++inode) {
for(t_edge_size iedge = 0; iedge < device_ctx.rr_nodes[inode].num_edges(); ++iedge) {
for(t_edge_size iedge = 0; iedge < rr_graph.num_edges(RRNodeId(inode)); ++iedge) {
auto sink_inode = device_ctx.rr_nodes[inode].edge_sink_node(iedge);
auto switch_id = device_ctx.rr_nodes[inode].edge_switch(iedge);
auto value = vtr::string_fmt("%d_%d_%zu",
Expand Down
30 changes: 30 additions & 0 deletions vpr/src/device/rr_graph_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,36 @@ class RRGraphView {
return node_storage_.node_side_string(node);
}

/** @brief Get the number of configurable edges. This function is inlined for runtime optimization. */
inline t_edge_size num_configurable_edges(RRNodeId node) const {
return node_storage_.num_configurable_edges(node);
}

/** @brief Get the number of non-configurable edges. This function is inlined for runtime optimization. */
inline t_edge_size num_non_configurable_edges(RRNodeId node) const {
return node_storage_.num_non_configurable_edges(node);
}

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

/** @brief Get ID range for non-configurable edges. This function is inlined for runtime optimization. */
inline edge_idx_range non_configurable_edges(RRNodeId node) const {
return node_storage_.non_configurable_edges(node);
}

/** @brief Get ID range for edges. This function is inlined for runtime optimization. */
inline edge_idx_range edges(RRNodeId node) const {
return node_storage_.edges(node);
}

/** @brief Get the number of edges. This function is inlined for runtime optimization. */
inline t_edge_size num_edges(RRNodeId node) const {
return node_storage_.num_edges(node);
}

/** @brief The ptc_num carries different meanings for different node types
* (true in VPR RRG that is currently supported, may not be true in customized RRG)
* CHANX or CHANY: the track id in routing channels
Expand Down
13 changes: 8 additions & 5 deletions vpr/src/draw/draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,7 @@ static void draw_rr_edges(int inode, ezgl::renderer* g) {

from_ptc_num = rr_graph.node_ptc_num(RRNodeId(inode));

for (t_edge_size iedge = 0, l = device_ctx.rr_nodes[inode].num_edges(); iedge < l; iedge++) {
for (t_edge_size iedge = 0, l = rr_graph.num_edges(RRNodeId(inode)); iedge < l; iedge++) {
to_node = device_ctx.rr_nodes[inode].edge_sink_node(iedge);
to_type = rr_graph.node_type(RRNodeId(to_node));
to_ptc_num = rr_graph.node_ptc_num(RRNodeId(to_node));
Expand Down Expand Up @@ -2697,10 +2697,11 @@ void highlight_nets(char* message, int hit_node) {
void draw_highlight_fan_in_fan_out(const std::set<int>& nodes) {
t_draw_state* draw_state = get_draw_state_vars();
auto& device_ctx = g_vpr_ctx.device();
const auto& rr_graph = device_ctx.rr_graph;

for (auto node : nodes) {
/* Highlight the fanout nodes in red. */
for (t_edge_size iedge = 0, l = device_ctx.rr_nodes[node].num_edges();
for (t_edge_size iedge = 0, l = rr_graph.num_edges(RRNodeId(node));
iedge < l; iedge++) {
int fanout_node = device_ctx.rr_nodes[node].edge_sink_node(iedge);

Expand All @@ -2719,7 +2720,7 @@ void draw_highlight_fan_in_fan_out(const std::set<int>& nodes) {

/* Highlight the nodes that can fanin to this node in blue. */
for (size_t inode = 0; inode < device_ctx.rr_nodes.size(); inode++) {
for (t_edge_size iedge = 0, l = device_ctx.rr_nodes[inode].num_edges(); iedge < l;
for (t_edge_size iedge = 0, l = rr_graph.num_edges(RRNodeId(inode)); iedge < l;
iedge++) {
int fanout_node = device_ctx.rr_nodes[inode].edge_sink_node(
iedge);
Expand Down Expand Up @@ -2823,11 +2824,12 @@ std::set<int> draw_expand_non_configurable_rr_nodes(int from_node) {
void draw_expand_non_configurable_rr_nodes_recurr(int from_node,
std::set<int>& expanded_nodes) {
auto& device_ctx = g_vpr_ctx.device();
const auto& rr_graph = device_ctx.rr_graph;

expanded_nodes.insert(from_node);

for (t_edge_size iedge = 0;
iedge < device_ctx.rr_nodes[from_node].num_edges(); ++iedge) {
iedge < rr_graph.num_edges(RRNodeId(from_node)); ++iedge) {
bool edge_configurable = device_ctx.rr_nodes[from_node].edge_is_configurable(iedge);
int to_node = device_ctx.rr_nodes[from_node].edge_sink_node(iedge);

Expand Down Expand Up @@ -3783,8 +3785,9 @@ bool trace_routed_connection_rr_nodes_recurr(const t_rt_node* rt_node,
//Find the edge between two rr nodes
static t_edge_size find_edge(int prev_inode, int inode) {
auto& device_ctx = g_vpr_ctx.device();
const auto& rr_graph = device_ctx.rr_graph;
for (t_edge_size iedge = 0;
iedge < device_ctx.rr_nodes[prev_inode].num_edges(); ++iedge) {
iedge < rr_graph.num_edges(RRNodeId(prev_inode)); ++iedge) {
if (device_ctx.rr_nodes[prev_inode].edge_sink_node(iedge) == inode) {
return iedge;
}
Expand Down
6 changes: 3 additions & 3 deletions vpr/src/place/timing_place_lookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1166,16 +1166,16 @@ bool directconnect_exists(int src_rr_node, int sink_rr_node) {
VTR_ASSERT(rr_graph.node_type(RRNodeId(src_rr_node)) == SOURCE && rr_graph.node_type(RRNodeId(sink_rr_node)) == SINK);

//TODO: This is a constant depth search, but still may be too slow
for (t_edge_size i_src_edge = 0; i_src_edge < rr_nodes[src_rr_node].num_edges(); ++i_src_edge) {
for (t_edge_size i_src_edge = 0; i_src_edge < rr_graph.num_edges(RRNodeId(src_rr_node)); ++i_src_edge) {
int opin_rr_node = rr_nodes[src_rr_node].edge_sink_node(i_src_edge);

if (rr_graph.node_type(RRNodeId(opin_rr_node)) != OPIN) continue;

for (t_edge_size i_opin_edge = 0; i_opin_edge < rr_nodes[opin_rr_node].num_edges(); ++i_opin_edge) {
for (t_edge_size i_opin_edge = 0; i_opin_edge < rr_graph.num_edges(RRNodeId(opin_rr_node)); ++i_opin_edge) {
int ipin_rr_node = rr_nodes[opin_rr_node].edge_sink_node(i_opin_edge);
if (rr_graph.node_type(RRNodeId(ipin_rr_node)) != IPIN) continue;

for (t_edge_size i_ipin_edge = 0; i_ipin_edge < rr_nodes[ipin_rr_node].num_edges(); ++i_ipin_edge) {
for (t_edge_size i_ipin_edge = 0; i_ipin_edge < rr_graph.num_edges(RRNodeId(ipin_rr_node)); ++i_ipin_edge) {
if (sink_rr_node == rr_nodes[ipin_rr_node].edge_sink_node(i_ipin_edge)) {
return true;
}
Expand Down
14 changes: 6 additions & 8 deletions vpr/src/power/power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ static void power_usage_routing(t_power_usage* power_usage,
continue;
}

for (t_edge_size edge_idx = 0; edge_idx < node.num_edges(); edge_idx++) {
for (t_edge_size edge_idx = 0; edge_idx < rr_graph.num_edges(RRNodeId(trace->index)); edge_idx++) {
const auto& next_node_id = node.edge_sink_node(edge_idx);
if (next_node_id != OPEN) {
t_rr_node_power* next_node_power = &rr_node_power[next_node_id];
Expand Down Expand Up @@ -981,7 +981,7 @@ static void power_usage_routing(t_power_usage* power_usage,
/* Determine types of switches that this wire drives */
connectionbox_fanout = 0;
switchbox_fanout = 0;
for (t_edge_size iedge = 0; iedge < node.num_edges(); iedge++) {
for (t_edge_size iedge = 0; iedge < rr_graph.num_edges(rr_node); iedge++) {
if (node.edge_switch(iedge) == routing_arch->wire_to_rr_ipin_switch) {
connectionbox_fanout++;
} else if (node.edge_switch(iedge) == routing_arch->delayless_switch) {
Expand Down Expand Up @@ -1225,7 +1225,7 @@ void power_routing_init(const t_det_routing_arch* routing_arch) {
break;
case CHANX:
case CHANY:
for (t_edge_size iedge = 0; iedge < node.num_edges(); iedge++) {
for (t_edge_size iedge = 0; iedge < rr_graph.num_edges(RRNodeId(rr_node_idx)); iedge++) {
if (node.edge_switch(iedge) == routing_arch->wire_to_rr_ipin_switch) {
fanout_to_IPIN++;
} else if (node.edge_switch(iedge) != routing_arch->delayless_switch) {
Expand Down Expand Up @@ -1260,7 +1260,7 @@ void power_routing_init(const t_det_routing_arch* routing_arch) {
for (size_t rr_node_idx = 0; rr_node_idx < device_ctx.rr_nodes.size(); rr_node_idx++) {
auto node = device_ctx.rr_nodes[rr_node_idx];

for (t_edge_size edge_idx = 0; edge_idx < node.num_edges(); edge_idx++) {
for (t_edge_size edge_idx = 0; edge_idx < rr_graph.num_edges(RRNodeId(rr_node_idx)); edge_idx++) {
if (node.edge_sink_node(edge_idx) != OPEN) {
if (rr_node_power[node.edge_sink_node(edge_idx)].driver_switch_type == OPEN) {
rr_node_power[node.edge_sink_node(edge_idx)].driver_switch_type = node.edge_switch(edge_idx);
Expand All @@ -1274,13 +1274,11 @@ void power_routing_init(const t_det_routing_arch* routing_arch) {
/* Find Max Fanout of Routing Buffer */
t_edge_size max_seg_fanout = 0;
for (size_t rr_node_idx = 0; rr_node_idx < device_ctx.rr_nodes.size(); rr_node_idx++) {
auto node = device_ctx.rr_nodes[rr_node_idx];

switch (rr_graph.node_type(RRNodeId(rr_node_idx))) {
case CHANX:
case CHANY:
if (node.num_edges() > max_seg_fanout) {
max_seg_fanout = node.num_edges();
if (rr_graph.num_edges(RRNodeId(rr_node_idx)) > max_seg_fanout) {
max_seg_fanout = rr_graph.num_edges(RRNodeId(rr_node_idx));
}
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/route/check_route.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ static bool check_adjacent(int from_node, int to_node) {

reached = false;

for (t_edge_size iconn = 0; iconn < device_ctx.rr_nodes[from_node].num_edges(); iconn++) {
for (t_edge_size iconn = 0; iconn < rr_graph.num_edges(RRNodeId(from_node)); iconn++) {
if (device_ctx.rr_nodes[from_node].edge_sink_node(iconn) == to_node) {
reached = true;
break;
Expand Down
12 changes: 6 additions & 6 deletions vpr/src/route/check_rr_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void check_rr_graph(const t_graph_type graph_type,
}

t_rr_type rr_type = rr_graph.node_type(rr_node);
int num_edges = device_ctx.rr_nodes[inode].num_edges();
int num_edges = rr_graph.num_edges(RRNodeId(inode));

check_rr_node(inode, route_type, device_ctx);

Expand Down Expand Up @@ -184,14 +184,14 @@ void check_rr_graph(const t_graph_type graph_type,
check_unbuffered_edges(inode);

//Check that all config/non-config edges are appropriately organized
for (auto edge : device_ctx.rr_nodes[inode].configurable_edges()) {
for (auto edge : rr_graph.configurable_edges(RRNodeId(inode))) {
if (!device_ctx.rr_nodes[inode].edge_is_configurable(edge)) {
VPR_FATAL_ERROR(VPR_ERROR_ROUTE, "in check_rr_graph: node %d edge %d is non-configurable, but in configurable edges",
inode, edge);
}
}

for (auto edge : device_ctx.rr_nodes[inode].non_configurable_edges()) {
for (auto edge : rr_graph.non_configurable_edges(RRNodeId(inode))) {
if (device_ctx.rr_nodes[inode].edge_is_configurable(edge)) {
VPR_FATAL_ERROR(VPR_ERROR_ROUTE, "in check_rr_graph: node %d edge %d is configurable, but in non-configurable edges",
inode, edge);
Expand Down Expand Up @@ -483,7 +483,7 @@ void check_rr_node(int inode, enum e_route_type route_type, const DeviceContext&
}

/* Check that the number of (out) edges is reasonable. */
num_edges = device_ctx.rr_nodes[inode].num_edges();
num_edges = rr_graph.num_edges(RRNodeId(inode));

if (rr_type != SINK && rr_type != IPIN) {
if (num_edges <= 0) {
Expand Down Expand Up @@ -544,7 +544,7 @@ static void check_unbuffered_edges(int from_node) {
if (from_rr_type != CHANX && from_rr_type != CHANY)
return;

from_num_edges = device_ctx.rr_nodes[from_node].num_edges();
from_num_edges = rr_graph.num_edges(RRNodeId(from_node));

for (from_edge = 0; from_edge < from_num_edges; from_edge++) {
to_node = device_ctx.rr_nodes[from_node].edge_sink_node(from_edge);
Expand All @@ -562,7 +562,7 @@ static void check_unbuffered_edges(int from_node) {
* check that there is a corresponding edge from to_node back to *
* from_node. */

to_num_edges = device_ctx.rr_nodes[to_node].num_edges();
to_num_edges = rr_graph.num_edges(RRNodeId(to_node));
trans_matched = false;

for (to_edge = 0; to_edge < to_num_edges; to_edge++) {
Expand Down
8 changes: 5 additions & 3 deletions vpr/src/route/route_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ static std::pair<t_trace*, t_trace*> add_trace_non_configurable_recurr(int node,
//Record the non-configurable out-going edges
std::vector<t_edge_size> unvisited_non_configurable_edges;
auto& device_ctx = g_vpr_ctx.device();
for (auto iedge : device_ctx.rr_nodes[node].non_configurable_edges()) {
const auto& rr_graph = device_ctx.rr_graph;
for (auto iedge : rr_graph.non_configurable_edges(RRNodeId(node))) {
VTR_ASSERT_SAFE(!device_ctx.rr_nodes[node].edge_is_configurable(iedge));

int to_node = device_ctx.rr_nodes[node].edge_sink_node(iedge);
Expand Down Expand Up @@ -1424,7 +1425,7 @@ void reserve_locally_used_opins(HeapInterface* heap, float pres_fac, float acc_f
//the reserved OPINs to move out of the way of congestion, by preferring
//to reserve OPINs with lower congestion costs).
from_node = route_ctx.rr_blk_source[blk_id][iclass];
num_edges = device_ctx.rr_nodes[from_node].num_edges();
num_edges = rr_graph.num_edges(RRNodeId(from_node));
for (iconn = 0; iconn < num_edges; iconn++) {
to_node = device_ctx.rr_nodes[from_node].edge_sink_node(iconn);

Expand Down Expand Up @@ -1561,9 +1562,10 @@ bool validate_traceback_recurr(t_trace* trace, std::set<int>& seen_rr_nodes) {
//Check there is an edge connecting trace and next

auto& device_ctx = g_vpr_ctx.device();
const auto& rr_graph = device_ctx.rr_graph;

bool found = false;
for (t_edge_size iedge = 0; iedge < device_ctx.rr_nodes[trace->index].num_edges(); ++iedge) {
for (t_edge_size iedge = 0; iedge < rr_graph.num_edges(RRNodeId(trace->index)); ++iedge) {
int to_node = device_ctx.rr_nodes[trace->index].edge_sink_node(iedge);

if (to_node == next->index) {
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/route/route_tree_timing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ static t_rt_node* add_non_configurable_to_route_tree(const int rr_node, const bo
VTR_ASSERT(rt_node->inode == rr_node);
}
}
for (int iedge : device_ctx.rr_nodes[rr_node].non_configurable_edges()) {
for (int iedge : rr_graph.non_configurable_edges(RRNodeId(rr_node))) {
//Recursive case: expand children
VTR_ASSERT(!device_ctx.rr_nodes[rr_node].edge_is_configurable(iedge));

Expand Down
4 changes: 3 additions & 1 deletion vpr/src/route/router_lookahead_map_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,13 @@ void expand_dijkstra_neighbours(const t_rr_graph_storage& rr_nodes,
std::priority_queue<Entry,
std::vector<Entry>,
std::greater<Entry>>* pq) {
auto& device_ctx = g_vpr_ctx.device();
const auto& rr_graph = device_ctx.rr_graph;
RRNodeId parent = parent_entry.rr_node;

auto& parent_node = rr_nodes[size_t(parent)];

for (int iedge = 0; iedge < parent_node.num_edges(); iedge++) {
for (int iedge = 0; iedge < rr_graph.num_edges(RRNodeId(parent)); iedge++) {
int child_node_ind = parent_node.edge_sink_node(iedge);
int switch_ind = parent_node.edge_switch(iedge);

Expand Down
4 changes: 2 additions & 2 deletions vpr/src/route/router_lookahead_sampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static std::tuple<int, int, int> get_node_info(const t_rr_node& node, int num_se
return std::tuple<int, int, int>(OPEN, OPEN, OPEN);
}

if (rr_graph.node_capacity(rr_node) == 0 || node.num_edges() == 0) {
if (rr_graph.node_capacity(rr_node) == 0 || rr_graph.num_edges(rr_node) == 0) {
return std::tuple<int, int, int>(OPEN, OPEN, OPEN);
}

Expand Down Expand Up @@ -205,7 +205,7 @@ std::vector<SampleRegion> find_sample_regions(int num_segments) {
std::vector<vtr::Rect<int>> bounding_box_for_segment(num_segments, vtr::Rect<int>());
for (auto& node : rr_nodes) {
if (rr_graph.node_type(node.id()) != CHANX && rr_graph.node_type(node.id()) != CHANY) continue;
if (rr_graph.node_capacity(node.id()) == 0 || node.num_edges() == 0) continue;
if (rr_graph.node_capacity(node.id()) == 0 || rr_graph.num_edges(node.id()) == 0) continue;
int seg_index = device_ctx.rr_indexed_data[rr_graph.node_cost_index(node.id())].seg_index;

VTR_ASSERT(seg_index != OPEN);
Expand Down
8 changes: 5 additions & 3 deletions vpr/src/route/rr_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,11 @@ void create_rr_graph(const t_graph_type graph_type,
void print_rr_graph_stats() {
auto& device_ctx = g_vpr_ctx.device();

const auto& rr_graph = device_ctx.rr_graph;

size_t num_rr_edges = 0;
for (auto& rr_node : device_ctx.rr_nodes) {
num_rr_edges += rr_node.edges().size();
num_rr_edges += rr_graph.edges(rr_node.id()).size();
}

VTR_LOG(" RR Graph Nodes: %zu\n", device_ctx.rr_nodes.size());
Expand Down Expand Up @@ -722,7 +724,7 @@ static void build_rr_graph(const t_graph_type graph_type,
* based on their fanin in the rr graph. This routine also adjusts the rr nodes to point to these new rr switches */
alloc_and_load_rr_switch_inf(num_arch_switches, R_minW_nmos, R_minW_pmos, wire_to_arch_ipin_switch, wire_to_rr_ipin_switch);

//Partition the rr graph edges for efficient access to configurable/non-configurable
//Partition the rr graph edges for efficient access to configurable/non-configurab/home/users/behzad.mahmood/eclipse-workspacele
//edge subsets. Must be done after RR switches have been allocated
device_ctx.rr_graph_builder.partition_edges();

Expand Down Expand Up @@ -2460,7 +2462,7 @@ std::string describe_rr_node(int inode) {

msg += vtr::string_fmt(" capacity: %d", rr_graph.node_capacity(RRNodeId(inode)));
msg += vtr::string_fmt(" fan-in: %d", rr_graph.node_fan_in(RRNodeId(inode)));
msg += vtr::string_fmt(" fan-out: %d", rr_node.num_edges());
msg += vtr::string_fmt(" fan-out: %d", rr_graph.num_edges(RRNodeId(inode)));

msg += " " + rr_graph.node_coordinate_to_string(RRNodeId(inode));

Expand Down
6 changes: 3 additions & 3 deletions vpr/src/route/rr_graph_area.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void count_bidir_routing_transistors(int num_switch, int wire_to_ipin_switch, fl
switch (from_rr_type) {
case CHANX:
case CHANY:
num_edges = device_ctx.rr_nodes[from_node].num_edges();
num_edges = rr_graph.num_edges(RRNodeId(from_node));

for (iedge = 0; iedge < num_edges; iedge++) {
RRNodeId to_node = RRNodeId(device_ctx.rr_nodes[from_node].edge_sink_node(iedge));
Expand Down Expand Up @@ -249,7 +249,7 @@ void count_bidir_routing_transistors(int num_switch, int wire_to_ipin_switch, fl
break;

case OPIN:
num_edges = device_ctx.rr_nodes[from_node].num_edges();
num_edges = rr_graph.num_edges(RRNodeId(from_node));
shared_opin_buffer_trans = 0.;

for (iedge = 0; iedge < num_edges; iedge++) {
Expand Down Expand Up @@ -361,7 +361,7 @@ void count_unidir_routing_transistors(std::vector<t_segment_inf>& /*segment_inf*
switch (from_rr_type) {
case CHANX:
case CHANY:
num_edges = device_ctx.rr_nodes[from_node].num_edges();
num_edges = rr_graph.num_edges(RRNodeId(from_node));

/* Increment number of inputs per cblock if IPIN */
for (iedge = 0; iedge < num_edges; iedge++) {
Expand Down
Loading