Skip to content

Commit cd79ff5

Browse files
committed
Added --place_quench_algorithm option to VPR options. Specifies the placement algorithm to be used during quench.
1 parent e0b70c4 commit cd79ff5

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

vpr/src/base/SetupVPR.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ static void SetupPlacerOpts(const t_options& Options, t_placer_opts* PlacerOpts)
530530
PlacerOpts->td_place_exp_last = Options.place_exp_last;
531531

532532
PlacerOpts->place_algorithm = Options.PlaceAlgorithm;
533+
PlacerOpts->place_quench_algorithm = Options.PlaceQuenchAlgorithm;
533534

534535
PlacerOpts->constraints_file = Options.constraints_file;
535536
PlacerOpts->pad_loc_file = Options.pad_loc_file;

vpr/src/base/read_options.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,6 +1621,12 @@ argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& arg
16211621
.choices({"bounding_box", "criticality_timing", "slack_timing"})
16221622
.show_in(argparse::ShowIn::HELP_ONLY);
16231623

1624+
place_grp.add_argument<e_place_algorithm, ParsePlaceAlgorithm>(args.PlaceQuenchAlgorithm, "--place_quench_algorithm")
1625+
.help("Controls which placement algorithm is used during placement quench")
1626+
.default_value("criticality_timing")
1627+
.choices({"bounding_box", "criticality_timing", "slack_timing"})
1628+
.show_in(argparse::ShowIn::HELP_ONLY);
1629+
16241630
place_grp.add_argument(args.PlaceChanWidth, "--place_chan_width")
16251631
.help(
16261632
"Sets the assumed channel width during placement. "
@@ -2227,6 +2233,11 @@ void set_conditional_defaults(t_options& args) {
22272233
}
22282234
}
22292235

2236+
//Which placement algorithm to use during placement quench?
2237+
if (args.PlaceQuenchAlgorithm.provenance() != Provenance::SPECIFIED) {
2238+
args.PlaceQuenchAlgorithm.set(args.PlaceAlgorithm, Provenance::INFERRED);
2239+
}
2240+
22302241
//Place chan width follows Route chan width if unspecified
22312242
if (args.PlaceChanWidth.provenance() != Provenance::SPECIFIED && args.RouteChanWidth.provenance() == Provenance::SPECIFIED) {
22322243
args.PlaceChanWidth.set(args.RouteChanWidth.value(), Provenance::INFERRED);

vpr/src/base/read_options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ struct t_options {
105105
argparse::ArgValue<float> PlaceSuccessTarget;
106106
argparse::ArgValue<sched_type> anneal_sched_type;
107107
argparse::ArgValue<e_place_algorithm> PlaceAlgorithm;
108+
argparse::ArgValue<e_place_algorithm> PlaceQuenchAlgorithm;
108109
argparse::ArgValue<e_pad_loc_type> pad_loc_type;
109110
argparse::ArgValue<e_block_loc_type> block_loc_type;
110111
argparse::ArgValue<int> PlaceChanWidth;

vpr/src/place/place.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,14 +891,14 @@ void try_place(const t_placer_opts& placer_opts,
891891
*move_generator,
892892
blocks_affected,
893893
timing_info.get(),
894-
placer_opts.place_algorithm);
894+
placer_opts.place_quench_algorithm);
895895

896896
tot_iter += move_lim;
897897
++num_temps;
898898

899899
calc_placer_stats(stats, success_rat, std_dev, costs, move_lim);
900900

901-
if (placer_opts.place_algorithm == CRITICALITY_TIMING_PLACE) {
901+
if (placer_opts.place_quench_algorithm == CRITICALITY_TIMING_PLACE) {
902902
critical_path = timing_info->least_slack_critical_path();
903903
sTNS = timing_info->setup_total_negative_slack();
904904
sWNS = timing_info->setup_worst_negative_slack();

0 commit comments

Comments
 (0)