Skip to content

Commit a5106f4

Browse files
committed
[vpr][base] fix switch id access
1 parent 9bdaa71 commit a5106f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vpr/src/base/stats.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ void write_sb_count_stats(const Netlist<>& net_list,
244244
RRNodeId sink_node = rt_node.inode;
245245
std::vector<RREdgeId> edges = rr_graph.find_edges(src_node, sink_node);
246246
VTR_ASSERT(edges.size() == 1);
247-
RRSwitchId rr_switch_id = rr_graph.edge_switch(edges[0]);
248-
const std::string& sw_template_id = rr_graph.rr_switch_inf(rr_switch_id).template_id;
247+
RRSwitchId switch_id = RRSwitchId(rr_graph.edge_switch(edges[0]));
248+
const std::string& sw_template_id = rr_graph.rr_switch_inf(switch_id).template_id;
249249
if (sw_template_id.empty()) {
250250
continue;
251251
}

0 commit comments

Comments
 (0)