@@ -124,16 +124,16 @@ void check_rr_graph(const t_graph_type graph_type,
124
124
t_rr_type to_rr_type = device_ctx.rr_nodes [to_node].type ();
125
125
126
126
/* Only expect the following cases to have multiple edges
127
- * - chan <-> chan connections
128
- * - IPIN < -> chan connections (unique rr_node for IPIN nodes on multiple sides)
129
- * - OPIN < -> chan connections (unique rr_node for OPIN nodes on multiple sides)
127
+ * - CHAN <-> CHAN connections
128
+ * - CHAN -> IPIN connections (unique rr_node for IPIN nodes on multiple sides)
129
+ * - OPIN -> CHAN connections (unique rr_node for OPIN nodes on multiple sides)
130
130
*/
131
- if (((to_rr_type != CHANX && to_rr_type != CHANY && rr_type != IPIN)
132
- || ( rr_type != CHANX && rr_type != CHANY))
133
- && (( to_rr_type != CHANX && to_rr_type != CHANY)
134
- || (rr_type != CHANX && rr_type != CHANY && rr_type != OPIN) )) {
131
+ bool is_chan_to_chan = (rr_type == CHANX || rr_type == CHANY) && ( to_rr_type == CHANY || to_rr_type == CHANX);
132
+ bool is_chan_to_ipin = (rr_type == CHANX || rr_type && CHANY) && to_rr_type == IPIN;
133
+ bool is_opin_to_chan = rr_type == OPIN && (to_rr_type == CHANX || to_rr_type == CHANY);
134
+ if (!(is_chan_to_chan || is_chan_to_ipin || is_opin_to_chan )) {
135
135
VPR_ERROR (VPR_ERROR_ROUTE,
136
- " in check_rr_graph: node %d (%s) connects to node %d (%s) %zu times - multi-connections only expected for CHAN->CHAN.\n " ,
136
+ " in check_rr_graph: node %d (%s) connects to node %d (%s) %zu times - multi-connections only expected for CHAN<->CHAN, CHAN->IPIN, OPIN ->CHAN.\n " ,
137
137
inode, rr_node_typename[rr_type], to_node, rr_node_typename[to_rr_type], num_edges_to_node);
138
138
}
139
139
0 commit comments