From: whitequark Date: Fri, 14 Dec 2018 16:21:53 +0000 (+0000) Subject: pysim.back: fix add_sync_process wrapper to handle signals correctly. X-Git-Tag: working~251 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88970ee29fb1bef8800ceff9f2f6f5d0c058d610;p=nmigen.git pysim.back: fix add_sync_process wrapper to handle signals correctly. --- diff --git a/nmigen/back/pysim.py b/nmigen/back/pysim.py index ba32dbf..f0bfba1 100644 --- a/nmigen/back/pysim.py +++ b/nmigen/back/pysim.py @@ -243,7 +243,9 @@ class Simulator: try: result = process.send(None) while True: - result = process.send((yield (result or Tick(domain)))) + if result is None: + result = Tick(domain) + result = process.send((yield result)) except StopIteration: pass self.add_process(sync_process())