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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sat Nov 13 08:56:59 GMT 2021


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

--- Comment #11 from andrey at technepisteme.xyz ---
(In reply to Luke Kenneth Casson Leighton from comment #10)
> diagram explaining JTAG redirection:
> https://libre-soc.org/shakti/m_class/JTAG/jtag-block.jpg
> 
> 3 phases needed here:
> 
> * phase 1 - simple dummy_pinset Resource list
> 
> a function is needed which turns the results of dummy_pinset()
> into:
> 
> [UARTResource("uart", 0, tx=..., rx=..),
>  I2CResource("i2c", 0, scl=..., sda=...),
>  Resource("gpio", 0, Subsignal("i"...), Subsignal("o"...)
>  Resource("gpio", 1, Subsignal("i"...), Subsignal("o"...)
>  ...
> ]

I created a file "testing_stage1.py" here:
https://git.libre-soc.org/?p=pinmux.git;a=blob;f=src/spec/testing_stage1.py;h=39690b52aa97cc116d73eafd0e2b5e7c8de0beb9;hb=8cb658e7ba3174d976a900065b1e62fcd49de61c

The file extends the dummy function you mentioned in comment #9

> and to create a Platform instance with that list, and build
> something random
> 
>    p=Platform()
>    p.resources=listofstuff
>    p.build(Blinker())

Haven't started yet.

> * phase 2 - read an arbitrary pinset (from a JSON file)
> 
> will edit tomorrow
> 
> * phase 3 - finally create an ASICPlatform with JTAG scan.
> 
> 
> 
> phase 1 should literally be no more than 20 lines of code.
> 
> phase 2 is a little more involved, some Resource peripherals
> need to be created, wrapping class Pin and creating Resource
> lists
> 
> phase 3 is quite straightforward.
> 
> more tomorrow

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


More information about the libre-soc-bugs mailing list