Skip to content

Commit cc2e0c7

Browse files
fix echo_compressed_grids
echo_compressed_grids() only printed the first element in each compressed grid axis 3D support added a new dimension to each compressed grid axis. This new dimension was not indexed properly in echo_compressed_grids()
1 parent 88b3970 commit cc2e0c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vpr/src/place/compressed_grid.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,14 @@ void echo_compressed_grids(const char* filename, const std::vector<t_compressed_
182182
fprintf(fp, "\n\nGrid type: %s \n", device_ctx.logical_block_types[i].name);
183183

184184
fprintf(fp, "X coordinates: \n");
185-
for (int j = 0; j < (int)comp_grids[i].compressed_to_grid_x.size(); j++) {
185+
for (int j = 0; j < (int)comp_grids[i].compressed_to_grid_x[layer_num].size(); j++) {
186186
auto grid_loc = comp_grids[i].compressed_loc_to_grid_loc({j, 0, layer_num});
187187
fprintf(fp, "%d ", grid_loc.x);
188188
}
189189
fprintf(fp, "\n");
190190

191191
fprintf(fp, "Y coordinates: \n");
192-
for (int k = 0; k < (int)comp_grids[i].compressed_to_grid_y.size(); k++) {
192+
for (int k = 0; k < (int)comp_grids[i].compressed_to_grid_y[layer_num].size(); k++) {
193193
auto grid_loc = comp_grids[i].compressed_loc_to_grid_loc({0, k, layer_num});
194194
fprintf(fp, "%d ", grid_loc.y);
195195
}

0 commit comments

Comments
 (0)