LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW FPGA BRAM

Solved!
Go to solution

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:

IhmeKyselij_0-1686045726710.png

But for the block ram implementation (which is almost identical) it produces this:

IhmeKyselij_1-1686045824210.png

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:

IhmeKyselij_4-1686046218056.pngIhmeKyselij_5-1686046232924.png

 

IhmeKyselij_6-1686046266536.pngIhmeKyselij_7-1686046281623.png

 

 

Download All
0 Kudos
Message 1 of 2
(561 Views)
Solution
Accepted by topic author IhmeKyselijä

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.

Message 2 of 2
(538 Views)