migen/bank: do not create interface in default param
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 6 Dec 2012 16:28:28 +0000 (17:28 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 6 Dec 2012 16:28:28 +0000 (17:28 +0100)
migen/bank/csrgen.py

index cd87316b0045a4a7b1716b17a9d172e219caee99..4112e2b730de1df7d66bc0fd1db527a41f5a4c94 100644 (file)
@@ -3,9 +3,11 @@ from migen.bus import csr
 from migen.bank.description import *
 
 class Bank:
-       def __init__(self, description, address=0, bus=csr.Interface()):
+       def __init__(self, description, address=0, bus=None):
                self.description = description
                self.address = address
+               if bus is None:
+                       bus = csr.Interface()
                self.bus = bus
        
        def get_fragment(self):