beautypg.com

Motorola DSP96002 User Manual

Page 629

background image

B-110

DSP96002 USER’S MANUAL

MOTOROLA

dc 0.0000000E+00

dc 2.000000

dc 3.000000

dc 8.000000

dc 9.000000

dc 12.00000

dc 15.00000

dc 19.00000

dc 20.00000

dc 22.00000

dc 23.00000

dc 24.00000

dc 25.00000

dc 26.00000

dc 27.00000

dc 28.00000

org p:$100

start

move #1,d7.l ;number of groups

move #n/4,d6.l ;number of butterflies/group

move #data,r0 ;upper leg pointer

move #n/2,n0 ;offset between groups

move #n-1,m0 ;mod N

move #data+n/2,r4 ;lower leg pointer

move #n/2,n4 ;offset between groups

do #iord-1,_stage ;do stages

do d7.l,_grp ;do groups

do d6.l,_bfly ;do butterflies

move x:(r0)+,d0.s ;upper leg 1

move x:(r4)+,d1.s ;lower leg 1

faddsub.s d0,d1 x:(r0)-,d2.s ;upper leg 2, point back to 1

move x:(r4)-,d3.s ;lower leg 2, point back to 1

faddsub.s d2,d3 d1.s,x:(r0)+ ;save upper 1, point to 2

move d0.s,x:(r4)+ ;save lower 1, point to 2

move d3.s,x:(r0)+ ;save upper 2, point to next