From 053434b9df457b32fdf3d335964a0b57c0c4546e Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 21 Sep 2021 19:36:53 +0200 Subject: [PATCH] litedram/gen/FIFO: Enable Bypass mode and do data-width adaptation directly in LiteDRAMFIFO. --- litedram/gen.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/litedram/gen.py b/litedram/gen.py index 76109e1..bb56af9 100755 --- a/litedram/gen.py +++ b/litedram/gen.py @@ -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 += [