Skip to content

Commit 7537c27

Browse files
committed
[vpr][place] remove block comment sysntax
1 parent 7ae2112 commit 7537c27

File tree

2 files changed

+43
-36
lines changed

2 files changed

+43
-36
lines changed

vpr/src/place/net_cost_handler.cpp

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,29 @@
99
using std::max;
1010
using std::min;
1111

12-
/* Flags for the states of the bounding box. *
13-
* Stored as char for memory efficiency. */
14-
12+
/**
13+
* @brief for the states of the bounding box.
14+
* Stored as char for memory efficiency.
15+
*/
1516
enum class NetUpdateState {
1617
NOT_UPDATED_YET,
1718
UPDATED_ONCE,
1819
GOT_FROM_SCRATCH
1920
};
2021

21-
/* This defines the error tolerance for floating points variables used in *
22-
* cost computation. 0.01 means that there is a 1% error tolerance. */
22+
/**
23+
* @brief The error tolerance due to round off for the total cost computation.
24+
* When we check it from scratch vs. incrementally. 0.01 means that there is a 1% error tolerance.
25+
*/
2326
#define ERROR_TOL .01
2427

25-
/* Expected crossing counts for nets with different #'s of pins. From *
26-
* ICCAD 94 pp. 690 - 695 (with linear interpolation applied by me). *
27-
* Multiplied to bounding box of a net to better estimate wire length *
28-
* for higher fanout nets. Each entry is the correction factor for the *
29-
* fanout index-1 */
28+
/**
29+
* @brief Crossing counts for nets with different #'s of pins. From
30+
* ICCAD 94 pp. 690 - 695 (with linear interpolation applied by me).
31+
* Multiplied to bounding box of a net to better estimate wire length
32+
* for higher fanout nets. Each entry is the correction factor for the
33+
* fanout index-1
34+
*/
3035
static const float cross_count[50] = {/* [0..49] */ 1.0, 1.0, 1.0, 1.0828,
3136
1.1536, 1.2206, 1.2823, 1.3385, 1.3991, 1.4493, 1.4974, 1.5455, 1.5937,
3237
1.6418, 1.6899, 1.7304, 1.7709, 1.8114, 1.8519, 1.8924, 1.9288, 1.9652,
@@ -35,33 +40,35 @@ static const float cross_count[50] = {/* [0..49] */ 1.0, 1.0, 1.0, 1.0828,
3540
2.5610, 2.5864, 2.6117, 2.6371, 2.6625, 2.6887, 2.7148, 2.7410, 2.7671,
3641
2.7933};
3742

38-
/* The arrays below are used to precompute the inverse of the average *
39-
* number of tracks per channel between [subhigh] and [sublow]. Access *
40-
* them as chan?_place_cost_fac[subhigh][sublow]. They are used to *
41-
* speed up the computation of the cost function that takes the length *
42-
* of the net bounding box in each dimension, divided by the average *
43-
* number of tracks in that direction; for other cost functions they *
44-
* will never be used. *
43+
/**
44+
* @brief Matrices below are used to precompute the inverse of the average
45+
* number of tracks per channel between [subhigh] and [sublow]. Access
46+
* them as chan?_place_cost_fac[subhigh][sublow]. They are used to
47+
* speed up the computation of the cost function that takes the length
48+
* of the net bounding box in each dimension, divided by the average
49+
* number of tracks in that direction; for other cost functions they
50+
* will never be used.
4551
*/
46-
static vtr::NdMatrix<float, 2> chanx_place_cost_fac({0, 0}); //[0...device_ctx.grid.width()-2]
47-
static vtr::NdMatrix<float, 2> chany_place_cost_fac({0, 0}); //[0...device_ctx.grid.height()-2]
52+
static vtr::NdMatrix<float, 2> chanx_place_cost_fac({0, 0}); // [0...device_ctx.grid.width()-2]
53+
static vtr::NdMatrix<float, 2> chany_place_cost_fac({0, 0}); // [0...device_ctx.grid.height()-2]
4854

4955
/* Cost of a net, and a temporary cost of a net used during move assessment. */
5056
static vtr::vector<ClusterNetId, double> net_cost, proposed_net_cost;
5157

52-
/* [0...cluster_ctx.clb_nlist.nets().size()-1] *
53-
* A flag array to indicate whether the specific bounding box has been updated *
54-
* in this particular swap or not. If it has been updated before, the code *
55-
* must use the updated data, instead of the out-of-date data passed into the *
56-
* subroutine, particularly used in try_swap(). The value NOT_UPDATED_YET *
57-
* indicates that the net has not been updated before, UPDATED_ONCE indicated *
58-
* that the net has been updated once, if it is going to be updated again, the *
59-
* values from the previous update must be used. GOT_FROM_SCRATCH is only *
60-
* applicable for nets larger than SMALL_NETS and it indicates that the *
61-
* particular bounding box cannot be updated incrementally before, hence the *
62-
* bounding box is got from scratch, so the bounding box would definitely be *
63-
* right, DO NOT update again. */
64-
static vtr::vector<ClusterNetId, NetUpdateState> bb_updated_before;
58+
/** *
59+
* @brief Flag array to indicate whether the specific bounding box has been updated
60+
* in this particular swap or not. If it has been updated before, the code
61+
* must use the updated data, instead of the out-of-date data passed into the
62+
* subroutine, particularly used in try_swap(). The value NOT_UPDATED_YET
63+
* indicates that the net has not been updated before, UPDATED_ONCE indicated
64+
* that the net has been updated once, if it is going to be updated again, the
65+
* values from the previous update must be used. GOT_FROM_SCRATCH is only
66+
* applicable for nets larger than SMALL_NETS and it indicates that the
67+
* particular bounding box is not incrementally updated, and hence the
68+
* bounding box is got from scratch, so the bounding box would definitely be
69+
* right, DO NOT update again.
70+
*/
71+
static vtr::vector<ClusterNetId, NetUpdateState> bb_updated_before; // [0...cluster_ctx.clb_nlist.nets().size()-1]
6572

6673
/* The following arrays are used by the try_swap function for speed. */
6774

@@ -77,9 +84,9 @@ static vtr::vector<ClusterNetId, NetUpdateState> bb_updated_before;
7784

7885
/* [0...cluster_ctx.clb_nlist.nets().size()-1] -> 3D bounding box*/
7986
static vtr::vector<ClusterNetId, t_bb> ts_bb_coord_new, ts_bb_edge_new;
80-
/* [0...cluster_ctx.clb_nlist.nets().size()-1][0...num_layers] -> 2D bonding box on a layer*/
87+
/* [0...cluster_ctx.clb_nlist.nets().size()-1][0...num_layers-1] -> 2D bonding box on a layer*/
8188
static vtr::vector<ClusterNetId, std::vector<t_2D_bb>> layer_ts_bb_edge_new, layer_ts_bb_coord_new;
82-
/* [0...cluster_ctx.clb_nlist.nets().size()-1][0...num_layers] -> number of sink pins on a layer*/
89+
/* [0...cluster_ctx.clb_nlist.nets().size()-1][0...num_layers-1] -> number of sink pins on a layer*/
8390
static vtr::Matrix<int> ts_layer_sink_pin_count;
8491
/* [0...num_afftected_nets] -> net_id of the affected nets */
8592
static std::vector<ClusterNetId> ts_nets_to_update;

vpr/src/util/vpr_utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ static AtomPinId find_atom_pin_for_pb_route_id(ClusterBlockId clb, int pb_route_
434434
return AtomPinId::INVALID();
435435
}
436436

437-
/* Return the net pin which drive the CLB input connected to sink_pb_pin_id, or nullptr if none (i.e. driven internally)
438-
* clb: Block in which the sink pin is located on
437+
/* Return the net pin which drives the CLB input connected to sink_pb_pin_id, or nullptr if none (i.e. driven internally)
438+
* clb: Block on which the sink pin is located
439439
* sink_pb_pin_id: The physical pin index of the sink pin on the block
440440
*
441441
* Returns a tuple containing

0 commit comments

Comments
 (0)