memory_bram: Consider read enable for address expansion register
authorDavid Shah <dave@ds0.me>
Tue, 2 Apr 2019 18:47:50 +0000 (19:47 +0100)
committerDavid Shah <dave@ds0.me>
Tue, 2 Apr 2019 18:47:50 +0000 (19:47 +0100)
Signed-off-by: David Shah <dave@ds0.me>
passes/memory/memory_bram.cc

index 85ed1c053c016a2f861681fb21ce9c0d3b3a6464..804aa21f9451d6ff84c3d64f0cdcf685db710a2c 100644 (file)
@@ -957,6 +957,8 @@ grow_read_ports:;
                                        SigSpec addr_ok_q = addr_ok;
                                        if ((pi.clocks || pi.make_outreg) && !addr_ok.empty()) {
                                                addr_ok_q = module->addWire(NEW_ID);
+                                               if (!pi.sig_en.empty())
+                                                       addr_ok = module->Mux(NEW_ID, addr_ok_q, addr_ok, pi.sig_en);
                                                module->addDff(NEW_ID, pi.sig_clock, addr_ok, addr_ok_q, pi.effective_clkpol);
                                        }