mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-08-22 14:17:29 +02:00
ecp5: Add --out-of-context for building hard macros
Signed-off-by: David Shah <[email protected]>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user