Skip to content

Commit 778f336

Browse files
committed
[vpr][placement] comment on median move generator
1 parent c8506c7 commit 778f336

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

vpr/src/place/median_move_generator.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ e_create_move MedianMoveGenerator::propose_move(t_pl_blocks_to_be_moved& blocks_
117117
} else {
118118
layer_new = net_bb_coords.layer_min;
119119
}
120-
120+
121+
// If the mvoing block is on the border of the bounding box, we cannot get
122+
// the bounding box incrementatlly. In that case, bounding box should be calculated
123+
// from scratch.
121124
if (!get_bb_incrementally(net_id,
122125
coords,
123126
xold,
@@ -324,6 +327,12 @@ static bool get_bb_incrementally(ClusterNetId net_id,
324327
t_bb union_bb_edge;
325328
t_bb union_bb;
326329
const bool& cube_bb = g_vpr_ctx.placement().cube_bb;
330+
/* Calculating per-layer bounding box is more time consuming compared to cube bounding box. To speed up
331+
* this move, the bounding box used for this move is of the type cube bounding box even if the per-layer
332+
* bounding box is used by placement SA engine.
333+
* If per-layer bounding box is used, we take a union of boundinx boxes on each layer to make a cube bounding box.
334+
* For example, the xmax of this cube boundix box is determined by the maximim x coordinate across all blocks on all layers.
335+
*/
327336
if (!cube_bb) {
328337
std::tie(union_bb_edge, union_bb) = union_2d_bb_incr(place_move_ctx.layer_bb_num_on_edges[net_id],
329338
place_move_ctx.layer_bb_coords[net_id]);

0 commit comments

Comments
 (0)