beautypg.com

Motorola DSP96002 User Manual

Page 522

background image

MOTOROLA

DSP96002 USER’S MANUAL

B-3

B.1.4 N Real Updates

d(I) = c(I) + a(I) * b(I), I=1,2,...,N


Program

ICycles

Words

move #aaddr,r0 1 1

move #baddr,r4 1 1

move #caddr,r1 1 1

move #daddr,r5 1 1

move x:(r0)+,d4.s y:(r4)+,d6.s 1 1

fmpy.s d4,d6,d1 x:(r1)+,d0.s 1 1

do #N,_end 2 3

fadd.s d1,d0 x:(r0)+,d4.s y:(r4)+,d6.s 1 1

fmpy.s d4,d6,d1 x:(r1)+,d0.s d0.s,y:(r5)+ 1 1

_end --- ---

Totals:

10 2N+9

(10 2N+9)

B.1.5 FIR Filter with Data Shift

N-1

c(n) = SUM {a(I) * b(n-I)}

I=0

Program

ICycles

Words

move #data,r0 1 1

move #coef,r4 1 1

move #n-1,m0 1 1

fclr d1 m0,m4 1 1

movep x:input,x:(r0) 1 2

fclr d0 x:(r0)-,d4.s y:(r4)+,d6.s 1 1

rep #N 1 2

fmpy d4,d6,d1 fadd.s d1,d0 x:(r0)-,d4.s y:(r4)+,d6.s 1 1

fadd.s d1,d0 (r0)+ 1 1

movep d0.s,x:output 1 2

--- ---

Totals:

10 1N+12

(10 1N+12)