X-Git-Url: https://git.libre-soc.org/?p=pinmux.git;a=blobdiff_plain;f=src%2Fbsv%2Fperipheral_gen%2Fbase.py;h=6a22061cb8a14aad4f174619ecf63b6c29b6b1aa;hp=53b5360b4de126901432f7683add55037ffe7c1b;hb=8c785c929837d10eb5b70c7aa2b4fb180269e056;hpb=afc31db1d093e8427afec750191c65574ddeb1da 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):