Figure 4:
FE310-G002 Interrupt Architecture Block Diagram.
If the global interrupt-enable
mstatus.MIE
is clear, then no interrupts will be taken. If
mstatus.MIE
is set, then pending-enabled interrupts at a higher interrupt level will preempt cur-
rent execution and run the interrupt handler for the higher interrupt level.
When an interrupt or synchronous exception is taken, the privilege mode is modified to reflect
the new privilege mode. The global interrupt-enable bit of the handler’s privilege mode is
cleared.
When an interrupt occurs:
• The value of
mstatus.MIE
is copied into
mcause.MPIE
, and then
mstatus.MIE
is cleared,
effectively disabling interrupts.
• The privilege mode prior to the interrupt is encoded in
mstatus.MPP
.
• The current
pc
is copied into the
mepc
register, and then
pc
is set to the value specified by
mtvec
as defined by the
mtvec.MODE
described in Table 19.
At this point, control is handed over to software in the interrupt handler with interrupts disabled.
Interrupts can be re-enabled by explicitly setting
mstatus.MIE
or by executing an
MRET
instruc-
tion to exit the handler. When an MRET instruction is executed, the following occurs:
• The privilege mode is set to the value encoded in
mstatus.MPP
.
• The global interrupt enable,
mstatus.MIE
, is set to the value of
mcause.MPIE
.
• The
pc
is set to the value of
mepc
.
Copyright © 2019, SiFive Inc. All rights reserved.
36
Содержание 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 ...