IDT EJTAG System
EJTAG Processor Core Extensions
79RC32438 User Reference Manual
20 - 15
November 4, 2002
Notes
General Debug Exception Processing
All debug exceptions have the same basic processing flow:
The DEPC register is loaded with the PC at which execution can be restarted, and the DBD bit is
set to indicate whether the last debug exception occurred in a branch delay slot. The value loaded
into the DEPC register is either the current PC (if the instruction is not in the delay slot of a branch)
or the PC of the branch or jump (if the instruction is in the delay slot of a branch or jump).
The DSS, DBp, DDBL, DDBS, DIB, DINT, DDBLImpr, and DDBSImpr bits in the Debug register are
updated appropriately depending on the debug exception.
DExcCode field in the Debug register is undefined.
Halt and Doze bits in the Debug register are updated appropriately.
IEXI bit is set to inhibit imprecise exceptions in the start of the debug handler.
DM bit in the Debug register is set to 1.
The processor begins fetching instructions from the debug exception vector.
The value loaded into the DEPC register represents the restart address from the debug exception and
does not need to be modified by the debug exception handler software. Debug software need only look at
the DBD bit in the Debug register if it wishes to identify the address of the instruction that actually caused a
precise debug exception.
The DSS, DBp, DDBL, DDBS, DIB, DINT, DDBLImpr, and DDBSImpr bits in the Debug register indicate
the occurrence of distinct debug exceptions, except when a Debug Data Break Load/Store Imprecise
exception occurs (see section “Debug Data Break Load/Store Imprecise Exception” on page 20-17). Note
that occurrence of an exception while in Debug mode will clear these bits. The handler can thereby deter-
mine whether an debug exception or an exception in Debug Mode occurred. No other CP0 registers or
fields are changed due to the debug exception, thus no additional state is saved. The overall exception
processing flow is shown below:
Operation
:
if (InstructionInBranchDelaySlot) then
DEPC ¨ BranchInstructionPC
DebugDBD ¨ 1
else
DEPC ¨ PC
DebugDBD ¨ 0
endif
DebugDSS, DBp, DDBL, DDBS, DIB, DINT, DDBLImpr and DDBSImpr ¨ DebugExceptionType
DebugDExcCode ¨ UNPREDICTABLE
DebugHalt ¨ HaltStatusAtDebugException
DebugDoze ¨ DozeStatusAtDebugException
DebugIEXI ¨ 1
ProbTrap bit in ECR
Register
Debug Exception
Vector Address
0
0xBFC0 0480
1
0xFF20 0200 in dmseg
Table 20.13 Debug Exception Vector Location