aboutsummaryrefslogtreecommitdiffstats
path: root/generic/pack.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-12-01 17:07:36 +0000
committerDavid Shah <dave@ds0.me>2019-12-01 17:07:36 +0000
commitf57c2bcebb9a5e0722fe90ac9b5d11d4db518c22 (patch)
treefce5718c1750c73eb3075d42ea586017d36b1378 /generic/pack.cc
parent89e15d488ad5c24536ef9ee5762995dfe2d02c6e (diff)
downloadnextpnr-f57c2bcebb9a5e0722fe90ac9b5d11d4db518c22.tar.gz
nextpnr-f57c2bcebb9a5e0722fe90ac9b5d11d4db518c22.tar.bz2
nextpnr-f57c2bcebb9a5e0722fe90ac9b5d11d4db518c22.zip
generic: Don't assume unused LUT inputs are zero
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'generic/pack.cc')
-rw-r--r--generic/pack.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/pack.cc b/generic/pack.cc
index 19266aba..b593c076 100644
--- a/generic/pack.cc
+++ b/generic/pack.cc
@@ -158,7 +158,8 @@ static void pack_constants(Context *ctx)
gnd_cell->ports.at(ctx->id("F")).net = gnd_net.get();
std::unique_ptr<CellInfo> vcc_cell = create_generic_cell(ctx, ctx->id("GENERIC_SLICE"), "$PACKER_VCC");
- vcc_cell->params[ctx->id("INIT")] = 1;
+ // Fill with 1s
+ vcc_cell->params[ctx->id("INIT")] = Property(Property::S1).extract(0, (1 << ctx->args.K), Property::S1);
std::unique_ptr<NetInfo> vcc_net = std::unique_ptr<NetInfo>(new NetInfo);
vcc_net->name = ctx->id("$PACKER_VCC_NET");
vcc_net->driver.cell = vcc_cell.get();