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

debug the driver of IP PCIE with DMA

hello experts,

my case is that when i run run_test.sh, i always get the same error below:

root@:~/native_pcie/xilinx_driver_rel20180420/tests# ./run_test.sh
Info: Number of enabled h2c channels = 2
Info: Number of enabled c2h channels = 2
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: Writing to h2c channel 1 at address offset 256.
Info: Wait for current transactions to complete.
** Average BW = 256, 0.397774
** Average BW = 256, 0.360850
Info: Writing to h2c channel 0 at address offset 512.
Info: Writing to h2c channel 1 at address offset 768.
Info: Wait for current transactions to complete.
** Average BW = 256, 0.387266
** Average BW = 256, 0.414628
Info: Reading from c2h channel 0 at address offset 0.
Info: Reading from c2h channel 1 at address offset 256.
Info: Wait for the current transactions to complete.
** Average BW = 256, 0.076274
** Average BW = 256, 0.084887
Info: Reading from c2h channel 0 at address offset 512.
Info: Reading from c2h channel 1 at address offset 768.
Info: Wait for the current transactions to complete.
** Average BW = 256, 0.517285
** Average BW = 256, 0.570786
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.

the mentioned data file and the dmesg log file are attached. I really have diffcult to debug it.

 

Can you help me please?

Tags (2)
0 Kudos
14 Replies
venkata
Moderator
Moderator
5,813 Views
Registered: ‎02-16-2010

Are you testing the driver with XDMA IP example design (or) IPI based design? If it is IPI based design, is it possible to export the BD to .tcl and share it?

------------------------------------------------------------------------------
Don't forget to reply, give kudo and accept as solution
------------------------------------------------------------------------------
0 Kudos
yanghaofei@ni
Observer
Observer
5,771 Views
Registered: ‎10-09-2018

@venkata

I am using the XDMA IP example design, which is generated by IP DMA Subsystem for PCI Express v4.0 (pg195) and the driver  is AR65444.

which is configured to use Mamory Mapped Port and connected to block RAM.

 

best regards

0 Kudos
venkata
Moderator
Moderator
5,735 Views
Registered: ‎02-16-2010

yanghaofei@ni

It seems you are using the latest Linux driver from AR#65444. Can you please confirm if you are following the steps below? 

- Change directory to the driver directory.
cd xdma
- Compile and install the kernel module driver.
make install
- Change directory to the tools directory.
cd tools
- Compile the provided example test tools.
make
- Load the kernel module driver:
a. modprobe xdma
b. using the provided script.
cd tests
./load_driver.sh
- Run the provided test script to generate basic DMA traffic.
./run_test.sh

Please share the driver version number you find with the step mentioned below.
- Check driver Version number
modinfo xdma (or)
modinfo ../xdma/xdma.ko

------------------------------------------------------------------------------
Don't forget to reply, give kudo and accept as solution
------------------------------------------------------------------------------
yanghaofei@ni
Observer
Observer
5,721 Views
Registered: ‎10-09-2018

hello @venkata

here is the message I got:

root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420# cd xdma/
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# cd tools/
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# cd ..
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420# cd tests/
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tests# ./load_driver.sh
xdma                   83181  0
Loading xdma driver...
Error: The Kernel module installed correctly, but no devices were recognized.
 FAILED
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tests# ./run_test.sh
Error at line 96, file reg_rw.c (2) [No such file or directory]
Error at line 96, file reg_rw.c (2) [No such file or directory]
Error at line 96, file reg_rw.c (2) [No such file or directory]
Error at line 96, file reg_rw.c (2) [No such file or directory]
Info: Number of enabled h2c channels = 0
Error at line 96, file reg_rw.c (2) [No such file or directory]
Error at line 96, file reg_rw.c (2) [No such file or directory]
Error at line 96, file reg_rw.c (2) [No such file or directory]
Error at line 96, file reg_rw.c (2) [No such file or directory]
Info: Number of enabled c2h channels = 0
Info: The PCIe DMA core is memory mapped.
Error: No PCIe DMA channels were identified.
root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tests# modinfo xdma
filename:       /lib/modules/4.6.7-rt14-cardassia-x64-434/extra/xdma.ko
license:        Dual BSD/GPL
version:        2017.1.47
description:    Xilinx XDMA Reference Driver
author:         Xilinx, Inc.
srcversion:     59BC425228672F0C2708AC0
alias:          pci:v000010EEd00002808sv*sd*bc*sc*i*
alias:          pci:v000010EEd00004B28sv*sd*bc*sc*i*
alias:          pci:v000010EEd00004A28sv*sd*bc*sc*i*
alias:          pci:v000010EEd00004908sv*sd*bc*sc*i*
alias:          pci:v000010EEd00004828sv*sd*bc*sc*i*
alias:          pci:v000010EEd00004808sv*sd*bc*sc*i*
alias:          pci:v000010EEd00006D30sv*sd*bc*sc*i*
alias:          pci:v000010EEd00006A30sv*sd*bc*sc*i*
alias:          pci:v000010EEd00006A28sv*sd*bc*sc*i*
alias:          pci:v000010EEd00006930sv*sd*bc*sc*i*
alias:          pci:v000010EEd00006928sv*sd*bc*sc*i*
alias:          pci:v000010EEd00006830sv*sd*bc*sc*i*
alias:          pci:v000010EEd00006828sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007038sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007034sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007032sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007031sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007028sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007024sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007022sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007021sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007018sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007014sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007012sv*sd*bc*sc*i*
alias:          pci:v000010EEd00007011sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008038sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008034sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008032sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008031sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008028sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008024sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008022sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008021sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008018sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008014sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008012sv*sd*bc*sc*i*
alias:          pci:v000010EEd00008011sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009011sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009021sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009031sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009012sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009022sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009032sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009014sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009024sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009034sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009018sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009028sv*sd*bc*sc*i*
alias:          pci:v000010EEd00009038sv*sd*bc*sc*i*
alias:          pci:v000010EEd0000903Fsv*sd*bc*sc*i*
depends:
vermagic:       4.6.7-rt14-cardassia-x64-434 SMP preempt mod_unload modversions
parm:           sgdma_timeout:timeout in seconds for sgdma, default is 10 sec. (uint)
parm:           poll_mode:Set 1 for hw polling, default is 0 (interrupts) (uint)
parm:           interrupt_mode:0 - MSI-x , 1 - MSI, 2 - Legacy (uint)
parm:           enable_credit_mp:Set 1 to enable creidt feature, default is 0 (no credit control) (uint)
parm:           desc_blen_max:per descriptor max. buffer length, default is (1 << 28) - 1 (uint)
0 Kudos
yanghaofei@ni
Observer
Observer
5,713 Views
Registered: ‎10-09-2018

@venkata

sometimes the c2h and h2c channels can be recognized. And i got:

root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tests# ./run_test.sh
Info: Number of enabled h2c channels = 2
Info: Number of enabled c2h channels = 2
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: Writing to h2c channel 1 at address offset 549686958592.
Info: Wait for current transactions to complete.
** Average BW = 256, 0.049956
** Average BW = 256, 0.047485
Info: Writing to h2c channel 0 at address offset 1099373917184.
Info: Writing to h2c channel 1 at address offset 1649060875776.
Info: Wait for current transactions to complete.
** Average BW = 256, 0.325398
** Average BW = 256, 0.303778
Info: Reading from c2h channel 0 at address offset 0.
Info: Reading from c2h channel 1 at address offset 549686958592.
Info: Wait for the current transactions to complete.
** Average BW = 256, 0.005157
** Average BW = 256, 0.005221
Info: Reading from c2h channel 0 at address offset 1099373917184.
Info: Reading from c2h channel 1 at address offset 1649060875776.
Info: Wait for the current transactions to complete.
** Average BW = 256, 0.003252
** Average BW = 256, 0.003222
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.

when I set the number of channels to 1, it was also failed. the error messages and dmesg messages are attached below.

 

0 Kudos
yanghaofei@ni
Observer
Observer
5,625 Views
Registered: ‎10-09-2018

any idea?

0 Kudos
venkata
Moderator
Moderator
5,602 Views
Registered: ‎02-16-2010

yanghaofei@ni

In the installation log you posted, I find the load_driver.sh script has not run successfully. Also, I do not find the following step is executed.

modprobe xdma

root@NI-USRP-2974-ADBADBAD:~/native_pcie/xilinx_driver_rel20180420/tests# ./load_driver.sh
xdma                   83181  0
Loading xdma driver...
Error: The Kernel module installed correctly, but no devices were recognized.
 FAILED

 

If the above error is observed, please confirm if the PCIe End point is enumerated successfully. You can check this by using the command "lspci -vvv -d 10ee:"

Before you run "run_tests.sh" test, the driver should have been loaded successfully. Have you done it?

------------------------------------------------------------------------------
Don't forget to reply, give kudo and accept as solution
------------------------------------------------------------------------------
0 Kudos
yanghaofei@ni
Observer
Observer
5,589 Views
Registered: ‎10-09-2018

@venkata

it didn't work. The driver is loaded successfully. but there is a Unknown error 512

please see below:

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.
0 Kudos
venkata
Moderator
Moderator
5,558 Views
Registered: ‎02-16-2010

yanghaofei@ni

I got a similar message a while back when running the "run_tests.sh". If I reboot the host machine after this error is observed, the test ran successfully. I understand that this error is observed when DMA engine is stuck. 

Could you try to reboot the host machine and do the same test? 

You can also try to assert a pulse on "dma_bridge_resetn" input to the IP and then run the test.

------------------------------------------------------------------------------
Don't forget to reply, give kudo and accept as solution
------------------------------------------------------------------------------
0 Kudos
abilash
Observer
Observer
5,286 Views
Registered: ‎10-31-2018

Check if your device ID as mentioned in PCIE ID is same as of the many device IDs mentioned in the xdma-core.c file available in the drivers. If not, remove the installed driver, add your device ID in the xdma-core.c and compile the driver again.

0 Kudos
mark.harfouche
Observer
Observer
4,710 Views
Registered: ‎11-05-2014

I got this error when trying to read from a Stream FIFO more bytes than the FIFO had.

 

After receving this error, the whole AXI master bus is stuck.....

 

Fun times trying to reboot.

0 Kudos
chandu_sathi
Adventurer
Adventurer
4,092 Views
Registered: ‎05-08-2019

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: 1024
transfer count: 1
Info: Writing to h2c channel 0 at address offset 2147483648.
Info: Wait for current transactions to complete.

 

I am trying to transfer data between the PC and FPGA using xdma linux drivers. I am able to transfer data using axi lite master with help of linux drivers 65444 but when I am using axi memory map interface the above message is display and sometimes it is also showing error 512. I tried both cool and warm reboot but then also it is not working.   Currently, I am trying enable the dma_bridge_resetn pin but I don’t know how to do that. I am new to FPGA. In manual, I have read that the dma_bridge_resetn pin must enable after the link up with minimum period 50ms using

set_property -dict [list CONFIG.soft_reset_en {true} [get_ips ] . But i didnt understand.

Please suggest tcl script or solution to this problem. Thank you

About my hardware: VCU108 Ultrascale FPGA.

0 Kudos
wh1t3w0lf
Observer
Observer
3,865 Views
Registered: ‎02-12-2014

I struggled with the "Unknown error 512" for 3 full days until I was ready to give up on the whole PCIe DMA Core + Driver. It happened on two Kintex-7 boards (KC705 + Enclustra one) and on 3 x86 machines (2 x86_64 + 1 x86_32).

The solution was very very simple and I was really stupid for not realising it quickly. I discovered it by luck while viewing the following video (skip to 12:15):

https://www.xilinx.com/video/technology/dma-for-pci-express.html

In that video it is mentioned that the tests try to DMA from 0x00000000 but most example designs and maybe your custom ones have the xdma core mapped on 0x0000000080000000 (0x80000000 for 32-bit) on the AXI bus.

Thus you need to change the scripts and add this offset as the video explains in 12:15. This will make the scripts call the ./dma_to_device and ./dma_from_device with -a (offset) of 0x80000000 and everything will work correctly on the XDMA IP Core + Driver from then on, at least for the normal AXI-MM case.

I suggest that this setup of the address offset gets added on the default script (or mention it on a comment or option) and also add this on the Xilinx Answer Record 71435 (XDMA Debug Guide pdf) and maybe mention it on the driver answer record 65444.

It will help a lot of people here that like me didn't immediately realize that the core aborted the transactions and didn't fire the completion interrupt not because it was stuck or due to a bigger problem with the PCIe link or the driver or the interrups or whatever, but just because the address offset was wrong and it couldn't fullfill the transaction on the wrong address.

longxr
Observer
Observer
3,362 Views
Registered: ‎02-13-2019

I have modify the offset,it still failed,can you help me, thanks!

The question link is

https://forums.xilinx.com/t5/Xilinx-Evaluation-Boards/xdma-pcie-vc709/td-p/1036475

0 Kudos