204 int xlow, ylow, xhigh, yhigh, ptc_num, capacity;
207 int nodes_per_chan, tracks_per_node, num_edges, cost_index;
219 if (xlow > xhigh || ylow > yhigh) {
220 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: rr endpoints are (%d,%d) and (%d,%d).\n",
221 xlow, ylow, xhigh, yhigh);
225 if (xlow < 0 || xhigh >
nx + 1 || ylow < 0 || yhigh >
ny + 1) {
226 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: rr endpoints (%d,%d) and (%d,%d) are out of range.\n",
227 xlow, ylow, xhigh, yhigh);
232 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) had a ptc_num of %d.\n",
233 inode, rr_type, ptc_num);
249 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: node %d (type %d) is at an illegal clb location (%d, %d).\n",
250 inode, rr_type, xlow, ylow);
253 if (xlow != xhigh || ylow != (yhigh - type->
height + 1)) {
254 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: node %d (type %d) has endpoints (%d,%d) and (%d,%d)\n",
255 inode, rr_type, xlow, ylow, xhigh, yhigh);
261 if (xlow < 1 || xhigh >
nx || yhigh >
ny || yhigh != ylow) {
262 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: CHANX out of range for endpoints (%d,%d) and (%d,%d)\n",
263 xlow, ylow, xhigh, yhigh);
266 if (route_type ==
GLOBAL && xlow != xhigh) {
267 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: node %d spans multiple channel segments (not allowed for global routing).\n",
274 if (xhigh >
nx || ylow < 1 || yhigh >
ny || xlow != xhigh) {
275 vpr_printf(TIO_MESSAGE_ERROR,
"Error in check_node: CHANY out of range for endpoints (%d,%d) and (%d,%d)\n",
276 xlow, ylow, xhigh, yhigh);
279 if (route_type ==
GLOBAL && ylow != yhigh) {
280 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: node %d spans multiple channel segments (not allowed for global routing).\n",
287 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: Unexpected segment type: %d\n", rr_type);
299 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) had a ptc_num of %d.\n",
300 inode, rr_type, ptc_num);
304 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) had a capacity of %d.\n",
305 inode, rr_type, capacity);
315 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) had a ptc_num of %d.\n",
316 inode, rr_type, ptc_num);
320 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) has a capacity of %d.\n",
321 inode, rr_type, capacity);
330 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) had a ptc_num of %d.\n",
331 inode, rr_type, ptc_num);
336 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) has a capacity of %d.\n",
337 inode, rr_type, capacity);
345 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) had a ptc_num of %d.\n",
346 inode, rr_type, ptc_num);
350 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) has a capacity of %d.\n",
351 inode, rr_type, capacity);
365 if (ptc_num >= nodes_per_chan) {
366 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) has a ptc_num of %d.\n",
367 inode, rr_type, ptc_num);
371 if (capacity != tracks_per_node) {
372 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) has a capacity of %d.\n",
373 inode, rr_type, capacity);
387 if (ptc_num >= nodes_per_chan) {
388 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) has a ptc_num of %d.\n",
389 inode, rr_type, ptc_num);
393 if (capacity != tracks_per_node) {
394 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: inode %d (type %d) has a capacity of %d.\n",
395 inode, rr_type, capacity);
401 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: Unexpected segment type: %d\n", rr_type);
409 if (rr_type !=
SINK && rr_type !=
IPIN) {
410 if (num_edges <= 0) {
414 vpr_printf(TIO_MESSAGE_WARNING,
"in check_node: node %d has no edges.\n", inode);
418 else if (rr_type ==
SINK) {
419 if (num_edges != 0) {
420 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: node %d is a sink, but has %d edges.\n",
432 if (C < 0. || R < 0.) {
433 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: node %d of type %d has R = %g and C = %g.\n",
434 inode, rr_type, R, C);
440 if (C != 0. || R != 0.) {
441 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: node %d of type %d has R = %g and C = %g.\n",
442 inode, rr_type, R, C);
449 vpr_printf(TIO_MESSAGE_ERROR,
"in check_node: node %d cost index (%d) is out of range.\n",
struct s_class * class_inf
struct s_grid_tile ** grid