Skip to content

Commit a522f36

Browse files
committed
[vpr][stats] use switch id to get template id
1 parent 1d674de commit a522f36

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vpr/src/base/stats.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,9 @@ 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-
const std::optional<std::string>& sb_id = rr_graph.edge_sw_template_id(edges[0]);
248-
if (!sb_id) {
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;
249+
if (sw_template_id.empty()) {
249250
continue;
250251
}
251252
if (sb_count.find(*sb_id) == sb_count.end()) {

0 commit comments

Comments
 (0)