beautypg.com

Motorola DSP96002 User Manual

Page 542

background image

MOTOROLA

DSP96002 USER’S MANUAL

B-23

fmpy d5,d9,d0 fsub.s d1,d2 y:(r1)-n1,d8.s 1 1

fmpy d6,d8,d1 fadd.s d0,d3 y:(r5)-n5,d9.s 1 1

fmpy.s d6,d9,d0 d3.s,x:(r4) y:(r2),d4.s 1 1

fmpy.s d4,d8,d3 d2.s,y:(r4)+n4 1 1

fmpy d4,d9,d2 fsub.s d0,d3 y:(r1)-n1,d8.s 1 1

fadd.s d2,d1 y:(r5)-n5,d9.s 1 1

move d1.s,x:(r4) d3.s,y: 1 1

_end_bfy

move #coef,r5 ;point at wi0 2 2

move #coef+table/4,r1 ;point at wr0 2 2

move #0,r3 ;reset group index counter 1 1

_end_grp

move n0,d0.l ;get butterflies per group 1 1

lsr d0.l ; 1 1

lsr d0.l n2,d1.l ;divide butterflies/group by 4 1 1

lsl d1.l d0.l,n0 ;multiply groups/pass by 4 1 1

lsl d1.l n3,d0.l ;get w rotation factor 1 1

lsl d0.l d1.l,n2 ;multiply rotation factor by 4 1 1

lsl d0.l n0,n4 ; 1 1

move d0.l,n3 ; 1 1

move n0,d1.l ;check for 1 butterfly per group 1 1

lsr d1.l ; 1 1

jne skip ; 1 2

move #0,n3 ;reset rotation factor - last pass 1 1

skip nop ; 1 1

_end_pass ; --- ---

endm ; 78 82

The speed for 1024 points using a 75ns instruction cycle is 2.72ms, assuming internal program and internal

data memory.

B.1.16

LMS ADAPTIVE FILTER

z

-1

z

-1

z

-1

+

-

f(n)

e(n)

x(n)

x(0)

x(n-1)

x(n-2)

x(n-3)

h0

h1

h2

h3

d(n)