From 34ce934809cf4bd451d23352efd564692b86e426 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 5 Dec 2012 16:40:12 +0100 Subject: [PATCH] actorlib/sim: drive busy high until generator is finished --- migen/actorlib/sim.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migen/actorlib/sim.py b/migen/actorlib/sim.py index 00848e3f..e6885225 100644 --- a/migen/actorlib/sim.py +++ b/migen/actorlib/sim.py @@ -73,8 +73,11 @@ class SimActor(Actor): super().__init__(*endpoint_descriptions, **misc) self.token_exchanger = TokenExchanger(generator, self) + def update_busy(self, s): + s.wr(self.busy, not self.token_exchanger.done) + def get_fragment(self): - return self.token_exchanger.get_fragment() + return self.token_exchanger.get_fragment() + Fragment(sim=[self.update_busy]) class Dumper(SimActor): def __init__(self, layout, prefix=""): -- 2.30.2