• The
pc
is set to the value of
mepc
.
At this point control is handed over to software.
The Control and Status Registers involved in handling RISC‑V interrupts are described in Sec-
tion 8.3.
8.3
Interrupt Control Status Registers
The FE310-G000 specific implementation of interrupt CSRs is described below. For a complete
description of RISC‑V interrupt behavior and how to access CSRs, please consult
The RISC‑V
Instruction Set Manual, Volume II: Privileged Architecture, Version 1.10
.
8.3.1
Machine Status Register (
mstatus
)
The
mstatus
register keeps track of and controls the hart’s current operating state, including
whether or not interrupts are enabled. A summary of the
mstatus
fields related to interrupts in
the FE310-G000 is provided in Table 12. Note that this is not a complete description of
mstatus
as it contains fields unrelated to interrupts. For the full description of
mstatus
, please consult
the
The RISC‑V Instruction Set Manual, Volume II: Privileged Architecture, Version 1.10
.
Table 12:
FE310-G000
mstatus
Register (partial)
Machine Status Register
CSR
mstatus
Bits
Field Name
Attr.
Description
[2:0]
Reserved
WPRI
3
MIE
RW
Machine Interrupt Enable
[6:4]
Reserved
WPRI
7
MPIE
RW
Machine Previous Interrupt Enable
[10:8]
Reserved
WPRI
[12:11]
MPP
RW
Machine Previous Privilege Mode
Interrupts are enabled by setting the MIE bit in
mstatus
and by enabling the desired individual
interrupt in the
mie
register, described in Section 8.3.3.
Chapter 8 Interrupts
SiFive FE310-G000 Manual: v3p2
© SiFive, Inc.
Page 35