Skip to content

Commit

Permalink
debug init_blk_types_empty_locations
Browse files Browse the repository at this point in the history
  • Loading branch information
amin1377 committed Mar 8, 2023
1 parent e8780d3 commit a008f8b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions vpr/src/place/initial_placement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ static int get_blk_type_first_loc(t_pl_loc& loc, t_pl_macro pl_macro, std::vecto
static std::vector<t_grid_empty_locs_block_type> init_blk_types_empty_locations(int block_type_index) {
const auto& compressed_block_grid = g_vpr_ctx.placement().compressed_block_grids[block_type_index];
const auto& device_ctx = g_vpr_ctx.device();
const auto& grid = device_ctx.grid;

//create a vector to store all columns containing block_type_index with their lowest y and number of remaining blocks
std::vector<t_grid_empty_locs_block_type> block_type_empty_locs;
Expand All @@ -525,9 +526,12 @@ static std::vector<t_grid_empty_locs_block_type> init_blk_types_empty_locations(
//traverse all column and store their empty locations in block_type_empty_locs
for (int x_loc = min_cx; x_loc <= max_cx; x_loc++) {
t_grid_empty_locs_block_type empty_loc;
empty_loc.first_avail_loc.x = compressed_block_grid.grid[x_loc].at(0).x;
empty_loc.first_avail_loc.y = compressed_block_grid.grid[x_loc].at(0).y;
empty_loc.first_avail_loc.sub_tile = 0;
auto first_avail_loc = compressed_block_grid.grid[x_loc].begin()->second;
empty_loc.first_avail_loc.x = first_avail_loc.x;
empty_loc.first_avail_loc.y = first_avail_loc.y;
const auto& physical_type = grid[first_avail_loc.x][first_avail_loc.y].type;
const auto& compatible_sub_tiles = compressed_block_grid.compatible_sub_tiles_for_tile.at(physical_type->index);
empty_loc.first_avail_loc.sub_tile = *std::min_element(compatible_sub_tiles.begin(), compatible_sub_tiles.end());
empty_loc.num_of_empty_locs_in_y_axis = compressed_block_grid.grid[x_loc].size();
block_type_empty_locs.push_back(empty_loc);
}
Expand Down

0 comments on commit a008f8b

Please sign in to comment.