beautypg.com

Motorola DSP96002 User Manual

Page 553

background image

B-34

DSP96002 USER’S MANUAL

MOTOROLA

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

move p y:datin,d1 ;get input sample

move #2,n4 1 1

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

do #N,_elat 2 3

fmpy d5,d6,d0 fadd.s d0,d3 1 1

fadd.s d0,d1 d6.s,d3.s d3.s,y:(r4)+n4 1 1

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

_elat

fadd.s d0,d3 1 1

fclr d0 d3.s,y:(r4)+ 1 1

fclr d1 d1.s,y:(r4)+ 1 1

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

rep #N 1 2

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

fadd.s d2,d3 (r4)+ 1 1

move p d3.s,y:datout ;output sample

--- ---

Totals: 14 4N+12