[Libre-soc-bugs] [Bug 50] nmigen pinmux
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Tue Dec 7 18:55:40 GMT 2021
https://bugs.libre-soc.org/show_bug.cgi?id=50
--- Comment #72 from andrey at technepisteme.xyz ---
(In reply to Luke Kenneth Casson Leighton from comment #71)
> (In reply to andrey from comment #70)
> + print ("bs pad keys", top.jtag.boundary_scan_pads.keys())
Thanks for the fix. I'll be sure to use .keys() from now on, I was trying to
figure out how to view the dictionary keys too...
> flipping the boundary scan bits, as is done in test_jtag_tap_srv.py
Started working on this. The sequence so far is:
https://git.libre-soc.org/?p=pinmux.git;a=commitdiff;h=e1706017b9fae3f71c122292ee0c4cae1303d520
1. Reset the JTAG BS by doing:
yield from jtag_set_reset(top.jtag)
2. Manipulate the core and pad signals (for example GPIO 0):
top.jtag.ios['gpio_0__gpio0__i'].core.i.eq(1)
top.jtag.ios['gpio_0__gpio0__i'].pad.i.eq(0)
3. Call an empty yield to progress to next clock cycle.
You mentioned that Tck is toggled by jtag_set_reset(), and I checked this is
the case in the code:
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/debug/jtagutils.py;hb=0eb75ea62a5f20e1824f9a25daefda9ff0340e53#l23
I looked at the test_jtag_tap_srv.py as a basis, and I don't see anything done
other than the steps I mentioned. I'm ignoring the jtag_read_write_reg however,
as I don't expect it to be needed for this task yet.
...
UPDATE
...
As I was writing this, I spotted that I missed "yield from" when using
"jtag_set_reset()", so that's one issue solved.
However I get an AttributeError because inside "tms_state_set()", the code is
trying to access "cbus" object to toggle Tck:
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/debug/jtagutils.py;hb=0eb75ea62a5f20e1824f9a25daefda9ff0340e53#l25
yield dut.cbus.tms.eq(bit)
Our Blinker top.jtag does NOT have cbus. Should it have one?
And if so, what is it for?
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list