From c4c4765a4e25e0aacc6989318a9892ab0a844cc0 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 25 Mar 2013 14:44:15 +0100 Subject: [PATCH] bank/csrgen/BankArray: retain name information --- migen/bank/csrgen.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/migen/bank/csrgen.py b/migen/bank/csrgen.py index d3f158f8..6cf26b3e 100644 --- a/migen/bank/csrgen.py +++ b/migen/bank/csrgen.py @@ -113,20 +113,20 @@ class BankArray: mapaddr = self.address_map(name, memory) mmap = csr.SRAM(memory, mapaddr) registers += mmap.get_registers() - self.srams.append(mmap) + self.srams.append((name, memory, mmap)) if registers: mapaddr = self.address_map(name, None) rmap = Bank(registers, mapaddr) - self.banks.append(rmap) + self.banks.append((name, rmap)) - def get_banks(self): - return self.banks + def get_rmaps(self): + return [rmap for name, rmap in self.banks] - def get_srams(self): - return self.srams + def get_mmaps(self): + return [mmap for name, memory, mmap in self.srams] def get_buses(self): - return [i.bus for i in self.banks + self.srams] + return [i.bus for i in self.get_rmaps() + self.get_mmaps()] def get_fragment(self): - return sum([i.get_fragment() for i in self.banks + self.srams], Fragment()) + return sum([i.get_fragment() for i in self.get_rmaps() + self.get_mmaps()], Fragment()) -- 2.30.2