bus/wishbone: allow specifying existing interface
This commit is contained in:
parent
d0d4c48098
commit
ece786d6aa
|
@ -147,9 +147,9 @@ class Tap(PureSimulable):
|
||||||
self.handler(transaction)
|
self.handler(transaction)
|
||||||
|
|
||||||
class Initiator(PureSimulable):
|
class Initiator(PureSimulable):
|
||||||
def __init__(self, generator):
|
def __init__(self, generator, bus=Interface()):
|
||||||
self.generator = generator
|
self.generator = generator
|
||||||
self.bus = Interface()
|
self.bus = bus
|
||||||
self.transaction_start = 0
|
self.transaction_start = 0
|
||||||
self.transaction = None
|
self.transaction = None
|
||||||
self.done = False
|
self.done = False
|
||||||
|
@ -192,8 +192,8 @@ class TargetModel:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
class Target(PureSimulable):
|
class Target(PureSimulable):
|
||||||
def __init__(self, model):
|
def __init__(self, model, bus=Interface()):
|
||||||
self.bus = Interface()
|
self.bus = bus
|
||||||
self.model = model
|
self.model = model
|
||||||
|
|
||||||
def do_simulation(self, s):
|
def do_simulation(self, s):
|
||||||
|
|
Loading…
Reference in New Issue