From: Luke Kenneth Casson Leighton Date: Sat, 20 Jun 2020 00:04:02 +0000 (+0100) Subject: more declaration of singleton objects X-Git-Tag: 24jan2021_ls180~12 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5136791f5980dbd69518412d77ee7e3d897287c4;p=nmigen-soc.git more declaration of singleton objects --- 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 = []