You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am playing around with FIFOs to better understand them but I have found a weird thing happening.
When instantiating a FIFO larger than the block RAM size of the FPGA, in my case ECP5 with 18 kBits size, it seems that I am still only getting a single BRAM instantiated.
I would have expected these to be cascaded in this case.
E.g. below I have a 16 bit wide RAM I made at least 16k words deep, this should use about 16 BRAMs.
But I get the following resource usage, 1 BRAM, indicating to me that the depth has been silently truncated.
Is this correct? Or maybe I am using the FIFO wrongly?
fromnmigenimportElaboratable, Signal, Module, Replfromnmigen.buildimportPlatformfromnmigen.lib.fifoimportAsyncFIFOBufferedfrom ..utils.ecp5pllimportECP5PLL, ECP5PLLConfigclassPllTimer(Elaboratable):
defelaborate(self, platform: Platform):
led1=platform.request("led", 0)
led4=platform.request("led", 3)
timer1=Signal(25)
fifo_buf=Signal(16)
m=Module()
m.submodules.pll=ECP5PLL([
ECP5PLLConfig("sync", 25),
ECP5PLLConfig("fast", 100, error=0),
])
# Some really large depth for the FIFOm.submodules.fifo=fifo=AsyncFIFOBuffered(
width=16, depth=16000, r_domain="fast", w_domain="sync")
# Write the FIFO using the top 16 bits of the `timer1` data in the `sync` domainm.d.sync+=timer1.eq(timer1+1)
withm.If(fifo.w_rdy):
m.d.comb+=fifo.w_data.eq(timer1[9:25])
m.d.comb+=fifo.w_en.eq(1)
# Read the FIFO in the `fast` domain, the LEDs should blink at the same timewithm.If(fifo.r_rdy):
m.d.fast+=fifo_buf.eq(fifo.r_data)
m.d.comb+=fifo.r_en.eq(1)
# Connect LEDs to top bitsm.d.comb+=led1.o.eq(timer1[-1])
m.d.comb+=led4.o.eq(fifo_buf[-1])
returnm
The text was updated successfully, but these errors were encountered:
Hi, I am playing around with FIFOs to better understand them but I have found a weird thing happening.
When instantiating a FIFO larger than the block RAM size of the FPGA, in my case ECP5 with 18 kBits size, it seems that I am still only getting a single BRAM instantiated.
I would have expected these to be cascaded in this case.
E.g. below I have a 16 bit wide RAM I made at least 16k words deep, this should use about 16 BRAMs.
But I get the following resource usage, 1 BRAM, indicating to me that the depth has been silently truncated.
Is this correct? Or maybe I am using the FIFO wrongly?
My test code:
The text was updated successfully, but these errors were encountered: