BCM1250/BCM1125/BCM1125H
User Manual
10/21/02
B r o a d c o m C o r p o r a t i o n
Page
76
Section 4: System Control and Debug Unit
Document
1250_1125-UM100CB-R
U
SING
THE
T
RACE
B
UFFER
The trace buffer starts off empty and tracing is disabled. The trigger events and sequencers are configured by
software or over the JTAG debug interface. Then the system is run and the trace is recorded in the buffer.
When the buffer freezes the trace can be read out, again either by software on the BCM1250 or BCM1125/H
or via the JTAG link.
Control of the trace features is done through the
trace_cfg
register. The JTAG interface or debug software can
write this register to trigger the start, stop or freeze functions, and also to reset and enable the trace buffer.
The trace unit can also be set to execute the
Freeze
function and/or the
Debug Pin
function when the buffer
fills (these functions are described in
Section: “Trigger Sequences” on page 73
).
A 64 bit register is provided for reading out the collected trace. The buffer should be frozen before samples are
read out, if it is not then the results of the read are UNPREDICTABLE. The startread bit in the
trace_cfg
register is written with a one to start the read process. Then each read of the
trace_read
location
(
00_1002_0A08
) will provide the next 64 bits from the trace memory. Software (either on the target, or
external debug agent) must post-process the trace to extract the information. (Broadcom provides code to do
this.) The buffer can only be read once after samples have been collected.
The trace control register is shown in
.
Table 48: Trace Control Register
trace_cfg -
00_1002_0A00
Bits
Field
Default
Description
0
reset
1‘b0
When this bit is written with a 1, the trace buffer pointers will be reset ready for collection
to begin. This bit always reads as zero.
1
startread
1‘b0
When this bit is written with a 1, the trace buffer read pointer and latch are prepared for
reading. This bit always reads as zero. Note that the buffer can only be read once after a
collection, if this bit is written with a 1 for a second time the data read back will be
UNPREDICTABLE.
2
start
1‘b0
When this bit is written with a 1, the start function is triggered, and collection will begin if
the buffer is not frozen. When read this bit will be set if collection is in progress.
3
stop
1‘b0
When this bit is written with a 1, the stop function is triggered, and collection will be
suspended until a start if the buffer is not frozen. When read the bit will be set if collection
is stopped and not frozen.
4
freeze
1‘b0
When this bit is written with a 1, the trace buffer is frozen. When read this bit will be set if
the buffer is frozen. The buffer must be reset to allow further collection.
5
freezeFull
1‘b0
If this bit is set the buffer will freeze when if becomes full. In order to prevent overflow the
buffer will freeze as soon as there is any data in the final entry, if it freezes with space for
two more Address/Control bundles (but no room for a Data sample) the trcFull bit will not
be set.
6
debugFull
1‘b0
If this bit is set the DEBUG_L pin will be asserted when the buffer becomes full. The
DEBUG_L pin is deasserted again when the first read of the trace buffer begins or the
trace is reset.
7
trcFull
1‘b0
Read Only. This bit is set when the trace buffer is full (if this is set 256 entries can be read
from the buffer)
8
forceCnt
1‘b0
If this bit is set and collection is in progress then an address/control sample is forced to be
collected before the COUNT field overflows regardless of the state of the filters. This
ensures an exact count between events (at the expense of some additional entries used
in the buffer.
9
reserved
2‘b0
Reserved
Содержание BCM1125
Страница 18: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xviii Document 1250_1125 UM100CB R ...
Страница 28: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xxviii Document 1250_1125 UM100CB R ...
Страница 515: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page vii Index Document 1250_1125 UM100CB R ...