Skip to content

Commit c8506c7

Browse files
committed
[vpr] apply PR comments
1 parent 46b0700 commit c8506c7

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

vpr/src/place/centroid_move_generator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ e_create_move CentroidMoveGenerator::propose_move(t_pl_blocks_to_be_moved& block
3838
/* Calculate the centroid location*/
3939
calculate_centroid_loc(b_from, false, centroid, nullptr);
4040

41-
// Centroid location is not necessarily a valid location, and the downstream location expect a valid
41+
// Centroid location is not necessarily a valid location, and the downstream location expects a valid
4242
// layer for the centroid location. So if the layer is not valid, we set it to the same layer as from loc.
4343
centroid.layer = (centroid.layer < 0) ? from.layer : centroid.layer;
4444
/* Find a location near the weighted centroid_loc */

vpr/src/place/place.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2928,8 +2928,8 @@ static void get_bb_from_scratch(ClusterNetId net_id,
29282928
coords.ymax = ymax;
29292929
coords.layer_min = layer_min;
29302930
coords.layer_max = layer_max;
2931-
VTR_ASSERT(layer_min >= 0 && layer_min < device_ctx.grid.get_num_layers());
2932-
VTR_ASSERT(layer_max >= 0 && layer_max < device_ctx.grid.get_num_layers());
2931+
VTR_ASSERT_DEBUG(layer_min >= 0 && layer_min < device_ctx.grid.get_num_layers());
2932+
VTR_ASSERT_DEBUG(layer_max >= 0 && layer_max < device_ctx.grid.get_num_layers());
29332933

29342934

29352935
num_on_edges.xmin = xmin_edge;

vpr/src/place/placer_context.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ struct PlacerMoveContext : public Context {
111111

112112
// Scratch vectors that are used by different directed moves for temporary calculations (allocated here to save runtime)
113113
// These vectors will grow up with the net size as it is mostly used to save coords of the net pins or net bb edges
114+
// Given that placement moves involve operations on each coordinate independently, we chose to
115+
// utilize a Struct of Arrays (SoA) rather than an Array of Struct (AoS).
114116
std::vector<int> X_coord;
115117
std::vector<int> Y_coord;
116118
std::vector<int> layer_coord;

0 commit comments

Comments
 (0)