aboutsummaryrefslogtreecommitdiffstats
path: root/common/command.cc
diff options
context:
space:
mode:
Diffstat (limited to 'common/command.cc')
-rw-r--r--common/command.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/common/command.cc b/common/command.cc
index 1399efdb..6f4137fe 100644
--- a/common/command.cc
+++ b/common/command.cc
@@ -27,6 +27,7 @@
#include "pybindings.h"
#endif
+#include <boost/algorithm/string/join.hpp>
#include <boost/filesystem/convenience.hpp>
#include <boost/program_options.hpp>
#include <fstream>
@@ -120,8 +121,18 @@ po::options_description CommandHandler::getGeneralOptions()
general.add_options()("json", po::value<std::string>(), "JSON design file to ingest");
general.add_options()("seed", po::value<int>(), "seed value for random number generator");
general.add_options()("randomize-seed,r", "randomize seed value for random number generator");
+
+ general.add_options()(
+ "placer", po::value<std::string>(),
+ std::string("placer algorithm to use; available: " + boost::algorithm::join(Arch::availablePlacers, ", ") +
+ "; default: " + Arch::defaultPlacer)
+ .c_str());
+
general.add_options()("slack_redist_iter", po::value<int>(), "number of iterations between slack redistribution");
general.add_options()("cstrweight", po::value<float>(), "placer weighting for relative constraint satisfaction");
+ general.add_options()("starttemp", po::value<float>(), "placer SA start temperature");
+ general.add_options()("placer-budgets", "use budget rather than criticality in placer timing weights");
+
general.add_options()("pack-only", "pack design only without placement or routing");
general.add_options()("ignore-loops", "ignore combinational loops in timing analysis");
@@ -183,10 +194,27 @@ void CommandHandler::setupContext(Context *ctx)
settings->set("timing/allowFail", true);
}
+ if (vm.count("placer")) {
+ std::string placer = vm["placer"].as<std::string>();
+ if (std::find(Arch::availablePlacers.begin(), Arch::availablePlacers.end(), placer) ==
+ Arch::availablePlacers.end())
+ log_error("Placer algorithm '%s' is not supported (available options: %s)\n", placer.c_str(),
+ boost::algorithm::join(Arch::availablePlacers, ", ").c_str());
+ settings->set("placer", placer);
+ } else {
+ settings->set("placer", Arch::defaultPlacer);
+ }
+
if (vm.count("cstrweight")) {
settings->set("placer1/constraintWeight", vm["cstrweight"].as<float>());
}
+ if (vm.count("starttemp")) {
+ settings->set("placer1/startTemp", vm["starttemp"].as<float>());
+ }
+ if (vm.count("placer-budgets")) {
+ settings->set("placer1/budgetBased", true);
+ }
if (vm.count("freq")) {
auto freq = vm["freq"].as<double>();
if (freq > 0)