actorlib/fifo: add buffered parameter
authorSebastien Bourdeauducq <sb@m-labs.hk>
Fri, 21 Nov 2014 02:46:54 +0000 (18:46 -0800)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Fri, 21 Nov 2014 02:46:54 +0000 (18:46 -0800)
migen/actorlib/fifo.py

index b0aecaf5f5751840f333a5cb2f001a0851a21f81..52d2b50a8339484cbad24318b8412470ffe4f78c 100644 (file)
@@ -23,8 +23,11 @@ class _FIFOActor(Module):
                ]
 
 class SyncFIFO(_FIFOActor):
-       def __init__(self, layout, depth):
-               _FIFOActor.__init__(self, fifo.SyncFIFO, layout, depth)
+       def __init__(self, layout, depth, buffered=False):
+               _FIFOActor.__init__(
+                       self,
+                       fifo.SyncFIFOBuffered if buffered else fifo.SyncFIFO,
+                       layout, depth)
 
 class AsyncFIFO(_FIFOActor):
        def __init__(self, layout, depth):