08-09-2017 02:26 AM
After running the provided opencl example in the zcu102 I was trying to make it work in the Ubuntu desktop created by Xilinx. This ubuntu desktop can run sdsoc applications so I thought the same could be done with OpenCL.
I tried the following steps:
1) Enable the OpenCL driver in petalinux 2017.1 (zocl).
2) Added to device tree system-user.dtsi something like:
compatible = "xlnx,zocl";
status = "okay";
reg = <0x80000000 0x10000>;
3) do a petalinux-build and get image.ub and boot.bin
4) copy the so libraries from the opencl example sd_card into ubuntu desktop following the steps in init.sh.
cp /mnt/platform_desc.txt /etc/xocl.txt
cp /mnt/libxilinxopencl.so /usr/lib/libxilinxopencl.so
5) export xilinx_opencl
root@linaro-gnome:/mnt/opencl# export XILINX_OPENCL=/mnt/opencl/embedded_root/
6) try to run with
root@linaro-gnome:/mnt/opencl# ./opencl_test3.exe binary_container_1.xclbin
ERROR: No devices found
[ 147.846968] pgd = ffffffc05db53000
[ 147.852407]  *pgd=000000005c59c003Segmentation fault
I am wondering if this approach is way off or I am missing something ? Maybe the device tree fragment is incorrect ?
08-15-2017 10:07 AM
08-24-2017 04:32 AM
After enabling the opencl driver in Petalinux I cannot see any references to check if it has been loaded doing dmesg | grep zocl.
I am not sure if the source code for this driver is up-to-date in the linux kernel since there are some differences on how the functions are called and maybe it is being ignored and not compiled into the kernel.
09-12-2019 08:42 AM
Thank you for this issue which is useful to me. But I'm still confused about is there an ip core for zocl exist? I want to know how should I set the Vivado design project to match the added device tree. Because I can't find the 0xA0010000 address in any definition file for zocl. Should I add an AXI Interconnect in my Vivado project or any other IP core for zocl to correct this problem? I do need a guid for how to add the zocl runtime to ZynqMP platform with linux.