Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bank/csrgen/BankArray: create banks in sorted order

  • Loading branch information...
commit fc883198ae6ffa986ec084651005793648d98f45 1 parent 52d1395
@sbourdeauducq sbourdeauducq authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 migen/bank/csrgen.py
View
4 migen/bank/csrgen.py
@@ -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 @@ def __init__(self, source, address_map):
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:

0 comments on commit fc88319

Please sign in to comment.
Something went wrong with that request. Please try again.