aboutsummaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-11-27 14:41:35 +0000
committerDavid Shah <dave@ds0.me>2019-11-27 14:42:05 +0000
commit2b3dda7535c0a5cab83fc58d1cac40338a1f9400 (patch)
tree32603e6a14f38e3cc78ff589e020a609a3e39c0a /generic
parent2957eb7cc926286b0943ef0deb97f7f3e8a7e615 (diff)
downloadnextpnr-2b3dda7535c0a5cab83fc58d1cac40338a1f9400.tar.gz
nextpnr-2b3dda7535c0a5cab83fc58d1cac40338a1f9400.tar.bz2
nextpnr-2b3dda7535c0a5cab83fc58d1cac40338a1f9400.zip
generic: Add support for disabling IOB insertion
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'generic')
-rw-r--r--generic/main.cc6
-rw-r--r--generic/pack.cc4
2 files changed, 9 insertions, 1 deletions
diff --git a/generic/main.cc b/generic/main.cc
index 7dfc6aa7..bb780996 100644
--- a/generic/main.cc
+++ b/generic/main.cc
@@ -46,6 +46,7 @@ po::options_description GenericCommandHandler::getArchOptions()
{
po::options_description specific("Architecture specific options");
specific.add_options()("generic", "set device type to generic");
+ specific.add_options()("no-iobs", "disable automatic IO buffer insertion");
return specific;
}
@@ -59,7 +60,10 @@ std::unique_ptr<Context> GenericCommandHandler::createContext(std::unordered_map
if (arch_name != "generic")
log_error("Unsuported architecture '%s'.\n", arch_name.c_str());
}
- return std::unique_ptr<Context>(new Context(chipArgs));
+ auto ctx = std::unique_ptr<Context>(new Context(chipArgs));
+ if (vm.count("no-iobs"))
+ ctx->settings[ctx->id("disable_iobs")] = Property::State::S1;
+ return ctx;
}
int main(int argc, char *argv[])
diff --git a/generic/pack.cc b/generic/pack.cc
index 69f248d2..19266aba 100644
--- a/generic/pack.cc
+++ b/generic/pack.cc
@@ -249,6 +249,10 @@ static void pack_io(Context *ctx)
delete_nets.insert(net2->name);
}
}
+ } else if (bool_or_default(ctx->settings, ctx->id("disable_iobs"))) {
+ // No IO buffer insertion; just remove nextpnr_[io]buf
+ for (auto &p : ci->ports)
+ disconnect_port(ctx, ci, p.first);
} else {
// Create a GENERIC_IOB buffer
std::unique_ptr<CellInfo> ice_cell =