Texas Instruments TMS320C28x Reference Manual page 324

Dsp cpu and instruction set
Table of Contents

Advertisement

MOV loc16,ACC << 1..8
SYNTAX OPTIONS
MOV loc16, ACC << 1
MOV loc16, ACC << 2..8
Operands
loc16
ACC
#1..8
Description
Flags and
N
Modes
Z
Repeat
Example
; Multiply two Q15 numbers (VarA and VarB) and store result in
; VarC as a Q15 number:
MOV
MPY
MOVH
; VarC as a Q31 number:
MOV
MPY
MOV
MOVH
Addressing mode (see Chapter 5)
Accumulator register
Shift value
Load the content of the location pointed to by the "loc16" addressing mode
with the low word of the ACC register after left−shifting by the specified value.
The ACC register is not modified:
[loc16] = ACC >> (16 − shift value); [loc16] = low (ACC
<<1...8)
If (loc16 = @AX), then after the load AX is checked for a negative condition.
The N flag is set if bit 15 of the AX is 1; else N is cleared.
If (loc16 = @AX) then after the load AX is checked for a zero condition. The Z
flag is set if AX is zero; else Z is cleared.
If the operation is repeatable, then the instruction will be executed N+1
times. The state of the Z and N flags will reflect the final result. If the operation
is not repeatable, the instruction will execute only once.
T,@VarA
ACC,T,@VarB
@VarC,ACC << 1
T,@VarA
ACC,T,@VarB
@VarC+0,ACC << 3
@VarC+1,ACC << 3
Save Low Word of Shifted Accumulator
OPCODE
1011 0001 LLLL LLLL
0101 0110 0010 1101
0000 0SHF LLLL LLLL
1011 1SHF LLLL LLLL
; T = VarA
; ACC = VarA * VarB
; VarC = ACC >> (16−1) (Q15)
; T = VarA
; ACC = VarA * VarB
; VarC low
= ACC << 3
; VarC high = ACC >> (16−1) (VarC = Q31)
MOV loc16,ACC << 1..8
OBJMODE
RPT
CYC
1
Y
N+1
1
Y
N+1
0
1
(Q15)
(Q30)
(T = Q14)
(ACC = Q28)
6-167

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C28x and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF