gen/fhdl/memory: Fix dual clock memory pattern (previous pattern is no longer supported by Yosys), thanks @gregdavill.
See https://github.com/enjoy-digital/litex/issues/1003.
This commit is contained in:
parent
8fbd1b84a4
commit
fd354c5759
|
@ -21,6 +21,13 @@ def memory_emit_verilog(memory, ns, add_data_file):
|
||||||
adr_regs = {}
|
adr_regs = {}
|
||||||
data_regs = {}
|
data_regs = {}
|
||||||
|
|
||||||
|
# https://github.com/enjoy-digital/litex/issues/1003
|
||||||
|
# FIXME: Verify behaviour with the different FPGA toolchains.
|
||||||
|
clocks = [port.clock for port in memory.ports]
|
||||||
|
if clocks.count(clocks[0]) != len(clocks):
|
||||||
|
for port in memory.ports:
|
||||||
|
port.mode = READ_FIRST
|
||||||
|
|
||||||
for port in memory.ports:
|
for port in memory.ports:
|
||||||
if not port.async_read:
|
if not port.async_read:
|
||||||
if port.mode == WRITE_FIRST:
|
if port.mode == WRITE_FIRST:
|
||||||
|
|
Loading…
Reference in New Issue