FFT IP Core - Input and output number format?
I am unsure what data format I should use for the FFT IP core input and what data format it will output
I can only find a few references to this topic in the user guide:
“Imaginary input data, which represents a signed number of data precision bits.” (in reference to sink_imag)
“Real input data, which represents a signed number of data precision bits.” (in reference to sink_real)
“The fixed transform FFT accepts a two's complement format complex data vector of length N inputs, where N is the desired transform length in natural order.”
I am assuming the input and output should always be in two’s compliment format then?
I have designed a system which takes the output of an on-chip ADC (MAX10) and performs an FFT on the data.
I am using a 1KHz test waveform and approx 4.5V.
I sample the output of the ADC every 598th tick of a 50MHz clock (83.6KHz sample rate)
I convert the 12-bit ADC data to 14-bit twos compliment by appending “00” to the front, as the signal is always positive anyway due to a DC offset.
This is then fed into the FFT core’s sink_real, whilst sink_imag is set to 0.
The FFT appears to be performing correctly with no errors, but my output looks incorrect:
sink_real format: signed line chart
source_real/imag format: unsigned line chart
The output is always almost either “11111111111111” or “00000000000000”. It is also different every time
setting the source_real/imag format to signed line chart looks like this
I’ve also attached a project archive.
Any help is greatly appreciated
Thanks for reading.