Skip to content

Commit b15fcc8

Browse files
litghostacomodi
authored andcommitted
Skip x locations that have no targets.
Signed-off-by: Keith Rothman <[email protected]>
1 parent 35d1036 commit b15fcc8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

vpr/src/place/place.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,9 +2063,11 @@ static bool find_to(t_type_ptr type, float rlim, const t_pl_loc from, t_pl_loc&
20632063
//The candidates are stored in a flat_map so we can efficiently find the set of valid
20642064
//candidates with upper/lower bound.
20652065
auto y_lower_iter = compressed_block_grid.grid[cx_to].lower_bound(min_cy);
2066-
auto y_upper_iter = compressed_block_grid.grid[cx_to].upper_bound(max_cy);
2066+
if (y_lower_iter == compressed_block_grid.grid[cx_to].end()) {
2067+
continue;
2068+
}
20672069

2068-
VTR_ASSERT_MSG(y_lower_iter != compressed_block_grid.grid[cx_to].end(), "Must have at least one block at this x location");
2070+
auto y_upper_iter = compressed_block_grid.grid[cx_to].upper_bound(max_cy);
20692071

20702072
if (y_lower_iter->first > min_cy) {
20712073
//No valid blocks at this x location which are within rlim_y

0 commit comments

Comments
 (0)