litedram/gen/FIFO: Enable Bypass mode and do data-width adaptation directly in LiteDRAMFIFO.

This commit is contained in:
Florent Kermarrec 2021-09-21 19:36:53 +02:00
parent 2d4a47f260
commit 053434b9df
1 changed files with 5 additions and 3 deletions

View File

@ -742,15 +742,17 @@ class LiteDRAMCore(SoCCore):
]
# FIFO ---------------------------------------------------------------------------------
elif port["type"] == "fifo":
user_port = self.sdram.crossbar.get_port(data_width=port.get("data_width", None))
platform.add_extension(get_fifo_user_port_ios(name, user_port.data_width))
user_port = self.sdram.crossbar.get_port()
data_width = port.get("data_width", user_port.data_width)
platform.add_extension(get_fifo_user_port_ios(name, data_width))
_user_fifo_io = platform.request("user_fifo_{}".format(name))
fifo = LiteDRAMFIFO(
data_width = user_port.data_width,
data_width = data_width,
base = port["base"],
depth = port["depth"],
write_port = self.sdram.crossbar.get_port("write"),
read_port = self.sdram.crossbar.get_port("read"),
with_bypass = True,
)
self.submodules += fifo
self.comb += [