diff options
-rw-r--r-- | common/placer_heap.cc | 2 | ||||
-rw-r--r-- | generic/pack.cc | 5 | ||||
-rw-r--r-- | generic/synth/cells_map.v | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/common/placer_heap.cc b/common/placer_heap.cc index 80ce67b2..01e50123 100644 --- a/common/placer_heap.cc +++ b/common/placer_heap.cc @@ -947,7 +947,7 @@ class HeAPPlacer visit.pop(); BelId target = ctx->getBelByLocation(ploc); if (vc->region != nullptr && vc->region->constr_bels && !vc->region->bels.count(target)) - continue; + goto fail; CellInfo *bound; if (target == BelId() || ctx->getBelType(target) != vc->type) goto fail; diff --git a/generic/pack.cc b/generic/pack.cc index 19266aba..e92e04c5 100644 --- a/generic/pack.cc +++ b/generic/pack.cc @@ -150,7 +150,7 @@ static void pack_constants(Context *ctx) log_info("Packing constants..\n"); std::unique_ptr<CellInfo> gnd_cell = create_generic_cell(ctx, ctx->id("GENERIC_SLICE"), "$PACKER_GND"); - gnd_cell->params[ctx->id("INIT")] = 0; + gnd_cell->params[ctx->id("INIT")] = Property(0, 1 << ctx->args.K); std::unique_ptr<NetInfo> gnd_net = std::unique_ptr<NetInfo>(new NetInfo); gnd_net->name = ctx->id("$PACKER_GND_NET"); gnd_net->driver.cell = gnd_cell.get(); @@ -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(); diff --git a/generic/synth/cells_map.v b/generic/synth/cells_map.v index a6027534..1d0939e0 100644 --- a/generic/synth/cells_map.v +++ b/generic/synth/cells_map.v @@ -4,7 +4,9 @@ module \$lut (A, Y); input [WIDTH-1:0] A; output Y; - LUT #(.K(`LUT_K), .INIT(LUT)) _TECHMAP_REPLACE_ (.I(A), .Q(Y)); + localparam rep = 1<<(`LUT_K-WIDTH); + + LUT #(.K(`LUT_K), .INIT({rep{LUT}})) _TECHMAP_REPLACE_ (.I(A), .Q(Y)); endmodule module \$_DFF_P_ (input D, C, output Q); DFF _TECHMAP_REPLACE_ (.D(D), .Q(Q), .CLK(C)); endmodule |