bus/csr: allow specifying existing interface
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 17 Nov 2012 18:44:25 +0000 (19:44 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 17 Nov 2012 18:44:25 +0000 (19:44 +0100)
migen/bus/csr.py

index 0bce395dec37f1df22f7cfa9ff6e7deed37cfbc3..df2543482af08916fb5ab0b66a1ecd9ec0087190 100644 (file)
@@ -17,9 +17,9 @@ class Interconnect(SimpleInterconnect):
        pass
 
 class Initiator(PureSimulable):
-       def __init__(self, generator):
+       def __init__(self, generator, bus=Interface()):
                self.generator = generator
-               self.bus = Interface()
+               self.bus = bus
                self.transaction = None
                self.done = False