Fix nmigen "domain" error when trying to run unit tests
When I try to run any unit test with nmigen
c42c3a0, I get the
following error:
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/mnolan/git/ieee754fpu/src/ieee754/fpmul/test/test_fpmul_pipe.py", line 24, in <module>
test_pipe_fp16()
File "/home/mnolan/git/ieee754fpu/src/ieee754/fpmul/test/test_fpmul_pipe.py", line 12, in test_pipe_fp16
runfp(dut, 16, "test_fpmul_pipe_fp16", Float16, mul, n_vals=50)
File "/home/mnolan/git/ieee754fpu/src/ieee754/fpcommon/test/fpmux.py", line 316, in runfp
run_simulation(dut, fns, vcd_name="%s.vcd" % name)
File "/home/mnolan/git/nmigen/nmigen/compat/sim/__init__.py", line 22, in run_simulation
fragment.domains += ClockDomain("sync")
AttributeError: 'FPMULMuxInOut' object has no attribute 'domains'
This seems to fix this error by giving the functions in the testbench
a default clock domain, rather than leaving it up to nmigen to figure
out.