@@ -63,39 +63,33 @@ struct NocCostTerms {
63
63
* values of the previous iteration. However, the divisions are expensive,
64
64
* so we store their multiplicative inverses when they are updated in
65
65
* the outer loop routines to speed up the normalization process.
66
- *
67
- * @param cost The weighted average of the wiring cost and the timing cost.
68
- * @param bb_cost The bounding box cost, aka the wiring cost.
69
- * @param timing_cost The timing cost, which is connection delay * criticality.
70
- *
71
- * @param bb_cost_norm The normalization factor for the wiring cost.
72
- * @param timing_cost_norm The normalization factor for the timing cost, which
73
- * is upper-bounded by the value of MAX_INV_TIMING_COST.
74
- *
75
- * @param noc_cost_terms NoC-related cost terms
76
- * @param noc_cost_norm_factors Normalization factors for NoC-related cost terms.
77
- *
78
- * @param MAX_INV_TIMING_COST Stops inverse timing cost from going to infinity
79
- * with very lax timing constraints, which avoids multiplying by a
80
- * gigantic timing_cost_norm when auto-normalizing. The exact value
81
- * of this cost has relatively little impact, but should be large
82
- * enough to not affect the timing costs computation for normal
83
- * constraints.
84
- *
85
- * @param place_algorithm Determines how the member values are updated upon
86
- * each temperature change during the placer annealing process.
87
66
*/
88
67
class t_placer_costs {
89
68
public: // members
69
+ // / The weighted average of the wiring cost, the timing cost, and the congestion cost (if enabled)
90
70
double cost = 0 .;
71
+
72
+ // / The bounding box cost, aka the wiring cost.
91
73
double bb_cost = 0 .;
74
+
75
+ // / The timing cost, which is connection delay * criticality.
92
76
double timing_cost = 0 .;
77
+
78
+ // / The congestion cost, which estimates how much routing channels are over-utilized.
93
79
double congestion_cost = 0 .;
80
+
81
+ // / The normalization factor for the wiring cost.
94
82
double bb_cost_norm = 0 .;
83
+
84
+ // / The normalization factor for the timing cost, which is upper-bounded by the value of MAX_INV_TIMING_COST.
95
85
double timing_cost_norm = 0 .;
86
+
87
+ // / The normalization factor for the congestion cost.
96
88
double congestion_cost_norm = 0 .;
97
89
90
+ // / NoC-related cost terms.
98
91
NocCostTerms noc_cost_terms;
92
+ // / Normalization factors for NoC-related cost terms.
99
93
NocCostTerms noc_cost_norm_factors;
100
94
101
95
public: // Constructor
@@ -133,7 +127,18 @@ class t_placer_costs {
133
127
t_placer_costs& operator +=(const NocCostTerms& noc_delta_cost);
134
128
135
129
private:
130
+ /* *
131
+ * @brief Stops inverse timing cost from going to infinity
132
+ * with very lax timing constraints, which avoids multiplying by a
133
+ * gigantic timing_cost_norm when auto-normalizing. The exact value
134
+ * of this cost has relatively little impact, but should be large
135
+ * enough to not affect the timing costs computation for normal
136
+ * constraints.
137
+ */
136
138
static constexpr double MAX_INV_TIMING_COST = 1 .e12 ;
139
+
140
+ // / Determines how the member values are updated upon
141
+ // / each temperature change during the placer annealing process.
137
142
t_place_algorithm place_algorithm;
138
143
bool noc_enabled;
139
144
};
@@ -150,39 +155,30 @@ class t_placer_costs {
150
155
* In terms of calculating statistics for total cost, we mean that we
151
156
* operate upon the set of placer cost values gathered after every
152
157
* accepted block move.
153
- *
154
- * @param av_cost
155
- * Average total cost. Cost formulation depends on
156
- * the place algorithm currently being used.
157
- * @param av_bb_cost
158
- * Average bounding box (wiring) cost.
159
- * @param av_timing_cost
160
- * Average timing cost (delay * criticality).
161
- * @param sum_of_squares
162
- * Sum of squares of the total cost.
163
- * @param success_num
164
- * Number of accepted block swaps for the current iteration.
165
- * @param success_rate
166
- * num_accepted / total_trials for the current iteration.
167
- * @param std_dev
168
- * Standard deviation of the total cost.
169
- *
170
158
*/
171
159
class t_placer_statistics {
172
160
public:
161
+ // / Average total cost. Cost formulation depends on the place algorithm currently being used.
173
162
double av_cost;
163
+ // / Average bounding box (wiring) cost.
174
164
double av_bb_cost;
165
+ // / Average timing cost (delay * criticality).
175
166
double av_timing_cost;
167
+ // / Average congestion cost.
176
168
double av_cong_cost;
169
+ // / Sum of squares of the total cost.
177
170
double sum_of_squares;
171
+ // / Number of accepted block swaps for the current iteration.
178
172
int success_sum;
173
+ // / num_accepted / total_trials for the current iteration.
179
174
float success_rate;
175
+ // / Standard deviation of the total cost.
180
176
double std_dev;
181
177
182
- public: // Constructor
178
+ public: // Constructor
183
179
t_placer_statistics () { reset (); }
184
180
185
- public: // Mutator
181
+ public: // Mutator
186
182
// /@brief Clear all data fields.
187
183
void reset ();
188
184
0 commit comments