06-06-2023 05:11 AM
Hi,
I am writing a signal processing code to my PXIe-5774 FlexRIO FPGA. It calculates an fft of data and then stores it into memory and reads it from memory after the host vi requests data. I made two versions; one where the fft data is stored into an array that is passed to the next iteration of the loop by a shift register and another where the data is written and read from bram. The array version works as it should and produces a frequency spectrum with a spike on the right frequency (I'm inputting a sinewave for now).
FFT with array storing method:
But for the block ram implementation (which is almost identical) it produces this:
Which looks like it is not storing the data in the correct order.
The reordering of the fft output is done on the host side, so if the data is not in the order that it should, the reordering does weird things. This looks like is the case but I cannot figure out why it would be arriving to the host in the wrong order (by wrong order I mean an order that is not what the fft output gives...).
The two fpga codes are attached...
Thanks:
Aarni
Some screenshots of the read algorithm on the array version and the bram version:
Solved! Go to Solution.
06-06-2023 06:52 AM
Bear in mind you are comparing the function with a SINGLE array of data (stored interleaved as X*2 and X*2+1 indices) with a version including TWO arrays (as BRAM), but still using the X*2 and X*2+1 indices for the different values.
I think you need wither a single BRAM and keep the addressing the same OR use two BRAMS and index them both the same with just X.