From 88970ee29fb1bef8800ceff9f2f6f5d0c058d610 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 14 Dec 2018 16:21:53 +0000 Subject: [PATCH] pysim.back: fix add_sync_process wrapper to handle signals correctly. --- 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 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()) -- 2.30.2