English
Language : 

SH7729R Datasheet, PDF (94/855 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer Super RISC engine Family/SH7700 Series
valid for either the X or the Y address register, only; it cannot be set for both at the same time.
Therefore, DMX and DMY cannot both be set simultaneously.
The MOD register is provided to set the start and end addresses of the modulo address area. The
MOD register contains MS (Modulo Start) and ME (Modulo End). An example of the use of the
MOD register (MS and ME fields) is shown below.
MOV.L ModAddr,Rn;
LDC Rn,MOD;
ModAddr: .DATA.W ModEnd
.DATA.W ModStart
Rn=ModEnd, ModStart
ME=ModEnd, MS=ModStart
ModStart: .DATA
:
ModEnd: .DATA
The start and end addresses are specified in MS and ME, then the DMX or DMY bit is set to 1.
The address register contents are compared with ME, and if they match, start address MS is stored
in the address register. The lower 16 bits of the address register are compared with ME.
The maximum modulo size is 64 kbytes. This is sufficient to access the X and Y data memory. A
block diagram of modulo addressing is shown in figure 2.14.
31
R8[Ix]
+2
+0
31 16 15
0
R4[Ax]
R5[Ax]
ALU
Instruction (MOVX/MOVY)
0 DMX DMY
CONT
31 16 15
R6[Ay]
R7[Ay]
15
1
MS
CMP
0
31
AU
0
R9[Iy]
+2
+0
XAB
ME
15
1
YAB
Figure 2.14 Modulo Addressing
An example of modulo addressing is given below.
MS = H'7008; ME=H'700C; R4=H'A5007008;
DMX = 1; DMY = 0: (Modulo addressing setting for address register Ax (R4, R5))
Rev. 5.0, 09/03, page 48 of 806