From: whitequark Date: Tue, 22 Jan 2019 06:56:46 +0000 (+0000) Subject: compat.genlib.fifo: adjust _FIFOInterface shim to not require fwft=. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ed5be329dcf81ff7d3222d7642cc173e36649acf;p=nmigen.git compat.genlib.fifo: adjust _FIFOInterface shim to not require fwft=. --- 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