Skip to content

Commit 92dfcc8

Browse files
committed
[vpr][power] use node type to determine whether edge is to IPIN
1 parent ae302cf commit 92dfcc8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

vpr/src/power/power.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,8 @@ static void power_usage_routing(t_power_usage* power_usage,
979979
connectionbox_fanout = 0;
980980
switchbox_fanout = 0;
981981
for (t_edge_size iedge = 0; iedge < rr_graph.num_edges(rr_id); iedge++) {
982-
if ((RRSwitchId)rr_graph.edge_switch(rr_id, iedge) == routing_arch.wire_to_rr_ipin_switch) {
982+
RRNodeId edge_sink = rr_graph.edge_sink_node(rr_id, iedge);
983+
if (rr_graph.node_type(edge_sink) == e_rr_type::IPIN) {
983984
connectionbox_fanout++;
984985
} else if (rr_graph.edge_switch(rr_id, iedge) == routing_arch.delayless_switch) {
985986
/* Do nothing */
@@ -1225,7 +1226,8 @@ void power_routing_init(const t_det_routing_arch& routing_arch) {
12251226
case e_rr_type::CHANX:
12261227
case e_rr_type::CHANY:
12271228
for (t_edge_size iedge = 0; iedge < rr_graph.num_edges(rr_node_idx); iedge++) {
1228-
if ((RRSwitchId)rr_graph.edge_switch(rr_node_idx, iedge) == routing_arch.wire_to_rr_ipin_switch) {
1229+
RRNodeId edge_sink = rr_graph.edge_sink_node(rr_node_idx, iedge);
1230+
if (rr_graph.node_type(edge_sink) == e_rr_type::IPIN) {
12291231
fanout_to_IPIN++;
12301232
} else if (rr_graph.edge_switch(rr_node_idx, iedge) != routing_arch.delayless_switch) {
12311233
fanout_to_seg++;

0 commit comments

Comments
 (0)