aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/main.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-11-28 07:43:00 +0000
committerGitHub <noreply@github.com>2018-11-28 07:43:00 +0000
commit7a2ef27d6c27425bc39ef3a71b0df8b1c608d599 (patch)
tree0c8835c5fd78f37954094fb4772c566e4cbe5e1f /ice40/main.cc
parente99e2f15701a761049a600e37b9e30482de44534 (diff)
parent80f7ef4b4b5a632e73c077da5810b218969132bc (diff)
downloadnextpnr-7a2ef27d6c27425bc39ef3a71b0df8b1c608d599.tar.gz
nextpnr-7a2ef27d6c27425bc39ef3a71b0df8b1c608d599.tar.bz2
nextpnr-7a2ef27d6c27425bc39ef3a71b0df8b1c608d599.zip
Merge pull request #153 from YosysHQ/global-options
ice40: Finer-grained control of global promotion
Diffstat (limited to 'ice40/main.cc')
-rw-r--r--ice40/main.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/ice40/main.cc b/ice40/main.cc
index fcc56d04..4b6a9e42 100644
--- a/ice40/main.cc
+++ b/ice40/main.cc
@@ -65,6 +65,9 @@ po::options_description Ice40CommandHandler::getArchOptions()
specific.add_options()("pcf", po::value<std::string>(), "PCF constraints file to ingest");
specific.add_options()("asc", po::value<std::string>(), "asc bitstream file to write");
specific.add_options()("read", po::value<std::string>(), "asc bitstream file to read");
+ specific.add_options()("promote-logic",
+ "enable promotion of 'logic' globals (in addition to clk/ce/sr by default)");
+ specific.add_options()("no-promote-globals", "disable all global promotion");
specific.add_options()("tmfuzz", "run path delay estimate fuzzer");
return specific;
}
@@ -152,7 +155,13 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext()
if (vm.count("package"))
chipArgs.package = vm["package"].as<std::string>();
- return std::unique_ptr<Context>(new Context(chipArgs));
+ auto ctx = std::unique_ptr<Context>(new Context(chipArgs));
+
+ if (vm.count("promote-logic"))
+ ctx->settings[ctx->id("promote_logic")] = "1";
+ if (vm.count("no-promote-globals"))
+ ctx->settings[ctx->id("no_promote_globals")] = "1";
+ return ctx;
}
int main(int argc, char *argv[])