Motorola DSP96002 User Manual

Page 555

Advertising
background image

B-36

DSP96002 USER’S MANUAL

MOTOROLA

SINGLE SECTION

EQUATIONS:

t’=t*q-k*s

u’=t*k+s*q

t’

t

output=sum (w*u’)

DSP56000 IMPLEMENTATION

Program ICycles

Words

move #coef,r0 ;point to coefficients

move #3*N,m0 ;mod on coefficients

move #state,r4 ;point to state variables

move #N,m4 ;mod on filter states

movep y:datin,y0 ;get input sample

move x:(r0)+,x1 ;get first Q in table 1 1

do #order,_endnlat 2 3

mpy x1,y0,a x:(r0)+,x0 y:(r4),y1 ;q*t, get k, get s 1 1

macr -x0,y1,a b,y:(r4)+ ;q*t-k*s, save new s 1 1

mpy x0,y0,b a,y0 ;k*t, set t’ 1 1

macr x1,y1,b x:(r0)+,x1 ;k*t+q*s, get next q 1 1

_endnlat

move b,y:(r4)+ ;sv scnd lst st 1 1

move a,y:(r4)+ ;save last state 1 1

clr a y:(r4)+,y0 ;clr acc, get fst st 1 1

rep #order ;do fir taps 1 2

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

macr x1,y0,a (r4)+ ;rnd, adj pointer 1 1

movep a,y:datout ;output sample

--- ---

Totals: 13 5N+10

DSP96002 IMPLEMENTATION

Z

-1

t’

u’

s

w

k

k’

t

q

q

u

Advertising