mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
bank/csrgen/BankArray: create banks in sorted order
This commit is contained in:
parent
52d13959f2
commit
fc883198ae
1 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
from operator import itemgetter
|
||||
|
||||
from migen.fhdl.structure import *
|
||||
from migen.bus import csr
|
||||
from migen.bank.description import *
|
||||
|
@ -100,7 +102,7 @@ class BankArray:
|
|||
def scan(self):
|
||||
self.banks = []
|
||||
self.srams = []
|
||||
for name, obj in self.source.__dict__.items():
|
||||
for name, obj in sorted(self.source.__dict__.items(), key=itemgetter(0)):
|
||||
if hasattr(obj, "get_registers"):
|
||||
registers = obj.get_registers()
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue