![](http://datasheet.mmic.net.cn/230000/79RC32438-200BB_datasheet_15568909/79RC32438-200BB_519.png)
IDT EJTAG System
Hardware Breakpoints
79RC32438 User Reference Manual
20 - 53
November 4, 2002
Notes
The break registers must be set up as follows:
–
IBA0 = 0x0000 0010
–
IBM0 = 0x0000 000C
–
IBC0: BE=1, ASIDuse=1, ASID = 0x5, other bits zero.
Note that IBA0 has the starting address, and IBM0 has the address mask.
Instruction Break on 32-bit MIPS16 Instruction
In this example, instruction breakpoint 0 needs to be set up to break on the range 0x0000 0030 to
0x0000 0036, which starts with the second part of an extended MIPS16 instruction:
0x0000 002e
EXT
// (1st part of MIPS16 inst.)
0x0000 0030
ADD
// (2nd part)
0x0000 0032
SUB
0x0000 0034
SUB
0x0000 0036
SUB
The break registers must be set up as follows:
–
IBA0 = 0x0000 0031
–
IBM0 = 0x0000 0006
–
IBC0: BE = 1, ASIDuse = 0, other bits zero
The CPU does not take a debug exception when fetching the second part of the ADD instruction,
because it does not constitute a whole instruction. The first break is on the SUB instruction at 0x0000 0032.
Data Breakpoint
This section provides three examples of data breakpoints.
Data Break on Load Access with ASID
This example shows how to perform a break on data breakpoint 0 when the CPU loads data 0xAAAA
0000 from memory location 0x0000 0100 in ASID=0x7:
LW $2, 0x100($0) // ASID = 0x7
The break registers must be set up as follows:
–
DBA0 = 0x0000 0100
–
DBM0 = 0x0
–
DBV0 = 0xAAAA 0000
–
DBC0: BE = 1, NoLB = 0, NoSB = 1, BLM = 0, BAI = 0, ASIDuse = 1, ASID = 0x7, other bits zero
In this example, DBA0 contains the breakpoint address; DBM0 has the address mask; DBV0 has the
data value; and DBC0 indicates a breakpoint condition might be fulfilled on a load but not on a store, there
is a value compare for a corresponding byte, and an ASID is used.
Data Break on Store(s) to Halfword in Memory
This example shows a break on data breakpoint 0 when the CPU stores data in a specific halfword in
memory. Stores to the other halfword at the same address can be ignored. The data word is illustrated in
Figure 20.20; the halfword for bits 31:16 is shaded. The store instructions shown in Figure 20.20 alter the
shaded halfword and cause a break if the breakpoint registers are set up as shown below.