Hi,
I am a newbie. And I am trying to run "Simple Vector Addition" on Ultra96v2 using Vitis 2022.2.
PetaLinux booted on Ultra96V2 from the files generated by PetaLinux 2022 with the .xsa by Vivado 2022.2. And I built Vitis platform with the same xsa. And I built my_vector_add application project using the built-in sample as "Simple Vector Addition" in "New Application Project" wizard.
The domain is "linux on psu_cortexa3"
I stored files into micro SD as follows
/BOOT partition ----- boot.scr, BOOT.BIN, image.ub --- This is fine. Linux boots up.
/ROOTFS partition, /home/petalinux --- my_vector_add, binary_container_1.xclbin, krnl_vadd.xo
zocl is up and running as I can see with "lsmod".
The first time, when I ran "./my_vector_add binary_container_1.xcbin, the screen shows "TEST PASSED" and there was no error.
But after the first time whenever I ran the same command, it came back with the below message.
ultra96petaproj3:~$ ./vector_add binary_container_1.xclbin INFO: Reading binary_container_1.xclbin Loading: 'binary_container_1.xclbin' Trying to program device[0]: edge Device[0]: program successful! XRT build version: 2.14.0 Build hash: 43926231f7183688add2dccfd391b36a1f000bea Build date: 2022-10-07 05:12:02 Git branch: 2022.2 PID: 603 UID: 1000 [Fri Nov 19 17:21:18 2021 GMT] HOST: EXE: /home/petalinux/vector_add [XRT] ERROR: No such compute unit 'krnl_vadd:krnl_vadd_1': Invalid argument ../src/vadd.cpp:137 Error calling krnl_vector_add = cl::Kernel(program, "krnl_vadd", &err), error code is: -6
I completely turned off the power to the board by taking out the round power plug for a few minutes making sure any residual power doesn't mess up. And I turned the power back on and retried the same but it never succeeded any more.
I happened to capture the image when succeeded as below.

My questions are:
1) How can I fix the error?
2) What is the reason why it succeed the first time and after that it doesn't any more?
I appreciate anyone's help.
--------------------------------
I did more to it. I left the Ultra96V2 for a few hours without supplying the power, and supplied the power back on and did the same "./my_vector_add binary_container_1.xclbin". It came back with "TEST PASSED". I didn't change any files. And I did another 30 times repeatedly and the result came back with "TEST PASSED". And I captured the stdout message into .txt file spending a few minutes. Then I tried it again, then it came back with the same error. I tried 20 times but all error.
I left the Ultra96V2 for another few hours without power and tried it again. It was all error for like 10 straight times. And I pressed the reset button to reboot then tried it. It came back with "TEST PASSED". I reset again and tried it and it became the same error. I reset the unit 6 times and it was all the same error.
I am applying only 100Mhz. So it's hard to think that it's a timing issue. Besides, I am just using PS part without programming PL part.
I really appreciate if anyone can help me.
========================
I did more to it.
When "TEST PASSED" , compute unit "krnl_vadd:krnl_vadd_1" is listed.
xbutil examine -d 0
----------------------
[0000:00:00.0] : edge
----------------------
Platform
ERROR: No such query request (151)
Xclbin UUID
FCD1D397-D969-99D4-7DDC-1B13FEC1A7AD
Compute Units
PL Compute Units
Index Name Base_Address Usage Status
0 krnl_vadd:krnl_vadd_1 0xa0000000 1
(IDLE)
PS Compute Units
Index Name Base_Address Usage Status
When ERROR, "krnl_vadd:krnl_vadd_1" is not listed. Why is this occuring and how can I fix it?
ultra96petaproj3:~$ xbutil examine -d 0
----------------------
[0000:00:00.0] : edge
----------------------
Platform
ERROR: No such query request (151)
Xclbin UUID
FCD1D397-D969-99D4-7DDC-1B13FEC1A7AD
Compute Units
PL Compute Units
Index Name Base_Address Usage Status
PS Compute Units
Index Name Base_Address Usage Status
I checked binary_container_1.xclbin, krnl_add.xo is inlcuded and it's linked to compute unit "krnl_vadd:1:krnl_vadd_1".
$ xclbinutil --info --input binary_container_1.xclbin
XRT Build Version: 2.14.0 (Vitis)
Build Date: 2022-07-07 16:55:20
Hash ID: b8ff81175d61a7e23a1a273613f410cc6fa37560
------------------------------------------------------------------------------
Warning: The option '--output' has not been specified. All operations will
be done in memory with the exception of the '--dump-section' command.
------------------------------------------------------------------------------
Reading xclbin file into memory. File: binary_container_1.xclbin
==============================================================================
XRT Build Version: 2.14.0 (Vitis)
Build Date: 2022-07-07 16:55:20
Hash ID: b8ff81175d61a7e23a1a273613f410cc6fa37560
==============================================================================
xclbin Information
------------------
Generated by: v++ (2022.2) on 2022-10-13-17:52:11
Version: 2.14.354
Kernels: krnl_vadd
Signature:
Content: Bitstream
UUID (xclbin): 9ad74332-3a47-f4d8-a1fc-436ab3df4930
Sections: BITSTREAM, MEM_TOPOLOGY, IP_LAYOUT, CONNECTIVITY,
BUILD_METADATA, EMBEDDED_METADATA, SYSTEM_METADATA,
GROUP_CONNECTIVITY, GROUP_TOPOLOGY
==============================================================================
Hardware Platform (Shell) Information
-------------------------------------
Vendor: xilinx
Board: ultra96v2
Name: name
Version: 0.0
Generated Version: Vivado 2022.2 (SW Build: 3671981)
Created:
Fri Apr 14 12:25:57 2023 FPGA Device: xczu3eg
Board Vendor: avnet.com
Board Name: avnet.com:ultra96v2:1.2
Board Part: avnet.com:ultra96v2:part0:1.2
Platform VBNV: xilinx_ultra96v2_name_0_0
Static UUID: 00000000-0000-0000-0000-000000000000
Feature ROM TimeStamp: 0
Scalable Clocks
---------------
No scalable clock data available.
System Clocks
------
Name: clk_wiz_0_clk_out1
Type: FIXED
Default Freq: 100 MHz
Name: clk_wiz_0_clk_out2
Type: FIXED
Default Freq: 100 MHz
Name: clk_wiz_0_clk_out3
Type: FIXED
Default Freq: 200 MHz
Name: clk_wiz_0_clk_out4
Type: FIXED
Default Freq: 300 MHz
Name: clk_wiz_0_clk_out5
Type: FIXED
Default Freq: 400 MHz
Name: clk_wiz_0_clk_out6
Type: FIXED
Default Freq: 600 MHz
Memory Configuration
--------------------
Name: HPC0
Index: 0
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x0
Bank Used: No
Name: HPC1
Index: 1
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x0
Bank Used: No
Name: HP0
Index: 2
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x0
Bank Used: No
Name: HP1
Index: 3
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x0
Bank Used: No
Name: HP2
Index: 4
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x0
Bank Used: No
Name: HP
Index: 5
Type: MEM_DRAM
Base Address: 0x0
Address Size: 0x80000000
Bank Used: Yes
==============================================================================
Kernel: krnl_vadd
Definition
----------
Signature: krnl_vadd (void* in1, void* in2, void* out, unsigned int size)
Ports
-----
Port: M_AXI_GMEM0
Mode: master
Range (bytes): 0xFFFFFFFF
Data Width: 32 bits
Port Type: addressable
Port: M_AXI_GMEM1
Mode: master
Range (bytes): 0xFFFFFFFF
Data Width: 32 bits
Port Type: addressable
Port: S_AXI_CONTROL
Mode: slave
Range (bytes): 0x3C
Data Width: 32 bits
Port Type: addressable
--------------------------
Instance: krnl_vadd_1
Base Address: 0xa0000000
Argument: in1
Register Offset: 0x10
Port: M_AXI_GMEM0
Memory: HP (MEM_DRAM)
Argument: in2
Register Offset: 0x1C
Port: M_AXI_GMEM1
Memory: HP (MEM_DRAM)
Argument: out
Register Offset: 0x28
Port: M_AXI_GMEM0
Memory: HP (MEM_DRAM)
Argument: size
Register Offset: 0x34
Port: S_AXI_CONTROL
Memory: <not applicable>
==============================================================================
Generated By
------------
Command: v++
Version: 2022.2 - 2022-10-13-17:52:11 (SW BUILD: 3671529)
Command Line: v++ --advanced.misc solution_name=link --config binary_container_1-link.cfg --connectivity.nk krnl_vadd:1:krnl_vadd_1 --input_files ../../vector_add_kernels/Hardware/build/krnl_vadd.xo --link --log_dir binary_container_1.build/logs --messageDb binary_container_1.mdb --optimize 0 --output binary_container_1.xclbin --platform /home/ichiri/ultra96/vivado/project_3/pfm/ultra96v2_pfm/export/ultra96v2_pfm/ultra96v2_pfm.xpfm --remote_ip_cache /home/ichiri/ultra96/vivado/project_3/pfm/ip_cache --report_dir binary_container_1.build/reports --report_level 0 --save-temps --target hw --temp_dir binary_container_1.build
Options: --advanced.misc solution_name=link
--config binary_container_1-link.cfg
--connectivity.nk krnl_vadd:1:krnl_vadd_1
--input_files ../../vector_add_kernels/Hardware/build/krnl_vadd.xo
--link
--log_dir binary_container_1.build/logs
--messageDb binary_container_1.mdb
--optimize 0
--output binary_container_1.xclbin
--platform /home/ichiri/ultra96/vivado/project_3/pfm/ultra96v2_pfm/export/ultra96v2_pfm/ultra96v2_pfm.xpfm
--remote_ip_cache /home/ichiri/ultra96/vivado/project_3/pfm/ip_cache
--report_dir binary_container_1.build/reports
--report_level 0
--save-temps
--target hw
--temp_dir binary_container_1.build
==============================================================================
User Added Key Value Pairs
--------------------------
<empty>
==============================================================================
Leaving xclbinutil.

Please help me to fix this problem.
************************************
I did more to it.
dmesg is added when I did "./vecrot_add binary_container_1.xclbin". I don't see any message including "zocl", "vadd" or "krnl" in dmesg duing the boot process. So "krnl_vadd" hardware kernel was not loaded at 0xa0000000 in FPGA fabric after all booting was done.
When error,
[ 157.402293] zocl-drm amba_pl@0:zyxclmm_drm: zocl_create_client: created KDS client for pid(607), ret: 0 [ 157.402404] zocl-drm amba_pl@0:zyxclmm_drm: zocl_destroy_client: client exits pid(607) [ 157.651181] zocl-drm amba_pl@0:zyxclmm_drm: zocl_create_client: created KDS client for pid(607), ret: 0 [ 157.651297] zocl-drm amba_pl@0:zyxclmm_drm: zocl_destroy_client: client exits pid(607) [ 157.651588] zocl-drm amba_pl@0:zyxclmm_drm: zocl_create_client: created KDS client for pid(607), ret: 0 [ 157.712388] [drm] skip kind 29(AIE_RESOURCES) return code: -22 [ 157.712433] [drm] found kind 8(IP_LAYOUT) [ 157.712444] [drm] skip kind 9(DEBUG_IP_LAYOUT) return code: -22 [ 157.712450] [drm] skip kind 25(AIE_METADATA) return code: -22 [ 157.712455] [drm] found kind 7(CONNECTIVITY) [ 157.712465] [drm] found kind 6(MEM_TOPOLOGY) [ 157.712741] [drm] Memory 0 is not reserved in device tree. Will allocate memory from CMA [ 157.712800] [drm] Memory 1 is not reserved in device tree. Will allocate memory from CMA [ 157.712845] [drm] Memory 2 is not reserved in device tree. Will allocate memory from CMA [ 157.712891] [drm] Memory 3 is not reserved in device tree. Will allocate memory from CMA [ 157.712938] [drm] Memory 4 is not reserved in device tree. Will allocate memory from CMA [ 157.712983] [drm] Memory 5 is not reserved in device tree. Will allocate memory from CMA [ 157.714103] zocl_irq_intc ZOCL_CU_INTC.2.auto: zocl_irq_intc_add: managing IRQ 77 [ 157.714190] cu_drv CU.4.auto: cu_probe: CU[0] created [ 157.715081] [drm] zocl_xclbin_read_axlf fcd1d397-d969-99d4-7ddc-1b13fec1a7ad ret: 0 [ 157.728832] [drm] bitstream fcd1d397-d969-99d4-7ddc-1b13fec1a7ad locked, ref=1 [ 157.728893] zocl-drm amba_pl@0:zyxclmm_drm: ffff000001bee410 kds_add_context: Client pid(607) add context Doma in(65535) CU(0xffff) shared(true) [ 157.728960] zocl-drm amba_pl@0:zyxclmm_drm: ffff000001bee410 kds_del_context: Client pid(607) del context Doma in(65535) CU(0xffff) [ 157.728976] [drm] bitstream fcd1d397-d969-99d4-7ddc-1b13fec1a7ad unlocked, ref=0 [ 157.741987] [drm] bitstream fcd1d397-d969-99d4-7ddc-1b13fec1a7ad locked, ref=1 [ 157.742024] zocl-drm amba_pl@0:zyxclmm_drm: ffff000001bee410 kds_add_context: Client pid(607) add context Doma in(65535) CU(0xffff) shared(true) [ 157.767395] zocl-drm amba_pl@0:zyxclmm_drm: ffff000001bee410 _kds_fini_client: Client pid(607) has open contex t for 0 slot [ 157.767434] zocl-drm amba_pl@0:zyxclmm_drm: ffff000001bee410 _kds_fini_client: Removing CU Domain[65535] CU In dex [65535] [ 157.767446] zocl-drm amba_pl@0:zyxclmm_drm: ffff000001bee410 kds_del_context: Client pid(607) del context Doma in(65535) CU(0xffff) [ 157.767497] zocl-drm amba_pl@0:zyxclmm_drm: zocl_destroy_client: client exits pid(607)
when succeeded,
[ 23.702277] zocl-drm axi:zyxclmm_drm: zocl_create_client: created KDS client for pid(602), ret: 0 [ 23.702388] zocl-drm axi:zyxclmm_drm: zocl_destroy_client: client exits pid(602) [ 23.951124] zocl-drm axi:zyxclmm_drm: zocl_create_client: created KDS client for pid(602), ret: 0 [ 23.951240] zocl-drm axi:zyxclmm_drm: zocl_destroy_client: client exits pid(602) [ 23.951533] zocl-drm axi:zyxclmm_drm: zocl_create_client: created KDS client for pid(602), ret: 0 [ 24.013522] [drm] skip kind 29(AIE_RESOURCES) return code: -22 [ 24.013566] [drm] found kind 8(IP_LAYOUT) [ 24.013577] [drm] skip kind 9(DEBUG_IP_LAYOUT) return code: -22 [ 24.013583] [drm] skip kind 25(AIE_METADATA) return code: -22 [ 24.013587] [drm] found kind 7(CONNECTIVITY) [ 24.013597] [drm] found kind 6(MEM_TOPOLOGY) [ 24.013842] [drm] Memory 0 is not reserved in device tree. Will allocate memory from CMA [ 24.013891] [drm] Memory 1 is not reserved in device tree. Will allocate memory from CMA [ 24.013936] [drm] Memory 2 is not reserved in device tree. Will allocate memory from CMA [ 24.013982] [drm] Memory 3 is not reserved in device tree. Will allocate memory from CMA [ 24.014028] [drm] Memory 4 is not reserved in device tree. Will allocate memory from CMA [ 24.014071] [drm] Memory 5 is not reserved in device tree. Will allocate memory from CMA [ 24.015090] zocl_irq_intc ZOCL_CU_INTC.2.auto: zocl_irq_intc_add: managing IRQ 77 [ 24.015154] cu_drv CU.4.auto: cu_probe: CU[0] created [ 24.015483] cu_drv CU.4.auto: ffff0000033d8c10 xrt_cu_intr_thread: CU[0] start [ 24.015497] [drm] zocl_xclbin_read_axlf fcd1d397-d969-99d4-7ddc-1b13fec1a7ad ret: 0 [ 24.030062] [drm] bitstream fcd1d397-d969-99d4-7ddc-1b13fec1a7ad locked, ref=1 [ 24.030121] zocl-drm axi:zyxclmm_drm: ffff0000019cb410 kds_add_context: Client pid(602) add context Domain(65535) CU(0xffff) shared(true) [ 24.030186] zocl-drm axi:zyxclmm_drm: ffff0000019cb410 kds_del_context: Client pid(602) del context Domain(65535) CU(0xffff) [ 24.030202] [drm] bitstream fcd1d397-d969-99d4-7ddc-1b13fec1a7ad unlocked, ref=0 [ 24.043651] [drm] bitstream fcd1d397-d969-99d4-7ddc-1b13fec1a7ad locked, ref=1 [ 24.043686] zocl-drm axi:zyxclmm_drm: ffff0000019cb410 kds_add_context: Client pid(602) add context Domain(65535) CU(0xffff) shared(true) [ 24.053823] zocl-drm axi:zyxclmm_drm: ffff0000019cb410 kds_add_context: Client pid(602) add context Domain(0) CU(0x0) shared(true) [ 24.060529] zocl-drm axi:zyxclmm_drm: ffff0000019cb410 kds_del_context: Client pid(602) del context Domain(0) CU(0x0) [ 24.060931] zocl-drm axi:zyxclmm_drm: ffff0000019cb410 kds_del_context: Client pid(602) del context Domain(655 35) CU(0xffff) [ 24.060954] [drm] bitstream fcd1d397-d969-99d4-7ddc-1b13fec1a7ad unlocked, ref=0 [ 24.076573] zocl-drm axi:zyxclmm_drm: zocl_destroy_client: client exits pid(602)
The differences are:
1) "[24.015483] cu_drv CU.4.auto: ffff0000033d8c10 xrt_cu_intr_thread: CU[0] start" is displayed if not error.
2) When good, "zocl-drm axi:zyxclmm_drm:"
When error, "zocl-drm amba_pl@0:zyxclmm_drm"
It might be the interrupt thread may not most of the time be invoked for some reasons.
/*When TEST PASSED*/ ultra96petaproj3:~$ ps aux | grep 602 petalin+ 623 0.0 0.0 2928 1236 ttyPS0 S+ 17:34 0:00 grep 602 /*When ERROR 1st*/ ultra96petaproj3:~$ ps aux|grep 601 petalin+ 609 0.0 0.0 2928 1256 ttyPS0 S+ 17:21 0:00 grep 601 /*When ERROR 2st*/ ultra96petaproj3:~$ ps aux|grep 642 petalin+ 648 0.0 0.0 2928 1268 ttyPS0 S+ 17:44 0:00 grep 642 /*When ERROR 3rd*/ ultra96petaproj3:~$ ps aux | grep 603 petalin+ 609 0.0 0.0 2928 1284 ttyPS0 S+ 17:22 0:00 grep 603