From 31cece221a9540b1a76577991d073361f69db3c3 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 9 Oct 2020 13:38:43 +0100 Subject: [PATCH] add default features over-ride option to wishbone --- c4m/nmigen/jtag/tap.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/c4m/nmigen/jtag/tap.py b/c4m/nmigen/jtag/tap.py index 8beb7ed..638cee6 100755 --- a/c4m/nmigen/jtag/tap.py +++ b/c4m/nmigen/jtag/tap.py @@ -600,7 +600,7 @@ class TAP(Elaboratable): def add_wishbone(self, *, ircodes, address_width, data_width, - granularity=None, domain="sync", + granularity=None, domain="sync", features=None, name=None, src_loc_at=0): """Add a wishbone interface @@ -616,6 +616,7 @@ class TAP(Elaboratable): share a shift register of length data_width. address_width: width of the address data_width: width of the data + features: features required. defaults to stall, lock, err, rty Returns: wb: nmigen_soc.wishbone.bus.Interface @@ -624,6 +625,8 @@ class TAP(Elaboratable): if len(ircodes) != 3: raise ValueError("3 IR Codes have to be provided") + if features is None: + features={"stall", "lock", "err", "rty"} if name is None: name = "wb" + str(len(self._wbs)) sr_addr = self.add_shiftreg( @@ -636,8 +639,7 @@ class TAP(Elaboratable): ) wb = WishboneInterface(data_width=data_width, addr_width=address_width, - granularity=granularity, - features={"stall", "lock", "err", "rty"}, + granularity=granularity, features=features, name=name, src_loc_at=src_loc_at+1) self._wbs.append((sr_addr, sr_data, wb, domain)) -- 2.30.2