LDB(U)/LDH(U)/LDW
Load From Memory With a 5-Bit Unsigned Constant Offset or Register Offset
3-68
Increments and decrements default to 1 and offsets default to 0 when no
bracketed register or constant is specified. Loads that do no modification to the
baseR can use the syntax *R. Square brackets, [ ], indicate that the ucst5 offset
is left-shifted by 2, 1, or 0 for word, halfword, and byte loads, respectively.
Parentheses, ( ), can be used to set a nonscaled, constant offset. For example,
LDW (.unit) *+
baseR (12) dst represents an offset of 12 bytes, whereas LDW
(.unit) *+
baseR [12] dst represents an offset of 12 words, or 48 bytes. You must
type either brackets or parentheses around the specified offset if you use the
optional offset parameter.
Word and halfword addresses must be aligned on word (two LSBs are 0) and
halfword (LSB is 0) boundaries, respectively.
Execution
if (cond)
mem
→
dst
else
nop
Pipeline
Stage
E1
E2
E3
E4
E5
Read
baseR
offsetR
Written
baseR
dst
Unit in use
.D
Instruction Type
Load
Delay Slots
4 for loaded value
0 for address modification from pre/post increment/decrement
For more information on delay slots for a load, see Chapter 5,
TMS320C62x
Pipeline, and Chapter 6, TMS320C67x Pipeline.
Example 1
LDW .D1
*A10,B1
Before LDW
1 cycle after LDW
5 cycles after LDW
B1
0000 0000h
B1
0000 0000h
B1
21F3 1996h
A10
0000 0100h
A10
0000 0100h
A10
0000 0100h
mem
100h
21F3 1996h
mem
100h
21F3 1996h
mem
100h
21F3 1996h
Pipeline