fpgas-verify: the JTAG IDCODE and the device DNA¶
You have an Acorn, Arty or NeTV2 and want to know how the check reads and judges its FPGA’s JTAG IDCODE and device DNA. Every fpgas-verify page is listed in fpgas-verify.
The JTAG IDCODE¶
Every board with JTAG has its FPGA’s whole 32-bit IDCODE read and decoded
(idcode.py):
Board |
Read with |
Must be |
In the report |
|---|---|---|---|
Acorn |
|
CLE-215+ and CLE-215: XC7A200T; CLE-101: XC7A100T |
the |
Arty A7 |
|
XC7A35T |
the board’s |
NeTV2 |
the scan that finds it: OpenOCD (Pi 3/4) or |
the variant’s part: XC7A35T or XC7A100T |
the board’s |
The Fomu EVT and TT FPGA have no JTAG.
Plain
openFPGALoader --detectprints the IDCODE its part table holds, which for these parts has the version masked off (idcode 0x3636093for an XC7A200T that answers0x13636093). Its raw scan, printed at--verbose-level 2as- 0 -> 0x13636093, is the whole value; OpenOCD’stap/device found:is too.Reading the IDCODE only shifts the data register after a TAP reset: it never reconfigures the FPGA. The check holds the board’s lock throughout (the Acorn’s is
/run/lock/fpgas-acorn.lock, shared withfpgas-acorn-flash), and on the Acorn the JTAG pins are put back as they were found.The part is compared without the version, so another silicon revision of the right part passes. A part that is not the variant’s fails the board, and so does an IDCODE with bit 0 clear.
A JTAG chain of more than one device fails the board, with every IDCODE on it in the reason. That holds for the NeTV2 too: finding it picks its part out of the chain, but the check counts every device the scan saw.
A scan whose tool exits with an error fails, even when it printed the right IDCODE; the reason gives the exit code. The IDCODE it printed is still decoded in the report.
Field |
Bits |
Example (an Acorn CLE-215+) |
|---|---|---|
|
31:0, 8 hex digits |
|
|
31:28, the silicon revision |
|
|
27:12 |
|
|
11:1, the JEP106 code (bank in 11:8) |
|
|
the JEP106 code’s name |
|
|
the IDCODE without its version, from the table below ( |
|
IDCODE, version 0 |
Device |
|---|---|
|
XC7A15T |
|
XC7A35T |
|
XC7A50T |
|
XC7A75T |
|
XC7A100T |
|
XC7A200T |
An Acorn CLE-215+ on a Raspberry Pi 5, read holding the Acorn lock:
$ sudo openFPGALoader --cable libgpiod --pins 10:9:11:8 --detect --verbose-level 2
libgpiod jtag bitbang driver, dev=/dev/gpiochip0, tck_pin=11, tms_pin=8, tdi_pin=10, tdo_pin=9
Raw IDCODE:
- 0 -> 0x13636093
- 1 -> 0xffffffff
Fetched TDI, end-of-chain
found 1 devices
index 0:
idcode 0x3636093
manufacturer xilinx
family artix a7 200t
model xc7a200
irlength 6
Its jtag test entry:
{"test": "jtag", "idcode": "0x13636093", "idcode_version": 1, "idcode_part_number": "0x3636",
"idcode_manufacturer_id": "0x049", "idcode_manufacturer": "Xilinx", "idcode_device": "XC7A200T",
"dna": "0x54b48664b04854",
"output": ["- 0 -> 0x13636093", "- 1 -> 0xffffffff", "{\"dna\": \"0x0054b48664b04854\"}"], "result": "pass"}
The device DNA¶
The Acorn, Arty and NeTV2 have their FPGA’s device DNA read: a 57-bit number fused into each chip, different on
every one (dna.py).
Board |
Read with |
In the report |
|---|---|---|
Acorn |
over BAR0, and |
the |
Arty A7 |
|
the board’s |
NeTV2, Pi 5 |
|
the board’s |
NeTV2, Pi 3/4 |
|
the board’s |
The JTAG read runs only once the IDCODE scan has found the one FPGA expected. Otherwise it is not run, the scan’s fault is the reason, and
dna_errorsays the DNA was not read.--read-dnaresets the TAP, shifts in the FUSE_DNA instruction (0x32) and shifts out 64 bits. It loads nothing and never reconfigures the FPGA, so--identifyreads it too. The board’s lock is held throughout; on the NeTV2 the JTAG pins are put back withpinctrlas after its scan.The FUSE_DNA instruction goes in through TDI and the DNA comes out on TDO, so a good DNA also shows TDI works; the IDCODE scan does not use TDI.
A read that exits with an error or prints no DNA fails the board; the reason ends with its last line of output. A DNA of all zeros or all ones fails it too: the DNA port is not being read.
A good DNA is
dnain thejtagentry, the identity and the recorded state, as 16 hex digits (0x0054b48664b04854). Otherwise the identity hasdna_error, with why.
openFPGALoader has --read-dna from 0.13.0:
openFPGALoader |
|
|---|---|
Debian bookworm’s (0.10.0) |
no, so the board packages need 0.13.0 or later: on bookworm, fpgas.online’s |
0.13.0 and later, and fpgas.online’s |
yes, over any JTAG cable: the read is in openFPGALoader’s Xilinx code ( |