HD6417320 RENESAS [Renesas Technology Corp], HD6417320 Datasheet - Page 114

no-image

HD6417320

Manufacturer Part Number
HD6417320
Description
Renesas 32-Bit RISC Microcomputer SuperHTM RISC engine Family / SH7700 Series
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet
Section 2
2.4.2
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,
Rev. 3.00 Jan. 18, 2008 Page 52 of 1458
REJ09B0033-0300
Byte position
Byte position
in memory
in R0
the instruction code must be stored from upper byte to lower byte in this order from the
word boundary of the memory.
Memory Data Formats
31
CPU
@(R1+0) @(R1+1) @(R1+2) @(R1+3)
[7:0]
23
Example: MOV.B R0, @R1
Figure 2.7
(a) Byte access
(R1 = Address 4n)
15
7
Data Format on Memory (Big Endian Mode)
[7:0]
0
@(R1+0) @(R1+1) @(R1+2) @(R1+3)
[15:8]
Example: MOV.W R0, @R1
(b) Word access
[7:0]
(R1 = Address 4n)
[15:8]
[7:0]
@(R1+0) @(R1+1) @(R1+2) @(R1+3)
[31:24]
[31:24]
Example: MOV.L R0, @R1
(c) Longword access
[23:16]
[23:16]
(R1 = Address 4n)
[15:8]
[15:8]
[7:0]
[7:0]

Related parts for HD6417320