Skip to content

Commit d923d75

Browse files
add is_flat to Placer
1 parent 87f4e2e commit d923d75

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

vpr/src/place/place.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void try_place(const Netlist<>& net_list,
9393
place_ctx.lock_loc_vars();
9494
place_ctx.compressed_block_grids = create_compressed_block_grids();
9595

96-
Placer placer(net_list, placer_opts, analysis_opts, noc_opts, directs, place_delay_model, cube_bb);
96+
Placer placer(net_list, placer_opts, analysis_opts, noc_opts, directs, place_delay_model, cube_bb, is_flat, /*quiet=*/false);
9797

9898
#ifndef NO_GRAPHICS
9999
if (placer.noc_cost_handler().has_value()) {

vpr/src/place/placer.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ Placer::Placer(const Netlist<>& net_list,
2222
const t_noc_opts& noc_opts,
2323
const std::vector<t_direct_inf>& directs,
2424
std::shared_ptr<PlaceDelayModel> place_delay_model,
25-
bool cube_bb)
25+
bool cube_bb,
26+
bool is_flat,
27+
bool quiet)
2628
: placer_opts_(placer_opts)
2729
, analysis_opts_(analysis_opts)
2830
, noc_opts_(noc_opts)
@@ -31,7 +33,8 @@ Placer::Placer(const Netlist<>& net_list,
3133
, rng_(placer_opts.seed)
3234
, net_cost_handler_(placer_opts, placer_state_, cube_bb)
3335
, place_delay_model_(std::move(place_delay_model))
34-
, log_printer_(*this, /*quiet*/false) {
36+
, log_printer_(*this, quiet)
37+
, is_flat_(is_flat) {
3538
const auto& cluster_ctx = g_vpr_ctx.clustering();
3639
const auto& device_ctx = g_vpr_ctx.device();
3740
const auto& atom_ctx = g_vpr_ctx.atom();
@@ -61,7 +64,6 @@ Placer::Placer(const Netlist<>& net_list,
6164
normalize_noc_cost_weighting_factor(const_cast<t_noc_opts&>(noc_opts));
6265
}
6366

64-
6567
BlkLocRegistry& blk_loc_registry = placer_state_.mutable_blk_loc_registry();
6668
initial_placement(placer_opts, placer_opts.constraints_file.c_str(),
6769
noc_opts, blk_loc_registry, noc_cost_handler_, rng_);
@@ -151,7 +153,7 @@ void Placer::alloc_and_init_timing_objects_(const Netlist<>& net_list,
151153
placement_delay_calc_ = std::make_shared<PlacementDelayCalculator>(atom_ctx.nlist,
152154
atom_ctx.lookup,
153155
p_timing_ctx.connection_delay,
154-
/*is_flat=*/false);
156+
is_flat_);
155157
placement_delay_calc_->set_tsu_margin_relative(placer_opts_.tsu_rel_margin);
156158
placement_delay_calc_->set_tsu_margin_absolute(placer_opts_.tsu_abs_margin);
157159

@@ -167,7 +169,7 @@ void Placer::alloc_and_init_timing_objects_(const Netlist<>& net_list,
167169
atom_ctx.nlist,
168170
atom_ctx.lookup,
169171
*timing_info_->timing_graph(),
170-
/*is_flat=*/false);
172+
is_flat_);
171173

172174
// First time compute timing and costs, compute from scratch
173175
PlaceCritParams crit_params;

vpr/src/place/placer.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ class Placer {
2727
const t_noc_opts& noc_opts,
2828
const std::vector<t_direct_inf>& directs,
2929
std::shared_ptr<PlaceDelayModel> place_delay_model,
30-
bool cube_bb);
30+
bool cube_bb,
31+
bool is_flat,
32+
bool quiet);
3133

3234
void place();
3335

@@ -55,7 +57,6 @@ class Placer {
5557

5658
const std::optional<NocCostHandler>& noc_cost_handler() const;
5759

58-
//TODO: make this private
5960
private:
6061
const t_placer_opts& placer_opts_;
6162
const t_analysis_opts& analysis_opts_;
@@ -66,6 +67,8 @@ class Placer {
6667
NetCostHandler net_cost_handler_;
6768
std::optional<NocCostHandler> noc_cost_handler_;
6869
std::shared_ptr<PlaceDelayModel> place_delay_model_;
70+
const PlacementLogPrinter log_printer_;
71+
const bool is_flat_;
6972

7073
t_placement_checkpoint placement_checkpoint_;
7174

@@ -76,15 +79,14 @@ class Placer {
7679
std::unique_ptr<NetPinTimingInvalidator> pin_timing_invalidator_;
7780
tatum::TimingPathInfo critical_path_;
7881

79-
8082
std::unique_ptr<vtr::ScopedStartFinishTimer> timer_;
8183

8284
IntraLbPbPinLookup pb_gpin_lookup_;
8385
ClusteredPinAtomPinsLookup netlist_pin_lookup_;
8486

8587
std::unique_ptr<PlacementAnnealer> annealer_;
8688

87-
const PlacementLogPrinter log_printer_;
89+
8890

8991
t_timing_analysis_profile_info pre_place_timing_stats_;
9092
t_timing_analysis_profile_info pre_quench_timing_stats_;

0 commit comments

Comments
 (0)