VPR-6.0
|
Go to the source code of this file.
Functions | |
void | check_netlist () |
void check_netlist | ( | ) |
This routine checks that the netlist makes sense.
Definition at line 41 of file check_netlist.c.
{ int i, error, num_conn; int net_count; struct s_hash **net_hash_table, *h_net_ptr; net_hash_table = alloc_hash_table(); net_count = 0; error = 0; /* Check that nets fanout and have a driver. */ for(i = 0; i < num_nets; i++) { h_net_ptr = insert_in_hash_table(net_hash_table, clb_net[i].name, i); if(h_net_ptr->count != 1) { printf(ERRTAG "net %s has multiple drivers.\n", clb_net[i].name); error++; } error += check_connections_to_global_clb_pins(i); if(error >= ERROR_THRESHOLD) { printf("Too many errors in netlist, exiting\n"); exit(1); } } free_hash_table(net_hash_table); /* Check that each block makes sense. */ for(i = 0; i < num_blocks; i++) { num_conn = get_num_conn(i); error += check_clb_conn(i, num_conn); error += check_clb_internal_nets(i); error += check_subblocks(i); if(error >= ERROR_THRESHOLD) { printf("Too many errors in netlist, exiting\n"); exit(1); } } error += check_for_duplicated_names(); if(error != 0) { printf("Found %d fatal Errors in the input netlist.\n", error); exit(1); } /* HACK: Jason Luu January 17, 2011 Do not route common constants gnd and vcc Todo: Need to make architecture driven. */ for(i = 0; i < num_nets; i++) { if(strcmp(clb_net[i].name, "vcc") == 0) { clb_net[i].is_global = TRUE; } else if(strcmp(clb_net[i].name, "gnd") == 0) { clb_net[i].is_global = TRUE; } } }