Services - tools - models - for embedded software development
Embecosm divider strip
Prev  Next

3.2.  The OpenRISC 1000 Remote JTAG Protocol

[Important]Important

The latest version of GDB for OpenRISC 1000 implements the GDB Remote Serial Protocol, which is the preferred mechanism for connecting to remote targets [2].

However the protocol described here is retained for backward compatibility. It is used here as a tutorial vehicle to illustrate how a custom debugging protocol can be used within GDB

To facilitate remote debugging by GDB, the OpenRISC defines a software protocol describing JTAG accesses, suitable for transport over TCP/IP via a socket interface.

[Note]Note

This protocol pre-dates the GDB Remote Serial Protocol (see Section 2.7). At some future date the OpenRISC 1000 Remote JTAG Protocol will be replaced by the RSP.

The OpenRISC 1000 Remote JTAG Protocol is a simple message send/acknowledge protocol. The JTAG request is packaged as a 32 bit command, 32-bit length and series of 32-bit data words. The JTAG response is packaged as a 32-bit status and optionally a number of 32-bit data words. The commands available are:

Where the Mohor version of the JTAG interface is being used, addresses for read/write accesses to the REGISTER scan chain are ignored—there is only one control register.

[Note]Note

There is apparently a contradiction in this protocol. Provision is made for individual registers to be read/written as 64 bits, whereas block read/writes (provided for communication efficiency) are only 32-bits.

Figure 3.1 shows the structures of all five requests and their corresponding (successful) responses. Note that if a request fails, the response will only contain the status word.

The OpenRISC 1000 Remote JTAG Protocol data structures

Figure 3.1.  The OpenRISC 1000 Remote JTAG Protocol data structures


The client side of this protocol (issuing the requests) is implemented by the GDB port for OpenRISC 1000.

Server side applications may implement this protocol to drive either physical hardware (via its JTAG port) or simulations, which include the JTAG functionality. Examples of the former include USB JTAG connectors, such as those produced by ORSoC™ AB. An example of the latter is the OpenRISC 1000 Architectural Simulator, Or1ksim (see Section 3.4).

Embecosm divider strip