@@ -1265,27 +1265,9 @@ bool intersect_range_limit_with_floorplan_constraints(t_logical_block_type_ptr t
1265
1265
t_bb& search_range,
1266
1266
int & delta_cx,
1267
1267
int layer_num) {
1268
- // Retrieve the compressed block grid for this block type
1269
- const auto & compressed_block_grid = g_vpr_ctx.placement ().compressed_block_grids [type->index ];
1270
-
1271
- auto min_grid_loc = compressed_block_grid.compressed_loc_to_grid_loc ({search_range.xmin ,
1272
- search_range.ymin ,
1273
- layer_num});
1274
-
1275
- auto max_grid_loc = compressed_block_grid.compressed_loc_to_grid_loc ({search_range.xmax ,
1276
- search_range.ymax ,
1277
- layer_num});
1278
-
1279
- Region range_reg;
1280
- range_reg.set_region_rect ({min_grid_loc.x ,
1281
- min_grid_loc.y ,
1282
- max_grid_loc.x ,
1283
- max_grid_loc.y ,
1284
- layer_num});
1285
-
1286
1268
const auto & floorplanning_ctx = g_vpr_ctx.floorplanning ();
1287
1269
1288
- const PartitionRegion& pr = floorplanning_ctx.cluster_constraints [b_from];
1270
+ const PartitionRegion& pr = floorplanning_ctx.compressed_cluster_constraints [b_from];
1289
1271
const std::vector<Region>& regions = pr.get_regions ();
1290
1272
Region intersect_reg;
1291
1273
/*
@@ -1296,22 +1278,27 @@ bool intersect_range_limit_with_floorplan_constraints(t_logical_block_type_ptr t
1296
1278
* complicated case to get correct functionality during place moves.
1297
1279
*/
1298
1280
if (regions.size () == 1 ) {
1281
+ Region range_reg;
1282
+ range_reg.set_region_rect ({search_range.xmin , search_range.ymin ,
1283
+ search_range.xmax , search_range.ymax ,
1284
+ layer_num});
1285
+
1299
1286
intersect_reg = intersection (regions[0 ], range_reg);
1300
1287
1301
1288
if (intersect_reg.empty ()) {
1302
- VTR_LOGV_DEBUG (g_vpr_ctx.placement ().f_placer_debug , " \t Couldn't find an intersection between floorplan constraints and search region\n " );
1289
+ VTR_LOGV_DEBUG (g_vpr_ctx.placement ().f_placer_debug ,
1290
+ " \t Couldn't find an intersection between floorplan constraints and search region\n " );
1303
1291
return false ;
1304
1292
} else {
1305
1293
const auto intersect_coord = intersect_reg.get_region_rect ();
1306
1294
VTR_ASSERT (intersect_coord.layer_num == layer_num);
1307
- auto min_compressed_loc = compressed_block_grid.grid_loc_to_compressed_loc_approx ({intersect_coord.xmin ,
1308
- intersect_coord.ymin ,
1309
- layer_num});
1310
-
1311
- auto max_compressed_loc = compressed_block_grid.grid_loc_to_compressed_loc_approx ({intersect_coord.xmax ,
1312
- intersect_coord.ymax ,
1313
- layer_num});
1314
- delta_cx = max_compressed_loc.x - min_compressed_loc.x ;
1295
+
1296
+ delta_cx = intersect_coord.xmax - intersect_coord.xmin ;
1297
+ search_range.xmin = intersect_coord.xmin ;
1298
+ search_range.ymin = intersect_coord.ymin ;
1299
+ search_range.xmax = intersect_coord.xmax ;
1300
+ search_range.ymax = intersect_coord.ymax ;
1301
+ search_range.layer_max = search_range.layer_min = layer_num;
1315
1302
}
1316
1303
}
1317
1304
0 commit comments