actorlib/sim/SimActor: remove dead time between transactions
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 20 Jun 2012 20:39:52 +0000 (22:39 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 20 Jun 2012 20:39:52 +0000 (22:39 +0200)
migen/actorlib/sim.py

index b79019150589fd64cece5091bf0fae318ebd1b7a..76e126e1de6acb6d40d5191c34b7ad9f6b8cc737 100644 (file)
@@ -57,13 +57,13 @@ class SimActor(PureSimulable, Actor):
                        or isinstance(transactions, set):
                        self.active = set(transactions)
                elif transactions is None:
-                       self.active = []
+                       self.active = set()
                else:
                        raise TypeError
        
        def do_simulation(self, s):
                if not self.done:
+                       if not self.active:
+                               self._next_transactions()
                        if self.active:
                                self._process_transactions(s)
-                       else:
-                               self._next_transactions()