3.4.2.10.6. The BAD Flag
During a general exception, the processor sets
BAD
to one when a bad virtual address
condition exists, and clears
BAD
to zero otherwise. The following exceptions set the
BAD
flag to one:
•
Supervisor-only instruction address
•
Supervisor-only data address
•
Misaligned data address
•
Misaligned destination address
Refer to Nios II Exceptions (In Decreasing Priority Order) table in the "Exception
Overview" section for more information on these exceptions.
Related Information
Exception Overview
on page 75
3.4.2.10.7. The PERM Flag
During a general exception, the processor sets
PERM
to one for a TLB permission
violation exception, and clears
PERM
to zero otherwise.
3.4.2.10.8. The D Flag
The
D
flag indicates whether the exception is an instruction access exception or a data
access exception. During a general exception, the processor sets
D
to one when the
exception is related to a data access, and clears
D
to zero for all other nonbreak
exceptions.
The following exceptions set the
D
flag to one:
•
Fast TLB miss (data)
•
Double TLB miss (data)
•
TLB permission violation (read or write)
•
Misaligned data address
•
Supervisor-only data address
3.4.2.11. The badaddr Register
Nios II/f processor provides information useful to system software for exception
processing in the exception and badaddr registers when an exception occurs.
Note:
The exception register is not available for Nios II/e core, therefore you cannot add a
MMU or MPU to the processor configuration. For more information, refer to the Nios II
Core Implementation Details chapter of this document.
When an exception occurs in Nios II/f processor, the
badaddr
register contains the
byte instruction or data address associated with certain exceptions at the time the
exception occurred. The Nios II Exceptions Table lists which exceptions write the
badaddr
register along with the value written.
3. Programming Model
NII-PRG | 2018.04.18
Nios II Processor Reference Guide
57