From fc883198ae6ffa986ec084651005793648d98f45 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 13 Mar 2013 23:07:44 +0100 Subject: [PATCH] bank/csrgen/BankArray: create banks in sorted order --- migen/bank/csrgen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migen/bank/csrgen.py b/migen/bank/csrgen.py index e345de3c..d3f158f8 100644 --- a/migen/bank/csrgen.py +++ b/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 @@ 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: -- 2.30.2