lib.fifo.AsyncFIFOBuffered: use FFSynchronizer instead of AsyncFFsynchronizer
authorRobin Ole Heinemann <robin.ole.heinemann@gmail.com>
Sat, 2 Jan 2021 23:12:31 +0000 (00:12 +0100)
committerwhitequark <whitequark@whitequark.org>
Wed, 6 Jan 2021 01:05:46 +0000 (01:05 +0000)
AsyncFFsynchronizer only synchronizes one edge

nmigen/lib/fifo.py

index c78c96454676078feb6d5a48a755511fdd946cc0..98517d9ffe4db5b0b00c0f449cfb11333fcd1e9a 100644 (file)
@@ -513,7 +513,7 @@ class AsyncFIFOBuffered(Elaboratable, FIFOInterface):
         m.d[self._r_domain] += self.r_level.eq(fifo.r_level + r_consume_buffered)
 
         w_consume_buffered = Signal()
-        m.submodules.consume_buffered_cdc = AsyncFFSynchronizer(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)
         m.d.comb += self.w_level.eq(fifo.w_level + w_consume_buffered)
 
         with m.If(self.r_en | ~self.r_rdy):