From ed5be329dcf81ff7d3222d7642cc173e36649acf Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 22 Jan 2019 06:56:46 +0000 Subject: [PATCH] compat.genlib.fifo: adjust _FIFOInterface shim to not require fwft=. --- nmigen/compat/genlib/fifo.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/nmigen/compat/genlib/fifo.py b/nmigen/compat/genlib/fifo.py index fee37b8..896b26b 100644 --- a/nmigen/compat/genlib/fifo.py +++ b/nmigen/compat/genlib/fifo.py @@ -1,5 +1,16 @@ -from ...lib.fifo import FIFOInterface as _FIFOInterface, \ - SyncFIFO, SyncFIFOBuffered +from ...tools import deprecated +from ...lib.fifo import FIFOInterface as NativeFIFOInterface, \ + SyncFIFO, SyncFIFOBuffered, AsyncFIFO, AsyncFIFOBuffered -__all__ = ["_FIFOInterface", "SyncFIFO", "SyncFIFOBuffered"] +__all__ = ["_FIFOInterface", "SyncFIFO", "SyncFIFOBuffered", "AsyncFIFO", "AsyncFIFOBuffered"] + + +@deprecated("attribute `fwft` must be provided to FIFOInterface constructor") +class CompatFIFOInterface(NativeFIFOInterface): + def __init__(self, width, depth): + super().__init__(width, depth, fwft=False) + del self.fwft + + +_FIFOInterface = CompatFIFOInterface -- 2.30.2