Motorola DSP96002 User Manual
Page 527
B-8
DSP96002 USER’S MANUAL
MOTOROLA
move #aaddr,r0 1 1
move #baddr,r4 1 1
move #caddr,r1 1 1
move r1,r6 1 1
move #daddr,r5 1 1
move r5,r2 1 1
move x:(r4),d6.s 1 1
move x:(r0),d4.s 1 1
fmpy.s d4,d6,d2 y:(r0)+,d5.s 1 1
fmpy.s d5,d6,d3 x:(r1)+,d0.s y:(r4)+,d7.s 1 1
fmpy d5,d7,d2 fadd.s d2,d0 x:(r4),d6.s 1 1
do #N,_end 2 3
fmpy d4,d7,d2 fsub.s d2,d0 x:(r0),d4.s y:(r6)+,d1.s 1 1
fmpy d4,d6,d2 fadd.s d2,d1 d0.s,x:(r5)+ y:(r0)+,d5.s 1 1
fmpy d5,d6,d3 fadd.s d3,d1 x:(r1)+,d0.s y:(r4)+,d7.s 1 1
fmpy d5,d7,d3 fadd.s d2,d0 x:(r4),d6.s d1.s,y:(r2)+ 1 1
_end
--- ---
Totals:
17 4N+14
(13 5N+9)
B.1.11
Complex Correlation Or Convolution (FIR Filter)
cr(n) + jci(n) = SUM(I=0,...,N-1) { ( ar(I) + jai(I) ) *
( br(n-I) + jbi(n-I) ) }
cr(n) = SUM(I=0,...,N-1) { ar(I) * br(n-I) - ai(I) * bi(n-I) }
ci(n) = SUM(I=0,...,N-1) { ar(I) * bi(n-I) + ai(I) * br(n-I) }
Program
ICycles
Words
move #aaddr,r0 1 1
fclr d2 #baddr,r4 1 1
fclr d0 1 1
fclr d1 x:(r0),d5.s y:(r4),d6.s 1 1
do #N,end 2 3
fmpy d6,d5,d2 fsub.s d2,d0 x:(r4)+,d4.s y:(r0)+,d7.s 1 1
fmpy d4,d7,d2 fadd.s d2,d1 1 1
fmpy d4,d5,d2 fadd.s d2,d1 1 1
fmpy d6,d7,d2 fadd.s d2,d0 x:(r0),d5.s y:(r4),d6.s 1 1
end
fsub.s d2,d0 1 1
--- ---
Totals:
1 1 4N+8
(11
4N+8)