CHAPTER 6 EXCEPTION PROCESSING
190
Servicing
The Watch exception is a debugging aid; typically the exception handler transfers control to a debugger, allowing
the user to examine the situation. To continue, once the Watch exception must be disabled to execute the
faulting instruction. The Watch exception must then be reenabled. The faulting instruction can be executed
either by the debugger or by setting breakpoints.
6.4.18 Interrupt Exception
Cause
The Interrupt exception occurs when one of the eight interrupt conditions
requests from internal peripheral units first enter the ICU and are then notified to the CPU core via one of four
interrupt sources (Int [3:0]) or NMI.
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. In the V
R
4102, interrupt
Note:
They are 1 timer interrupt, 5 ordinary interrupts, and 2 software interrupts.
Of the five ordinary interrupts, Int4 is never asserted active.
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 request signal 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.