Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

DMA FIFO 9606 occasional data corruption

I am having occasional data corruption issues while transferring data from FPGA to RT host. Here are the details of my project:

- Hardware: SBRIO 9606 + NI 9683

- The project has two test VIs: one for RT host and one for FPGA target.

- The FPGA vi reads 14 A/D inputs at 10 kHz. The FIFO depth is 4096.

- The Host vi is running at 100 Hz. FIFO depth is 14336.

- According to my calculation (@ 40Mhz) FPGA clock, FIFO will fill to 1400 elements before the host vi reads it.

- Please see attached code and waveform. I see most of the time, normal three phase waveform. Occasionally, I see a burst of corrupt data as shown and then periods of good waveform.

- I have ruled out hardware by hardwiring the A/D output to D/A in the FPGA and observing the waveform on an oscilloscope. This ruled out the signals coming to the A/D and the A/D reading itself. Now I am left with DMA …

 

Thank you and best regards,

Download All
0 Kudos
Message 1 of 3
(2,175 Views)

TGY,

 

First thing that comes to my mind from the behavior is that a FIFO overflow or underflow might be occuring, but there is no current way of knowing this in your code since you are not checking for this at the moment. The while loop continues to run even if an error occurs because the stop button is set to False at all times. A good place to get started if by checking if there is something wrong with the state of the FIFO at any point in time.

 

Regards,

 

 

tuco100s

0 Kudos
Message 2 of 3
(2,128 Views)

Tuco100s,

I added software to latch the timeout. If a timeout happens, the RT code will shutdown and it will then stop the FPGA code. Please see attached pdf. The ResetCntr may be confusing, I am using that for troubleshooting. I set it as TRUE for normal operation.

 

Also you will notice that I replaced the A/D with generated sine waves and got the same issue as before.

 

TGY,

Download All
0 Kudos
Message 3 of 3
(2,119 Views)