aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/pack.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/pack.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/pack.cc')
-rw-r--r--ecp5/pack.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc
index a9416f32..7cf9df78 100644
--- a/ecp5/pack.cc
+++ b/ecp5/pack.cc
@@ -356,7 +356,12 @@ class Ecp5Packer
ionet = ci->ports.at(ctx->id("I")).net;
trio = net_only_drives(ctx, ci->ports.at(ctx->id("I")).net, is_trellis_io, ctx->id("B"), true, ci);
}
- if (trio != nullptr) {
+ if (bool_or_default(ctx->settings, ctx->id("arch.ooc"))) {
+ // No IO buffer insertion in out-of-context mode, just remove the nextpnr buffer
+ // and leave the top level port
+ for (auto &port : ci->ports)
+ disconnect_port(ctx, ci, port.first);
+ } else if (trio != nullptr) {
// Trivial case, TRELLIS_IO used. Just destroy the net and the
// iobuf
log_info("%s feeds TRELLIS_IO %s, removing %s %s.\n", ci->name.c_str(ctx), trio->name.c_str(ctx),
@@ -673,6 +678,7 @@ class Ecp5Packer
CellInfo *make_carry_feed_out(NetInfo *carry, boost::optional<PortRef> chain_next = boost::optional<PortRef>())
{
std::unique_ptr<CellInfo> feedout = create_ecp5_cell(ctx, ctx->id("CCU2C"));
+
feedout->params[ctx->id("INIT0")] = Property(0, 16);
feedout->params[ctx->id("INIT1")] = Property(10, 16); // LUT4 = 0; LUT2 = A
feedout->params[ctx->id("INJECT1_0")] = std::string("NO");