Add RFB/RAM context support for latest release

This commit is contained in:
Miodrag Milanovic 2024-05-23 12:18:32 +02:00
parent 4e552c8ea3
commit 7fd2122614
2 changed files with 10 additions and 0 deletions

View File

@ -365,14 +365,20 @@ struct BitstreamJsonBackend
log_error("Unknown mode %d for cell '%s'.\n", mode, cell->name.c_str(ctx));
}
add_config("mode", mode);
add_config("context", str_or_default(cell->params, ctx->id("mem_ctxt"), ""));
add_config("wck_edge", bool_or_default(cell->params, ctx->id("wck_edge"), false));
close_instance();
}
void write_ram(CellInfo *cell) {
open_instance(cell, "RAM");
add_config("mcka_edge", bool_or_default(cell->params, ctx->id("mcka_edge"), false));
add_config("mckb_edge", bool_or_default(cell->params, ctx->id("mckb_edge"), false));
add_config("pcka_edge", bool_or_default(cell->params, ctx->id("pcka_edge"), false));
add_config("pckb_edge", bool_or_default(cell->params, ctx->id("pckb_edge"), false));
add_config("raw_config0", extract_bits_or_default(cell->params, ctx->id("raw_config0"), 4));
add_config("raw_config1", extract_bits_or_default(cell->params, ctx->id("raw_config1"), 16));
add_config("context", str_or_default(cell->params, ctx->id("mem_ctxt"), ""));
close_instance();
}

View File

@ -1044,6 +1044,10 @@ void NgUltraPacker::pack_rams(void)
ci.disconnectPort(id_BCKC);
ci.disconnectPort(id_BCKD);
ci.disconnectPort(id_BCKR);
for (auto &p : ci.ports) {
if (p.second.type == PortType::PORT_IN)
disconnect_if_gnd(&ci, p.first);
}
}
}