12-14-2015 10:05 AM - edited 12-14-2015 10:08 AM
Hi All,
Which labVIEW communication suite node should i use for checking the “DMA FIFO buffer” status related to the remaining samples which are ready to be transmitted?
Thank you in Advance!
12-14-2015 12:29 PM
Hello AAU,
If you use the Read DMA FIFO with number of elements and timeout equal to 0, it will output the elements remaining.
If you use the Write DMA FIFO with no data and timeout equal to 0, it will output the number of empty elements in the FIFO.
These stats will represent the host side FIFO.
You can use the Check Stream Status VI in the Streaming Examples, to read the FPGA Controls and Indicators to determine if any overflows or underflows occurred.
Documentation:
How to Transfer Data between FPGA and Host:
http://zone.ni.com/reference/en-XX/help/371599G-01/lvfpgaconcepts/fpga_transfer_data/
How DMA FIFOs work:
http://zone.ni.com/reference/en-XX/help/371599H-01/lvfpgaconcepts/fpga_dma_how_it_works/
Best Practices with DMA FIFOs:
http://zone.ni.com/reference/en-XX/help/371599J-01/lvfpgaconcepts/fpga_dma_best_practices/
Regards,
12-15-2015 04:18 AM
Hi Thomas,
Thank you very much!
I used the Write DMA FIFO with constant data input and a timeout 0, but the remianing empty element is not matching with the actual depth of the DMA FIFO buffer 😞
here the subvi which i am using to check the status of the buffer
Best regards,
aau
12-15-2015 05:52 PM
Hello AAU,
What is output?
DMA FIFOs are actually comprised of 2 FIFOs, one host and one FPGA. In the background, the DMA engine will transfer the elements from one FIFO to the other. More information can be found here:
http://zone.ni.com/reference/en-XX/help/371599H-01/lvfpgaconcepts/fpga_dma_how_it_works/
By writing NULL data with a 0 timeout, the empty elements will indicate the amount of free space on the host side buffer. If you want to know how much free space is available on the FPGA, you will need to use the FIFO Properties node in a Clock Driven Loop. If you feed this information into a Front Panel Indicator, you can use a Read/Write Control to have access to this information from the host.
Regards,