Skip to content

Add raw setup slack analysis to placement quench #1501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f4ea4a1
Added interface for mapping between CLB pins and setup slacks. Refact…
Bill-hbrhbr Jul 23, 2020
c024603
Refactored criticalities update in place.cpp and added setup slacks u…
Bill-hbrhbr Jul 23, 2020
cb6e9a6
Fixe up format and compilation errors
Bill-hbrhbr Jul 23, 2020
63db2e1
Merged 3 update routines into 1 single routine
Bill-hbrhbr Jul 31, 2020
aa7b233
Resolve merge conflicts
Bill-hbrhbr Jul 31, 2020
e8f73c6
Resolve more merge conflicts
Bill-hbrhbr Jul 31, 2020
d80de58
Changed crit_exponent to first_crit_exponent/state.crit_exponent
Bill-hbrhbr Jul 31, 2020
831df44
Created a setup slack matrix that copies data from the PlacerSetupSla…
Bill-hbrhbr Aug 6, 2020
d329911
Provided more complete explanation for the record_setup_slacks routine.
Bill-hbrhbr Aug 6, 2020
225870e
Added placement snapshot functions that facilitates the reversion of …
Bill-hbrhbr Aug 6, 2020
9056301
Merge the master branch into PlacerSetupSlacks (updating vtr flow
Bill-hbrhbr Aug 6, 2020
0e01ed7
Implemented do_setup_slack_cost_analysis: softmax of negative slacks
Bill-hbrhbr Aug 6, 2020
2e212dc
Added single move reversion for setup slack analysis(rather than taki…
Bill-hbrhbr Aug 11, 2020
96e65ba
Corrected the timing update and reversion of setup slack analysis dur…
Bill-hbrhbr Aug 14, 2020
112bde5
Moved four boolean global variables controlling the timing update int…
Bill-hbrhbr Aug 14, 2020
29b55a3
Added vpr option --place_quench_metric to turn on/off setup slack ana…
Bill-hbrhbr Aug 20, 2020
f641b66
Added the option --place_quench_metric to VPR documentation on VPR co…
Bill-hbrhbr Aug 28, 2020
d88a38d
Moved timing_update_mode boolean variables into PlacerSetupSlacks and…
Bill-hbrhbr Aug 28, 2020
df9db48
Removed quench metric option.
Bill-hbrhbr Sep 1, 2020
9b01e1f
Changed PATH_TIMING_DRIVEN_PLACE to CRITICALITY_TIMING_PLACE, and SET…
Bill-hbrhbr Sep 1, 2020
e0b70c4
Changed e_place_algorithm to t_place_algorithm, a wrapper class that …
Bill-hbrhbr Sep 1, 2020
cd79ff5
Added --place_quench_algorithm option to VPR options. Specifies the p…
Bill-hbrhbr Sep 1, 2020
dd2cfe2
Utilized the is_timing_driven() method provided by the t_place_algori…
Bill-hbrhbr Sep 1, 2020
270d1ef
Added regression test strong_place_quench_slack to check if running S…
Bill-hbrhbr Sep 1, 2020
23e8782
Fixed slack cost routine bug and updated golden results. Added code d…
Bill-hbrhbr Sep 4, 2020
f6e809e
Code review update: enhance more documentations. Added function level…
Bill-hbrhbr Sep 6, 2020
e3d7d65
Removed find_affected_sink_pins() to eliminate the placer runtime inc…
Bill-hbrhbr Sep 8, 2020
06c9cf6
Merge branch 'master' into QuenchSlackDraft
Bill-hbrhbr Sep 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions doc/src/vpr/command_line_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,16 @@ The following options are only valid when the placement engine is in timing-driv

Name of the post-placement timing report file to generate (not generated if unspecfied).

.. option:: --place_quench_metric {auto, timing_cost, setup_slack}

Specifies which cost formulation the placer uses during the quench stage.

* ``auto`` VPR makes the choice. Currently, VPR uses ``timing_cost`` by default.
* ``timing_cost`` Use the timing cost: connection delay * criticality.
* ``setup_slack`` Directly checks the raw setup slack returned by the timing analyzer.

**Default:** ``auto``

.. _router_options:

Router Options
Expand Down
2 changes: 2 additions & 0 deletions vpr/src/base/SetupVPR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,8 @@ static void SetupPlacerOpts(const t_options& Options, t_placer_opts* PlacerOpts)

PlacerOpts->effort_scaling = Options.place_effort_scaling;
PlacerOpts->timing_update_type = Options.timing_update_type;

PlacerOpts->place_quench_metric = Options.place_quench_metric;
}

static void SetupAnalysisOpts(const t_options& Options, t_analysis_opts& analysis_opts) {
Expand Down
46 changes: 46 additions & 0 deletions vpr/src/base/read_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,41 @@ struct ParseTimingUpdateType {
}
};

struct ParsePlaceQuenchMetric {
ConvertedValue<e_place_quench_metric> from_str(std::string str) {
ConvertedValue<e_place_quench_metric> conv_value;
if (str == "auto")
conv_value.set_value(e_place_quench_metric::AUTO);
else if (str == "timing_cost")
conv_value.set_value(e_place_quench_metric::TIMING_COST);
else if (str == "setup_slack")
conv_value.set_value(e_place_quench_metric::SETUP_SLACK);
else {
std::stringstream msg;
msg << "Invalid conversion from '" << str << "' to e_place_quench_metric (expected one of: " << argparse::join(default_choices(), ", ") << ")";
conv_value.set_error(msg.str());
}
return conv_value;
}

ConvertedValue<std::string> to_str(e_place_quench_metric val) {
ConvertedValue<std::string> conv_value;
if (val == e_place_quench_metric::AUTO)
conv_value.set_value("auto");
if (val == e_place_quench_metric::TIMING_COST)
conv_value.set_value("timing_cost");
else {
VTR_ASSERT(val == e_place_quench_metric::SETUP_SLACK);
conv_value.set_value("setup_slack");
}
return conv_value;
}

std::vector<std::string> default_choices() {
return {"auto", "timing_cost", "setup_slack"};
}
};

argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& args) {
std::string description =
"Implements the specified circuit onto the target FPGA architecture"
Expand Down Expand Up @@ -1747,6 +1782,17 @@ argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& arg
.default_value("")
.show_in(argparse::ShowIn::HELP_ONLY);

place_timing_grp.add_argument<e_place_quench_metric, ParsePlaceQuenchMetric>(args.place_quench_metric, "--place_quench_metric")
.help(
"Controls which cost function the placer uses during the quench stage:\n"
" * auto: VPR decides\n"
" * timing_cost: The same cost formulation as the one used during\n"
" the annealing stage (more stable)\n"
" * setup_slack: Directly uses setup slacks (in combination with wiring)\n"
" to check if the block moves should be accepted\n")
.default_value("auto")
.show_in(argparse::ShowIn::HELP_ONLY);

auto& route_grp = parser.add_argument_group("routing options");

route_grp.add_argument(args.max_router_iterations, "--max_router_iterations")
Expand Down
1 change: 1 addition & 0 deletions vpr/src/base/read_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ struct t_options {
argparse::ArgValue<PlaceDelayModelType> place_delay_model;
argparse::ArgValue<e_reducer> place_delay_model_reducer;
argparse::ArgValue<std::string> allowed_tiles_for_delay_model;
argparse::ArgValue<e_place_quench_metric> place_quench_metric;

/* Router Options */
argparse::ArgValue<bool> check_rr_graph;
Expand Down
10 changes: 9 additions & 1 deletion vpr/src/base/vpr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,8 @@ struct t_annealing_sched {
* doPlacement: true if placement is supposed to be done in the CAD flow, false otherwise */
enum e_place_algorithm {
BOUNDING_BOX_PLACE,
PATH_TIMING_DRIVEN_PLACE
PATH_TIMING_DRIVEN_PLACE,
SETUP_SLACK_ANALYSIS_PLACE
};

enum e_place_effort_scaling {
Expand Down Expand Up @@ -884,6 +885,12 @@ enum class e_place_delta_delay_algorithm {
DIJKSTRA_EXPANSION,
};

enum class e_place_quench_metric {
TIMING_COST,
SETUP_SLACK,
AUTO
};

struct t_placer_opts {
enum e_place_algorithm place_algorithm;
float timing_tradeoff;
Expand Down Expand Up @@ -932,6 +939,7 @@ struct t_placer_opts {
std::string allowed_tiles_for_delay_model;

e_place_delta_delay_algorithm place_delta_delay_matrix_calculation_method;
e_place_quench_metric place_quench_metric;
};

/* All the parameters controlling the router's operation are in this *
Expand Down
Loading