aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/main.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-06-22 16:57:00 +0100
committerDavid Shah <dave@ds0.me>2019-08-07 14:22:47 +0100
commit661237eb64a694a11900f736b07132ef8da4b0dd (patch)
tree68f7e853f8182adf931100da3c69d1ab9379a568 /ecp5/main.cc
parent90364fc3fad72f8c23b7200160f1acc0343c94d9 (diff)
downloadnextpnr-661237eb64a694a11900f736b07132ef8da4b0dd.tar.gz
nextpnr-661237eb64a694a11900f736b07132ef8da4b0dd.tar.bz2
nextpnr-661237eb64a694a11900f736b07132ef8da4b0dd.zip
ecp5: Add --out-of-context for building hard macros
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5/main.cc')
-rw-r--r--ecp5/main.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/ecp5/main.cc b/ecp5/main.cc
index 5544c55f..71dffc8d 100644
--- a/ecp5/main.cc
+++ b/ecp5/main.cc
@@ -71,6 +71,8 @@ po::options_description ECP5CommandHandler::getArchOptions()
specific.add_options()("lpf", po::value<std::vector<std::string>>(), "LPF pin constraint file(s)");
specific.add_options()("lpf-allow-unconstrained", "don't require LPF file(s) to constrain all IO");
+ specific.add_options()("out-of-context", "disable IO buffer insertion and global promotion/routing, for building pre-routed blocks (experimental)");
+
return specific;
}
void ECP5CommandHandler::validate()
@@ -91,6 +93,9 @@ void ECP5CommandHandler::customBitstream(Context *ctx)
basecfg = vm["basecfg"].as<std::string>();
}
+ if (bool_or_default(ctx->settings, ctx->id("arch.ooc")) && vm.count("textcfg"))
+ log_error("bitstream generation is not available in out-of-context mode (use --write to create a post-PnR JSON design)\n");
+
std::string textcfg;
if (vm.count("textcfg"))
textcfg = vm["textcfg"].as<std::string>();
@@ -228,6 +233,8 @@ std::unique_ptr<Context> ECP5CommandHandler::createContext(std::unordered_map<st
ctx->settings[ctx->id(val.first)] = val.second;
ctx->settings[ctx->id("arch.package")] = ctx->archArgs().package;
ctx->settings[ctx->id("arch.speed")] = speedString(ctx->archArgs().speed);
+ if (vm.count("out-of-context"))
+ ctx->settings[ctx->id("arch.ooc")] = 1;
return ctx;
}