UPGRADE YOUR BROWSER

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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
2,724 Views
Registered: ‎11-26-2016

PCIe DMA Windows Driver - Data Loss Issue

Hi,

 

I am currently working on a PCIe DMA Design using the new Windows XDMA Driver 2017.1 from https://www.xilinx.com/support/answers/65444.html.

 

As a quick test, the data is looped back from h2c -> c2h using a fifo inbetween as a buffer. Running xdma_test.exe prints:

 

Detected XDMA AXI-ST design.
Found h2c_0 and c2h_0:
    Initiating H2C_0 transfer of 4096 bytes...
    Initiating C2H_0 transfer of 4096 bytes...
    Transfers completed. Comparing data... OK!
Could not find h2c_1 and/or c2h_1
Could not find h2c_2 and/or c2h_2
Could not find h2c_3 and/or c2h_3
Success!

So far so good, since only channel 0 is used.

 

Testing the same loopback also works fine with the xdma_rw.exe read|write arguments, as long as ALL the data that is sent is read back in ONE single read transfair. The driver seems to keep TREADY asserted which results in data loss.

 

The figure below shows the S_AXIS_C2H_0 port of the xdma with 256bit data width and a 512bit read call "xdma_rw.exe c2h_0 read 0 -l 0x40". The first peak (trigger mark) reads the 512bit, but after that several more reads are requested until the fifo is empty (TVALID drops to zero).

 

xdma.PNG

 

The output of the requested 512bit DMA transfair on the host is correct, but the remaining data is clearly lost.

 

0x0000: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................
0x0010: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................
0x0020: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................
0x0030: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 02 ................
64 bytes received in 0.000012s

Without source code, I am completely in the dark here. Is it possible to gain access to the source code of the tools and the windows driver?

 

The Linux PCIe Driver seems to suffer from the the same issue, but at least they have the source code and can do something about it... 

https://forums.xilinx.com/t5/PCI-Express/Issues-with-Linux-PCIe-driver/td-p/764601

 

This issue can also be reproduced as described in the link above by running:

1. "xdma_rw.exe h2c_0 write -b -f datafile4K.bin"    //success

2. "xdma_rw.exe h2c_0 write -b -f datafile4K.bin"    //success

3. "xdma_rw.exe c2h_0 read 0 -l 0x1000"                //success

4. "xdma_rw.exe c2h_0 read 0 -l 0x1000"                //hangs -> no data there to read, step 3 consumed it all

 

Would appreciate any help.

0 Kudos