![](http://datasheet.mmic.net.cn/290000/XPC801ZP25_datasheet_16187868/XPC801ZP25_413.png)
Development Support
18-2
MPC801 USER’S MANUAL
MOTOROLA
18
To reconstruct program trace, the program code combined with additional MPC801
information is required. Reporting program trace during retirement significantly complicates
visibility and increases the die size for two reasons—more than one instruction can retire in
a clock cycle and it is harder to report on indirect branches during retirement. Because of
this, program trace is reported during fetch and helps to reconstruct the instructions that
actually retire after fetch canceled instructions are reported. Instructions are fetched
sequentially until branches (direct or indirect), exceptions, or interrupts appear in the
program flow or until a stall in execution forces the machine to avoid fetching the next
address. These instructions may be architecturally executed or they may be canceled in any
stage of the machine pipeline. Therefore, the additional information includes:
A description of the last fetched instruction (stall, sequential, branch not taken, branch
direct taken, branch indirect taken, interrupt/exception taken).
The addresses of all indirect flow changes targets. Indirect flow changes include all
branches using the link and count registers as the target address, all
interrupts/exceptions, as well as
rfi
and
mtmsr
The number of instructions canceled on each clock.
because it may cause context switch.
The following sections define how this information is generated and how it should be used
to reconstruct the program trace. The issue of data compression that could reduce the
amount of memory needed by the debug system is also mentioned.
18.1.1 Basic Operation
18.1.1.1 THE INTERNAL HARDWARE
To make the events that occur in the machine visible, a few dedicated pins are used. Also,
a special bus cycle attribute called program trace cycle is defined. The program trace cycle
attribute is attached to all fetch cycles resulting from indirect flow changes. When program
trace recording is required, you must ensure that these cycles are visible on the external
bus.
The VSYNC signal, when asserted, forces all fetch cycles marked with the program trace
cycle
attribute to be visible on the external bus, even if their data is found in one of the
internal devices. To enable the external hardware to properly synchronize with the internal
activity of the core, the assertion and negation of VSYNC forces the machine to synchronize
and the first fetch after this synchronization to be marked as a program trace cycle and be
seen on the external bus. For more information on the activity of the external hardware
during program trace, refer to
Section 18.1.1.5 The External Hardware
.