From 90a6578c533fc03402fba7b37c6f7bbac6e81c30 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 25 Apr 2023 12:38:36 +0200 Subject: [PATCH] handle VLO and VHI --- machxo2/pack.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/machxo2/pack.cc b/machxo2/pack.cc index 7689a3ae..1f064c1d 100644 --- a/machxo2/pack.cc +++ b/machxo2/pack.cc @@ -951,6 +951,15 @@ class MachXO2Packer { 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_machxo2_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"));