Next Steps - LabVIEW RIO Evaluation Kit

cancel
Showing results for 
Search instead for 
Did you mean: 

How to feed array values one at a time to and from FPGA?

I have a u16 array of constants that's stored on the host because it's too big to fit on the FPGA. I'm trying to feed the values one at a time to the Xilinx FFT core on the FPGA vi, then send each processed value back to the host, and the host vi should show a graph of the input data and the output data.  The project is based on the 2011 version of the tutorial. (I don't know if it's the same as the 2012). I just disabled all the stuff in the FPGA vi, added the FFT core, and added the variables needed. The FPGA vi compiles and the project deploys ok, but when I try to run it, I get a dialog box that says the following:

"Error -1950679035 occurred at Open Variable Connection in Initialize Shared Variables Host.vi->Windows UI.vi

Possible reason(s):

LabVIEW:  (Hex 0x8BBB0005) Unable to locate variable in the Shared Variable Engine.  Deployment of this variable may have failed."

I click continue and the vi stops.

I will try different approaches, but the purpose of posting this is just in case someone sees an obvious error.

(Note: I've tried the input for loop on the host vi as well as the RT vi. The version with the input for loop on the RT vi is shown here.)

There's a longer (and older) thread at the following link if you'd prefer to post on the main board: http://forums.ni.com/t5/LabVIEW/Xilinx-FFT-function-how-to-feed-values-to-it-one-at-a-time/td-p/2295...

Here are screenshots of the three main vi's:

FPGA vi:

http://i.snag.gy/IhG4G.jpg

RT microprocessor vi:

http://i.snag.gy/Ocmim.jpg

Host vi:

http://i.snag.gy/JghpJ.jpg

0 Kudos
Message 1 of 7
(14,153 Views)

Hi Count3r5tr1ke!

Thanks for posting your issue here.  I'll take a look at the longer thread, but one quick observation on your code is that you should probably be using DMA FIFO's to pass data to and from the FPGA.  Are you familiar with these?  Or is there a particular reason why you are not using them?

Best,

Jeff S

Jeff S.
National Instruments
0 Kudos
Message 2 of 7
(6,943 Views)

I looked at the different methods of data transfer given on this page: http://zone.ni.com/reference/en-XX/help/371599F-01/lvfpgaconcepts/pfi_data_transfer/

I'd like to use programmatic front panel communication so I can store the array on the host and feed the values one at a time to the FPGA vi.

Right now, I don't need the most elegant/fastest method. So I just wanted to modify the tutorial project as little as possible.

0 Kudos
Message 3 of 7
(6,943 Views)

Count3r5tr1ke,

The problem with "Programmatic Front Panel Communication" is that it is inherently lossy.  If you are passing the values from your array to the FPGA one value at a time, you will have to implement some sort of handshaking to make sure that you don't skip any points or read any points twice.  This is still possible, but your code is going to start becoming unnecessarily complex.

Best,

Jeff S

Jeff S.
National Instruments
0 Kudos
Message 4 of 7
(6,943 Views)

I really appreciate your explanations. I'm looking at the "FFT with Handshaking" example, and I replaced the sine wave generator with 1/4 of my array, through a for loop to make the values one at a time. Does that sound like it will work?  I'm compiling it right now, if it works at least it's something, but it's not really what I was trying to do because clearly, the data is on the FPGA in that example, and my entire dataset won't fit on the FPGA. The pre-synthesis report indicates 1/4 of the array plus the code uses 43% of registers and 87% of LUTs.

--------------

Update: it doesn't work details posted on main forum: http://forums.ni.com/t5/LabVIEW/Xilinx-FFT-function-how-to-feed-values-to-it-one-at-a-time/m-p/23476...

0 Kudos
Message 5 of 7
(6,943 Views)

Count3r5tr1ke,

I'm sorry for the delay in my response.


I really think it would be worth the time for you to try implementing a FIFO.  Please give this method a try and let me know how it goes!

Best,

Jeff S

Jeff S.
National Instruments
0 Kudos
Message 6 of 7
(6,943 Views)

Thanks for your response. The FPGA FFT examples provided by NI both use FIFOs. I tried plugging my array into both of them but still nothing. Details and code given on the main board (see messages 18,19, and 20) http://forums.ni.com/t5/LabVIEW/Xilinx-FFT-function-how-to-feed-values-to-it-one-at-a-time/m-p/23476...

0 Kudos
Message 7 of 7
(6,943 Views)