Skip to content

Commit 9307ef3

Browse files
remove place_cost_exp and calls to pow()
1 parent 49d4396 commit 9307ef3

File tree

5 files changed

+1
-11
lines changed

5 files changed

+1
-11
lines changed

vpr/src/base/SetupVPR.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,8 +633,6 @@ static void SetupPlacerOpts(const t_options& Options, t_placer_opts* PlacerOpts)
633633
PlacerOpts->inner_loop_recompute_divider = Options.inner_loop_recompute_divider;
634634
PlacerOpts->quench_recompute_divider = Options.quench_recompute_divider;
635635

636-
PlacerOpts->place_cost_exp = 1;
637-
638636
PlacerOpts->td_place_exp_first = Options.place_exp_first;
639637

640638
PlacerOpts->td_place_exp_last = Options.place_exp_last;

vpr/src/base/ShowSetup.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,6 @@ static void ShowPlacerOpts(const t_placer_opts& PlacerOpts,
547547
VTR_LOG("Using constraints file '%s'\n", PlacerOpts.constraints_file.c_str());
548548
}
549549

550-
VTR_LOG("PlacerOpts.place_cost_exp: %f\n", PlacerOpts.place_cost_exp);
551-
552550
VTR_LOG("PlacerOpts.place_chan_width: %d\n", PlacerOpts.place_chan_width);
553551

554552
if (PlacerOpts.place_algorithm.is_timing_driven()) {

vpr/src/base/vpr_types.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,6 @@ struct t_placer_opts {
10651065
t_place_algorithm place_algorithm;
10661066
t_place_algorithm place_quench_algorithm;
10671067
float timing_tradeoff;
1068-
float place_cost_exp;
10691068
int place_chan_width;
10701069
enum e_pad_loc_type pad_loc_type;
10711070
std::string constraints_file;

vpr/src/place/net_cost_handler.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,8 +1515,6 @@ double NetCostHandler::get_net_wirelength_from_layer_bb_(ClusterNetId net_id) {
15151515
}
15161516

15171517
float NetCostHandler::get_chanz_cost_factor_(const t_bb& bb) {
1518-
float place_cost_exp = placer_opts_.place_cost_exp;
1519-
15201518
int num_inter_dir_conn;
15211519

15221520
if (bb.xmin == 0 && bb.ymin == 0) {
@@ -1540,7 +1538,6 @@ float NetCostHandler::get_chanz_cost_factor_(const t_bb& bb) {
15401538
} else {
15411539
int bb_num_tiles = (bb.xmax - bb.xmin + 1) * (bb.ymax - bb.ymin + 1);
15421540
z_cost_factor = bb_num_tiles / static_cast<float>(num_inter_dir_conn);
1543-
z_cost_factor = pow((double)z_cost_factor, (double)place_cost_exp);
15441541
}
15451542

15461543
return z_cost_factor;

vpr/src/place/net_cost_handler.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,13 +524,11 @@ class NetCostHandler {
524524
std::pair<double, double> get_chanxy_cost_fac_(const BBT& bb) {
525525
const int total_chanx_width = acc_chanx_width_[bb.ymax] - acc_chanx_width_[bb.ymin - 1];
526526
const double inverse_average_chanx_width = (bb.ymax - bb.ymin + 1.0) / total_chanx_width;
527-
const double inverse_average_chanx_width_sharpened = std::pow(inverse_average_chanx_width, (double)placer_opts_.place_cost_exp);
528527

529528
const int total_chany_width = acc_chany_width_[bb.xmax] - acc_chany_width_[bb.xmin - 1];
530529
const double inverse_average_chany_width = (bb.xmax - bb.xmin + 1.0) / total_chany_width;
531-
const double inverse_average_chany_width_sharpened = std::pow(inverse_average_chany_width, (double)placer_opts_.place_cost_exp);
532530

533-
return {inverse_average_chanx_width_sharpened, inverse_average_chany_width_sharpened};
531+
return {inverse_average_chanx_width, inverse_average_chany_width};
534532
}
535533

536534
/**

0 commit comments

Comments
 (0)