Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
725 Views

MSB not used in FFT Megacore Function

I am currently using the FFT MegaCore and I remarked something strange about the output resolution. 

 

I tested the function in Matlab using the model with different types of signals (sine, noise, sine+noise, square) and I remarked that the MSB of the output is never used (always 0 or 1), and sometimes the 2 MSBs are not used. 

 

For instance, I used FFT in streaming architecture with 18 bits resolution, the input signals is a perfect square wave (4096 samples) that I scale to the maximum (i.e. 0/1 → -131'071 / 131071), and the maximum of the output of the FFT is 16'247 for the real part and 18'514 for the imaginary part. That means the two MSB are not used (because it is 18 bits whereas 16 bits would be sufficient). The exponent value is -11, so the limitation doesnot come from this. 

 

I waited that the scaling was optimized to exploit all the bits. But maybe it uses all bits internally and this cannot be seen on the output. So, I just would like to know if anybody can confirm that this is normal. 

 

Thanks in advance 

 

Jérôme
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
40 Views

Interesting... 

I noted the same thing in altera's first releaeses (back in 2001) and raised the issue to them. The following fft version improved .  

 

You might set the bitwidth higher to force it to use more bits if indeed it is not enough.
Altera_Forum
Honored Contributor I
40 Views

Yes, but a higher resolution implies more resources... 

 

But in my case, the precision is sufficient, it is not a problem. It is just that I was surprised by this behaviour.
Altera_Forum
Honored Contributor I
40 Views

I think all you can help me. 

I have a video stream and I must implement this datas in fft.  

I made my own fft with the megafunction. but I dont know how can I use this in my project? 

I need to storage phase of data ??
Reply