beautypg.com

Motorola DSP96002 User Manual

Page 529

background image

B-10

DSP96002 USER’S MANUAL

MOTOROLA

B.1.14 N Cascaded Real Biquad IIR Filters

w(n) = x(n) - a1 * w(n-1) - a2 * w(n-2)

y(n) = w(n) + b1 * w(n-1) + b2 * w(n-2)

X Memory Organization Y Memory Organization

b1N Coef. + 4N-1

b2N

a1N

a2N

wN(n-1) Data + 2N-1

.

wN(n-2)

.

.

b11

.

b21

w1(n-1)

a11

R1,R0

w1(n-2) Data

R4

a21 Coef.

DSP56000 IMPLEMENTATION

Program

ICycles

Words

move #$ffffffff,m0 2 2

move m0,m4 1 1

move #data,r0 2 2

move #coef,r4 2 2

movep x:input,a 1 2

move x:(r0)+,x0 y:(r4)+,y0 1 1

do #n,end 2 3

mac -x0,y0,a x:(r0)-,x1 y:(r4)+,y0 1 1

macr -x1,y0,a x1,x:(r0)+ y:(r4)+,y0 1 1

mac x0,y0,a a,x:(r0)+ y:(r4)+,y0 1 1

mac x1,y0,a x:(r0)+,x0 y:(r4)+,y0 1 1

end

rnd a 1 1

movep a,x:output 1 2

-------------------

Totals 17 4N+16