cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ryanjohnson8
Explorer
Explorer
449 Views
Registered: ‎05-30-2017

Simple Write Error

Hi,

I am using the VCU128 dev board, and I am using the DMA Core (xci attached) to do one channel of h2c and c2h over pcie gen 4 x8. I am having two issues:

1.) I get write errors when I do these simple steps:
--load the FPGA with the bitstream
--reboot the computer so it enumerates the device (which it does correctly)
--Do the following:

bear:~>cd docs/software/dma_ip_drivers/XDMA/linux-kernel/tests/
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>modprobe xdma
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ./load_driver.sh 
xdma                   90112  0
Loading xdma driver...
The Kernel module installed correctly and the xmda devices were recognized.
 DONE
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
** Average BW = 1920000, 6783.829102
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
** Average BW = 1920000, 6492.869629
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
** Average BW = 1920000, 6571.494141
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
/dev/xdma0_h2c_0, W off 0x0, 0xffffffffffffffff != 0x1d4c00.
write file: Input/output error
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
** Average BW = 1920000, 5499.573242
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
** Average BW = 1920000, 6583.210938
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
/dev/xdma0_h2c_0, W off 0x0, 0xffffffffffffffff != 0x1d4c00.
write file: Input/output error
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
** Average BW = 1920000, 6595.399902
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
** Average BW = 1920000, 5564.233398
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
/dev/xdma0_h2c_0, W off 0x0, 0xffffffffffffffff != 0x1d4c00.
write file: Input/output error
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
** Average BW = 1920000, 6874.599609
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
** Average BW = 1920000, 6443.212402
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>sudo ../tools/dma_to_device -d /dev/xdma0_h2c_0 -f /dev/zero -s 1920000 -c 1
/dev/xdma0_h2c_0, W off 0x0, 0xffffffffffffffff != 0x1d4c00.
write file: Input/output error
bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel/tests>

And here is my dmesg when this happens:

[ 9973.128002] xdma:engine_service_final_transfer: engine 0-H2C0-ST, status error 0x10.
[ 9973.128004] xdma:engine_status_dump: SG engine 0-H2C0-ST status: 0x00000010: MAGIC_STOPPED
[ 9973.128006] 0-H2C0-ST, s 0x10, aborted xfer 0x00000000bd0921f3, cmpl 0/469
[ 9973.128036] xdma:xdma_xfer_submit: xfer 0x00000000bd0921f3,1920000, failed, ep 0x0.

 

As you can see, things work great. Most of the time, that is. But I consistently get these write errors. In my RTL, the ready signal for the H2C port is high all the time. How do I fix this so this doesn't happen?

0 Kudos
2 Replies
ryanjohnson8
Explorer
Explorer
395 Views
Registered: ‎05-30-2017

Just an update—this periodic write error happens in memory mapped mode transfers as well. All I have to do is modify the run test script to send files larger than the default 4K size, and then I get these periodic errors.
0 Kudos
ryanjohnson8
Explorer
Explorer
376 Views
Registered: ‎05-30-2017

Okay, just to make things simpler, all I have to do to get the error is this single command:

 

bear:~/docs/software/dma_ip_drivers/XDMA/linux-kernel>sudo tools/dma_to_device -d /dev/xdma0_h2c_0 -f tests/data/ramdisk/rando_1_92M_0.bin -s 1920000 -a 3758096384 -c 1
/dev/xdma0_h2c_0, W off 0xe0000000, 0xffffffffffffffff != 0x1d4c00.
write file: Input/output error

 

I'm trying to send over a 1920000-byte file, and it just fails one out of every 5 or so attempts. 

0 Kudos