Debug Support
7-4
ColdFire2/2M User’s Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
also be indicated. The size of the transfer will depend on the format of the WDDATA
instruction.
7.2.1.5 BEGIN EXECUTION OF TAKEN BRANCH (PST = $5).
generated whenever a taken branch is executed. The branch target may be optionally
displayed on DDATA depending on the control parameters contained in the configuration/
status register (CSR). The number of bytes of the address to be displayed is also controlled
in the CSR and indicated during the data transfer on the following clock cycle.
This encoding is
The bytes are always displayed in a least-significant to most-significant order. The
processor captures only those target addresses associated with taken branches using a
variant addressing mode, i.e. all JMP and JSR instructions using address register indirect
or indexed addressing modes, all RTE and RTS instructions as well as all exception vectors.
The simplest example of a branch instruction using a variant address is the compiled code
for a C language “case” statement. Typically, the evaluation of this statement uses the
variable of an expression as an index into a table of offsets, where each offset points to a
unique case within the structure. For these types of change-of-flow operations, the
ColdFire2/2M processor uses the debug pins to output a sequence of information on
successive clock cycles
1. Identify a taken branch has been executed using the PST pins ($5).
2. Using the PST pins, optionally signal the target address is to be displayed on the
DDATA pins. The encoding ($9, $A, $B) identifies the number of bytes that are
displayed.
3. The new target address is optionally available on subsequent cycles using the nibble-
wide DDATA port. The number of bytes of the target address displayed on this port is
a configurable parameter (2, 3, or 4 bytes).
Another example of a variant branch instruction would be a JMP (A0) instruction. If the CSR
was programmed to display the lower two bytes of an address, the output of the PST and
DDATA signals when this instruction executed are shown in
Figure 7-2
.
In the first cycle, PST is driven with a $5 indicating a taken branch with a variant address. In
the second cycle, PST is driven with a $9 indicating a two-byte address will be displayed
four bits at a time on the DDATA signals over the next four clock cycles. The remaining four
clock cycles display the lower two-bytes of the address (A0), least significant nibble to most
significant nibble. The output of the PST signals after the branch instruction completes will
Figure 7-2. Example PST Diagram
CLK
$5
$9
$0
PST
$0
$0
A[3:0]
A[7:4]
A[11:8]
A[15:12]
DDATA
F
Freescale Semiconductor, Inc.
n
.