X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fbsv%2Fperipheral_gen%2Fbase.py;h=53b5360b4de126901432f7683add55037ffe7c1b;hb=afc31db1d093e8427afec750191c65574ddeb1da;hp=e96504ec6949c5beefb2b8b37b9f0b988ce6ed58;hpb=a5e43947f68123b6ebba0db7e9efa1204353dbe2;p=pinmux.git diff --git a/src/bsv/peripheral_gen/base.py b/src/bsv/peripheral_gen/base.py index e96504e..53b5360 100644 --- a/src/bsv/peripheral_gen/base.py +++ b/src/bsv/peripheral_gen/base.py @@ -639,7 +639,7 @@ class PeripheralIface(object): return ('', 0) return self.slow.axi_slave_idx(start, self.ifacename, count, typ) - def axi_fastaddr_map(self, count): + def axi_fastaddr_map(self, name, count): if not self.slow: return '' return self.slow.axi_fastaddr_map(self.ifacename, count) @@ -675,6 +675,7 @@ class PeripheralInterfaces(object): ('_mk_clk_con', MkClkCon, 8), ('mk_ext_ifacedef', MkExtIface, 8), ('axi_addr_map', MkAxiAddrMap, 8), + ('axi_fastaddr_map', MkAxiFastAddrMap, 8), ): fn = CallIfaceFn(self, kls, indent) setattr(self, fname, types.MethodType(fn, self)) @@ -799,15 +800,6 @@ class PeripheralInterfaces(object): return self._axi_num_idx(0, axi_fastslave_declarations, 'fastslave', 'fast', *args) - def axi_fastaddr_map(self, *args): - ret = [] - for (name, count) in self.ifacecount: - for i in range(count): - if self.is_on_fastbus(name, i): - continue - ret.append(self.data[name].axi_fastaddr_map(i)) - return '\n'.join(li(list(filter(None, ret)), 8)) - def mkfast_peripheral(self, *args): ret = [] for (name, count) in self.ifacecount: @@ -971,6 +963,16 @@ class IfaceIter(object): def next(self): return self.__next__() + +class MkAxiFastAddrMap(IfaceIter): + + def check(self, name, i): + return not self.ifaces.is_on_fastbus(name, i) + + def item(self, name, i): + return self.ifaces.data[name].axi_fastaddr_map(name, i) + + class MkAxiAddrMap(IfaceIter): def check(self, name, i):