09-25-2018 05:16 PM
I'm using the 20180420 release of the xdma driver on linux on an x86 processor. I have configured the IP to have four streaming c2h channels on a PCIe Gen3 x8 interface. I am streaming 1 MB of data from the FPGA in each packet (between each tlast), and I have two problems appearing at the driver:
1. Frequently, a little more than 1 MB appears in the driver buffer. I throw this away, because my userspace buffer would overrun.
2. Less frequently, the driver will appear to have skipped about as much data as the size of the kernelspace buffer.
What would you suspect for these symptoms? Any details about my setup I missed?
09-26-2018 09:19 AM
When you set up descriptors in C2H streaming for each channel, they create a buffer ring. These will continue to be used as you feed in data in a loop, so if your data source has the ability to feed more data, it will continue to flow. Basically, the tready will never go low - because there is always a "next valid" descriptor.
Is there a chance you are expecting the C2H Stream interface to throttle?
09-27-2018 01:06 PM
I am hoping there is some path for feedback from the driver to the fpga if the descriptor buffers are all full. Is that not true?
Without throttling, I would hope that I would be able to guarantee with fast enough processor operation that I wouldn't lose any data. How can I know when to stop sending data if the descriptor buffers are all full?