3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-13 20:38:44 +00:00

memory_map: Use const drivers instead of FFs for ROMs.

This commit is contained in:
Marcelina Kościelnicka 2022-06-17 14:11:04 +02:00
parent bb634d39ef
commit 01daa077a2

View file

@ -191,6 +191,10 @@ struct MemoryMapWorker
data_reg_out[idx] = static_cells_map[addr];
count_static++;
}
else if (mem.wr_ports.empty())
{
data_reg_out[idx] = init_data.extract(i*mem.width, mem.width);
}
else
{
RTLIL::Cell *c = module->addCell(genid(mem.memid, "", addr), ID($dff));
@ -266,6 +270,8 @@ struct MemoryMapWorker
log(" read interface: %d $dff and %d $mux cells.\n", count_dff, count_mux);
if (!mem.wr_ports.empty())
{
for (int i = 0; i < mem.size; i++)
{
int addr = i + mem.start_offset;
@ -330,6 +336,7 @@ struct MemoryMapWorker
module->connect(RTLIL::SigSig(data_reg_in[idx], sig));
}
}
log(" write interface: %d write mux blocks.\n", count_wrmux);