The FE310-G002 supports a basic hardware performance monitoring facility compliant with
The
RISC‑V Instruction Set Manual, Volume II: Privileged Architecture, Version 1.10
. The
mcycle
CSR holds a count of the number of clock cycles the hart has executed since some arbitrary
time in the past. The
minstret
CSR holds a count of the number of instructions the hart has
retired since some arbitrary time in the past. Both are 64-bit counters. The
mcycle
and
minstret
CSRs hold the 32 least-significant bits of the corresponding counter, and the
mcycleh
and
minstreth
CSRs hold the most-significant 32 bits.
The hardware performance monitor includes two additional event counters,
mhpmcounter3
and
mhpmcounter4
. The event selector CSRs
mhpmevent3
and
mhpmevent4
are registers that con-
trol which event causes the corresponding counter to increment. The
mhpmcounters
are 40-bit
counters. The
mhpmcounter_i
CSR holds the 32 least-significant bits of the corresponding
counter, and the
mhpmcounter_ih
CSR holds the 8 most-significant bits.
The event selectors are partitioned into two fields, as shown in Table 3: the lower 8 bits select
an event class, and the upper bits form a mask of events in that class. The counter increments if
the event corresponding to any set mask bit occurs. For example, if
mhpmevent3
is set to
0x4200
, then
mhpmcounter3
will increment when either a load instruction or a conditional
branch instruction retires. An event selector of 0 means "count nothing."
Note that in-flight and recently retired instructions may or may not be reflected when reading or
writing the performance counters or writing the event selectors.
Copyright © 2019, SiFive Inc. All rights reserved.
19
Содержание FE310-G002
Страница 1: ...SiFive FE310 G002 Manual v19p05 SiFive Inc ...
Страница 11: ...Figure 1 FE310 G002 top level block diagram Copyright 2019 SiFive Inc All rights reserved 9 ...
Страница 15: ...Chapter 2 List of Abbreviations and Terms 13 ...
Страница 23: ...Chapter 4 Memory Map The memory map of the FE310 G002 is shown in Table 4 21 ...