stream/AsyncFIFO: add default depth (useful when used for CDC).
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 14 Apr 2020 15:34:57 +0000 (17:34 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 14 Apr 2020 15:35:19 +0000 (17:35 +0200)
litex/soc/interconnect/stream.py

index 4558ac8c98859049aef7205a00e0ac85c2be4429..f70393aa339f13da21c1c90e0bcdbf922e7a4ba5 100644 (file)
@@ -228,7 +228,7 @@ class SyncFIFO(_FIFOWrapper):
 
 
 class AsyncFIFO(_FIFOWrapper):
-    def __init__(self, layout, depth, buffered=False):
+    def __init__(self, layout, depth=4, buffered=False):
         assert depth >= 4
         _FIFOWrapper.__init__(self,
             fifo_class = fifo.AsyncFIFOBuffered if buffered else fifo.AsyncFIFO,