[Libre-soc-bugs] [Bug 846] Pinmux Pinspec Interconnect Auto-Generation

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sat Oct 1 12:33:02 BST 2022


--- Comment #5 from Andrey Miroshnikov <andrey at technepisteme.xyz> ---
Here's the latest commit:

By reverse engineering the PinSpec "write()" method, I was initially able to
extract only the bank, pin, and mux information.

ps.pinbanks.keys() <-- Gives the available banks for the chip (A/B/C/D etc)
ps.keys() <-- Gives all pins (summing all banks)

But running in interactive shell was useful to find the rest of the dicts.
Also I answered my own question before finishing this comment.
"keys()" is a method you added to the Pinouts class (which PinSpec inherits)
that internally calls .pins.keys().

ps.byspec <-- dict that has the signal names with IOType information

Now that I have the information, I'll integrate it into the pinmux block by
feeding PinSpec object directly!

There seems to be a strange recursive duplication.
ps.items() gives the pin information (as ps is PinSpec and inherits Pinouts),
but the same dict is returned by ps.gpio.pinouts.items()
and this can be continued for a while (tried up to 20 levels, 4 shown):

Is this a bug? It doesn't seem like there are infinite objects (otherwise my
wouldn't be happy), but perhaps a circular reference somewhere?

Also added new sections to the pinmux doc (they may need to move around, but
haven't focused on that yet), 4.1.1-4.1.4 covering the terminology and the
PinSpec and Pinouts classes.

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

More information about the libre-soc-bugs mailing list