BENCHMARK PROGRAMS

 

sub

y0,a

;k-bergtabl[j]

 

move

b,x1

;save b, x1=i

 

move

r0,y0

;y0=j=i+i

 

add

y0,b

;b=j+i

 

move

b,r0

;r0=j+i

 

nop

 

 

 

move

a,x:(r0+n0)

;store bergtabl[j+i]

 

add

x1,b

;b=j+i+i

 

move

b,x0

;save b

 

move

x1,b

;recover b=i

 

jmp

_star

 

_loop

move

y1,a

;recover a

_endl

 

 

 

 

move

#>offset,a

;offset is the location of output data or twiddle

 

move

#bergtable,r0

 

 

do #points,_add_offset

 

 

move

x:(r0),B

 

 

add

A,B

 

 

move

B,x:(r0)+

 

_add_offset

 

 

 

 

endm

;end of sincos macro

 

;convert normal order to berglang order

 

norm2berg

macro

points,bergtable,twiddle

 

;points is actual size of table to be converting

 

 

move

#bergtable,r0

;r0=pointer of bergland table

 

move

#twiddle,r2

;r2=twiddle pointer for X

 

move

r2,r6

;r6=twiddle pointer for Y

 

do

#points,data_temp

 

 

move

x:(r0)+,r3

;get index

 

move

r3,r7

 

 

move

x:(r3),a

 

 

move

y:(r7),b

;get value

 

move

a,x:(r2)+ b,y:(r6)+

;write back

data_temp

 

 

 

 

endm

 

 

;Real-Valued FFT for MOTOROLA DSP56000/1/2

;based on Glenn Bergland’s algorithm

;

 

 

 

;

______________________________

 

rifft macro points,binlogsz,idata,odata,twiddle,bergtable

 

 

move

#idata,r0

;r0 = ptr to a

 

move

#points/4,n0

;bflys in ea group, half at ea pass

B - 22

BENCHMARK PROGRAMS

MOTOROLA

Page 584
Image 584
Motorola DSP56000, 24-Bit Digital Signal Processor manual Benchmark Programs