From: Luke Kenneth Casson Leighton Date: Sun, 5 Aug 2018 19:23:44 +0000 (+0100) Subject: move slowifdeclmux to class X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c785c929837d10eb5b70c7aa2b4fb180269e056;p=pinmux.git move slowifdeclmux to class --- diff --git a/src/bsv/peripheral_gen/base.py b/src/bsv/peripheral_gen/base.py index 53b5360..6a22061 100644 --- a/src/bsv/peripheral_gen/base.py +++ b/src/bsv/peripheral_gen/base.py @@ -676,6 +676,7 @@ class PeripheralInterfaces(object): ('mk_ext_ifacedef', MkExtIface, 8), ('axi_addr_map', MkAxiAddrMap, 8), ('axi_fastaddr_map', MkAxiFastAddrMap, 8), + ('slowifdeclmux', MkSlowIfDeclMux, 8), ): fn = CallIfaceFn(self, kls, indent) setattr(self, fname, types.MethodType(fn, self)) @@ -721,13 +722,6 @@ class PeripheralInterfaces(object): ret.append(self.data[name].extifdecl(name, i)) return '\n'.join(li(list(filter(None, ret)), 8)) - def slowifdeclmux(self, *args): - ret = [] - for (name, count) in self.ifacecount: - for i in range(count): - ret.append(self.data[name].slowifdeclmux(name, i)) - return '\n'.join(li(list(filter(None, ret)), 8)) - def fastifdecl(self, *args): ret = [] for (name, count) in self.ifacecount: @@ -963,6 +957,14 @@ class IfaceIter(object): def next(self): return self.__next__() +class MkSlowIfDeclMux(IfaceIter): + + def check(self, name, i): + return True + + def item(self, name, i): + return self.ifaces.data[name].slowifdeclmux(name, i) + class MkAxiFastAddrMap(IfaceIter):