Skip to content

Commit 377aed4

Browse files
committed
[log] fix printing location for 3d loc
1 parent 792c276 commit 377aed4

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

vpr/src/base/read_route.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,9 @@ static void process_global_blocks(const Netlist<>& net_list, std::ifstream& fp,
459459

460460
if (block_loc.loc.x != x || block_loc.loc.y != y) {
461461
vpr_throw(VPR_ERROR_ROUTE, filename, lineno,
462-
"The placement coordinates (%d,%d,%d) of %d block does not match given (%d,%d,%d)",
463-
layer_num, x, y,
464-
block_loc.loc.layer, block_loc.loc.x, block_loc.loc.y);
462+
"The placement coordinates (%d,%d,%d) of %zu block does not match given (%d,%d,%d)",
463+
x, y, layer_num, size_t(bnum),
464+
block_loc.loc.x, block_loc.loc.y, block_loc.loc.layer);
465465
}
466466

467467
auto pin_class = get_class_range_for_block(bnum, is_flat);
@@ -598,12 +598,12 @@ void print_route(const Netlist<>& net_list,
598598
int layer_num = rr_graph.node_layer(inode);
599599

600600
fprintf(fp, "Node:\t%zu\t%6s (%d,%d,%d) ", size_t(inode),
601-
rr_graph.node_type_string(inode), layer_num, ilow, jlow);
601+
rr_graph.node_type_string(inode), ilow, jlow, layer_num);
602602

603603
if ((ilow != rr_graph.node_xhigh(inode))
604604
|| (jlow != rr_graph.node_yhigh(inode)))
605-
fprintf(fp, "to (%d,%d,%d) ", layer_num, rr_graph.node_xhigh(inode),
606-
rr_graph.node_yhigh(inode));
605+
fprintf(fp, "to (%d,%d,%d) ", rr_graph.node_xhigh(inode),
606+
rr_graph.node_yhigh(inode), layer_num);
607607

608608
switch (rr_type) {
609609
case IPIN:
@@ -689,9 +689,9 @@ void print_route(const Netlist<>& net_list,
689689
fprintf(fp, "Block %s (#%zu) at (%d,%d,%d), Pin class %d.\n",
690690
net_list.block_name(block_id).c_str(),
691691
size_t(block_id),
692-
blk_loc.loc.layer,
693692
blk_loc.loc.x,
694693
blk_loc.loc.y,
694+
blk_loc.loc.layer,
695695
iclass);
696696
}
697697
}

vpr/src/place/place.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,14 +2101,15 @@ static int check_block_placement_consistency() {
21012101
|| !is_sub_tile_compatible(physical_tile, logical_block,
21022102
loc.sub_tile)) {
21032103
VTR_LOG_ERROR(
2104-
"Block %zu's location is (%d,%d,%d) but found in grid at (%zu,%zu,%d,%d).\n",
2104+
"Block %zu's location is (%d,%d,%d,%d) but found in grid at (%d,%d,%d,%d).\n",
21052105
size_t(bnum),
21062106
loc.x,
21072107
loc.y,
21082108
loc.sub_tile,
2109-
tile_loc.x,
2110-
tile_loc.y,
2111-
tile_loc.layer_num,
2109+
loc.layer,
2110+
i,
2111+
j,
2112+
k,
21122113
layer_num);
21132114
error++;
21142115
}

0 commit comments

Comments
 (0)