Texas Instruments TMS320C67X/C67X+ DSP User Manual

Page 199

Advertising
background image

Load Word From Memory With a 15-Bit Unsigned Constant Offset

LDW

3-139

Instruction Set

SPRU733

Load Word From Memory With a 15-Bit Unsigned Constant Offset

LDW

Syntax

LDW (.unit) *+B14/B15[ucst15], dst

.unit = .D2

Compatibility

C62x, C64x, C67x, and C67x+ CPU

Opcode

31

29

28

27

23

22

18

17

13

12

9

8

7

6

4

3

2

1

0

creg

z

dst

ucst15

y 1 1 0 1 1 s p

3

1

5

15

1

1

1

Description

Load a word from memory to a general-purpose register (dst). The memory
address is formed from a base address register B14 (y = 0) or B15 (y = 1) and
an offset, which is a 15-bit unsigned constant (ucst15). The assembler selects
this format only when the constant is larger than five bits in magnitude. This
instruction operates only on the .D2 unit.

The offset, ucst15, is scaled by a left shift of 2 bits. After scaling, ucst15 is
added to baseR. Subtraction is not supported. The result of the calculation is
the address sent to memory. The addressing arithmetic is always performed
in linear mode.

For LDW, the entire 32 bits fills dst. dst can be in either register file. The s bit
determines which file dst will be loaded into: s = 0 indicates dst will be loaded
in the A register file and s = 1 indicates dst will be loaded in the B register file.

Square brackets, [ ], indicate that the ucst15 offset is left-shifted by 2.
Parentheses, ( ), can be used to set a nonscaled, constant offset. For example,
LDW (.unit) *+B14/B15(60), dst represents an offset of 60 bytes; whereas,
LDW (.unit) *+B14/B15[60], dst represents an offset of 60 words, or 240 bytes.
You must type either brackets or parentheses around the specified offset, if
you use the optional offset parameter.

Word addresses must be aligned on word (two LSBs are 0) boundaries.

Execution

if (cond)

mem

dst

else nop

Note:
This instruction executes only on the B side (.D2).

Advertising