From d6e98fd934086312c6c08106ec339d37eb99b174 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 18 Dec 2018 03:05:16 +0000 Subject: [PATCH] back.pysim: continue running simulator processes until they suspend. --- nmigen/back/pysim.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nmigen/back/pysim.py b/nmigen/back/pysim.py index 1871389..5cb7ebf 100644 --- a/nmigen/back/pysim.py +++ b/nmigen/back/pysim.py @@ -554,10 +554,12 @@ class Simulator: interval = cmd.interval self._wait_deadline[process] = self._timestamp + interval self._suspended.add(process) + break elif isinstance(cmd, Tick): self._wait_tick[process] = cmd.domain self._suspended.add(process) + break elif isinstance(cmd, Passive): self._passive.add(process) @@ -594,7 +596,7 @@ class Simulator: raise TypeError("Received unsupported command '{!r}' from process '{}'" .format(cmd, self._name_process(process))) - break + cmd = process.send(None) except StopIteration: self._processes.remove(process) -- 2.30.2