from nmigen import Signal, Module
from nmigen.back.pysim import Simulator, Delay, Tick, Passive
from nmigen.hdl.ast import Assign, Value
-from nmigen.hdl.ir import Fragment
from typing import Any, Generator, List, Union, Optional, Tuple, Iterable
import unittest
from hashlib import sha256
yield Tick()
yield from generic_process(GenOrCheck.Check)
- f = Fragment.get(module, platform=None)
- if "sync" in f.drivers:
- sim.add_clock(2e-6)
+ sim.add_clock(2e-6, if_exists=True)
sim.add_process(generate_process)
sim.add_process(check_process)
sim.run()
yield Tick()
yield from process(GenOrCheck.Check)
- f = Fragment.get(module, platform=None)
- if "sync" in f.drivers:
- sim.add_clock(2e-6)
+ sim.add_clock(2e-6, if_exists=True)
sim.add_process(generate_process)
sim.add_process(check_process)
sim.run()