We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Registered: ‎06-07-2017

[KC705 EV][PCIExpress] Read Function from xBlock/xDMA

Hello All,


We are using the KC705 evaluation board to stream from the FPGA side to the PC using PCI Express, xBlock and XDMA drivers.


The FPGA streams the data through PCI Express to the PC, Then from the application we are using the windows function ReadFile which receives -xBlock- as a device handle order to read from the xBlock.



We are writing a test file using the Windows WriteFile( ) function and it is received correctly at the FPGA and we loop back this data to the PC again. Then we try to retrieve this data from the SW application using the Windows ReadFile functoin call.

Sometimes the data is received correctly, sometimes not (shifted or didn't match at all).


The ReadFile( ) call receives an overlapped structure with an offset always set to zero. There is no any idea about the actual offset that was written to the physical memory from the FPGA Side.


We guess that the misalignment happened due to the incorrect given offset.


1) How could we know the offset that is written to (from the FPGA to the xDMA) in order to use it in the SW application (in the ReadFile function call) ?

2) When we read data from the SW side using ReadFile, Does it pops the read data from the physical memory or we need to update the offset?

3) When the FPGA write the data to the memory buffer inside the PC till buffer is full, shall writing new data lead to overwrite the existing data or the new data shall be dropped?


Kindly Support Us.


Best Regards,



0 Kudos