English
Language : 

SH7720 Datasheet, PDF (114/1524 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperHTM RISC engine Family / SH7700 Series
Section 2 CPU
2.4.2 Memory Data Formats
Memory data formats are classified into byte, word, and longword. Memory can be accessed in
byte, word, and longword. When the memory operand is only a byte (8 bits) or a word (16 bits), it
is sign-extended into a longword when loaded into a register.
An address error will occur if word data starting from an address other than 2n or longword data
starting from an address other than 4n is accessed. In such cases, the data accessed cannot be
guaranteed.
When a word or longword operand is accessed, the byte positions on the memory corresponding to
the word or longword data on the register is determined to the specified endian mode (big endian
or little endian).
Figure 2.7 shows a byte correspondence in big endian mode. In big endian mode, the MSB byte in
the register corresponds to the lowest address in the memory, and the LSB the in the register
corresponds to the highest address. For example, if the contents of the general register R0 is stored
at an address indicated by the general register R1 in longword, the MSB byte of the R0 is stored at
the address indicated by the R1 and the LSB byte of the R1 register is stored at the address
indicated by the (R1 +3).
The on-chip device registers assigned to memory are accessed in big endian mode. Note that the
available access size (byte, word, or long word) differs in each register.
Note: The CPU instruction codes of this LSI must be stored in word units. In big endian mode,
the instruction code must be stored from upper byte to lower byte in this order from the
word boundary of the memory.
31
23
15
7
0
Byte position
in R0
[7:0]
[15:8] [7:0]
[31:24] [23:16] [15:8] [7:0]
Byte position
in memory
[7:0]
@(R1+0) @(R1+1) @(R1+2) @(R1+3)
[15:8] [7:0]
@(R1+0) @(R1+1) @(R1+2) @(R1+3)
(a) Byte access
Example: MOV.B R0, @R1
(R1 = Address 4n)
(b) Word access
Example: MOV.W R0, @R1
(R1 = Address 4n)
[31:24] [23:16] [15:8] [7:0]
@(R1+0) @(R1+1) @(R1+2) @(R1+3)
(c) Longword access
Example: MOV.L R0, @R1
(R1 = Address 4n)
Figure 2.7 Data Format on Memory (Big Endian Mode)
Rev. 3.00 Jan. 18, 2008 Page 52 of 1458
REJ09B0033-0300