From 5136791f5980dbd69518412d77ee7e3d897287c4 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 20 Jun 2020 01:04:02 +0100 Subject: [PATCH] more declaration of singleton objects --- nmigen_soc/wishbone/bus.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nmigen_soc/wishbone/bus.py b/nmigen_soc/wishbone/bus.py index 2d9296c..580af84 100644 --- a/nmigen_soc/wishbone/bus.py +++ b/nmigen_soc/wishbone/bus.py @@ -225,8 +225,11 @@ class Decoder(Elaboratable): Bus providing access to subordinate buses. """ - def __init__(self, *, addr_width, data_width, granularity=None, features=frozenset(), + def __init__(self, *, addr_width, data_width, granularity=None, + features=None, alignment=0): + if features is None: + features = frozenset() self.bus = Interface(addr_width=addr_width, data_width=data_width, granularity=granularity, features=features, alignment=alignment) @@ -373,8 +376,11 @@ class Arbiter(Elaboratable): Shared bus to which the selected initiator gains access. """ - def __init__(self, *, addr_width, data_width, granularity=None, features=frozenset(), + def __init__(self, *, addr_width, data_width, granularity=None, + features=None, scheduler="rr"): + if features is None: + features = frozenset() self.bus = Interface(addr_width=addr_width, data_width=data_width, granularity=granularity, features=features) self._itors = [] -- 2.30.2