#tap #jtag #chain #cable #bits #scan #read

jtag-taps

Library for interacting with individual TAPs on a JTAG scan chain

9 releases (4 breaking)

0.5.0 Oct 24, 2023
0.4.0 Oct 21, 2023
0.3.0 Oct 17, 2023
0.2.3 Oct 16, 2023
0.1.1 Sep 30, 2023

#293 in Hardware support

Download history 3/week @ 2024-02-16 11/week @ 2024-02-23 6/week @ 2024-03-01 7/week @ 2024-03-08 4/week @ 2024-03-15 74/week @ 2024-03-29

85 downloads per month
Used in 3 crates

MIT license

57KB
1.5K SLoC

jtag-taps

This crate allows for interacting with a JTAG test chain at a variety of levels of abstraction. At the lowest level, you can directly interact with a JTAG cable, such as those based on the "jtagkey" design. Other FT2232-based cables could easily be added, as well as direct GPIO control. The Cable trait allows for changing modes and shifting bits in and out of the JTAG chain.

The next higher level of abstraction is the JtagSM, which keeps track of the mode of the TAPs. You tell it which mode you want (e.g., Reset or Idle) and it gets there with the fewest number of mode changes. You can also read and write the instruction and data registers. read_write and write_reg take care of getting to ShiftDR or ShiftIR mode as appropriate.

If there are multiple TAPs in the JTAG chain, you probably want to use the methods associated with the Taps struct. You tell Taps how much TAPs exist and what the IR length is for each one. You can then read and write the instruction and data registers for that one TAP, and it will take care of putting other TAPs in BYPASS and shifting data in and out as appropriate. Taps also has some support for automatically detecting the IR lengths and ID codes of the TAPs.

Dependencies

~9.5MB
~108K SLoC