English
Language : 

HD6417727BP160CV Datasheet, PDF (109/1098 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH™ RISC engine Family/ SH7700 Series
Section 2 CPU
Modulo Addressing: Like other DSPs, the SH7727 has a modulo addressing mode. Address
registers are updated in the same way in this mode. When the address pointer value reaches the
preset modulo end address, the address pointer value becomes the modulo start address.
Modulo addressing is only available for the X and Y data transfer instructions (MOVX.W,
MOVY.W). Modulo addressing mode is specified for the X address register by setting the DMX
bit in the SR register, and for the Y address register by setting the DMY bit. Modulo addressing is
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 (if they are, the DMY setting will
be valid).
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
.DATA.W
Rn=ModEnd, ModStart
ME=ModEnd, MS=ModStart
mEnd; ModEnd
mStart;
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.
Rev.6.00 Mar. 27, 2009 Page 51 of 1036
REJ09B0254-0600