English
Language : 

SH7065 Datasheet, PDF (74/941 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH RISC engine Family/SH7000 Series
Section 2 CPU
An example of modulo addressing is given below.
MS = H'C008; ME = H'C00C; R4 = H'C008;
DMX = 1;
DMY = 0; (Modulo addressing setting for address
register Ax (R4, R5))
As a result of the above settings, the R4 register changes as follows.
Inc.
Inc.
Inc.
R4: H'C008
R4: H'C00A
R4: H'C00C
R4: H'C008
(Reaches modulo end address, so becomes modulo start address)
Place the data so that the upper 16 bits of the modulo start and end addresses are the same. This is
because the modulo start address overwrites only the lower 15 bits of the address register,
excluding bit 0.
Note:
When addition indexing is used for DSP data addressing, the address pointer may exceed
the ME value without actually reaching it. In this case, the address pointer will not return
to the modulo start address. Not only with modulo addressing, but when X and Y data
addressing is used, bit 0 is ignored. 0 must always be written to bit 0 of the address
pointer, index register, MS, and ME.
DSP Addressing Operations
DSP addressing operations in the pipeline execution stage (EX), including modulo addressing, are
shown below.
if ( Operation is MOVX.W MOVY.W ) {
ABx=Ax; ABy=Ay;
/* memory access cycle uses ABx and ABy. The addresses to be used
have not been updated */
/* Ax is one of R4,5 */
if ( DMX==0 || DMX==1 && DMY == 1 )} Ax=Ax+(+2 or R8[Ix] or +0);
/* Inc,Index,Not-Update */
else if (! not-update) Ax=modulo( Ax, (+2 or R8[Ix]) );
/* Ay is one of R6,7 */
Rev. 5.00 Sep 11, 2006 page 52 of 916
REJ09B0332-0500