Skip to content

Commit ea6464e

Browse files
add comments
1 parent c74ca63 commit ea6464e

File tree

5 files changed

+24
-13
lines changed

5 files changed

+24
-13
lines changed

vpr/src/base/region.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Region intersection(const Region& r1, const Region& r2) {
123123
return intersect;
124124
}
125125

126-
// subtile are not compatible
126+
// subtiles are not compatible
127127
return {};
128128
}
129129

vpr/src/base/vpr_constraints_serializer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ class VprConstraintsSerializer final : public uxsd::VprConstraintsBase<VprConstr
291291
report_error_->operator()("The specified region is empty.");
292292
}
293293
}
294-
294+
295295
loaded_part_region.add_to_part_region(loaded_region);
296296

297297
Region clear_region;

vpr/src/pack/constraints_report.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "constraints_report.h"
22

3-
//To-do: alter this routine to check whether whole PartitionRegions are full instead of individual Regions
43
bool floorplan_constraints_regions_overfull() {
54
GridTileLookup grid_tiles;
65

vpr/src/pack/constraints_report.h

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,23 @@
99
#include "grid_tile_lookup.h"
1010
#include "place_constraints.h"
1111

12-
/*
13-
* Check if any constraints regions are overfull,
14-
* i.e. the region contains more clusters of a certain type
15-
* than it has room for.
16-
* If the region is overfull, a message is printed saying which
17-
* region is overfull, and by how many clusters.
12+
/**
13+
* @brief Check if any constraint partition regions are overfull,
14+
* i.e. the partition contains more clusters of a certain type
15+
* than it has room for. If the region is overfull, a message is
16+
* printed saying which partition is overfull, and by how many clusters.
17+
*
18+
* To reduce the complexity of this function, several assumptions are made.
19+
* 1) Regions of a partition do not overlap, meaning that the capacity of each
20+
* partition for accommodating blocks of a specific type can be calculated by
21+
* accumulating the capacity of its regions.
22+
* 2) Partitions do not overlap. This means that each physical tile is in at most
23+
* one partition.
24+
*
25+
* VPR can still work if these assumptions do not hold true, but for tight overlapping
26+
* partitions, the placement engine may fail to find a legal placement.
27+
*
28+
* @return True if there is at least one overfull partition.
1829
*/
1930
bool floorplan_constraints_regions_overfull();
2031

vpr/src/place/grid_tile_lookup.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,13 @@ class GridTileLookup {
6969
void fill_type_matrix(t_logical_block_type_ptr block_type, vtr::NdMatrix<int, 3>& type_count);
7070

7171
/**
72-
* @brief Stores the cumulative total of subtiles available at each location in the grid for each block type.
72+
* @brief Stores the cumulative total of subtiles available at each (x, y) location in each layer
73+
* for all block types.
7374
*
7475
* Therefore, the length of the vector will be the number of logical block types. To access the cumulative
75-
* number of subtiles at a location, you would use block_type_matrices[iblock_type][x][y] - this would
76-
* give the number of placement locations that are at, or above and to the right of the given [x,y] for
77-
* the given block type.
76+
* number of subtiles at a location in a specific layer, you would use block_type_matrices[iblock_type][layer][x][y].
77+
* 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
78+
* the given block type in the given layer.
7879
*/
7980
std::vector<vtr::NdMatrix<int, 3>> block_type_matrices;
8081

0 commit comments

Comments
 (0)