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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Nov 19 21:08:49 GMT 2021


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

--- Comment #43 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to andrey from comment #42)

> >     sim.add_sync_process(wrap(jtag_sim(dut))) # actual jtag tester
> >     sim.add_sync_process(wrap(dmi_sim(dut)))  # handles (pretends to be) DMI
> Ok, the jtag_sim tests the io connections, whereas the dmi_sim exercises the
> DMI register interface?

yes.  

> Code crashing:

terminology: "crashing" is extremely serious, it indicate a catastrophic
failure on the part of the binary executable, "/usr/bin/python3".

you should not use the term "crashing" for any interpreted language
unless, in fact, the actual interpreter binary executable does in fact
terminate with extreme prejudice, usually with a segfault and a coredump.

you meant to say, "an exception occurred" or "an exception was raised".

>     sim = Simulator(top)
>   File "/home/rohdo/src/nmigen/nmigen/sim/core.py", line 66, in __init__
>     self._fragment = Fragment.get(fragment, platform=None).prepare()
>   File "/home/rohdo/src/nmigen/nmigen/hdl/ir.py", line 37, in get
>     obj = obj.elaborate(platform)
>   File "testing_stage1.py", line 122, in elaborate
>     print ("resources", platform.resources.items())
> AttributeError: 'NoneType' object has no attribute 'resources'

this is likely correct.  you have attempted to use the module
directly, prior to having called "build".

only by calling "build" will platform resources be allocated.

if you recall, we went over this lsst week.

the situation is slightly unique in that further modules
are created (the pin pads) by the build process, meaning
that somehow the overall module needs to be extracted.

i have no idea how yet that is done, it will involve
analysing PlatformTemplate and comparing how it
calls elaborate() compared to how pysim calls
elaborate() to obtain a module.

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


More information about the libre-soc-bugs mailing list