Skip to content

Commit 68e489f

Browse files
add comments for use_ts arguments
1 parent 8bf5d2d commit 68e489f

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

vpr/src/place/net_cost_handler.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,9 @@ void NetCostHandler::get_non_updatable_cube_bb_(ClusterNetId net_id, bool use_ts
505505
const auto& block_locs = placer_state_.block_locs();
506506
auto& move_ctx = placer_state_.mutable_move();
507507

508+
// the bounding box coordinates that is going to be updated by this function
508509
t_bb& bb_coord_new = use_ts ? ts_bb_coord_new_[net_id] : move_ctx.bb_coords[net_id];
510+
// the number of sink pins of "net_id" on each layer
509511
vtr::NdMatrixProxy<int, 1> num_sink_pin_layer = use_ts ? ts_layer_sink_pin_count_[size_t(net_id)] : move_ctx.num_sink_pin_layer[size_t(net_id)];
510512

511513
ClusterBlockId bnum = cluster_ctx.clb_nlist.net_driver_block(net_id);
@@ -1482,6 +1484,8 @@ double NetCostHandler::get_net_cube_bb_cost_(ClusterNetId net_id, bool use_ts) {
14821484

14831485
double NetCostHandler::get_net_per_layer_bb_cost_(ClusterNetId net_id , bool use_ts) {
14841486
const auto& move_ctx = placer_state_.move();
1487+
1488+
// Per-layer bounding box of the net
14851489
const std::vector<t_2D_bb>& bb = use_ts ? layer_ts_bb_coord_new_[net_id] : move_ctx.layer_bb_coords[net_id];
14861490
const vtr::NdMatrixProxy<int, 1> layer_pin_sink_count = use_ts ? ts_layer_sink_pin_count_[size_t(net_id)] : move_ctx.num_sink_pin_layer[size_t(net_id)];
14871491

vpr/src/place/net_cost_handler.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,22 +283,22 @@ class NetCostHandler {
283283
void set_ts_edge_(const ClusterNetId net_id);
284284

285285
/**
286-
* @brief Calculate the 3D bounding box of "net_id" from scratch (based on the block locations stored in place_ctx) and
287-
* store them in bb_coord_new
286+
* @brief Calculate the 3D bounding box of "net_id" from scratch (based on the block locations
287+
* stored in placer_state_.blk_loc_registry) and store them in bb_coord_new
288288
* @param net_id ID of the net for which the bounding box is requested
289-
* @param bb_coord_new Computed by this function and returned by reference.
290-
* @param num_sink_pin_layer Store the number of sink pins of "net_id" on each layer
289+
* @param use_ts Specifies whether the `ts` bounding box is updated or
290+
* the one stored in placer_state_
291291
*/
292292
void get_non_updatable_cube_bb_(ClusterNetId net_id, bool use_ts);
293293

294294
/**
295295
* @brief Calculate the per-layer bounding box of "net_id" from scratch (based on the block locations stored in place_ctx) and
296296
* store them in bb_coord_new
297297
* @param net_id ID of the net for which the bounding box is requested
298-
* @param bb_coord_new Computed by this function and returned by reference.
299-
* @param num_sink_layer Store the number of sink pins of "net_id" on each layer
298+
* @param use_ts Specifies whether the `ts` bounding box is updated or
299+
* the one stored in placer_state_
300300
*/
301-
void get_non_updatable_per_layer_bb_(ClusterNetId net_id, bool use_sink);
301+
void get_non_updatable_per_layer_bb_(ClusterNetId net_id, bool use_ts);
302302

303303
/**
304304
* @brief Calculate the 3D BB of a large net from scratch and update coord, edge, and num_sink_pin_layer data structures.
@@ -478,7 +478,8 @@ class NetCostHandler {
478478
* @brief Given the per-layer BB, calculate the wire-length cost of the net on each layer
479479
* and return the sum of the costs
480480
* @param net_id ID of the net which cost is requested. Currently unused
481-
* @param bb Per-layer bounding box of the net
481+
* @param use_ts Specifies whether the 'ts` bounding box is used to compute the
482+
* cost or the one stored in placer_state_
482483
* @return Wirelength cost of the net
483484
*/
484485
double get_net_per_layer_bb_cost_(ClusterNetId net_id, bool use_ts);

0 commit comments

Comments
 (0)