aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-05-09 19:47:03 +0100
committerDavid Shah <dave@ds0.me>2020-05-09 19:47:03 +0100
commite431d1a33fdabcd118557cc7a61f671a0d2d2599 (patch)
tree2c44b73068004655cf973d61d935e05c478af794 /common
parent0faf07aac851692c523ea7824d6882245898c6e8 (diff)
downloadnextpnr-e431d1a33fdabcd118557cc7a61f671a0d2d2599.tar.gz
nextpnr-e431d1a33fdabcd118557cc7a61f671a0d2d2599.tar.bz2
nextpnr-e431d1a33fdabcd118557cc7a61f671a0d2d2599.zip
Add missing --top option
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'common')
-rw-r--r--common/command.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/command.cc b/common/command.cc
index a7a19989..3dc0d968 100644
--- a/common/command.cc
+++ b/common/command.cc
@@ -123,6 +123,7 @@ po::options_description CommandHandler::getGeneralOptions()
#endif
general.add_options()("json", po::value<std::string>(), "JSON design file to ingest");
general.add_options()("write", po::value<std::string>(), "JSON design file to write");
+ general.add_options()("top", po::value<std::string>(), "name of top module");
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");
@@ -277,6 +278,10 @@ int CommandHandler::executeMain(std::unique_ptr<Context> ctx)
return 0;
}
+ if (vm.count("top")) {
+ ctx->settings[ctx->id("frontend/top")] = vm["top"].as<std::string>();
+ }
+
#ifndef NO_GUI
if (vm.count("gui")) {
Application a(argc, argv, (vm.count("gui-no-aa") > 0));