From d10df1a8abb6e2d64ae6fb1f58874d66eb06711e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 17 Nov 2012 19:46:28 +0100 Subject: [PATCH] actorlib/sim: swap TokenExchanger parameters --- migen/actorlib/sim.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migen/actorlib/sim.py b/migen/actorlib/sim.py index 1d938755..f63e15b4 100644 --- a/migen/actorlib/sim.py +++ b/migen/actorlib/sim.py @@ -14,9 +14,9 @@ class Token: # NB: the possibility to push several tokens at once is important to interact # with actors that only accept a group of tokens when all of them are available. class TokenExchanger(PureSimulable): - def __init__(self, actor, generator): - self.actor = actor + def __init__(self, generator, actor): self.generator = generator + self.actor = actor self.active = set() self.done = False @@ -71,7 +71,7 @@ class TokenExchanger(PureSimulable): class SimActor(Actor): def __init__(self, generator, *endpoint_descriptions, **misc): super().__init__(*endpoint_descriptions, **misc) - self.token_exchanger = TokenExchanger(self, generator) + self.token_exchanger = TokenExchanger(generator, self) def get_fragment(self): return self.token_exchanger.get_fragment() -- 2.30.2