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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70545fbfbad6e43af401476f7dc16365b0375548;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())