diff --git a/ecp5/pack.cc b/ecp5/pack.cc index 3b56daa9..4ef2e92a 100644 --- a/ecp5/pack.cc +++ b/ecp5/pack.cc @@ -991,6 +991,15 @@ class Ecp5Packer { log_info("Packing constants..\n"); + for (auto &cell : ctx->cells) { + CellInfo *ci = cell.second.get(); + if (ci->type.in(ctx->id("VLO"))) { + ci->type = id_GND; + } else if (ci->type.in(ctx->id("VHI"))) { + ci->type = id_VCC; + } + } + std::unique_ptr gnd_cell = create_ecp5_cell(ctx, id_LUT4, "$PACKER_GND"); gnd_cell->params[id_INIT] = Property(0, 16); auto gnd_net = std::make_unique(ctx->id("$PACKER_GND_NET"));