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
84
Section 4: System Control and Debug Unit
Document
1250_1125-UM100CB-R
T
RACE
E
XAMPLE
1: A
LL
CPU0 A
CTIVITY
The code running on CPU0 is being monitored, for a particular section of code all address bus activity will be
recorded to check the L2 cache behavior.
The code is patched to do a dummy access to an address at the start and end points of the code to trace, and
the trace buffer is set up:
When CPU0 accesses the dummy start address
trace1
and
seq0
will cause trace collection to be started.
Then
trace0
and
seq1
will cause every address requested by CPU0 to be written to the buffer, until the
dummy access that causes
trace2
and
seq2
to stop collection (the A-sample bit could be set on this sequence
to record the dummy access if a separator was required).
When the trace buffer is full,
the
trace_cfg
setting
causes it to freeze, and raise an interrupt. CPU0 would
service this interrupt and (with as little cache disturbance as possible) read out the trace into a bigger in-
memory buffer. At the end of the ISR the trace buffer is reset and started (it must have been collecting for it to
fill) and collection continues.
At the end of the test the buffer would be frozen by software and the final samples copied to the memory buffer.
The memory buffer would then be post-processed for analysis.
Addrmatch0 = start trigger
Addrmatch1 = stop trigger
trace0 = reqid=cpu0 & (read|write)
trace1 = reqid=cpu0 & Addrmatch0 & (read|write)
trace2 = reqid=cpu0 & Addrmatch1 & (read|write)
trace_cfg = freezeFull
seq0 = trace1, ignore, ignore, ignore -> Start
seq1 = trace0, ignore, ignore, ignore -> A-sample
seq2 = trace2, ignore, ignore, ignore -> Stop