@@ -23,7 +23,7 @@ void PlacementLogPrinter::print_place_status_header() const {
2323 return ;
2424 }
2525
26- const bool noc_enabled = placer_.noc_opts () .noc ;
26+ const bool noc_enabled = placer_.noc_opts_ .noc ;
2727
2828 VTR_LOG (" \n " );
2929 if (!noc_enabled) {
@@ -52,20 +52,20 @@ void PlacementLogPrinter::print_place_status(float elapsed_sec) const {
5252 return ;
5353 }
5454
55- const PlacementAnnealer& annealer = placer_.annealer () ;
55+ const PlacementAnnealer& annealer = * placer_.annealer_ ;
5656 const t_annealing_state& annealing_state = annealer.get_annealing_state ();
5757 const auto & [swap_stats, move_type_stats, placer_stats] = annealer.get_stats ();
5858 const int tot_moves = annealer.get_total_iteration ();
59- const t_placer_costs& costs = placer_.costs () ;
60- std::shared_ptr<const SetupTimingInfo> timing_info = placer_.timing_info () ;
59+ const t_placer_costs& costs = placer_.costs_ ;
60+ std::shared_ptr<const SetupTimingInfo> timing_info = placer_.timing_info_ ;
6161
62- const bool noc_enabled = placer_.noc_opts () .noc ;
63- const NocCostTerms& noc_cost_terms = placer_.costs () .noc_cost_terms ;
62+ const bool noc_enabled = placer_.noc_opts_ .noc ;
63+ const NocCostTerms& noc_cost_terms = placer_.costs_ .noc_cost_terms ;
6464
65- const bool is_timing_driven = placer_.placer_opts () .place_algorithm .is_timing_driven ();
66- const float cpd = is_timing_driven ? placer_.critical_path () .delay () : std::numeric_limits<float >::quiet_NaN ();
67- const float sTNS = is_timing_driven ? placer_.timing_info () ->setup_total_negative_slack () : std::numeric_limits<float >::quiet_NaN ();
68- const float sWNS = is_timing_driven ? placer_.timing_info () ->setup_worst_negative_slack () : std::numeric_limits<float >::quiet_NaN ();
65+ const bool is_timing_driven = placer_.placer_opts_ .place_algorithm .is_timing_driven ();
66+ const float cpd = is_timing_driven ? placer_.critical_path_ .delay () : std::numeric_limits<float >::quiet_NaN ();
67+ const float sTNS = is_timing_driven ? placer_.timing_info_ ->setup_total_negative_slack () : std::numeric_limits<float >::quiet_NaN ();
68+ const float sWNS = is_timing_driven ? placer_.timing_info_ ->setup_worst_negative_slack () : std::numeric_limits<float >::quiet_NaN ();
6969
7070 VTR_LOG (
7171 " %4zu %6.1f %7.1e "
@@ -105,7 +105,7 @@ void PlacementLogPrinter::print_resources_utilization() const {
105105
106106 const auto & cluster_ctx = g_vpr_ctx.clustering ();
107107 const auto & device_ctx = g_vpr_ctx.device ();
108- const auto & block_locs = placer_.placer_state () .block_locs ();
108+ const auto & block_locs = placer_.placer_state_ .block_locs ();
109109
110110 size_t max_block_name = 0 ;
111111 size_t max_tile_name = 0 ;
@@ -144,7 +144,7 @@ void PlacementLogPrinter::print_placement_swaps_stats() const {
144144 return ;
145145 }
146146
147- const PlacementAnnealer& annealer = placer_.annealer () ;
147+ const PlacementAnnealer& annealer = * placer_.annealer_ ;
148148 const auto & [swap_stats, move_type_stats, placer_stats] = annealer.get_stats ();
149149 const t_annealing_state& annealing_state = annealer.get_annealing_state ();
150150
@@ -170,25 +170,21 @@ void PlacementLogPrinter::print_initial_placement_stats() const {
170170 return ;
171171 }
172172
173- const t_placer_costs& costs = placer_.costs ();
174- const t_noc_opts& noc_opts = placer_.noc_opts ();
175- const t_placer_opts& placer_opts = placer_.placer_opts ();
176- const tatum::TimingPathInfo& critical_path = placer_.critical_path ();
177- const std::optional<NocCostHandler>& noc_cost_handler = placer_.noc_cost_handler ();
178- std::shared_ptr<const SetupTimingInfo> timing_info = placer_.timing_info ();
179- const PlacerState& placer_state = placer_.placer_state ();
173+ const t_placer_costs& costs = placer_.costs_ ;
174+ const t_placer_opts& placer_opts = placer_.placer_opts_ ;
175+ std::shared_ptr<const SetupTimingInfo> timing_info = placer_.timing_info_ ;
180176
181177 VTR_LOG (" Initial placement cost: %g bb_cost: %g td_cost: %g\n " ,
182178 costs.cost , costs.bb_cost , costs.timing_cost );
183179
184- if (noc_opts .noc ) {
185- VTR_ASSERT (noc_cost_handler .has_value ());
186- noc_cost_handler ->print_noc_costs (" Initial NoC Placement Costs" , costs, noc_opts );
180+ if (placer_. noc_opts_ .noc ) {
181+ VTR_ASSERT (placer_. noc_cost_handler_ .has_value ());
182+ placer_. noc_cost_handler_ ->print_noc_costs (" Initial NoC Placement Costs" , costs, placer_. noc_opts_ );
187183 }
188184
189185 if (placer_opts.place_algorithm .is_timing_driven ()) {
190186 VTR_LOG (" Initial placement estimated Critical Path Delay (CPD): %g ns\n " ,
191- 1e9 * critical_path .delay ());
187+ 1e9 * placer_. critical_path_ .delay ());
192188 VTR_LOG (" Initial placement estimated setup Total Negative Slack (sTNS): %g ns\n " ,
193189 1e9 * timing_info->setup_total_negative_slack ());
194190 VTR_LOG (" Initial placement estimated setup Worst Negative Slack (sWNS): %g ns\n " ,
@@ -198,7 +194,7 @@ void PlacementLogPrinter::print_initial_placement_stats() const {
198194 print_histogram (create_setup_slack_histogram (*timing_info->setup_analyzer ()));
199195 }
200196
201- const BlkLocRegistry& blk_loc_registry = placer_state .blk_loc_registry ();
197+ const BlkLocRegistry& blk_loc_registry = placer_. placer_state_ .blk_loc_registry ();
202198 size_t num_macro_members = 0 ;
203199 for (const t_pl_macro& macro : blk_loc_registry.place_macros ().macros ()) {
204200 num_macro_members += macro.members .size ();
@@ -228,12 +224,11 @@ void PlacementLogPrinter::print_post_placement_stats() const {
228224 }
229225
230226 const auto & timing_ctx = g_vpr_ctx.timing ();
231- const PlacementAnnealer& annealer = placer_.annealer ();
232- const auto & [swap_stats, move_type_stats, placer_stats] = annealer.get_stats ();
227+ const auto & [swap_stats, move_type_stats, placer_stats] = placer_.annealer_ ->get_stats ();
233228
234229 VTR_LOG (" \n " );
235230 VTR_LOG (" Swaps called: %d\n " , swap_stats.num_ts_called );
236- annealer. get_move_abortion_logger ().report_aborted_moves ();
231+ placer_. annealer_ -> get_move_abortion_logger ().report_aborted_moves ();
237232
238233 if (placer_.placer_opts_ .place_algorithm .is_timing_driven ()) {
239234 // Final timing estimate
0 commit comments