Xilinx MicroBlaze Reference Manual page 106

Hide thumbs Also See for MicroBlaze:
Table of Contents

Advertisement

Event trace: Stores event trace information including cycle count events. Events include
all program exceptions, interrupts, and breaks, as well as all cross-trigger events
defined in
Table
The program counter can also optionally be stored for call instructions to trace function
calls in the program, and for return instructions to trace function call returns.
Software can inject an event by using an "xori r0, rA, IMM" instruction. Typically this is
used to trace operating system events like context switches and system calls, but it can
be used by any program to trace significant events.
Tracing can be started using the Trace Command Register, by hitting a program breakpoint
or watchpoint configured as a tracepoint in the Trace Control Register, or by a cross trigger
event (see
Table
Tracing is automatically stopped when the trace buffer becomes full, and can be stopped
using the Trace Command Register or by a cross trigger event (see
The cycle count can measure up to 32768 clock cycles when using complete trace, and up
to 8192 cycles between instructions when using program flow and cycle count. If the cycle
count exceeds this value, the Trace Status Register overflow bit is set to one.
It is possible to configure trace to halt the processor when the trace buffer becomes full or
when the cycle count overflows. This allows continuous trace of the entire program flow,
albeit not in real time due to the time required to read the trace buffer.
The debug registers used to configure and control tracing, and to read the Embedded Trace
Buffer, are listed in the following table.
The
DBG_CTRL
Register to access the register, used with MDM software access to debug registers.
Table 2-49: MicroBlaze Program Trace Debug Registers
Register Name Size (bits)
Trace Control
Trace Command
Trace Status
1
Trace Data Read
1. This register is not available when
MicroBlaze Processor Reference Guide
UG984 (v2018.2) June 21, 2018
2-62. Each event is optionally preceded by a stored program counter.
2-62).
value indicates the value to use in the MDM Debug Register Access Control
MDM
Command
22
0110 0001
4
0110 0010
18
0110 0011
18
0110 0110
C_DEBUG_EXTERNAL_TRACE
www.xilinx.com
Chapter 2: MicroBlaze Architecture
DBG_CTRL
R/W
Value
Set tracepoints, trace compression level
4C215
W
and optionally stored trace information
Command to clear trace buffer, start or
4C403
W
stop trace, and sample number of
current buffer items
4C611
R
Read the sampled trace buffer status
Read the oldest item from the
4CC11
R
Embedded Trace Buffer
is set
Table
2-62).
Description
106
Send Feedback

Advertisement

Table of Contents
loading

Table of Contents