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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Nov 29 17:06:30 GMT 2021


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

--- Comment #54 from andrey at technepisteme.xyz ---
(In reply to Luke Kenneth Casson Leighton from comment #53)
> (In reply to andrey from comment #52)
> 
> > What am I missing from the function to make it a generator?
> 
> a change in the simulator API 18 months ago requires the use
> of the wrap() function.

Thanks, adding the wrap function got the generator test function to be
accepted.
Now I'm trying to figure out the signal names to use in the test.

https://git.libre-soc.org/?p=pinmux.git;a=commitdiff;h=0f5e9d3241043e2439f39b98bfa496e1169dcd75

For example, accessing gpio0 output.

I tried the following:
>From the code in Blinker: gpio.gpio0.o
>From yosys diagram: gpio_0__gpio0__o__io
>From vcd GTKWave: gpio_0__gpio0__o__core__o, gpio_0__gpio0__o__o,
gpio_0__gpio0__o__pad__o
>From script's standard output resource: gpio0_o, gpio_0__gpio0__o

In all cases I got the:
Traceback (most recent call last):
  File "testing_stage1.py", line 425, in <module>
    sim.run()
  File "/home/rohdo/src/nmigen/nmigen/sim/core.py", line 165, in run
    while self.advance():
  File "/home/rohdo/src/nmigen/nmigen/sim/core.py", line 156, in advance
    return self._engine.advance()
  File "/home/rohdo/src/nmigen/nmigen/sim/pysim.py", line 319, in advance
    self._step()
  File "/home/rohdo/src/nmigen/nmigen/sim/pysim.py", line 308, in _step
    process.run()
  File "/home/rohdo/src/nmigen/nmigen/sim/_pycoro.py", line 123, in run
    self.coroutine.throw(exn)
  File "/home/rohdo/src/nmigen/nmigen/sim/_pycoro.py", line 64, in run
    command = self.coroutine.send(response)
  File "/home/rohdo/src/nmigen/nmigen/sim/core.py", line 90, in wrapper
    yield from process()
  File "/home/rohdo/src/nmutil/src/nmutil/util.py", line 53, in wrapper
    yield from process
  File "testing_stage1.py", line 376, in test_case0
    yield top.gpio0_o.eq(0)
AttributeError: 'Blinker' object has no attribute 'gpio0_o'

I thought the GPIO block is accessible as an attribute of top module.
What is the correct way to access the GPIO signals in the test?

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


More information about the libre-soc-bugs mailing list