mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-22 14:17:27 +02: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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user