From b92e967b7815e6115f0a833efb8246dd63681d6b Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 12 Sep 2019 19:36:45 +0000 Subject: [PATCH] lib.fifo: make fwft a keyword-only argument. Because it accepts a boolean. --- nmigen/lib/fifo.py | 6 +++--- nmigen/test/test_lib_fifo.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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 -- 2.30.2