![](http://datasheet.mmic.net.cn/230000/79RC32438-200BB_datasheet_15568909/79RC32438-200BB_100.png)
IDT MIPS32 4Kc Processor Core
Exceptions
79RC32438 User Reference Manual
2 - 38
November 4, 2002
Notes
General Exception Processing
With the exception of Reset, Soft Reset, NMI, and Debug exceptions, which have their own special
processing as described below, exceptions have the same basic processing flow:
1. If the EXL bit in the Status register is cleared, the EPC register is loaded with the PC at which execu-
tion will be restarted and the BD bit is set appropriately in the Cause register. If the instruction is not
in the delay slot of a branch, the BD bit in Cause will be cleared and the value loaded into the EPC
register is the current PC. If the instruction is in the delay slot of a branch, the BD bit in Cause is set
and EPC is loaded with PC-4. If the EXL bit in the Status register is set, the EPC register is not
loaded and the BD bit is not changed in the Cause register.
2. The CE and ExcCode fields of the Cause registers are loaded with the values appropriate to the
exception. The CE field is loaded, but not defined, for any exception type other than a coprocessor
unusable exception.
3. The EXL bit is set in the Status register.
4. The processor is started at the exception vector.
The value loaded into EPC represents the restart address for the exception and need not be modified by
exception handler software in the normal case. Software need not look at the BD bit in the Cause register
unless is wishes to identify the address of the instruction that actually caused the exception.
Note that individual exception types may load additional information into other registers. This is noted in
the description of each exception type below.
Operation:
if Status
EXL
= 0 then
if InstructionInBranchDelaySlot then
EPC << PC - 4
CauseBD << 1
else
EPC << PC
CauseBD << 0
endif
if ExceptionType = TLBRefill then
vectorOffset << 0x000
elseif (ExceptionType = Interrupt) and
(CauseIV = 1) then
vectorOffset << 0x200
else
vectorOffset << 0x180
endif
else
vectorOffset << 0x180
endif
CauseCE << FaultingCoprocessorNumber
CauseExcCode << ExceptionType
StatusEXL << 1
if StatusBEV = 1 then
PC << 0xBFC0_0200 + vectorOffset
else
PC << 0x8000_0000 + vectorOffset
endif