BENCHMARK PROGRAMS

move

#twiddle+1,r7

lua

(r0)+n0,r1

 

move

r0,r4

 

move

r1,r5

 

move

#1,r3

 

move

x:(r0),A

y:(r4),y0

do n0,pass1

;------------------------------------------------

;First Pass -- W(n) = 1

;

;A---\ /---A’= Re[ A + jB + (C + jD) ] = A + C

;B----\__/----B’= Im[ A + jB + (C + jD) ] =j(D + B)

;C----/ \----C’= Re[ A + jB - (C + jD) ] = A - C

;D---/ \---D’= Im[-A - jB + (C + jD) ] =j(D - B)

;-------------------------------------------------

 

 

;

 

 

 

 

sub

y0,A

x:(r1),x0 y:(r5),B

add

x0,B

A,x:(r1)+

y:(r5),A

sub

x0,A

x:(r0)+,B

B,y:(r4)+

add

y0,B

x:(r0)-, A A,y:(r5)+

move

B,x:(r0)+

y:(r4),y0

pass1

 

 

 

 

move

#idata,r0

 

 

do

#binlogsz-3,end_pass

move

r7,r2

 

 

 

move

r2,r6

 

 

 

move

n0,A

 

 

 

lsr

A r3,B

 

 

 

lsl

A,n0

 

 

 

move

B,r3

 

 

 

lua

(r0)+n0,r1

 

move

r0,r4

 

 

 

move

r1,r5

 

 

 

lua

(r3)-,n2

 

 

move

x:(r0),A

y:(r4),y0

do n0,FirstGroupInPass

sub

y0,A

x:(r1),x0

y:(r5),B

add

x0,B

A,x:(r1)+ y:(r5),A

sub

x0,A

x:(r0)+,B B,y:(r4)+

add

y0,B

x:(r0)-,A A,y:(r5)+

move

B,x:(r0)+

y:(r4),y0

FirstGroupInPass

 

 

 

 

do

n2,end_group

 

move

r5,r0

 

 

 

move

r0,r4

 

 

 

;r7 always points to start location of twiddle ;r1 = ptr to b

;r4 points to c

;r5 points to d,with predecrement ;group per pass, double at ea pass ;A=a, y0=c

;first pass is trivial, no multiplications

;A=a-c=c’,B=d,x0=b, ;B=d+b=b’, A=d,PUT c’ to x:b ;A=d-b=d’,B=a,PUT b’ to y:c ;B=a+c=a’, A=next a,PUT d’ ;y0=next c, PUT a’

;r0 = ptr to a

;do all passes except first and last ;r2 points to real twiddle

;r6 points to imag twiddle ;half bflys per group ;double group per pass

;r3 is temp reg. ;r1 = ptr to b ;r4 points to c ;r5 points to d ;n2=group per pass -1 ;A=a, y0=c

;first group in a pass ;A=a-c=c’,B=d,x0=b, ;B=d+b=b’, A=d,PUT c’ to x:b ;A=d-b=d’,B=a,PUT b’ to y:c ;B=a+c=a’, A=next a,PUT d’ ;y0=next c, PUT a’

;rest groups in this pass ;r0 ptr to next group a ;r4 ptr to next group c

MOTOROLA

BENCHMARK PROGRAMS

B - 23

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