Missing Data with DMA FIFO

Updated Jul 29, 2019

Reported In

Software

  • LabVIEW FPGA Module

Issue Details

  • I noticed that I am missing data when removing it from my DMA FIFO. How do I prevent this?
  • I am "losing" data when I sample at higher rates. I am using a DMA FIFO. 

Solution

Missing data from a DMA FIFO is usually due to improper DMA architecture. The points below are several common issues related to missing data that developers run into when using a DMA FIFO.  
  • The acquisition code of the FPGA has sections of code that take an undefined amount of time. If data should be acquired at a given loop rate and the FPGA is waiting on the host for a value change or an interrupt, the FPGA will stop acquiring and data will be lost. 
  • Data is being read from the FIFO out of order. This can occur when interleaving data into the FIFO and you do not specify to read an integer multiple of the number of channels.
  • The DMA FIFO is overflowing. The KnowledgeBase article Missing Data When Using DMA FIFO With High Sample Rates on FPGA goes into more detail on this subject. However, there are several methods for avoiding overflows given below.