![](http://datasheet.mmic.net.cn/290000/XPC801ZP25_datasheet_16187868/XPC801ZP25_416.png)
Development Support
MOTOROLA
MPC801 USER’S MANUAL
18-5
18
18.1.1.3 PROGRAM TRACE IN DEBUG MODE
When entering debug mode an interrupt/exception taken is reported on the VF pins
(VF=’100’) and a cycle marked with the program trace cycle is externally visible. When the
core is in debug mode, the VF pins equal ‘000’ and the VFLS pins equal ‘11’. For more
information on the MPC801 debug mode, refer to
Interface
.
Section 18.3 Development System
If the VSYNC signal is asserted or negated while the CPU is in debug mode, this information
is announced when the first VF pins report as the CPU returns to regular mode. If VSYNC
was not changed while in debug mode, the first VF pins report will be encoded as VF=’101’
(indirect branch) due to the
rfi
instruction being issued. In both cases, the first instruction
fetch after debug mode is marked with the program trace cycle attribute and is externally
visible.
18.1.1.4 SEQUENTIAL INSTRUCTIONS MARKED AS INDIRECT BRANCH
There are instances in which nonbranch (sequential) instructions affect the machine like
indirect branch instructions affect it. These instructions include the
mtspr
instructions to the CMPA-F, ICTRL, ICR, and DER registers.
rfi
,
mtmsr
,
isync
, and
The core marks these instructions as indirect branch instructions (VF = ‘101’) and the
following instruction address is marked with the program trace cycle attribute, as if it was an
indirect branch target. Therefore, when one of these special instructions is detected in the
core, the address of the following instruction is externally visible. The reconstructing
software is now able to correctly evaluate the effect of these instructions.
18.1.1.5 THE EXTERNAL HARDWARE
When program trace is needed, the external hardware must sample the status pins (VF and
VFLS) of every clock and mark the address of all cycles with the program trace cycle
attribute. Program trace is used in various ways, but back trace and window trace are the
most common methods.
18.1.1.5.1 Back Trace.
an event like system failure occurs. If back trace is required, the external hardware should
start sampling the VF and VFLS pins and the addresses of all cycles marked with the
program trace cycle attribute immediately after reset is negated. Since the instruction show
cycles programming defaults to “show all” out of reset, all cycles marked with the program
trace cycle attribute are visible on the external bus. VSYNC should be asserted sometime
after reset and negated when the actual event occurs. If “show all” is not preferable for the
instruction show cycles prior to the occurrence of the actual event, VSYNC must be asserted
before the changing instruction show cycles programming from “show all”. Notice that if the
timing of the event in question is unknown, it is possible to use cyclical buffers. After the
VSYNC signal is negated, the trace buffer contains the program flow trace of the program
that was executed before the event in question occurred.
This is useful when a record of the program trace is needed before
18.1.1.5.2 Window Trace.
events is required. The VSYNC signal should be asserted between these two events. After
VSYNC is negated, the trace buffer will contain information describing the program trace of
the program that was executed between the two events.
This is useful when a record of the program trace between two