Hi Andrew:

Now I can find the OF output from FFT module is high. Does this mean the FFT is 
overflow? But I already set all shift bit to '1'.

I an not very sure how many shift bits the FFT module has. I just give it 32 
bits width '1'.

Thanks

Wan

________________________________
From: Andrew Martens [mailto:[email protected]]
Sent: Monday, 22 June 2009 4:23 PM
To: Cheng, Wan (ATNF, Marsfield)
Cc: [email protected]
Subject: Re: [casper] about the shift input of FFT

Hi Wan

The FFT applies gain to any repeating input signal. You can view this happening 
with the following MATLAB commands;

x = 0:1:32;
y = sin(4*x*2*pi/32);
plot(abs(fft(y,32)));

You will see that the output has spikes of height 16 instead of 1 which you 
would expect from a sinusoid of amplitude 1. The FFT scales the signal by 
2^(n-1), where n is the number of stages in the FFT (a 32 bin fft has log2(32) 
= 5 stages etc).

This scaling has the potential to introduce overflow errors.

The CASPER FFT allows you to remove the risk of overflows by shifting the data 
down by one bit at each stage in the FFT. The shift input allows you to set how 
much shifting is done. The default is normally to leave this all '1's but it 
depends on what your input data looks like.

I hope this answers your question. If you have MLIB_ROOT properly defined in 
your environment, you should have access to some documentation on the FFT (and 
most blocks). Press the 'Help' button in the mask dialog.

Regards
Andrew

2009/6/22 <[email protected]>
Hi:

Could anyone give me some idea on the function of shift input pin of FFT?
I find some example design set it to all 1s. This means every stage are set to 
shift 1. What does this mean?

Thanks

Wan

Reply via email to