The exception handler can examine
estatus
to determine the pre-exception status of
the processor. When returning from an exception, the
eret
instruction restores the
pre-exception value of
status
. The instruction restores the pre-exception value by
copying either
estatus
or
sstatus
back to
status
, depending on the value of
status.CRS
.
Refer to the Exception Processing section for more information.
Related Information
•
Exception Processing
on page 74
•
The sstatus Register
on page 66
3.4.2.3. The bstatus Register
The
bstatus
register holds a saved copy of the
status
register during break
exception processing.
Table 17.
btatus Control Register Fields
Bit Fields
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
Reserved
RSIE
NMI
PRS
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
CRS
IL
IH
EH
U
PIE
All fields in the
bstatus
register have read/write access. All fields reset to 0.
The Status Control Register Field Description table describes the details of the fields
defined in the
bstatus
register.
When a break occurs, the value of the
status
register is copied into
bstatus
. Using
bstatus
, the debugger can restore the
status
register to the value prior to the
break. The
bret
instruction causes the processor to copy
bstatus
back to
status
.
Refer to the Processing a Break section for more information.
Related Information
Processing a Break
on page 79
3.4.2.4. The ienable Register
The
ienable
register controls the handling of internal hardware interrupts. Each bit
of the
ienable
register corresponds to one of the interrupt inputs,
irq0
through
irq31
. A value of one in bit n means that the corresponding
irq
n interrupt is
enabled; a bit value of zero means that the corresponding interrupt is disabled. Refer
to the Exception Processing section for more information.
Note:
When the internal interrupt controller is not implemented, the value of the
ienable
register is always 0.
Related Information
Exception Processing
on page 74
3. Programming Model
NII-PRG | 2018.04.18
Nios II Processor Reference Guide
51