Before completing this task, verify that FIFOs are the best data storage and transfer option for your application.Use FIFOs to transfer data between an FPGA target and a host processor without data loss.
Use the RIO address for your FPGA found in Measurement & Automation Explorer (MAX) to specify an FPGA target. To ensure your code runs on the FPGA, the RIO address input must match the FPGA target RIO Alias.
|Select Open FPGA VI Reference and select a mode of assigning an FPGA bitfile or application on the Item tab. You must assign a bitfile or application before you can select FIFO references for Write DMA FIFO and Read DMA FIFO. To obtain a bitfile, you must first compile FPGA code into a bitfile.|
|Perform operations using the host processor before transferring data to the FPGA target. The data you write to Write DMA FIFO must use the same data type that you need in your FPGA VI. Convert data types from the host processor to the data type of the FIFO you specify for Write DMA FIFO.|
|In a resource collection (.grsc) targeted to the FPGA, create a Host to Target FIFO. In the host VI, select Write DMA FIFO and specify the reference to the Host to Target FIFO in the General section of the Item tab.|
|In a resource collection (.grsc) targeted to the FPGA, create a Target to Host FIFO. In the host VI, select Read DMA FIFO and specify the reference to the Target to Host FIFO in the General section of the Item tab.|
|The data output from Read DMA FIFO contains data written to the DMA FIFO from the FPGA target. Use this output to display data from the FPGA target on the host, or use the host to further process the output data using the host processor.|
|Use a FIFO constant to reference the Host to Target FIFO that you created. Use the same FIFO reference for Read FIFO that you specify for Write DMA FIFO on the host VI.|
|Process the data sent from the host. Use handshaking when working with nodes that have a latency of greater than one clock cycle to ensure the FPGA writes valid data.|
|Use a FIFO constant to reference the Target to Host FIFO that you created. Use the same FIFO reference for Write FIFO that you specify for Read DMA FIFO on the host VI.|
If you receive unexpected or invalid data on your host from your target:
Search within the programming environment to access the following installed examples: