From: whitequark Date: Tue, 18 Dec 2018 04:43:04 +0000 (+0000) Subject: back.pysim: fix an off-by-1 in add_sync_process(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d95ffd6fa379e019320523c877c36a02e64c665b;p=nmigen.git back.pysim: fix an off-by-1 in add_sync_process(). --- diff --git a/nmigen/back/pysim.py b/nmigen/back/pysim.py index 65357bf..5a6b5ad 100644 --- a/nmigen/back/pysim.py +++ b/nmigen/back/pysim.py @@ -342,10 +342,11 @@ class Simulator: try: result = None while True: + self._process_loc[sync_process] = self._name_process(process) + result = process.send(result) if result is None: result = Tick(domain) - self._process_loc[sync_process] = self._name_process(process) - result = process.send((yield result)) + result = yield result except StopIteration: pass sync_process = sync_process()