LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to initialize FPGA memory via an external file?

I'm using Labview FPGA (with the PXI-7833R).  I'd like to set up a lookup table that acts as a ROM lookup table after initialization.  After establishing the Memory Area as an FPGA resource there's an option to initialize it by filling in a spreadsheet.  However, this would be very time consuming, as my memory is 4Kwords deep.  Is there some way to just reference an external text file, or at least automatically read/paste an external file for this purpose?  If not, is there some clever host init VI that can read data from a file to initialize the FPGA Lookup Table?
 
Also, a question regarding memory capacity.  The specification sheet states that the FPGA device has an intrinsic capacity of 196KBytes.  Does this imply that when I define a memory of 4KWords (4Kdeep by 16 bits wide) it will all be allocated in block RAM?  The leftover RAM capacity can then still be used for FIFOs?
 
Thanks.
0 Kudos
Message 1 of 2
(4,528 Views)

Hi jayde,

what I use to do is to read the file from a host VI and then write the data word per word to the FPGA.  Here is are snapshot of this Host VI.  The host vi first sets the SignalDataSize to the FPGA and then then set Start to true when it will start to write the SignalData.  At this point, the FPGA is simply filling its RAM with SignalData every time NewData changes.  I didn't measure the time for this operation, but I'm sending 1024 U16 and I'm not waiting.  When the whole data is written, FPGA enters sequence 2 to run it's main application.  Note that your text file could contain voltage values, but you must send binary values to the FPGA (if you have cRIO-9263 connected to your 7833, use Convert to Binary (cRIO-9263).vi from the 9263 support library).

For your question about memory capacity, you can look at the following post: http://forums.ni.com/ni/board/message?board.id=170&message.id=226364#M226364

Hope this helps!

Patrick.

Download All
0 Kudos
Message 2 of 2
(4,523 Views)