Machine Interrupt Enable Register
CSR
mie
Bits
Field Name
Attr.
Description
[2:0]
Reserved
WPRI
3
MSIE
RW
Machine Software Interrupt Enable
[6:4]
Reserved
WPRI
7
MTIE
RW
Machine Timer Interrupt Enable
[10:8]
Reserved
WPRI
11
MEIE
RW
Machine External Interrupt Enable
[15:12]
Reserved
WPRI
16
LIE0
RW
Local Interrupt 0 Enable
17
LIE1
RW
Local Interrupt 1 Enable
18
LIE2
RW
Local Interrupt 2 Enable
…
31
LIE15
RW
Local Interrupt 15 Enable
Table 6:
mie
Register
The machine interrupt pending (
mip
) register indicates which interrupts are currently pending.
The
mip
register is described in Table 7.
Machine Interrupt Pending Register
CSR
mip
Bits
Field Name
Attr.
Description
[2:0]
Reserved
WIRI
3
MSIP
RO
Machine Software Interrupt Pending
[6:4]
Reserved
WIRI
7
MTIP
RO
Machine Timer Interrupt Pending
[10:8]
Reserved
WIRI
11
MEIP
RO
Machine External Interrupt Pending
[15:12]
Reserved
WIRI
16
LIP0
RO
Local Interrupt 0 Pending
17
LIP1
RO
Local Interrupt 1 Pending
18
LIP2
RO
Local Interrupt 2 Pending
…
31
LIP15
RO
Local Interrupt 15 Pending
Table 7:
mip
Register
When a trap is taken in machine mode,
mcause
is written with a code indicating the event that
caused the trap. When the event that caused the trap is an interrupt, the most-significant bit of
mcause
is set to 1, and the least-significant bits indicate the interrupt number, using the same
Copyright © 2017–2018, SiFive Inc. All rights reserved.
18