From: whitequark Date: Thu, 12 Sep 2019 19:36:45 +0000 (+0000) Subject: lib.fifo: make fwft a keyword-only argument. X-Git-Tag: v0.1rc1~107 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b92e967b7815e6115f0a833efb8246dd63681d6b;p=nmigen.git lib.fifo: make fwft a keyword-only argument. Because it accepts a boolean. --- diff --git a/nmigen/lib/fifo.py b/nmigen/lib/fifo.py index ae1ed2d..ad8172f 100644 --- a/nmigen/lib/fifo.py +++ b/nmigen/lib/fifo.py @@ -58,7 +58,7 @@ class FIFOInterface: w_attributes="", r_attributes="") - def __init__(self, width, depth, fwft): + def __init__(self, width, depth, *, fwft): self.width = width self.depth = depth self.fwft = fwft @@ -121,8 +121,8 @@ class SyncFIFO(Elaboratable, FIFOInterface): """.strip(), w_attributes="") - def __init__(self, width, depth, fwft=True): - super().__init__(width, depth, fwft) + def __init__(self, width, depth, *, fwft=True): + super().__init__(width, depth, fwft=fwft) self.level = Signal.range(depth + 1) diff --git a/nmigen/test/test_lib_fifo.py b/nmigen/test/test_lib_fifo.py index 0b7daaa..972afcb 100644 --- a/nmigen/test/test_lib_fifo.py +++ b/nmigen/test/test_lib_fifo.py @@ -46,7 +46,7 @@ class FIFOModel(Elaboratable, FIFOInterface): Non-synthesizable first-in first-out queue, implemented naively as a chain of registers. """ def __init__(self, width, depth, fwft, rdomain, wdomain): - super().__init__(width, depth, fwft) + super().__init__(width, depth, fwft=fwft) self.rdomain = rdomain self.wdomain = wdomain