From: Sebastien Bourdeauducq Date: Sat, 17 Nov 2012 18:46:28 +0000 (+0100) Subject: actorlib/sim: swap TokenExchanger parameters X-Git-Tag: 24jan2021_ls180~2099^2~780 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d10df1a8abb6e2d64ae6fb1f58874d66eb06711e;p=litex.git actorlib/sim: swap TokenExchanger parameters --- 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()