Motorola DSP96002 User Manual

Page 552

Advertising
background image

MOTOROLA

DSP96002 USER’S MANUAL

B-33

SINGLE SECTION

EQUATIONS:

t’=t-k*s

s’=s+k*t’

t’

t

output= sum(s’*w)

DSP56000 IMPLEMENTATION

Program ICycles

Words

move #k,r0 ;point to coefficients

move #2*N,m0 ;mod 2*(# of k’s)+1

move #state,r4 ;point to filter states

move #N,m4 ;mod on filter states

movep y:datin,a ;get input sample

move x:(r0)+,x0 y:(r4)-,y0 ;get first k, first s 1 1

do #N,_el ;do filter 2 3

macr -x0,y0,a b,y:(r4)+ ;t-k*s, save prev s 1 1

move a,x1 y:(r4)+,b ;copy t’,get s again 1 1

macr x1,x0,b x:(r0)+,x0 y:(r4)-,y0 ;t’*k+s,get k,get s 1 1

_el

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

clr a a,y:(r4)+ ;save first state 1 1

move y:(r4)+,y0 ;get last state 1 1

rep #N 1 2

mac x0,y0,a x:(r0)+,x0 y:(r4)+,y0 ;do fir taps 1 1

macr x0,y0,a (r4)+ ;finish, adj pointer 1 1

movep a,y:datout ;output sample

--- ---

Totals: 12 4N+10

DSP96002 IMPLEMENTATION

Z

-1

t

t’

s’

s

w

k

k’

Advertising