back.pysim: fix an off-by-1 in add_sync_process().

This commit is contained in:
whitequark 2018-12-18 04:43:04 +00:00
parent 34b81d0b87
commit 65702719e8

View file

@ -342,10 +342,11 @@ class Simulator:
try: try:
result = None result = None
while True: while True:
self._process_loc[sync_process] = self._name_process(process)
result = process.send(result)
if result is None: if result is None:
result = Tick(domain) result = Tick(domain)
self._process_loc[sync_process] = self._name_process(process) result = yield result
result = process.send((yield result))
except StopIteration: except StopIteration:
pass pass
sync_process = sync_process() sync_process = sync_process()