@@ -66,7 +66,6 @@ static void update_noc_reachability_partitions(const std::vector<AtomBlockId>& n
66
66
const auto & atom_ctx = g_vpr_ctx.atom ();
67
67
auto & constraints = g_vpr_ctx.mutable_floorplanning ().constraints ;
68
68
const auto & high_fanout_thresholds = g_vpr_ctx.cl_helper ().high_fanout_thresholds ;
69
- const auto & device_ctx = g_vpr_ctx.device ();
70
69
71
70
const size_t high_fanout_threshold = high_fanout_thresholds.get_threshold (" " );
72
71
@@ -79,9 +78,9 @@ static void update_noc_reachability_partitions(const std::vector<AtomBlockId>& n
79
78
80
79
RegionRectCoord unconstrained_rect{0 ,
81
80
0 ,
82
- ( int )device_ctx. grid . width () - 1 ,
83
- ( int )device_ctx. grid . height () - 1 ,
84
- - 1 };
81
+ std::numeric_limits< int >:: max () ,
82
+ std::numeric_limits< int >:: max () ,
83
+ 0 };
85
84
Region unconstrained_region;
86
85
unconstrained_region.set_region_rect (unconstrained_rect);
87
86
@@ -128,7 +127,6 @@ static void update_noc_reachability_partitions(const std::vector<AtomBlockId>& n
128
127
} else {
129
128
auto & atom_partition = constraints.get_mutable_partition (atom_partition_id);
130
129
auto & atom_partition_region = atom_partition.get_mutable_part_region ();
131
- // std::cout << "ss" << atom_partition_region.get_exclusivity_index() << std::endl;
132
130
VTR_ASSERT (atom_partition_region.get_exclusivity_index () < 0 || current_atom == noc_atom_id);
133
131
atom_partition_region.set_exclusivity_index (exclusivity_cnt);
134
132
}
@@ -253,6 +251,7 @@ bool try_pack(t_packer_opts* packer_opts,
253
251
int pack_iteration = 1 ;
254
252
bool floorplan_regions_overfull = false ;
255
253
254
+ auto constraints_backup = g_vpr_ctx.floorplanning ().constraints ;
256
255
// find all NoC router atoms
257
256
auto noc_atoms = find_noc_router_atoms ();
258
257
update_noc_reachability_partitions (noc_atoms);
@@ -398,6 +397,21 @@ bool try_pack(t_packer_opts* packer_opts,
398
397
// check clustering and output it
399
398
check_and_output_clustering (*packer_opts, is_clock, arch, helper_ctx.total_clb_num , clustering_data.intra_lb_routing );
400
399
400
+
401
+ g_vpr_ctx.mutable_floorplanning ().constraints = constraints_backup;
402
+ const int max_y = (int )g_vpr_ctx.device ().grid .height ();
403
+ const int max_x = (int )g_vpr_ctx.device ().grid .width ();
404
+ for (auto & cluster_partition_region : g_vpr_ctx.mutable_floorplanning ().cluster_constraints ) {
405
+ const auto & regions = cluster_partition_region.get_regions ();
406
+ if (regions.size () == 1 ) {
407
+ const auto rect = regions[0 ].get_region_rect ();
408
+
409
+ if (rect.xmin <= 0 && rect.ymin <= 0 && rect.xmax >= max_x && rect.ymax >= max_y) {
410
+ cluster_partition_region = PartitionRegion ();
411
+ }
412
+ }
413
+ }
414
+
401
415
// Free Data Structures
402
416
free_clustering_data (*packer_opts, clustering_data);
403
417
0 commit comments