Tx Register Ready Bit (Tr); Conditional Execution Using Txrxctrl; Tx Handshaking; Txrxctrl Mnemonic Extensions - Intel XScale Core Developer's Manual

Table of Contents

Advertisement

9.8.4

TX Register Ready Bit (TR)

The debugger and debug handler use the TR bit to synchronize accesses to the TX register. The
debugger and debug handler must poll the TR bit before accessing the TX register.
shows the handshaking used to access the TX register.
Table 9-11.

TX Handshaking

Debugger Actions
Debugger is expecting data from the debug handler.
Before reading data from the TX register, the debugger polls the TR bit through JTAG until the bit is set. NOTE:
while polling TR, the debugger must scan out the TR bit and the TX register data.
Reading a '1' from the TR bit, indicates that the TX data scanned out is valid
The action of scanning out data when the TR bit is set, automatically clears TR.
Debug Handler Actions
Debug handler wants to send data to the debugger (in response to a previous request).
The debug handler polls the TR bit to determine when the TX register is empty (any previous data has been
read out by the debugger). The handler polls the TR bit until it is clear.
Once the TR bit is clear, the debug handler writes new data to the TX register. The write operation
automatically sets the TR bit.
9.8.5

Conditional Execution Using TXRXCTRL

All of the bits in TXRXCTRL are placed such that they can be read directly into the CC flags using
an MCR instruction. To simplify the debug handler, the TXRXCTRL register should be read using
the following instruction:
mrc p14, 0, r15, C14, C0, 0
This instruction will directly update the condition codes in the CPSR. The debug handler can then
conditionally execute based on each CC bit.
conditionally execute based on whether the TXRXCTRL bit is set or clear.
Table 9-12.

TXRXCTRL Mnemonic Extensions

TXRXCTRL bit
31 (to N flag)
30 (to Z flag)
29 (to C flag)
28 (to V flag)
The following example is a code sequence in which the debug handler polls the TXRXCTRL
handshaking bit to determine when the debugger has completed its write to RX and the data is
ready for the debug handler to read.
loop:
mrc
mrcmi
bpl
Developer's Manual
mnemonic extension to execute if bit set
MI
EQ
CS
VS
p14, 0, r15, c14, c0, 0# read the handshaking bit in TXRXCTRL
p14, 0, r0, c9, c0, 0 # if RX is valid, read it
loop
January, 2004
Intel XScale® Core Developer's Manual
Table 9-12
shows the mnemonic extension to
mnemonic extension to execute if bit clear
# if RX is not valid, loop
Software Debug
Table 9-11
PL
NE
CC
VC
137

Advertisement

Table of Contents
loading

Table of Contents