Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

bank/csrgen/BankArray: create banks in sorted order

  • Loading branch information...
commit fc883198ae6ffa986ec084651005793648d98f45 1 parent 52d1395
Sébastien Bourdeauducq authored March 13, 2013

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  migen/bank/csrgen.py
4  migen/bank/csrgen.py
... ...
@@ -1,3 +1,5 @@
  1
+from operator import itemgetter
  2
+
1 3
 from migen.fhdl.structure import *
2 4
 from migen.bus import csr
3 5
 from migen.bank.description import *
@@ -100,7 +102,7 @@ def __init__(self, source, address_map):
100 102
 	def scan(self):
101 103
 		self.banks = []
102 104
 		self.srams = []
103  
-		for name, obj in self.source.__dict__.items():
  105
+		for name, obj in sorted(self.source.__dict__.items(), key=itemgetter(0)):
104 106
 			if hasattr(obj, "get_registers"):
105 107
 				registers = obj.get_registers()
106 108
 			else:

0 notes on commit fc88319

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