From ece786d6aa75c1fc6623384dd054de213b728141 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 17 Nov 2012 19:42:06 +0100 Subject: [PATCH] bus/wishbone: allow specifying existing interface --- migen/bus/wishbone.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migen/bus/wishbone.py b/migen/bus/wishbone.py index 0b60f9ea9..e55da5de1 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):