3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-30 16:03:17 +00:00

Make a few passes auto-call Mem::narrow instead of rejecting wide ports.

This essentially adds wide port support for free in passes that don't
have a usefully better way of handling wide ports than just breaking
them up to narrow ports, avoiding "please run memory_narrow" annoyance.
This commit is contained in:
Marcelina Kościelnicka 2021-05-27 23:43:25 +02:00
parent 055ba748bc
commit cbf6b719fe
5 changed files with 10 additions and 33 deletions

View file

@ -124,6 +124,7 @@ struct Smt2Worker
memories = Mem::get_all_memories(module);
for (auto &mem : memories)
{
mem.narrow();
mem_dict[mem.memid] = &mem;
for (auto &port : mem.wr_ports)
{
@ -715,12 +716,6 @@ struct Smt2Worker
has_sync_wr = true;
else
has_async_wr = true;
if (port.wide_log2)
log_error("Memory %s.%s has wide write ports. This is not supported by \"write_smt2\". Use memory_narrow to convert them first.\n", log_id(cell), log_id(module));
}
for (auto &port : mem->rd_ports) {
if (port.wide_log2)
log_error("Memory %s.%s has wide read ports. This is not supported by \"write_smt2\". Use memory_narrow to convert them first.\n", log_id(cell), log_id(module));
}
if (has_async_wr && has_sync_wr)
log_error("Memory %s.%s has mixed clocked/nonclocked write ports. This is not supported by \"write_smt2\".\n", log_id(cell), log_id(module));