15 #define ERROR_THRESHOLD 100
38 int i, error, num_conn;
39 struct s_hash **net_hash_table, *h_net_ptr;
49 vpr_printf(TIO_MESSAGE_INFO,
"Please go to the check_netlist() function in check_netlist.c and remove the first section as needed.");
60 if (h_net_ptr->
count != 1) {
66 vpr_printf(TIO_MESSAGE_ERROR,
"Too many errors in netlist, exiting.\n");
78 vpr_printf(TIO_MESSAGE_ERROR,
"Too many errors in netlist, exiting.\n");
86 vpr_printf(TIO_MESSAGE_ERROR,
"Found %d fatal Errors in the input netlist.\n", error);
96 }
else if (strcmp(
clb_net[i].name,
"gnd") == 0) {
108 int ipin, num_pins, iblk, node_block_pin, error;
118 for (ipin = 0; ipin < num_pins; ipin++) {
123 if (
block[iblk].type->is_global_pin[node_block_pin]
129 vpr_printf(TIO_MESSAGE_WARNING,
"in check_connections_to_global_clb_pins:\n");
130 vpr_printf(TIO_MESSAGE_WARNING,
"\tnet #%d (%s) is driven by CLB output pin (#%d) on block #%d (%s).\n",
133 vpr_printf(TIO_MESSAGE_ERROR,
"in check_connections_to_global_clb_pins:\n");
134 vpr_printf(TIO_MESSAGE_ERROR,
"\tpin %d on net #%d (%s) connects to CLB input pin (#%d) on block #%d (%s).\n",
140 vpr_printf(TIO_MESSAGE_INFO,
"Net is global, but CLB pin is not.\n");
142 vpr_printf(TIO_MESSAGE_INFO,
"CLB pin is global, but net is not.\n");
154 int iclass, ipin, error;
169 }
else if (num_conn < 2) {
170 vpr_printf(TIO_MESSAGE_WARNING,
"Logic block #%d (%s) has only %d pin.\n",
179 for (ipin = 0; ipin < type->
num_pins; ipin++) {
184 vpr_printf(TIO_MESSAGE_INFO,
"Pin is an input -- this whole block is hanging logic that should be swept in logic synthesis.\n");
185 vpr_printf(TIO_MESSAGE_INFO,
"\tNon-fatal, but check this.\n");
187 vpr_printf(TIO_MESSAGE_INFO,
"Pin is an output -- may be a constant generator.\n");
188 vpr_printf(TIO_MESSAGE_INFO,
"\tNon-fatal, but check this.\n");
201 vpr_printf(TIO_MESSAGE_ERROR,
"logic block #%d with output %s has %d pins.\n",
252 int iblk, isub, iprim, error;
253 int clb_count, sub_count, prim_count;
254 struct s_hash **clb_hash_table, *clb_h_ptr;
255 struct s_hash **sub_hash_table, *sub_h_ptr;
256 struct s_hash **prim_hash_table, *prim_h_ptr;
262 error = clb_count = sub_count = prim_count = 0;
267 if (clb_h_ptr->
count > 1) {
268 vpr_printf(TIO_MESSAGE_ERROR,
"Block %s has duplicated name.\n",
274 for (isub = 0; isub <
block[iblk].num_subblocks; isub++)
277 if (sub_h_ptr->
count > 1) {
278 vpr_printf(TIO_MESSAGE_ERROR,
"Subblock %s has duplicated name.\n",
279 block[iblk].subblocks[isub].name);
284 for (iprim = 0; iprim <
block[iblk].subblocks[isub].num_primitives; iprim++)
287 if (prim_h_ptr->
count > 1) {
288 vpr_printf(TIO_MESSAGE_ERROR,
"Primitive %s has duplicated name.\n",
289 block[iblk].subblocks[isub].primitives[iprim].name);
313 for (i = 0; i < type->
num_pins; i++) {
struct s_hash ** alloc_hash_table(void)
struct s_class * class_inf
static int check_subblock_internal_nets(int iblk, int isub)
void free_hash_table(struct s_hash **hash_table)
static int check_subblocks(int iblk)
static int check_for_duplicated_names(void)
static int check_connections_to_global_clb_pins(int inet)
static int get_num_conn(int bnum)
static int check_primitives(int iblk, int isub)
struct s_hash * insert_in_hash_table(struct s_hash **hash_table, char *name, int next_free_index)
static int check_clb_internal_nets(int iblk)
static int check_clb_conn(int iblk, int num_conn)