01-12-2026 10:14 PM
Hello Everyone,
I want to transmit a U32 value from the FPGA to a real-time application running on a PXI controller in the same chassis as my FPGA. I want to do this with as little latency as possible.
I thought this could be achieved by creating, writing to, and reading from a 1-element Target-To-Host DMA FIFO that I defined in my project.
At the time I believed I could perpetually write to this FIFO from the FPGA and it would overwrite the element like a circular buffer. Then, a piece of real-time software could read the newest value sitting in the FIFO, on demand.
That doesn't seem to be the case. As I try to read the FIFO from a real-time software component, the DMA transfer seems to operate in short bursts, stop working, then operates correctly again after some time. This continues throughout runtime.
---
The FPGA writes to the FIFO every 20 uSec, on average. (Data is dependent on the performance of a device on the other end of a UART interface)
The real-time software reads 1 element form the FIFO every software frame, or 2ms.
Am I approaching this correctly?
What I have tried:
1. Using the FPGA Interface library to read the data from a control on the FPGA VI's front panel. This works as expected, but I only did this to verify my design. I'm concerned this approach introduces a lot of latency.
2. Flushing the FIFO at the start of my duty cycle (2uSec after writing to the FIFO). This results in identical performance (bursts of the DMA working, then not working, and working again).
I assume the DMA implementation would be faster, and I would really like to get this working.
Could someone explain what I'm not understanding about the FIFO/DMA approach?
If DMA is not an option, could someone suggest a software approach to make this U32 value available on demand by a PXI controller (in the same chassis as the FPGA) with as little latency as possible?
Thank you kindly,
-Chrs
01-13-2026 01:01 AM
If your goal is the lowest latency, you should go with tag read/write using control. The latency is microseconds level.
DMA FIFO is for lossless high throughput data transfer but it has high overhead.
See Transferring Data between the FPGA and Host
01-13-2026 05:18 AM
For a single value with only the most recent value being relevant, using a front panel control is the best solution.
DMA is a QUEUE, using a QUEUE as a single-element interface is just going to introduce all kinds of awkwardness.
It's also the lowest latency option. Front panel elements only become "expensive" Latency-wise if you start having multiple dozens of them being read each cycle.
01-13-2026 08:38 AM
Hi ZYOng,
Thank you for your input and the link!
Just to be sure, are you suggesting "Programmatic front panel communication" from your link?
I believe this is what I have done (using the FPGA Interface library to read FPGA indicators) as a stop-gap. If that's the case, I will leave things the way they are until i can benchmark everything.
Thank you for taking the time to help me,
-Chris
01-13-2026 09:05 AM
Yes, that's exactly what I mean.