
19-4
MCF5249UM
MOTOROLA
Real-Time Trace Support
19.2
REAL-TIME TRACE SUPPORT
In the area of debug functions, one fundamental requirement is support for real-time trace functionality. For
example, definition of the dynamic execution path. The ColdFire solution is to include a parallel output port
providing encoded processor status and data to an external development system. This port is partitioned
into two nibbles (4 bits): one nibble allows the processor to transmit information concerning the execution
status of the core (processor status: PST), while the other nibble allows operand data to be displayed.
(debug data: DDATA). The processor status (PST) timing is synchronous with the processor status clock
(PSTCLK) and may not be related to the current bus transfer.
Table 19-1 shows the encoding of these
signals.
The PST outputs can be used with an external image of the program to completely track the dynamic
execution path of the machine when used with external development systems. The tracking of this
dynamic path is complicated by any change-of-flow operation. This is especially evident when the branch
target address is calculated based on the contents of a program-visible register (variant addressing.) For
this reason, the DDATA outputs can be configured to display the target address of these types of
change-of-flow instructions. Because the DDATA bus is only 4 bits wide, the address is displayed a nibble
at a time across multiple clock cycles.
The debug module includes two 32-bit storage elements for capturing the internal ColdFire bus
information. These two elements effectively form a FIFO buffer connecting the processor’s high-speed
local bus to the external development system through the DDATA signals. The FIFO buffer captures
branch target addresses along with certain operand data values for eventual display on the DDATA output
port, a nibble at a time, starting with the least-significant bit. The execution speed of the ColdFire
processor is affected only when both storage elements contain valid data waiting to be dumped onto the
DDATA port. In this case, the processor core is stalled until one FIFO entry is available. In all other cases,
data output on the DDATA port does not impact execution speed.
19.2.1
PROCESSOR STATUS SIGNAL ENCODING
The PST signals are encoded to reflect the state of the Operand Execution Pipeline, and are generally not
related to the current external bus transfer.
19.2.1.1
Continue Execution (PST = $0)
Many instructions complete in a single processor cycle. If an instruction requires more clock cycles, the
subsequent clock cycles are indicated by driving the PST outputs with this encoding.
19.2.1.2
Begin Execution of an Instruction (PST = $1)
For most instructions, this encoding signals the first clock cycle of an instruction’s execution. Certain
change-of-flow opcodes, plus the PULSE and WDDATA instructions generate different encodings.
19.2.1.3
Entry into User Mode (PST = $3)
This encoding indicates the ColdFire processor has entered user mode. This encoding is signaled after the
instruction which caused the user mode entry has executed.
19.2.1.4
Begin Execution of PULSE or WDDATA instructions (PST = $4)
The ColdFire instruction set architecture includes a PULSE opcode. This opcode generates a unique PST
encoding, $4, when executed. This instruction can define logic analyzer triggers for debug and/or
performance analysis. Additionally, a WDDATA instruction is supported that allows the processor core to
write any operand (byte, word, longword) directly to the DDATA port, independent of any debug module
configuration. This opcode also generates the special PST encoding ($4) when executed, followed by the