glip  0.1.0-dev
The Generic Logic Interfacing Project
JTAG Wire Protocol
Note
This section requires some familarity with JTAG and the JTAG state machine. If this sounds unfamiliar, please read up on those topics first before returning to this documentation.

GLIP uses a custom data transmission protocol on top of JTAG to achieve reasonable performance. Two main factors limit the throughput over JTAG:

Considering those factors, the central idea of the GLIP JTAG protocol is the usage of very large transmissions, i.e. a very long shift register to achieve good performance. All communication is done in the JTAG data shift state (dshift). To further reduce the overhead introduced by round-trip delays, we chose a flow control protocol based on the opportunistic sending of data, which is then acknowledged by the FPGA or (if not acknowledged) retransmitted by the host.

Three types of communication messages are defined, which are described below.

Configuration Discovery

Before starting the communication between the host and the target, the host needs to get the values of some configuration parameters, passed to glip_jtag_toplevel at synthesis time.

Therefore, communication starts with a configuration discovery transmission, which is depicted below:

word  0        1            2
bit   15     0 15         0 15        0
     +--------+------------+-----------+
req  | 0xFFFF |   0x0000   |  0x0000   |
     +--------+------------+-----------+
     +--------+------------+-----------+
resp | 0x0000 | WORD_WIDTH | NUM_WORDS |
     +--------+------------+-----------+

Side Channel Communication

GLIP supports the transmission of side-channel data in addition to the FIFO payload data. This data is transferred in the same way as the configuration discovery packet.

word  0        1            2
bit   15     0 15         0 15        0
     +--------+------------+-----------+
req  | 0xFFFF |     SC     |  0x0000   |
     +--------+------------+-----------+
     +--------+------------+-----------+
resp | 0x0000 |   ignored  |  ignored  |
     +--------+------------+-----------+

SC is a bitfield of side-channel data.

Data Communication

The basic idea of the data communication is the following.

The word width (WW in the following diagram) is equal to the FIFO width on the logic side.

word  0             1             2            n+1          n+2            n+3
bit   WW-1        0 WW-1        0 WW-1      0  WW-1       0 WW-1         0 WW-1         0
     +-------------+-------------+-----------+/+-----------+--------------+--------------+
req  | WR_REQ_SIZE | RD_REQ_SIZE | WR_WORD_1 |/| WR_WORD_n |    0x0000    |    0x0000    |
     +-------------+-------------+-----------+/+-----------+--------------+--------------+
     +-------------+-------------+-----------+/+-----------+--------------+--------------+
resp |    0x0000   |    0x0000   | RD_WORD_1 |/| RD_WORD_n | WR_RESP_SIZE | RD_RESP_SIZE |
     +-------------+-------------+-----------+/+-----------+--------------+--------------+