14.08.2013 Views

Fast Fourier Transforms on Motorola's Digital Signal Processors

Fast Fourier Transforms on Motorola's Digital Signal Processors

Fast Fourier Transforms on Motorola's Digital Signal Processors

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

every output corresp<strong>on</strong>ding to every input. In the<br />

Goertzel algorithm, <strong>on</strong>ly <strong>on</strong>e DFT coefficient X(k) is<br />

needed, and X(k) = y k (N). In other words, the complex<br />

multiplicati<strong>on</strong> is carried out <strong>on</strong>ly <strong>on</strong>ce in an<br />

entire DFT calculati<strong>on</strong>. In frequency detecti<strong>on</strong>, <strong>on</strong>ly<br />

the power of magnitude of the DFT coefficient is<br />

needed. This observati<strong>on</strong> may simplify the computati<strong>on</strong><br />

even more.<br />

;Goertzel algorithm to calculate energy of DFT coefficient<br />

;<br />

;<br />

;<br />

data equ $100<br />

COEF equ $123456<br />

LOOP equ 256<br />

org p:$40<br />

move #data,r0 ;r0 -> input data<br />

clr a #0,b ;I(n-1)=0,I(n-2)=0<br />

move #COEF,y0 ;y0=cos(2pik/N)<br />

do #LOOP,_END_GOERT<br />

neg b y:(r0)+,a a,x1 ;x1=I(n-1),b=-I(n-2),a=x[i]/2<br />

macr y0,x1,a x1,y1 ;a=x[i]/2 + I(n-1)*COEF,y1=I(n-1)<br />

addl b,a x1,b ;a=x[i] + 2*I(n-1)*CEOF - I(n-2),b=I(n-1)<br />

_END_GOERT<br />

mpy -y0,x1,a a,x0 ;a=-c<strong>on</strong>(2pik/N)I(n),x0=I(n)<br />

mpy x1,y1,b ;b=I(n-1)^2<br />

mac x0,x0,b a,y0 ;b=I(n)^2+I(n-1)^2<br />

mpy x1,y0,a ;a= -c<strong>on</strong>(2pik/N)I(n)I(n-1)<br />

addl b,a ;a= power of magnitude of DFT<br />

Figure 6-6 DSP56001 assembly code that calculates energy of DFT<br />

coefficients by single parameter<br />

From Figure 6-6, the last output of the IIR filter is:<br />

k<br />

y<br />

k<br />

( N)<br />

=<br />

IN ( ) – W<br />

N<br />

IN ( – 1)<br />

Eqn. 6-15<br />

MOTOROLA 6-19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!