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-Tag: working~184 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=65702719e821f0578ef2754b141c287ca08f73f5;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()