Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21588 Discussions

FFT Megafunction Fixed Point

Altera_Forum
Honored Contributor II
1,322 Views

I'm trying to use Altera's FFT Megafunction in Fixed Point mode but I didn't find any documentation defining how many bits it uses for decimal part. I'm using the Variable Streaming because its the only onde that gives me the ability to use 32 bits entrance. 

 

I need to use it with 32 bits in which 26 are integer and 6 bits of decimal part. 

 

Can anyone help me.  

Thanks
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
620 Views

I think you need to scale the input up in such a way that you have 32 bits integer and the scale it down in the output. In other words you need to do a bit casting.

0 Kudos
Altera_Forum
Honored Contributor II
620 Views

the FFT core only has a sense of decimals when using floating point mode. fixed notation is largely an abstraction 

 

since the FFT is a linear operator, you should be able to imagine multiplying your 26:6 input word by 1,000,000 to force it to 32:0, a full integer. then you can divide the FFT output by 1,000,000 to rescale 

 

the FFT output is somewhat relative due to processing gain and any windowing. if you convert to decibels you could just subtract 20*log10(1,000,000)=60dB from each value
0 Kudos
Reply