bus/wishbone: allow specifying existing interface

This commit is contained in:
Sebastien Bourdeauducq 2012-11-17 19:42:06 +01:00
parent d0d4c48098
commit ece786d6aa
1 changed files with 4 additions and 4 deletions

View File

@ -147,9 +147,9 @@ class Tap(PureSimulable):
self.handler(transaction)
class Initiator(PureSimulable):
def __init__(self, generator):
def __init__(self, generator, bus=Interface()):
self.generator = generator
self.bus = Interface()
self.bus = bus
self.transaction_start = 0
self.transaction = None
self.done = False
@ -192,8 +192,8 @@ class TargetModel:
return True
class Target(PureSimulable):
def __init__(self, model):
self.bus = Interface()
def __init__(self, model, bus=Interface()):
self.bus = bus
self.model = model
def do_simulation(self, s):