dsp56800 Freescale Semiconductor, Inc, dsp56800 Datasheet - Page 416

no-image

dsp56800

Manufacturer Part Number
dsp56800
Description
16-bit Digital Signal Controllers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
B.1.8
This code multiples a vector by a scalar and adds the result to another vector. The Y0 register holds the
scalar value. Figure B-6 gives a graphical overview and memory map for the vector multiply-accumulate
code.
B-20
; Y0 is assumed to have been initialized with the multiplier scalar value
EndDO1_8:
;
;
opt
MOVEI
MOVE
MOVE
MOVE
CLR
MOVE
DO
MAC
TFR
Vector Multiply-Accumulate
cc
#N_,N
#A_Vec8,R0
#B_Vec8,R3
#C_Vec8,R1
A
N,EndDO1_8
y0,x0,a
y1,a
c1
c2
c3
=
X:(R0)+,A
X:(R0)+,Y1
A,X:(R1)+
Figure B-6. Vector Multiply-Accumulate
a1
a2
a3
+
DSP56800 Family Manual
y0
X:(R3)+,X0
X:(R3)+,X0
Total:
X
b1
b2
b3
; 2
; 2
; 2
; 2
; 1
; 1
; 2
; 1
; 1
____________
14
r0
r3
r1
2
2
2
2
1
1
3
1
1
2N+13
X memory
vector size
point to vec a
point to vec b
point to vec c
X0=b
A=a
repeat prod N times
A=Y0*b+a load nxt a,b
A=next(a) STORE c
a1
a2
a3
b1
b2
b3
c1
c2
c3
Freescale Semiconductor
RESULT:A=0
AA0084

Related parts for dsp56800