From: whitequark Date: Tue, 18 Dec 2018 03:05:16 +0000 (+0000) Subject: back.pysim: continue running simulator processes until they suspend. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ed6369114f4c666b5418d389b7f315fcd7442bb;p=nmigen.git back.pysim: continue running simulator processes until they suspend. --- 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)