diff --git a/vpr/src/base/region.cpp b/vpr/src/base/region.cpp index bc3f321b34f..7cc6280626b 100644 --- a/vpr/src/base/region.cpp +++ b/vpr/src/base/region.cpp @@ -123,7 +123,7 @@ Region intersection(const Region& r1, const Region& r2) { return intersect; } - // subtile are not compatible + // subtiles are not compatible return {}; } diff --git a/vpr/src/base/vpr_constraints_serializer.h b/vpr/src/base/vpr_constraints_serializer.h index 09b88ea6b68..9cfd47829c2 100644 --- a/vpr/src/base/vpr_constraints_serializer.h +++ b/vpr/src/base/vpr_constraints_serializer.h @@ -291,7 +291,7 @@ class VprConstraintsSerializer final : public uxsd::VprConstraintsBaseoperator()("The specified region is empty."); } } - + loaded_part_region.add_to_part_region(loaded_region); Region clear_region; diff --git a/vpr/src/pack/constraints_report.cpp b/vpr/src/pack/constraints_report.cpp index a6e7711ba69..a443e04bb56 100644 --- a/vpr/src/pack/constraints_report.cpp +++ b/vpr/src/pack/constraints_report.cpp @@ -1,6 +1,5 @@ #include "constraints_report.h" -//To-do: alter this routine to check whether whole PartitionRegions are full instead of individual Regions bool floorplan_constraints_regions_overfull() { GridTileLookup grid_tiles; diff --git a/vpr/src/pack/constraints_report.h b/vpr/src/pack/constraints_report.h index c41107f8c78..46af3fa83db 100644 --- a/vpr/src/pack/constraints_report.h +++ b/vpr/src/pack/constraints_report.h @@ -9,12 +9,23 @@ #include "grid_tile_lookup.h" #include "place_constraints.h" -/* - * Check if any constraints regions are overfull, - * i.e. the region contains more clusters of a certain type - * than it has room for. - * If the region is overfull, a message is printed saying which - * region is overfull, and by how many clusters. +/** + * @brief Check if any constraint partition regions are overfull, + * i.e. the partition contains more clusters of a certain type + * than it has room for. If the region is overfull, a message is + * printed saying which partition is overfull, and by how many clusters. + * + * To reduce the complexity of this function, several assumptions are made. + * 1) Regions of a partition do not overlap, meaning that the capacity of each + * partition for accommodating blocks of a specific type can be calculated by + * accumulating the capacity of its regions. + * 2) Partitions do not overlap. This means that each physical tile is in at most + * one partition. + * + * VPR can still work if these assumptions do not hold true, but for tight overlapping + * partitions, the placement engine may fail to find a legal placement. + * + * @return True if there is at least one overfull partition. */ bool floorplan_constraints_regions_overfull(); diff --git a/vpr/src/place/grid_tile_lookup.h b/vpr/src/place/grid_tile_lookup.h index 63b99fb55a6..66d9d372db3 100644 --- a/vpr/src/place/grid_tile_lookup.h +++ b/vpr/src/place/grid_tile_lookup.h @@ -69,12 +69,13 @@ class GridTileLookup { void fill_type_matrix(t_logical_block_type_ptr block_type, vtr::NdMatrix& type_count); /** - * @brief Stores the cumulative total of subtiles available at each location in the grid for each block type. + * @brief Stores the cumulative total of subtiles available at each (x, y) location in each layer + * for all block types. * * Therefore, the length of the vector will be the number of logical block types. To access the cumulative - * number of subtiles at a location, you would use block_type_matrices[iblock_type][x][y] - this would - * give the number of placement locations that are at, or above and to the right of the given [x,y] for - * the given block type. + * number of subtiles at a location in a specific layer, you would use block_type_matrices[iblock_type][layer][x][y]. + * This would give the number of placement locations that are at, or above (larger y) and to the right of the given [x,y] for + * the given block type in the given layer. */ std::vector> block_type_matrices;