m.d[self._r_domain] += self.r_level.eq(fifo.r_level + r_consume_buffered)
w_consume_buffered = Signal()
- m.submodules.consume_buffered_cdc = FFSynchronizer(r_consume_buffered, w_consume_buffered, o_domain=self._w_domain)
+ m.submodules.consume_buffered_cdc = FFSynchronizer(r_consume_buffered, w_consume_buffered, o_domain=self._w_domain, stages=4)
m.d.comb += self.w_level.eq(fifo.w_level + w_consume_buffered)
with m.If(self.r_en | ~self.r_rdy):
fifo = AsyncFIFOBuffered(width=32, depth=9, r_domain="read", w_domain="write")
self.check_async_fifo_level(fifo, fill_in=5, expected_level=5)
+ def test_async_buffered_fifo_level_only_three(self):
+ fifo = AsyncFIFOBuffered(width=32, depth=9, r_domain="read", w_domain="write")
+ self.check_async_fifo_level(fifo, fill_in=3, expected_level=3)
+
def test_async_buffered_fifo_level_full(self):
fifo = AsyncFIFOBuffered(width=32, depth=9, r_domain="read", w_domain="write")
self.check_async_fifo_level(fifo, fill_in=10, expected_level=9)