36 int inet, ipin, max_pins, inode, prev_node;
37 boolean valid, connects;
38 boolean * connected_to_route;
43 vpr_printf(TIO_MESSAGE_INFO,
"Checking to ensure routing is legal...\n");
52 vpr_printf(TIO_MESSAGE_ERROR,
"Error in check_route -- routing resources are overused.\n");
61 for (inet = 0; inet <
num_nets; inet++)
64 pin_done = (
boolean *)
my_malloc(max_pins *
sizeof(
boolean));
68 for (inet = 0; inet <
num_nets; inet++) {
74 pin_done[ipin] =
FALSE;
80 vpr_printf(TIO_MESSAGE_ERROR,
"in check_route: net %d has no routing.\n", inet);
87 connected_to_route[inode] =
TRUE;
97 while (tptr != NULL) {
103 if (connected_to_route[inode] ==
FALSE) {
104 vpr_printf(TIO_MESSAGE_ERROR,
"in check_route: node %d does not link into existing routing for net %d.\n", inode, inet);
112 vpr_printf(TIO_MESSAGE_ERROR,
"in check_route: found non-adjacent segments in traceback while checking net %d.\n", inet);
116 if (connected_to_route[inode] &&
rr_node[inode].type !=
SINK) {
121 vpr_printf(TIO_MESSAGE_ERROR,
"in check_route: net %d routing is not a tree.\n", inet);
125 connected_to_route[inode] =
TRUE;
136 vpr_printf(TIO_MESSAGE_ERROR,
"in check_route: net %d does not end with a SINK.\n", inet);
141 if (pin_done[ipin] ==
FALSE) {
142 vpr_printf(TIO_MESSAGE_ERROR,
"in check_route: net %d does not connect to pin %d.\n", inet, ipin);
152 free(connected_to_route);
153 vpr_printf(TIO_MESSAGE_INFO,
"Completed routing consistency check successfully.\n");
static void recompute_occupancy_from_scratch(t_ivec **clb_opins_used_locally)
boolean feasible_routing(void)
static void check_locally_used_clb_opins(t_ivec **clb_opins_used_locally, enum e_route_type route_type)
static void check_node_and_range(int inode, enum e_route_type route_type)
void * my_calloc(size_t nelem, size_t size)
static void * my_malloc(int ibytes)
static void check_source(int inode, int inet)
static boolean check_adjacent(int from_node, int to_node)
struct s_trace ** trace_head
static void reset_flags(int inet, boolean *connected_to_route)
static void check_sink(int inode, int inet, boolean *pin_done)
static void check_switch(struct s_trace *tptr, int num_switch)