![](http://datasheet.mmic.net.cn/230000/79RC32438-200BB_datasheet_15568909/79RC32438-200BB_101.png)
IDT MIPS32 4Kc Processor Core
Exceptions
79RC32438 User Reference Manual
2 - 39
November 4, 2002
Notes
Debug Exception Processing
All debug exceptions have the same basic processing flow:
1. The DEPC register is loaded with the program counter (PC) value at which execution will be restarted
and the DBD bit is set appropriately in the Debug register. The value loaded into the DEPC register
is the current PC if the instruction is not in the delay slot of a branch, or the PC-4 of the branch if the
instruction is in the delay slot of a branch.
2. The DSS, DBp, DDBL, DDBS, DIB and DINT bits (D* bits at [5:0]) in the Debug register are updated
appropriately depending on the debug exception type.
3. Halt and Doze bits in the Debug register are updated appropriately.
4. DM bit in the Debug register is set to 1.
5. The processor is started at the debug exception vector.
The value loaded into DEPC represents the restart address for the debug exception and need not be
modified by the debug exception handler software in the usual case. Debug software need not look at the
DBD bit in the Debug register unless it wishes to identify the address of the instruction that actually caused
the debug exception.
A unique debug exception is indicated through the DSS, DBp, DDBL, DDBS, DIB and DINT bits (D* bits
at [5:0]) in the Debug register.
No other CP0 registers or fields are changed due to the debug exception, thus no additional state is
saved.
Operation:
if InstructionInBranchDelaySlot then
DEPC << PC-4
DebugDBD << 1
else
DEPC << PC
DebugDBD << 0
endif
DebugD* bits at at [5:0] <- DebugExceptionType
DebugHalt << HaltStatusAtDebugException
DebugDoze << DozeStatusAtDebugException
DebugDM << 1
if EJTAGControlRegisterProbTrap = 1 then
PC << 0xFF20_0200
else
PC << 0xBFC0_0480
endif
The same debug exception vector location is used for all debug exceptions. The location is determined
by the ProbTrap bit in the EJTAG Control register (ECR), as shown in Table 2.18.
Exceptions
The following subsections describe each of the exceptions listed in the same sequence as shown in
Table 2.14.
ProbTrap bit in
ECR Register
Debug Exception Vector Address
0
0xBFC0_0480
1
0xFF20_0200 in dmseg
Table 2.18 Debug Exception Vector Addresses