diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-09-25 14:22:33 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-09-25 14:22:33 +0200 |
commit | 4864736167ba7538bc5f526ed251a74e184f6539 (patch) | |
tree | 330676d0461878be97c18150d84b4a48e5282255 /passes/memory/memory_bram.cc | |
parent | f9d7df086972217769f86392b30cadaa0a865c2d (diff) | |
download | yosys-4864736167ba7538bc5f526ed251a74e184f6539.tar.gz yosys-4864736167ba7538bc5f526ed251a74e184f6539.tar.bz2 yosys-4864736167ba7538bc5f526ed251a74e184f6539.zip |
Bugfix in bram read-enable code
Diffstat (limited to 'passes/memory/memory_bram.cc')
-rw-r--r-- | passes/memory/memory_bram.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/passes/memory/memory_bram.cc b/passes/memory/memory_bram.cc index 3e83a6d9b..b371578d4 100644 --- a/passes/memory/memory_bram.cc +++ b/passes/memory/memory_bram.cc @@ -859,8 +859,11 @@ grow_read_ports:; if (pi.enable) { SigSpec sig_en = pi.sig_en; - sig_en.extend_u0((grid_d+1) * pi.enable); - sig_en = sig_en.extract(grid_d * pi.enable, pi.enable); + + if (pi.wrmode == 1) { + sig_en.extend_u0((grid_d+1) * pi.enable); + sig_en = sig_en.extract(grid_d * pi.enable, pi.enable); + } if (!addr_ok.empty()) sig_en = module->Mux(NEW_ID, SigSpec(0, GetSize(sig_en)), sig_en, addr_ok); |