[vpr] fixed a bug when parsing instances
@@ -914,7 +914,7 @@ static std::pair<int, int> ProcessInstanceString(pugi::xml_node Locations,
if (token.type != TOKEN_INT) {
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
- "No integer to indicate least significant pin index: %s\n", pin_loc_string);
+ "No integer to indicate least significant instance index: %s\n", pin_loc_string);
}
first_inst = vtr::atoi(token.data);
@@ -933,7 +933,7 @@ static std::pair<int, int> ProcessInstanceString(pugi::xml_node Locations,
if (token_index != num_tokens) {
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
- "pin location should be completed, but more tokens are present: %s\n", pin_loc_string);
+ "instance of pin location should be completed, but more tokens are present: %s\n", pin_loc_string);
}
freeTokens(tokens, num_tokens);
@@ -945,7 +945,7 @@ static std::pair<int, int> ProcessInstanceString(pugi::xml_node Locations,
if (token.type != TOKEN_INT) {
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
- "No integer to indicate most significant pin index: %s\n", pin_loc_string);
+ "No integer to indicate most significant instance index: %s\n", pin_loc_string);
}
last_inst = vtr::atoi(token.data);
@@ -958,13 +958,6 @@ static std::pair<int, int> ProcessInstanceString(pugi::xml_node Locations,
"No closed square bracket: %s\n", pin_loc_string);
}
- token_index++;
-
- if (token_index != num_tokens) {
- archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
- "pin location should be completed, but more tokens are present: %s\n", pin_loc_string);
- }
-
if (first_inst > last_inst) {
std::swap(first_inst, last_inst);
}
