![Samsung S3C2501X Скачать руководство пользователя страница 127](http://html.mh-extra.com/html/samsung/s3c2501x/s3c2501x_user-manual_340828127.webp)
INSTRUCTION SET
S3C2501X
3-36
3.10.2 HALF-WORD LOAD AND STORES
Setting S = 0 and H = 1 may be used to transfer unsigned Half-words between an ARM9TDMI register and
memory.
The action of LDRH and STRH instructions is influenced by the BIGEND control signal. The two possible
configurations are described in the section below.
3.10.3 SIGNED BYTE AND HALF-WORD LOADS
The S bit controls the loading of sign-extended data. When S = 1 the H bit selects between Bytes (H = 0) and
Half-words (H = 1). The L bit should not be set low (Store) when Signed (S = 1) operations have been selected.
The LDRSB instruction loads the selected Byte into bits 7 to 0 of the destination register and bits 31 to 8 of the
destination register are set to the value of bit 7, the sign bit.
The LDRSH instruction loads the selected Half-word into bits 15 to 0 of the destination register and bits 31 to 16
of the destination register are set to the value of bit 15, the sign bit.
The action of the LDRSB and LDRSH instructions is influenced by the BIGEND control signal. The two possible
configurations are described in the following section.
3.10.4 ENDIANNESS AND BYTE/HALF-WORD SELECTION
3.10.4.1 Little-Endian Configuration
A signed byte load (LDRSB) expects data on data bus inputs 7 through to 0 if the supplied address is on a word
boundary, on data bus inputs 15 through to 8 if it is a word address plus one byte, and so on. The selected byte is
placed in the bottom 8 bit of the destination register, and the remaining bits of the register are filled with the sign
bit, bit 7 of the byte. Please see Figure 2-2.
A half-word load (LDRSH or LDRH) expects data on data bus inputs 15 through to 0 if the supplied address is on
a word boundary and on data bus inputs 31 through to 16 if it is a half-word boundary, (A[1]=1).The supplied
address should always be on a half-word boundary. If bit 0 of the supplied address is high then the ARM9TDMI
will load an unpredictable value. The selected half-word is placed in the bottom 16 bits of the destination register.
For unsigned half-words (LDRH), the top 16 bits of the register are filled with zeros and for signed half-words
(LDRSH) the top 16 bits are filled with the sign bit, bit 15 of the half-word.
A half-word store (STRH) repeats the bottom 16 bits of the source register twice across the data bus outputs 31
through to 0. The external memory system should activate the appropriate half-word subsystem to store the data.
Note that the address must be half-word aligned, if bit 0 of the address is high this will cause unpredictable
behaviour.
Содержание S3C2501X
Страница 1: ...S3C2501X 32 BIT RISC MICROPROCESSOR USER S MANUAL Revision 1 查询S3C2501X供应商 捷多邦 专业PCB打样工厂 24小时加急出货 ...
Страница 18: ......
Страница 275: ...MEMORY CONTROLLER S3C2501X 5 60 NOTES ...
Страница 289: ...I2C CONTROLLER S3C2501X 6 14 NOTES ...
Страница 373: ...GDMA CONTROLLER S3C2501X 9 24 NOTES ...
Страница 435: ...I O PORTS S3C2501X 12 12 NOTES ...
Страница 463: ...ELECTRICAL DATA S3C2501X 15 6 NOTES ...