26 infile = fopen(place_file,
"r");
34 for (i = 0; i < 6; ++i) {
36 if (NULL == tokens[i]) {
42 if ((0 != strcmp(tokens[0],
"Netlist"))
43 || (0 != strcmp(tokens[1],
"file:"))
44 || (0 != strcmp(tokens[3],
"Architecture"))
45 || (0 != strcmp(tokens[4],
"file:"))) {
50 vpr_printf(TIO_MESSAGE_ERROR,
"'%s' - Bad filename specification line in placement file.\n", place_file);
53 if (0 != strcmp(tokens[2], arch_file)) {
54 vpr_printf(TIO_MESSAGE_ERROR,
"'%s' - Architecture file that generated placement (%s) does not match current architecture file (%s).\n",
55 place_file, tokens[2], arch_file);
58 if (0 != strcmp(tokens[5], net_file)) {
59 vpr_printf(TIO_MESSAGE_ERROR,
"'%s' - Netlist file that generated placement (%s) does not match current netlist file (%s).\n",
60 place_file, tokens[5], net_file);
72 for (i = 0; i < 7; ++i) {
74 if (NULL == tokens[i]) {
80 if ((0 != strcmp(tokens[0],
"Array"))
81 || (0 != strcmp(tokens[1],
"size:"))
82 || (0 != strcmp(tokens[3],
"x"))
83 || (0 != strcmp(tokens[5],
"logic"))
84 || (0 != strcmp(tokens[6],
"blocks"))) {
89 vpr_printf(TIO_MESSAGE_ERROR,
"'%s' - Bad FPGA size specification line in placement file.\n",
93 if ((
my_atoi(tokens[2]) != L_nx) || (
my_atoi(tokens[4]) != L_ny)) {
94 vpr_printf(TIO_MESSAGE_ERROR,
"'%s' - Current FPGA size (%d x %d) is different from size when placement generated (%d x %d).\n",
105 for (i = 0; i < L_num_blocks; ++i) {
106 if (0 == strcmp(block_list[i].
name, tokens[0])) {
107 cur_blk = (block_list + i);
113 if (NULL == cur_blk) {
114 vpr_printf(TIO_MESSAGE_ERROR,
"'%s':%d - Block in placement file does not exist in netlist.\n",
char ** ReadLineTokens(INOUTP FILE *InFile, INOUTP int *LineNum)
int my_atoi(const char *str)