[Libre-soc-bugs] [Bug 50] nmigen pinmux

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Nov 29 14:59:47 GMT 2021


https://bugs.libre-soc.org/show_bug.cgi?id=50

--- Comment #52 from andrey at technepisteme.xyz ---
Removed code I took from the JTAG server test, replaced it with a simple sanity
test case.

https://git.libre-soc.org/?p=pinmux.git;a=blobdiff;f=src/spec/testing_stage1.py;h=db7e7ce1af63df7c553eb61824005b30d46f5915;hp=a2f1c5c5959d321999ae1bbdf861d414dd5c01a1;hb=0d65da15997f7128cab430408e4629adfcd94210;hpb=a61fe0517a767c5c0985ef8b7d8482c2a1e12a44

I'm getting a TypeError because simulator does not consider this function:
def test_case0():
    print("Starting sanity test case!")
    yield top.gpio_0__gpio_0__i__io.eq(0)
    yield 

Even though I have 'yield' statements in the function itself.

Traceback (most recent call last):
  File "testing_stage1.py", line 361, in <module>
    sim.add_sync_process(test_case0())
  File "/home/rohdo/src/nmigen/nmigen/sim/core.py", line 85, in
add_sync_process
    process = self._check_process(process)
  File "/home/rohdo/src/nmigen/nmigen/sim/core.py", line 73, in _check_process
    .format(process))
TypeError: Cannot add a process <generator object test_case0 at 0x7f459ca149a8>
because it is not a generator function


What am I missing from the function to make it a generator?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list