@@ -79,28 +79,67 @@ class Placer {
7979
8080 // / Stores a placement state as a retrievable checkpoint in case the placement quality deteriorates later.
8181 t_placement_checkpoint placement_checkpoint_;
82-
82+ // / It holds a setup timing analysis engine. Other placement timing object usually have a reference or pointer to timing_info.
8383 std::shared_ptr<SetupTimingInfo> timing_info_;
84+ // / Post-clustering delay calculator. Its API allows extraction of delay for each timing edge.
8485 std::shared_ptr<PlacementDelayCalculator> placement_delay_calc_;
86+ // / Stores setup slack of the clustered netlist connections.
8587 std::unique_ptr<PlacerSetupSlacks> placer_setup_slacks_;
88+ // / Stores criticalities of the clustered netlist connections.
8689 std::unique_ptr<PlacerCriticalities> placer_criticalities_;
90+ // / Used to invalidate timing edges corresponding to the pins of moved blocks.
8791 std::unique_ptr<NetPinTimingInvalidator> pin_timing_invalidator_;
92+ // / Stores information about the critical path. This is usually updated after that timing info is updated.
8893 tatum::TimingPathInfo critical_path_;
8994
9095 std::unique_ptr<vtr::ScopedStartFinishTimer> timer_;
9196
9297 IntraLbPbPinLookup pb_gpin_lookup_;
9398 ClusteredPinAtomPinsLookup netlist_pin_lookup_;
9499
100+ // / Performs random swaps and implements the simulated annealer optimizer.
95101 std::unique_ptr<PlacementAnnealer> annealer_;
96102
103+ /* These variables store timing analysis profiling information
104+ * at different stages of the placement to be printed at the end
105+ */
97106 t_timing_analysis_profile_info pre_place_timing_stats_;
98107 t_timing_analysis_profile_info pre_quench_timing_stats_;
99108 t_timing_analysis_profile_info post_quench_timing_stats_;
100109
110+ /* PlacementLogPrinter is made a friend of this class, so it can
111+ * access its private member variables without getter methods.
112+ * PlacementLogPrinter holds a constant reference to an object of type
113+ * Placer to avoid modifying its member variables.
114+ */
101115 friend class PlacementLogPrinter ;
102116
103117 private:
118+ /* *
119+ * @brief Constructs and initializes timing-related objects.
120+ *
121+ * This function performs the following steps to set up timing analysis:
122+ *
123+ * 1. Constructs a `tatum::DelayCalculator` for post-clustering delay calculations.
124+ * This calculator holds a reference to `PlacerTimingContext::connection_delay`,
125+ * which contains net delays based on block locations.
126+ *
127+ * 2. Creates and stores a `SetupTimingInfo` object in `timing_info_`.
128+ * This object utilizes the delay calculator to compute delays on timing edges
129+ * and calculate setup times.
130+ *
131+ * 3. Constructs `PlacerSetupSlacks` and `PlacerCriticalities` objects,
132+ * which translate arrival and required times into slacks and criticalities,
133+ * respectively.
134+ *
135+ * 4. Creates a `NetPinTimingInvalidator` object to mark timing edges
136+ * corresponding to the pins of moved blocks as invalid.
137+ *
138+ * 5. Performs a full timing analysis by marking all pins as invalid.
139+ *
140+ * @param net_list The netlist used for iterating over pins.
141+ * @param analysis_opts Analysis options, including whether to echo the timing graph.
142+ */
104143 void alloc_and_init_timing_objects_ (const Netlist<>& net_list,
105144 const t_analysis_opts& analysis_opts);
106145
0 commit comments