Texas Instruments TMS320C28x Reference Manual page 387

Dsp cpu and instruction set
Table of Contents

Advertisement

MPY P,T,loc16
MPY P,T,loc16
SYNTAX OPTIONS
MPY P,T,loc16
Operands
P
T
loc16
Description
Flags and
Modes
Repeat
Example
; Calculate using 16-bit multiply:
; Y = (X0*C0) >> 2) + (X1*C1 >> 2) + (X2*C2 >> 2)
; X2 = X1
; X1 = X0
SPM
MOVP
MPYS
MOVAD
MPY
MOVAD
MPY
ADDL
MOVL
6-230
0011 0011 LLLL LLLL
Product register
Multiplicand register
Addressing mode (see Chapter 5)
Multiply the signed 16-bit content of the T register by the signed 16-bit
contents of the location pointed to by the "loc16" addressing mode and store
the 32-bit result in the P register:
P = signed T * signed [loc16];
None
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
−2
; Set product shift to >> 2
T,@X2
; T = X2
P,T,@C2
; P = T*C2, ACC = 0
T,@X1
; T = X1, ACC = X2*C2>>2, X2 = X1
P,T,@C1
; P = T*C1
T,@X0
; T = X0, ACC = X1*C1>>2 + X2*C2>>2, X1 = X0
P,T,@C0
; P = T*C0
ACC,P << PM
; ACC = X0*C0>>2 + X1*C1>>2 + X2*C2>>2
@Y,ACC
; Store result into Y
OPCODE
OBJMODE
16 X 16 Multiply
RPT
CYC
X
1

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?

Table of Contents

Save PDF