![](http://datasheet.mmic.net.cn/370000/-PD30101_datasheet_16680756/-PD30101_147.png)
CHAPTER 5 EXCEPTION PROCESSING
116
5.4.18 Interrupt Exception
Cause
The Interrupt exception occurs when one of the eight interrupt conditions
significance of these interrupts is dependent upon the specific system implementation.
Each of the eight interrupts can be masked by clearing the corresponding bit in the IM field of the Status
register, and all of the eight interrupts can be masked at once by clearing the IE bit of the Status
register or setting the EXL/ERL bit.
Note
is asserted. The
Note:
They are 1 timer interrupt, 5 ordinary interrupts, and 2 software interrupts.
Processing
The common exception vector is used for this exception, and the Int code in the ExcCode field of the
Cause register is set.
The IP field of the Cause register indicates current interrupt requests. It is possible that more than one
of the bits can be simultaneously set (or cleared) if the interrupt is asserted and then deasserted before
this register is read.
The EPC register contains the address of the instruction that caused the exception unless it is in a
branch delay slot, in which case the EPC register contains the address of the preceding branch
instruction and the BD bit of the Cause register is set to 1.
Servicing
If the interrupt is caused by one of the two software-generated exceptions (SW0 or SW1), the interrupt
condition is cleared by setting the corresponding Cause register bit to 0.
If the interrupt is caused by hardware, the interrupt condition is cleared by deactivating the
corresponding interrupt request signal.
5.5 EXCEPTION HANDLING AND SERVICING FLOWCHARTS
The remainder of this chapter contains flowcharts for the following exceptions and guidelines for their
handlers:
"
Common exceptions and a guideline to their exception handler
"
TLB/XTLB Refill exception and a guideline to their exception handler
"
Cache Error exception
"
Cold Reset, Soft Reset and NMI exceptions, and a guideline to their handler.
Generally speaking, the exceptions are “handled” by hardware (HW); the exceptions are then “serviced”
by software (SW).