⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 check_rr_graph.c

📁 fpga设计评估软件
💻 C
📖 第 1 页 / 共 2 页
字号:
 case SOURCE:    if (clb[xlow][ylow].type == CLB) {       if (ptc_num >= num_class || class_inf[ptc_num].type != DRIVER) {          printf ("Error in check_node.  Inode %d (type %d) had a ptc_num\n"                  "of %d.\n", inode, rr_type, ptc_num);          exit (1);       }       if (class_inf[ptc_num].num_pins != capacity) {          printf ("Error in check_node.  Inode %d (type %d) had a capacity\n"                  "of %d.\n", inode, rr_type, capacity);          exit (1);       }    }    else {   /* IO block */       if (ptc_num >= io_rat) {          printf ("Error in check_node.  Inode %d (type %d) had a ptc_num\n"                  "of %d.\n", inode, rr_type, ptc_num);          exit (1);       }       if (capacity != 1) {          printf ("Error in check_node:  Inode %d (type %d) had a capacity\n"                  "of %d.\n", inode, rr_type, capacity);          exit (1);       }    }    break;  case SINK:    if (clb[xlow][ylow].type == CLB) {       if (ptc_num >= num_class || class_inf[ptc_num].type != RECEIVER) {          printf ("Error in check_node.  Inode %d (type %d) had a ptc_num\n"                  "of %d.\n", inode, rr_type, ptc_num);          exit (1);       }       if (class_inf[ptc_num].num_pins != capacity) {          printf ("Error in check_node.  Inode %d (type %d) has a capacity\n"                  "of %d.\n", inode, rr_type, capacity);          exit (1);       }    }    else {   /* IO block */       if (ptc_num >= io_rat) {          printf ("Error in check_node.  Inode %d (type %d) had a ptc_num\n"                  "of %d.\n", inode, rr_type, ptc_num);          exit (1);       }       if (capacity != 1) {          printf ("Error in check_node:  Inode %d (type %d) has a capacity\n"                  "of %d.\n", inode, rr_type, capacity);          exit (1);       }    }    break;  case OPIN:    if (clb[xlow][ylow].type == CLB) {       if (ptc_num >= pins_per_clb || class_inf[clb_pin_class[ptc_num]].type                != DRIVER) {          printf ("Error in check_node.  Inode %d (type %d) had a ptc_num\n"                  "of %d.\n", inode, rr_type, ptc_num);          exit (1);       }    }    else {  /* IO block */       if (ptc_num >= io_rat) {          printf ("Error in check_node.  Inode %d (type %d) had a ptc_num\n"                  "of %d.\n", inode, rr_type, ptc_num);          exit (1);       }    }    if (capacity != 1) {      printf ("Error in check_node:  Inode %d (type %d) has a capacity\n"                  "of %d.\n", inode, rr_type, capacity);       exit (1);    }    break;  case IPIN:    if (clb[xlow][ylow].type == CLB) {       if (ptc_num >= pins_per_clb || class_inf[clb_pin_class[ptc_num]].type                != RECEIVER) {          printf ("Error in check_node.  Inode %d (type %d) had a ptc_num\n"                  "of %d.\n", inode, rr_type, ptc_num);          exit (1);       }    }    else {   /* IO block */       if (ptc_num >= io_rat) {          printf ("Error in check_node.  Inode %d (type %d) had a ptc_num\n"                  "of %d.\n", inode, rr_type, ptc_num);          exit (1);       }    }    if (capacity != 1) {      printf ("Error in check_node:  Inode %d (type %d) has a capacity\n"                  "of %d.\n", inode, rr_type, capacity);       exit (1);    }    break;  case CHANX:    if (route_type == DETAILED) {       nodes_per_chan = chan_width_x[ylow];       tracks_per_node = 1;    }    else {       nodes_per_chan = 1;       tracks_per_node = chan_width_x[ylow];    }     if (ptc_num >= nodes_per_chan) {      printf ("Error in check_node:  Inode %d (type %d) has a ptc_num\n"                  "of %d.\n", inode, rr_type, ptc_num);       exit (1);    }     if (capacity != tracks_per_node) {      printf ("Error in check_node:  Inode %d (type %d) has a capacity\n"                  "of %d.\n", inode, rr_type, capacity);       exit (1);    }    break;  case CHANY:    if (route_type == DETAILED) {       nodes_per_chan = chan_width_y[xlow];       tracks_per_node = 1;    }    else {       nodes_per_chan = 1;       tracks_per_node = chan_width_y[xlow];    }     if (ptc_num >= nodes_per_chan) {      printf ("Error in check_node:  Inode %d (type %d) has a ptc_num\n"                  "of %d.\n", inode, rr_type, ptc_num);       exit (1);    }     if (capacity != tracks_per_node) {      printf ("Error in check_node:  Inode %d (type %d) has a capacity\n"                  "of %d.\n", inode, rr_type, capacity);       exit (1);    }    break;  default:    printf("Error in check_node:  Unexpected segment type: %d\n", rr_type);    exit(1);  }/* Check that the number of (out) edges is reasonable. */  num_edges = rr_node[inode].num_edges;  if (rr_type != SINK) {    if (num_edges <= 0) {       printf ("Error in check_node: node %d has no edges.\n", inode);       exit (1);    }     } else {   /* SINK -- remove this check if feedthroughs allowed */    if (num_edges != 0) {       printf ("Error in check_node: node %d is a sink, but has "               "%d edges.\n", inode, num_edges);       exit (1);    } }/* Check that the capacitance, resistance and cost_index are reasonable. */ C = rr_node[inode].C; R = rr_node[inode].R; if (rr_type == CHANX || rr_type == CHANY) {    if (C < 0. || R < 0.) {       printf ("Error in check_node: node %d of type %d has R = %g "               "and C = %g.\n", inode, rr_type, R, C);       exit (1);    } }    else {    if (C != 0. || R != 0.) {       printf ("Error in check_node: node %d of type %d has R = %g "               "and C = %g.\n", inode, rr_type, R, C);       exit (1);     } } cost_index = rr_node[inode].cost_index; if (cost_index < 0 || cost_index >= num_rr_indexed_data) {    printf ("Error in check_node:  node %d cost index (%d) is out of "            "range.\n", inode, cost_index);    exit (1); }}static void check_pass_transistors (int from_node) {/* This routine checks that all pass transistors in the routing truly are  * * bidirectional.  It may be a slow check, so don't use it all the time.   */ int from_edge, to_node, to_edge, from_num_edges, to_num_edges; t_rr_type from_rr_type, to_rr_type; short from_switch_type; boolean trans_matched; from_rr_type = rr_node[from_node].type; if (from_rr_type != CHANX && from_rr_type != CHANY)     return; from_num_edges = rr_node[from_node].num_edges; for (from_edge=0;from_edge<from_num_edges;from_edge++) {    to_node = rr_node[from_node].edges[from_edge];    to_rr_type = rr_node[to_node].type;    if (to_rr_type != CHANX && to_rr_type != CHANY)        continue;       from_switch_type = rr_node[from_node].switches[from_edge];      if (switch_inf[from_switch_type].buffered)       continue;   /* We know that we have a pass transitor from from_node to to_node.  Now *    * check that there is a corresponding edge from to_node back to         *    * from_node.                                                            */         to_num_edges = rr_node[to_node].num_edges;    trans_matched = FALSE;        for (to_edge=0;to_edge<to_num_edges;to_edge++) {       if (rr_node[to_node].edges[to_edge] == from_node &&            rr_node[to_node].switches[to_edge] == from_switch_type) {          trans_matched = TRUE;          break;       }    }    if (trans_matched == FALSE) {       printf ("Error in check_pass_transistors:  Connection from node %d to\n"            "node %d uses a pass transistor (switch type %d), but there is\n"            "no corresponding pass transistor edge in the other direction.\n",            from_node, to_node, from_switch_type);       exit (1);    } }   /* End for all from_node edges */}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -