Skip to content

Commit 4a6e333

Browse files
committed
[vpr][place] move MIN_BLK_PER_COLUMN_EXPAND into the routine
1 parent 96e9cc5 commit 4a6e333

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

vpr/src/place/move_utils.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
//Note: The flag is only effective if compiled with VTR_ENABLE_DEBUG_LOGGING
2020
bool f_placer_breakpoint_reached = false;
2121

22-
constexpr int MIN_NUMBER_OF_BLOCK_PER_COLUMN = 3;
23-
2422
//Accessor for f_placer_breakpoint_reached
2523
bool placer_breakpoint_reached() {
2624
return f_placer_breakpoint_reached;
@@ -979,6 +977,9 @@ bool find_compatible_compressed_loc_in_range(t_logical_block_type_ptr type,
979977
bool block_constrained,
980978
const BlkLocRegistry& blk_loc_registry,
981979
vtr::RngContainer& rng) {
980+
// If the number of blocks in a column is less than this number, we
981+
// will expand the search range to the whole column
982+
constexpr int MIN_BLK_PER_COLUMN_EXPAND = 3;
982983
//TODO For the time being, the blocks only moved in the same layer. This assertion should be removed after VPR is updated to move blocks between layers
983984
VTR_ASSERT(to_layer_num == from_loc.layer_num);
984985
const auto& compressed_block_grid = g_vpr_ctx.placement().compressed_block_grids[type->index];
@@ -1019,7 +1020,7 @@ bool find_compatible_compressed_loc_in_range(t_logical_block_type_ptr type,
10191020
}
10201021
auto y_upper_iter = block_rows.upper_bound(search_range.ymax);
10211022

1022-
if (block_rows.size() < MIN_NUMBER_OF_BLOCK_PER_COLUMN && !block_constrained) {
1023+
if (block_rows.size() < MIN_BLK_PER_COLUMN_EXPAND && !block_constrained) {
10231024
//Fall back to allow the whole y range
10241025
y_lower_iter = block_rows.begin();
10251026
y_upper_iter = block_rows.end();

0 commit comments

Comments
 (0)