Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

JTAG Hub, Avalon JTAG UART

Hi,

I'm looking for documentation about how to communicate with an Avalon JTAG UART from an external microcontroller. I have read ug_virtualjtag and thus know how i could implement communication using custom logic, but I really would like to access the generic JTAG UART. Why reinvent the wheel...

The first obstacle to overcome is the JTAG Hub. Is there any way to determine the number and type of virtual devices attached to the Hub? I can see in (traced) JTAG communication that IR sometimes is loaded with instructions longer than 10 bits (in a chain with only a single EP1C12F324), and instructions with code 0xC and 0xE appear quite often and seem to select a particular chain at the hub, maybe a register in the virtual device in that chain?

Second, I need to know how to communicate with the JTAG UART. It seems to me that there is a small IR in the JTAG Hub itself (3 or 5 bits?), which is polled until there is some data-available-bit set. Then the complete FIFO is read (10 bits per data byte?). But is it flushed at the same time? And how to write data to the FIFO(s) so that a Nios could receive it?

While I'm at it: it would also be convenient to know if there's a generic method to access any Avalon slave registers and memory contents (e.g. RAM) via JTAG...

Thanks for any hints

Kolja

12 Replies