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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sat Dec 4 00:09:24 GMT 2021


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

--- Comment #68 from andrey at technepisteme.xyz ---
Created attachment 150
  --> https://bugs.libre-soc.org/attachment.cgi?id=150&action=edit
Sim showing I/O/OE test for all GPIOs

(In reply to Luke Kenneth Casson Leighton from comment #67)
> (In reply to andrey from comment #66)
> then add a temporary Signal to Blinker into which a copy of that value
> is placed.
Added, I'll keep that in mind for future problems.

> don't guess: CHECK. use a print statement to print out the type of the
> object.
> 
> *you* are in control, here.  any "guessing", your *immediate* reaction
> as an Engineer should be, "how can i confirm 100% my guess?"
I'm starting to do this more, and will aim to be self-sufficient, but also
offer my findings and ask to clarify if I still don't understand. 

> probably... but not via the Pins/Resources, it is completely the wrong
> data structure.
Yeah. The yosys diagram is starting to make more sense, now I can even tell
where the pins and signals are XD

> git pull and check the code-comments: you missed re-reading pad0_out-pad3_out
> after changing gpio0_pad_in.
Fixed.

There's now a test to verify i/o/oe (however it's not completely parametrised,
I had some thoughts to use get_attr to iterate over gpios, there might be a
cleaner way though). See the attached screenshot for more beautiful waveforms.
Oh, and am I uploading too many? The previous screenshots could probably be
removed to save space.

I started the UART test, and only noticed later you already gave the example
for writing to the UART pad.

Why do I have to use the UART pads from resource_table_pads, and not
boundary_scan_pads? Is the JTAG BS connection different for GPIOs and
peripherals like UART?

To get a GPIO pad:
gpio0_o = top.jtag.boundary_scan_pads['gpio_0__gpio0__o']['o']

To get a UART pad: 
uart_pad = top.jtag.resource_table_pads[('uart', 0)]

I guess it's not too important, but it might come to bite me when I do I2C
(I'll try both later, too tired now).

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


More information about the libre-soc-bugs mailing list