@@ -135,23 +135,36 @@ class t_annealing_state {
135135
136136/* *
137137 * @class PlacementAnnealer
138- * @brief Implements a simulated annealing optimizer that minimizes the placement cost
139- * by swapping clustered blocks. It always accepts swaps that reduce the placement cost,
140- * but accepts the swaps that increase the cost with a diminishing probability.
138+ * @brief Simulated annealing optimizer for minimizing placement cost via block swaps.
141139 *
142- * @details Swaps are performed in a two nested loops. The inner loop is implemented in
143- * placement_inner_loop() method. Each iteration of the inner loop performs a single swap,
144- * and all swaps performed in each iteration of the other loop are evaluated using the same
145- * temperature.
140+ * @details This class implements simulated annealing to optimize placement cost by swapping clustered blocks.
141+ * Swaps that reduce the cost are always accepted, while those that increase the cost are accepted
142+ * with a diminishing probability.
146143 *
147- * The user is expected to call outer_loop_update_timing_info() before calling
148- * placement_inner_loop(). Then, outer_loop_update_state() should be called to
149- * determine whether another iteration of the outer loop is required.
150- * If outer_loop_update_state() returns false, start_quench() can be called to
151- * set the temperate to zero so that the annealer behaves greedily. Then,
152- * outer_loop_update_timing_info() and placement_inner_loop() can be called
153- * to run the quench stage.
144+ * The annealing process consists of two nested loops:
145+ * - The **inner loop** (implemented in `placement_inner_loop()`) performs individual swaps, all evaluated at a fixed temperature.
146+ * - The **outer loop** adjusts the temperature and determines whether further iterations are needed.
154147 *
148+ * Usage workflow:
149+ * 1. Call `outer_loop_update_timing_info()` to update timing information.
150+ * 2. Execute `placement_inner_loop()` for swap evaluations.
151+ * 3. Call `outer_loop_update_state()` to check if more outer loop iterations are needed.
152+ * 4. Optionally, use `start_quench()` to set the temperature to zero for a greedy optimization (quenching stage),
153+ * then repeat steps 1 and 2.
154+ *
155+ * Usage example:
156+ * **************************************
157+ * PlacementAnnealer annealer(...);
158+ *
159+ * do {
160+ * annealer.outer_loop_update_timing_info();
161+ * annealer.placement_inner_loop();
162+ * } while (annealer.outer_loop_update_state());
163+ *
164+ * annealer.start_quench();
165+ * annealer.outer_loop_update_timing_info();
166+ * annealer.placement_inner_loop();
167+ * **************************************
155168 */
156169class PlacementAnnealer {
157170 public:
0 commit comments