Skip to content

Commit df05ed8

Browse files
gatecatkmurray
authored andcommitted
Improve error reporting in rr_graph_reader
Signed-off-by: David Shah <[email protected]>
1 parent 53e7530 commit df05ed8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

vpr/src/route/rr_graph_reader.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -477,16 +477,17 @@ void verify_grid(pugi::xml_node parent, const pugiutil::loc_data & loc_data, con
477477

478478
if (grid_tile.type->index != get_attribute(grid_node, "block_type_id", loc_data).as_float(0)) {
479479
vpr_throw(VPR_ERROR_OTHER, __FILE__, __LINE__,
480-
"Architecture file does not match RR graph's block_type_id");
480+
"Architecture file does not match RR graph's block_type_id at (%d, %d): arch used ID %d, RR graph used ID %d.", x, y,
481+
(grid_tile.type->index), (int)get_attribute(grid_node, "block_type_id", loc_data).as_float(0));
481482
}
482483
if (grid_tile.width_offset != get_attribute(grid_node, "width_offset", loc_data).as_float(0)) {
483484
vpr_throw(VPR_ERROR_OTHER, __FILE__, __LINE__,
484-
"Architecture file does not match RR graph's width_offset");
485+
"Architecture file does not match RR graph's width_offset at (%d, %d)", x, y);
485486
}
486487

487488
if (grid_tile.height_offset != get_attribute(grid_node, "height_offset", loc_data).as_float(0)) {
488489
vpr_throw(VPR_ERROR_OTHER, __FILE__, __LINE__,
489-
"Architecture file does not match RR graph's height_offset");
490+
"Architecture file does not match RR graph's height_offset at (%d, %d)", x, y);
490491
}
491492
grid_node = grid_node.next_sibling(grid_node.name());
492493
}
@@ -508,7 +509,7 @@ void verify_blocks(pugi::xml_node parent, const pugiutil::loc_data & loc_data) {
508509

509510
if (strcmp(block_info.name, name) != 0) {
510511
vpr_throw(VPR_ERROR_OTHER, __FILE__, __LINE__,
511-
"Architecture file does not match RR graph's block name");
512+
"Architecture file does not match RR graph's block name: arch uses name %s, RR graph uses name %s", block_info.name, name);
512513
}
513514

514515
if (block_info.width != get_attribute(Block, "width", loc_data).as_float(0)) {
@@ -577,7 +578,7 @@ void verify_segments(pugi::xml_node parent, const pugiutil::loc_data & loc_data,
577578
const char* name = get_attribute(Segment, "name", loc_data).as_string();
578579
if (strcmp(segment_inf[segNum].name, name) != 0) {
579580
vpr_throw(VPR_ERROR_OTHER, __FILE__, __LINE__,
580-
"Architecture file does not match RR graph's segment name");
581+
"Architecture file does not match RR graph's segment name: arch uses %s, RR graph uses %s", segment_inf[segNum].name, name);
581582
}
582583

583584
subnode = get_single_child(parent, "timing", loc_data, OPTIONAL);

0 commit comments

Comments
 (0)