From: Sebastien Bourdeauducq Date: Sat, 17 Nov 2012 18:42:06 +0000 (+0100) Subject: bus/wishbone: allow specifying existing interface X-Git-Tag: 24jan2021_ls180~2099^2~783 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ece786d6aa75c1fc6623384dd054de213b728141;p=litex.git bus/wishbone: allow specifying existing interface --- diff --git a/migen/bus/wishbone.py b/migen/bus/wishbone.py index 0b60f9ea..e55da5de 100644 --- a/migen/bus/wishbone.py +++ b/migen/bus/wishbone.py @@ -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):