cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
yanghaofei@ni
Observer
Observer
2,158 Views
Registered: ‎10-09-2018

Unknown error 512 with testing XDMA transaction

dear xilinx team,

i am testing XDMA transaction with driver AR65444. The design is example design of ip DMA Subsystem for PCI Express v4.0 (pg195).

but when i run the test run_test.sh, i got an unknown error 512. how to solve this problem?

root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420# ls
COPYING     LICENSE     include/    libxdma/    readme.txt  tests/      tools/      xdma/
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420# cd xdma/
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/xdma# ls
Makefile        cdev_bypass.o   cdev_ctrl.o     cdev_sgdma.c    cdev_xvc.c      libxdma.c       modules.order   xdma.mod.c      xdma_cdev.c     xdma_mod.c
Module.symvers  cdev_ctrl.c     cdev_events.c   cdev_sgdma.h    cdev_xvc.h      libxdma.h       version.h       xdma.mod.o      xdma_cdev.h     xdma_mod.h
cdev_bypass.c   cdev_ctrl.h     cdev_events.o   cdev_sgdma.o    cdev_xvc.o      libxdma.o       xdma.ko         xdma.o          xdma_cdev.o     xdma_mod.o
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/xdma# make install
Makefile:10: XVC_FLAGS: .
make -C /lib/modules/4.6.7-rt14-cardassia-x64-434/build M=/home/root/native_pcie/xilinx_driver_rel20180420/xdma modules
make[1]: Entering directory '/lib/modules/4.6.7-rt14-cardassia-x64-434/build'
/home/root/native_pcie/xilinx_driver_rel20180420/xdma/Makefile:10: XVC_FLAGS: .
  Building modules, stage 2.
/home/root/native_pcie/xilinx_driver_rel20180420/xdma/Makefile:10: XVC_FLAGS: .
  MODPOST 1 modules
make[1]: Leaving directory '/lib/modules/4.6.7-rt14-cardassia-x64-434/build'
make -C /lib/modules/4.6.7-rt14-cardassia-x64-434/build M=/home/root/native_pcie/xilinx_driver_rel20180420/xdma modules_install
make[1]: Entering directory '/lib/modules/4.6.7-rt14-cardassia-x64-434/build'
  INSTALL /home/root/native_pcie/xilinx_driver_rel20180420/xdma/xdma.ko
  DEPMOD  4.6.7-rt14-cardassia-x64-434
make[1]: Leaving directory '/lib/modules/4.6.7-rt14-cardassia-x64-434/build'
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/xdma# cd ..
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420# ld
ld: no input files
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420# ls
COPYING     LICENSE     include/    libxdma/    readme.txt  tests/      tools/      xdma/
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420# cd tools/
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tools# ls
Makefile           dma_from_device.c  dma_to_device*     dma_to_device.o    performance*       performance.o      reg_rw.c
dma_from_device*   dma_from_device.o  dma_to_device.c    dma_utils.c        performance.c      reg_rw*            reg_rw.o
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tools# make
make: Nothing to be done for 'all'.
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tools# modprobe xdma
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tools# cd ..
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420# ls
COPYING     LICENSE     include/    libxdma/    readme.txt  tests/      tools/      xdma/
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420# cd tests/
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tests# ls
data/                      dma_memory_mapped_test.sh* dma_streaming_test.sh*     load_driver.sh*            perform_hwcount.sh*        run_test.sh*
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tests# ./load_driver.sh
xdma                   83181  0
Loading xdma driver...
The Kernel module installed correctly and the xmda devices were recognized.
 DONE
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tests# ./run_test.sh
Info: Number of enabled h2c channels = 1
Info: Number of enabled c2h channels = 1
Info: The PCIe DMA core is memory mapped.
Info: Running PCIe DMA memory mapped write read test
      transfer size:  256
      transfer count: 1
Info: Writing to h2c channel 0 at address offset 0.
Info: Wait for current transactions to complete.
** Average BW = 256, 0.089277
Info: Writing to h2c channel 0 at address offset 549686958592.
Info: Wait for current transactions to complete.
** Average BW = 256, 0.090962
Info: Writing to h2c channel 0 at address offset 1099373917184.
Info: Wait for current transactions to complete.
** Average BW = 256, 0.460733
Info: Writing to h2c channel 0 at address offset 1649060875776.
Info: Wait for current transactions to complete.
/dev/xdma0_h2c_0, W off 0x17ff3b00e00, 0xffffffffffffffff != 0x100.
write file: Unknown error 512
Info: Reading from c2h channel 0 at address offset 0.
Info: Wait for the current transactions to complete.
/dev/xdma0_c2h_0, R off 0x0, 0xffffffffffffffff != 0x100.
read file: Unknown error 512
Info: Reading from c2h channel 0 at address offset 549686958592.
Info: Wait for the current transactions to complete.
/dev/xdma0_c2h_0, R off 0x0, 0xffffffffffffffff != 0x100.
read file: Unknown error 512
Info: Reading from c2h channel 0 at address offset 1099373917184.
Info: Wait for the current transactions to complete.
/dev/xdma0_c2h_0, R off 0x0, 0xffffffffffffffff != 0x100.
read file: Unknown error 512
Info: Reading from c2h channel 0 at address offset 1649060875776.
Info: Wait for the current transactions to complete.
/dev/xdma0_c2h_0, R off 0x0, 0xffffffffffffffff != 0x100.
read file: Unknown error 512
Info: Checking data integrity.
Error: The data written did not match the data that was read.
       address range:   0 - 256
       write data file: data/datafile0_4K.bin
       read data file:  data/output_datafile0_4K.bin
Error: The data written did not match the data that was read.
       address range:   256 - 512
       write data file: data/datafile1_4K.bin
       read data file:  data/output_datafile1_4K.bin
Error: The data written did not match the data that was read.
       address range:   512 - 768
       write data file: data/datafile2_4K.bin
       read data file:  data/output_datafile2_4K.bin
Error: The data written did not match the data that was read.
       address range:   768 - 1024
       write data file: data/datafile3_4K.bin
       read data file:  data/output_datafile3_4K.bin
Error: Test completed with Errors.
Error: Test completed with Errors.
Tags (2)
0 Kudos
1 Reply
venkata
Moderator
Moderator
2,123 Views
Registered: ‎02-16-2010

https://forums.xilinx.com/t5/PCI-Express/debug-the-driver-of-IP-PCIE-with-DMA/m-p/914480#M12599
------------------------------------------------------------------------------
Don't forget to reply, give kudo and accept as solution
------------------------------------------------------------------------------
0 Kudos