File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -415,6 +415,7 @@ static bool find_centroid_neighbor(ClusterBlockId block_id,
415
415
const auto & compressed_block_grid = g_vpr_ctx.placement ().compressed_block_grids [block_type->index ];
416
416
const int num_layers = g_vpr_ctx.device ().grid .get_num_layers ();
417
417
const int centroid_loc_layer_num = centroid_loc.layer ;
418
+ VTR_ASSERT (centroid_loc_layer_num != OPEN);
418
419
419
420
// Determine centroid location in the compressed space of the current block
420
421
auto compressed_centroid_loc = get_compressed_loc_approx (compressed_block_grid,
@@ -424,8 +425,12 @@ static bool find_centroid_neighbor(ClusterBlockId block_id,
424
425
// If no compressed location can be found on this layer, return false.
425
426
// TODO: Maybe search in the layers above or below.
426
427
const t_physical_tile_loc& compressed_loc_on_layer = compressed_centroid_loc[centroid_loc.layer ];
427
- if (compressed_loc_on_layer.x == OPEN && compressed_loc_on_layer.y == OPEN && compressed_loc_on_layer.layer_num == OPEN)
428
+ if (compressed_loc_on_layer.x == OPEN || compressed_loc_on_layer.y == OPEN) {
429
+ VTR_ASSERT_MSG (compressed_loc_on_layer.x == OPEN && compressed_loc_on_layer.y == OPEN,
430
+ " When searching for a compressed location, and a location cannot be found "
431
+ " both x and y should be OPEN." );
428
432
return false ;
433
+ }
429
434
430
435
// range limit (rlim) set a limit for the neighbor search in the centroid placement
431
436
// the neighbor location should be within the defined range to calculated centroid location
Original file line number Diff line number Diff line change @@ -855,8 +855,12 @@ bool find_to_loc_centroid(t_logical_block_type_ptr blk_type,
855
855
// If no compressed location can be found on this layer, return false.
856
856
// TODO: Maybe search in the layers above or below.
857
857
const t_physical_tile_loc& compressed_loc_on_layer = centroid_compressed_loc[to_layer_num];
858
- if (compressed_loc_on_layer.x == OPEN && compressed_loc_on_layer.y == OPEN && compressed_loc_on_layer.layer_num == OPEN)
858
+ if (compressed_loc_on_layer.x == OPEN || compressed_loc_on_layer.y == OPEN) {
859
+ VTR_ASSERT_MSG (compressed_loc_on_layer.x == OPEN && compressed_loc_on_layer.y == OPEN,
860
+ " When searching for a compressed location, and a location cannot be found "
861
+ " both x and y should be OPEN." );
859
862
return false ;
863
+ }
860
864
861
865
// Determine the valid compressed grid location ranges
862
866
int delta_cx;
You can’t perform that action at this time.
0 commit comments