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: 
Observer athulya
Observer
1,001 Views
Registered: ‎08-13-2019

PCIe XCZU4CG

Jump to solution

i use an XCZU4CG Ultrascale+ board for PCIe . I use the Xilinx Drivers and run the example script run_test.sh. But i get error " writefile : unknown error 512" and H2C status shows busy.

0 Kudos
1 Solution

Accepted Solutions
Participant benu
Participant
523 Views
Registered: ‎06-09-2014

Re: PCIe XCZU4CG

Jump to solution

Disregard that, I think you're actually using the old AR65444 driver. There is a new Xilinx driver here: https://github.com/Xilinx/dma_ip_drivers

I think I'm experiencing a similar problem with that driver however

0 Kudos
21 Replies
Moderator
Moderator
964 Views
Registered: ‎01-15-2008

Re: PCIe XCZU4CG

Jump to solution

which PCIe you have configured? is it PS-PCIE or PL-PCIE? 

the drivers/example design in AR65444 is for PL-PCIe

could you provide the complete report of the error message you see

0 Kudos
Observer athulya
Observer
946 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution

Im using PL-pcie.

The run_test logs -kernel and user side are attached below.

0 Kudos
Moderator
Moderator
937 Views
Registered: ‎01-15-2008

Re: PCIe XCZU4CG

Jump to solution

check the following thread and see if the suggestions helps in your case which is same error message

 

https://forums.xilinx.com/t5/PCI-Express/debug-the-driver-of-IP-PCIE-with-DMA/m-p/914480#M12599

0 Kudos
Observer athulya
Observer
909 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution

Tried rebooting after running the test run_test.sh. I tried with transfer size 256,1024 . Tried with address offset 0 and 2147483648. Same error occurs.

Tried Wojtechs driver(v2_xdma) -make command itself generated lot of errors.

The link given in pdf AR65444 points to an old version of Xilinx driver.The link to github seen shows updated version of both Xilinx_files(org.driver) and Xilinx_rel2018(new driver).

I tried old Xilinx file(github -which had some updates) and using the./dma from device and ./dma to device on command line works.But when running run_test.sh, it starts the first transfer and in dmesg outputs till h2c engine starts running.After that ,there is no output(on both side-kernel and user).I observe that the interrupts are not getting serviced and i think thats why the next transfer doesnt start and dma gets stuck there.

set_property -dict [list CONFIG.soft_reset_en {true} [get_ips ] . i didnt understand this.Where is this to be set?

I have attached the ./dma from device and dma to device log. The run_test output is also attached.

0 Kudos
Observer athulya
Observer
894 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution

When i try using AXI-Lite Interface,i get the error:Segmentation fault(core dumped).The AXI-Lite is at offset 0x44A00000as per my design.

 

athulya@athulya:~/ATHULYA/XilinxAR65444-master/Linux/Xilinx_Answer_65444_Linux_Files/tests$ ./reg_rw /dev/xdma0_user 0x44A00000 w 0x12345678
argc = 5
device: /dev/xdma0_user
address: 0x44a00000
access type: write
access width given.
access width: word (32-bits)
character device /dev/xdma0_user opened.
Memory mapped at address 0x7f89b6caa000.
Write 32-bits value 0x12345678 to 0x44a00000 (0x0x7f89fb6aa000)
Segmentation fault (core dumped)

0 Kudos
Participant benu
Participant
868 Views
Registered: ‎06-09-2014

Re: PCIe XCZU4CG

Jump to solution

Open reg_rw.c and edit the #define MAP_SIZE to map a larger space, your AXI_L IP is outside of the mapped range

0 Kudos
Observer athulya
Observer
798 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution

I edited the MAP_SIZE to 4K in reg_rw.c and offset which was earlier 0x44A00000 is set to 0x0000 in Axi lite interface and now works. Dma_to_device which was getting stuck now gives successful write after resetting the count to a small value which was initially a very high value.Now H2C works but C2H does not work.

Also, at a time only one interface works. That is, if i am using ./reg_rw/xdma0_user(Axi lite) for write and read-which works,then the dma(MM interface) wont work and vice versa. Please suggest!!

0 Kudos
Observer athulya
Observer
759 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution

Dma write works. But only for 10bytes transfersize. Dma gets stuck on Higher value of transfer size like 100,1024 etc.Dma read doesnt work. Interrupt not getting serviced. In ILA,when read command is executed,i get arvalid=1.No transfer after then.What could be the reason?

0 Kudos
Participant benu
Participant
741 Views
Registered: ‎06-09-2014

Re: PCIe XCZU4CG

Jump to solution

Are you using MSI-x interrupts? If not, i think you have to go into load_driver.sh and change the default to "use MSI"

0 Kudos
Observer athulya
Observer
727 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution

In load_driver.sh, There is no such line specifying to use MSI. Can you specify where i should use?

0 Kudos
Participant benu
Participant
707 Views
Registered: ‎06-09-2014

Re: PCIe XCZU4CG

Jump to solution

Yeah they didn't really make it clear how to use it.

 

You see the line where you can comment out and specify "poll mode" vs "interrupt mode"?

insmod ../xdma/xdma.ko poll_mode=1

These are kernel module parameters, specified in libxdma.c

if you open it you will see one for "interrupt_mode"

So for mine, i've set:

insmod ../xdma/xdma.ko interrupt_mode=1

To specify I'm using MSI and not MSI-x or legacy interrupts. I don't know why but the driver seemed to check for MSI-x interrupts and if the capability wasn't found it would default back to legacy.

0 Kudos
Observer athulya
Observer
572 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution

My system got crashed and had to reinstall ubuntu. But when i try to install the Xilinx USB Cable drivers , i get this error.

 

sudo ./install_drivers
--Driver versions in this package: windrvr=900, xpc4drvr=1041
--Script name = ./install_drivers
--HostName = ignz
--Current working dir = /home/relysis/.local/share/Trash/files/install_drivers.2
--Script location = /home/relysis/.local/share/Trash/files/install_drivers.2
--Kernel version = 4.15.0-45-generic.
--Arch = x86_64.
--Installer version = 1053
--Unsetting ARCH environment variable.
--User has root permission.
--File /lib/modules/misc/install_windrvr6 does not exist.
--Installing USB drivers------------------------------------------
--File /etc/hotplug/usb/xusbdfwu.fw/xusbdfwu.hex exists.
./setup_pcusb: 94: ./setup_pcusb: Bad substitution
--File /sbin/fxload exists.
--Installing windrvr6---------------------------------------------
--Checking version.
--File /lib/modules/4.15.0-45-generic/kernel/drivers/misc/windrvr6.ko does not exist.
--File LINUX.4.15.0-45-generic.x86_64/windrvr6.ko does not exist.
--Setting source version to 900.
--File LINUX.4.15.0-45-generic.x86_64/windrvr6.ko is newer than the destination file.
checking for cpu architecture... x86_64
checking for WinDriver root directory... /home/relysis/.local/share/Trash/files/install_drivers.2/linux_drivers/windriver64
checking for linux kernel source... found at /lib/modules/4.15.0-45-generic/build
checking for lib directory... ln -sf $(ROOT_DIR)/lib/$(SHARED_OBJECT)_32.so /usr/lib/$(SHARED_OBJECT).so; ln -sf $(ROOT_DIR)/lib/$(SHARED_OBJECT).so /usr/lib64/$(SHARED_OBJECT).so
checking which directories to include... -I/lib/modules/4.15.0-45-generic/build/include
checking linux kernel version... 4.15.0-45-generic
checking for modules installation directory... /lib/modules/4.15.0-45-generic/kernel/drivers/misc
checking for gcc kernel version... 5
checking output directory... LINUX.4.15.0-45-generic.x86_64
checking target... LINUX.4.15.0-45-generic.x86_64/windrvr6.o
checking for usb support... hello.c:1:26: fatal error: linux/config.h: No such file or directory
compilation terminated.
no
checking for right linked object... windrvr_gcc_v3.a
configure: creating ./config.status
config.status: creating makefile
rm -f core LINUX.4.15.0-45-generic.x86_64/windrvr6.o LINUX.4.15.0-45-generic.x86_64/*
cc -c -O2 -Wall -DLINUX -D__KERNEL__ -DMODULE -DWINDRIVER_KERNEL -Wstrict-prototypes -Wno-trigraphs -fno-common -fomit-frame-pointer -pipe -mno-red-zone -mcmodel=kernel -fno-reorder-blocks -Wno-sign-compare -I/lib/modules/4.15.0-45-generic/build/include -I/home/relysis/.local/share/Trash/files/install_drivers.2/linux_drivers/windriver64/include -I/home/relysis/.local/share/Trash/files/install_drivers.2/linux_drivers/windriver64 -fno-strict-aliasing -c -o LINUX.4.15.0-45-generic.x86_64/linux_wrappers.o linux_wrappers.c
In file included from linux_wrappers.c:15:0:
linux_common.h:28:4: error: #error "This kernel is too recent: not supported by this file"
# error "This kernel is too recent: not supported by this file"
^
linux_common.h:50:2: error: #error "unsuppored linux kernel version"
#error "unsuppored linux kernel version"
^
In file included from /lib/modules/4.15.0-45-generic/build/include/linux/string.h:6:0,
from /lib/modules/4.15.0-45-generic/build/include/uapi/linux/uuid.h:22,
from /lib/modules/4.15.0-45-generic/build/include/linux/uuid.h:19,
from /lib/modules/4.15.0-45-generic/build/include/linux/mod_devicetable.h:13,
from /lib/modules/4.15.0-45-generic/build/include/linux/pci.h:21,
from linux_wrappers.c:19:
/lib/modules/4.15.0-45-generic/build/include/linux/compiler.h:247:25: fatal error: asm/barrier.h: No such file or directory
compilation terminated.
makefile:27: recipe for target 'LINUX.4.15.0-45-generic.x86_64/linux_wrappers.o' failed
make: *** [LINUX.4.15.0-45-generic.x86_64/linux_wrappers.o] Error 1
cc -c -O2 -Wall -DLINUX -D__KERNEL__ -DMODULE -DWINDRIVER_KERNEL -Wstrict-prototypes -Wno-trigraphs -fno-common -fomit-frame-pointer -pipe -mno-red-zone -mcmodel=kernel -fno-reorder-blocks -Wno-sign-compare -I/lib/modules/4.15.0-45-generic/build/include -I/home/relysis/.local/share/Trash/files/install_drivers.2/linux_drivers/windriver64/include -I/home/relysis/.local/share/Trash/files/install_drivers.2/linux_drivers/windriver64 -fno-strict-aliasing -c -o LINUX.4.15.0-45-generic.x86_64/linux_wrappers.o linux_wrappers.c
In file included from linux_wrappers.c:15:0:
linux_common.h:28:4: error: #error "This kernel is too recent: not supported by this file"
# error "This kernel is too recent: not supported by this file"
^
linux_common.h:50:2: error: #error "unsuppored linux kernel version"
#error "unsuppored linux kernel version"
^
In file included from /lib/modules/4.15.0-45-generic/build/include/linux/string.h:6:0,
from /lib/modules/4.15.0-45-generic/build/include/uapi/linux/uuid.h:22,
from /lib/modules/4.15.0-45-generic/build/include/linux/uuid.h:19,
from /lib/modules/4.15.0-45-generic/build/include/linux/mod_devicetable.h:13,
from /lib/modules/4.15.0-45-generic/build/include/linux/pci.h:21,
from linux_wrappers.c:19:
/lib/modules/4.15.0-45-generic/build/include/linux/compiler.h:247:25: fatal error: asm/barrier.h: No such file or directory
compilation terminated.
makefile:27: recipe for target 'LINUX.4.15.0-45-generic.x86_64/linux_wrappers.o' failed
make: *** [LINUX.4.15.0-45-generic.x86_64/linux_wrappers.o] Error 1
--make windrvr install rc= 2
--install_windrvr6 rc = 2
--Module windrvr6 is not running.
--Module xpc4drvr is not running.
--Note: By default, the file permission of /dev/windrvr6 is enabled for the root user only
and must be changed to allow access to other users.

--Return code = 2

0 Kudos
Observer athulya
Observer
562 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution
Got it working. Plug out the cable before you install the drivers. Install the drivers from within the Vivado_Lab folder(I use 2018.2). The install script is present within data/xicom folder. Run that script with sudo. It shows driver installation successful.Now reboot the system. The system detects the device clearly now.
Try referring to
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_1/ug973-vivado-release-notes-install-license.pdf
0 Kudos
Highlighted
Observer athulya
Observer
550 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution

I rie setting interrupt_mode =1. Still facing same issue. Now even 10bytes is not transfered.It shows rc==size .Core dumped. What i assume is the datafile0_4K.bin might be full. So i tried writing to datafile1_4k.bin. Here h2c write works successfully for 10bytes but gets stuck when more than 10 bytes like 100,1024 etc. are given.

0 Kudos
Participant benu
Participant
531 Views
Registered: ‎06-09-2014

Re: PCIe XCZU4CG

Jump to solution

I get the same thing. Cool. We're now at the same point of XDMA driver debug.

Let me diff the new xdma driver from the Xilinx Git with the old one from the answer record from some months ago. I believe that one worked without this problem. Polled DMA works fine for me by the way and might be an interim solution for you.

0 Kudos
Participant benu
Participant
524 Views
Registered: ‎06-09-2014

Re: PCIe XCZU4CG

Jump to solution

Disregard that, I think you're actually using the old AR65444 driver. There is a new Xilinx driver here: https://github.com/Xilinx/dma_ip_drivers

I think I'm experiencing a similar problem with that driver however

0 Kudos
Observer athulya
Observer
497 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution

Does the new driver work for you with interrupt mode(default one)?

0 Kudos
Observer athulya
Observer
448 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution

I got h2c and c2h write and read success with the new driver.Successful transmission and reception of 10,100and 1024 bytes. The issue was with the bitfile unfortunately. Now its working.

0 Kudos
Participant benu
Participant
408 Views
Registered: ‎06-09-2014

Re: PCIe XCZU4CG

Jump to solution

What was the issue with the bitfile? I think my problem is with my bitfile as well. Somewhere in the AXI, but i haven't got down to debugging it quite yet

0 Kudos
Observer athulya
Observer
374 Views
Registered: ‎08-13-2019

Re: PCIe XCZU4CG

Jump to solution

The DMA was going into a different mode once transfer was initated. So correcting that,worked.

0 Kudos
Participant benu
Participant
344 Views
Registered: ‎06-09-2014

Re: PCIe XCZU4CG

Jump to solution

My issue was in firmware as well. I believe the XDMA 4.0 IP  for 7 series gen2 wrongly sets parameter MSI_ENABLED "true" and pcie2_to_pcie3 wrapper generate statement is looking for "TRUE", leading to cfg_interruptN being tied to VCC. Fixed by turning on MSI-x and avoiding that bad generate statement, since IPI does not let you set this parameter manually.