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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Dec 10 23:10:18 GMT 2021


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

--- Comment #76 from Andrey Miroshnikov <andrey at technepisteme.xyz> ---
(In reply to Luke Kenneth Casson Leighton from comment #75)
> (In reply to Andrey Miroshnikov from comment #74)
> that's adding the Record (IOConn) to an internal list, self._ios.
> that then, if you search for self._ios, lines 587, 590, 593, 595,
> 600, 601 and 602, you can see the Muxes.
Thanks, very useful.

> we see the *exact same data structure being added to a dictionary-version
> self.ios instead of a list-version self._ios.
> 
> therefore, logically, we may deduce that those *are* the IOConn Records,
> and that if they're not changing then you're doing something wrong.
JTAG has the ios signals as public, however I did not see those signals being
brought out to Blinker's public ports.
Since the JTAG mechanism is working by using TDI however, I'll leave the deeper
understanding till later.

> well, it's going to be a shift register, obviously, because JTAG *is*
> shift registers.  this looks like it's setting something, doesn't it?
> 
>  74     bs = yield from jtag_read_write_reg(dut, BS_SAMPLE, bslen, bs_actual)
JTAG also has additional registers (like Instruction Register), so I thought
that some special address has to be specified in order to propagate the test
bitstream into the actual shift register used for the Blinker's core/pad
signals.

I'm honestly amazed how deceptively simple it is. Again I was overcomplicating.

Just one command!

Also, for the BS_SAMPLE parameter (address), I set it to be 0. Is this meant to
be anything else?


After trying jtag_read_write_reg() with a few test bitstream, I was able to
alter the states of the signals normally controlled by the core.

At the same time, after setting the pad inputs (uart rx, gpio i, etc.),
jtag_read_write_reg() also shows that those signals are set.

Here's the jtag bs test so far:
https://git.libre-soc.org/?p=pinmux.git;a=blob;f=src/spec/testing_stage1.py;h=a73da8179078e8e67879fd04dd3c1da29ba67fda;hb=823c97d150034ced5e10ceaf36d54eb626c642f7#l645

Now I'll add asserts to the test by verifying:
-Signals set by JTAG shift register have the right values
-JTAG output shows correct values for the input pad signals

For this I want to use the ios dict, as it will allow to easily decode the JTAG
output bistream (e.g. uart rx pin corresponds to bit0 of the shift register and
bit19 of the output word).

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


More information about the libre-soc-bugs mailing list