VLO,VHI support for ECP5

This commit is contained in:
Miodrag Milanovic 2023-08-29 09:38:06 +02:00 committed by myrtle
parent 688f1ba983
commit 5497a37de1

View File

@ -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<CellInfo> gnd_cell = create_ecp5_cell(ctx, id_LUT4, "$PACKER_GND");
gnd_cell->params[id_INIT] = Property(0, 16);
auto gnd_net = std::make_unique<NetInfo>(ctx->id("$PACKER_GND_NET"));