diff options
Diffstat (limited to 'passes/memory/memory_nordff.cc')
-rw-r--r-- | passes/memory/memory_nordff.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/passes/memory/memory_nordff.cc b/passes/memory/memory_nordff.cc index 665efceb2..80f78ca77 100644 --- a/passes/memory/memory_nordff.cc +++ b/passes/memory/memory_nordff.cc @@ -57,9 +57,12 @@ struct MemoryNordffPass : public Pass { for (auto &mem : Mem::get_selected_memories(module)) { bool changed = false; - for (int i = 0; i < GetSize(mem.rd_ports); i++) - if (mem.extract_rdff(i, &initvals)) + for (int i = 0; i < GetSize(mem.rd_ports); i++) { + if (mem.rd_ports[i].clk_enable) { + mem.extract_rdff(i, &initvals); changed = true; + } + } if (changed) mem.emit(); |