Tx Register Ready Bit (Tr); Conditional Execution Using Txrxctrl - Intel PXA255 User Manual

Xscale microarchitecture
Hide thumbs Also See for PXA255:
Table of Contents

Advertisement

Software Debug
The download flag becomes especially useful when an overflow occurs. If a loop counter is used,
and an overflow occurs, the debug handler cannot determine how many data words overflowed.
Therefore the debug handler counter may get out of sync with the debugger - the debugger may
finish downloading the data, but the debug handler counter may indicate there is more data to be
downloaded - this results in unpredictable behavior of the debug handler.
10.7.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 10-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.
10.7.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 10-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:
mcr
10-14
mnemonic extension to execute if bit set
MI
EQ
CS
VS
p14, 0, r15, c14, c0, 0# read the handshaking bit in TXRXCTRL
Table 10-12
shows the mnemonic extension to
mnemonic extension to execute if bit
Intel® XScale™ Microarchitecture User's Manual
Table 10-11
clear
PL
NE
CC
VC

Advertisement

Table of Contents
loading

Table of Contents