Xilinx MicroBlaze Reference Manual page 89

32-bit soft processor
Hide thumbs Also See for MicroBlaze:
Table of Contents

Advertisement

Performance Monitoring
With extended debugging, MicroBlaze provides performance monitoring counters to count
various events and to measure latency during program execution. The number of event
counters and latency counters can be configured with C_DEBUG_EVENT_COUNTERS and
C_DEBUG_LATENCY_COUNTERS respectively, and the counter width can be set to 32, 48 or
64 bits with C_DEBUG_COUNTER_WIDTH. With the default configuration, the counter width
is set to 32 bits and there are five event counters and one latency counter.
An event counter simply counts the number of times a certain event has occurred, whereas
a latency counter provides the following information:
Number of times the event has occurred (N)
The sum of each event latency measured by counting clock cycles from the event starts
until it finishes (ΣL), used to calculate the mean latency
The sum of each event latency squared (ΣL
deviation
The minimum, shortest, measured latency for all events (L
The maximum, longest, measured latency for all events (L
The mean latency (μ) is calculated by the formula:
ΣL
μ
------ -
=
The standard deviation (σ) of the latency is calculated by the formula:
σ
-----------------------------------------
=
Counting can be started or stopped via the Performance Counter Command Register or by
cross trigger events (see
When configuring, reading or writing counters, they are accessed sequentially through the
performance counter registers. After every access the selected counter item is incremented.
All counters are sampled simultaneously for reading via the Performance Counter
Command Register. This can be done while counting, or after counting has been stopped.
When an event counter reaches its maximum value, the overflow status bit is set, and the
external interrupt signal Dbg_Intr is set to one. The interrupt signal is reset to zero by
clearing the counters via the Performance Counter Command Register.
By using one of the event counters to count number of clock cycles, and initializing this
counter to overflow after a predetermined sampling interval, the external interrupt can be
used to periodically sample the performance counters.
The available events are described in
MicroBlaze Processor Reference Guide
UG984 (v2016.2) June 8, 2016
UG984 (v2016.1) April 6, 2016
N
2
NΣL
2
(
ΣL
)
N
Table
2-61).
www.xilinx.com
Chapter 2: MicroBlaze Architecture
2
), used to calculate the latency standard
Table
2-40, listed in numerical order.
)
min
)
max
Send Feedback
89

Advertisement

Table of Contents
loading

Table of Contents