Skip to content

Commit e32f037

Browse files
bugfix: consider the last layer when constructing GridTileLookup
1 parent aeb4612 commit e32f037

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vpr/src/place/grid_tile_lookup.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ int GridTileLookup::region_tile_count(const Region& reg, t_logical_block_type_pt
9191
// VTR_ASSERT(intersect_coord.layer_num == layer_num);
9292

9393
const auto [xmin, ymin, xmax, ymax] = intersect_rect.coordinates();
94-
auto [layer_low, layer_high] = intersect_reg.get_region_bounds().get_layer_range();
94+
const auto [layer_low, layer_high] = intersect_reg.get_region_bounds().get_layer_range();
9595
auto& layer_type_grid = block_type_matrices[block_type->index];
9696

9797
int xdim = (int)layer_type_grid.dim_size(1);
@@ -100,7 +100,7 @@ int GridTileLookup::region_tile_count(const Region& reg, t_logical_block_type_pt
100100
int num_tiles = 0;
101101

102102
if (subtile == NO_SUBTILE) {
103-
for (int l = layer_low; l < layer_high; l++) {
103+
for (int l = layer_low; l <= layer_high; l++) {
104104
int num_tiles_in_layer = layer_type_grid[l][xmin][ymin];
105105

106106
if ((ymax + 1) < ydim) {

0 commit comments

Comments
 (0)