Altera_Forum
Honored Contributor
7 years agoHello world program hangs :(
I have generated the binary file of the hello world program. I have used the host program to launch it. However, it never completes. It gets stuck at the line
status = clFinish(queue); Here is my output of the program. manoj@EV-PHD-ROS-PC:~/Documents/exm_opencl_hello_world_x64_linux/hello_world/bin$ ./host Querying platform for info: ========================== CL_PLATFORM_NAME = Intel(R) FPGA SDK for OpenCL(TM) CL_PLATFORM_VENDOR = Intel(R) Corporation CL_PLATFORM_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 17.1.2 Querying device for info: ======================== CL_DEVICE_NAME = a10gx : Arria 10 Reference Platform (acla10_ref0) CL_DEVICE_VENDOR = Intel(R) Corporation CL_DEVICE_VENDOR_ID = 4466 CL_DEVICE_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 17.1.2 CL_DRIVER_VERSION = 17.1 CL_DEVICE_ADDRESS_BITS = 64 CL_DEVICE_AVAILABLE = true CL_DEVICE_ENDIAN_LITTLE = true CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = 32768 CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = 0 CL_DEVICE_GLOBAL_MEM_SIZE = 2147483648 CL_DEVICE_IMAGE_SUPPORT = true CL_DEVICE_LOCAL_MEM_SIZE = 16384 CL_DEVICE_MAX_CLOCK_FREQUENCY = 1000 CL_DEVICE_MAX_COMPUTE_UNITS = 1 CL_DEVICE_MAX_CONSTANT_ARGS = 8 CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 536870912 CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 3 CL_DEVICE_MEM_BASE_ADDR_ALIGN = 8192 CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = 1024 CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR = 4 CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT = 2 CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT = 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG = 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT = 1 CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE = 0 Command queue out of order? = false Command queue profiling enabled? = true Using AOCX: hello_world.aocx Reprogramming device [0] with handle 1 MMD INFO : Autodetect Cable not found!! MMD INFO : setting Cable to default value 1 MMD INFO : setting Device Index to default value 1 MMD INFO : executing "quartus_pgm -c 1 -m jtag -o "P;reprogram_temp.sof@1"" Info: ******************************************************************* Info: Running Quartus Prime Programmer Info: Version 17.1.2 Build 304 01/31/2018 SJ Pro Edition Info: Copyright (C) 2018 Intel Corporation. All rights reserved. Info: Your use of Intel Corporation's design tools, logic functions Info: and other software and tools, and its AMPP partner logic Info: functions, and any output files from any of the foregoing Info: (including device programming or simulation files), and any Info: associated documentation or information are expressly subject Info: to the terms and conditions of the Intel Program License Info: Subscription Agreement, the Intel Quartus Prime License Agreement, Info: the Intel FPGA IP License Agreement, or other applicable license Info: agreement, including, without limitation, that your use is for Info: the sole purpose of programming logic devices manufactured by Info: Intel and sold by Intel or its authorized distributors. Please Info: refer to the applicable agreement for further details. Info: Processing started: Fri May 18 11:38:58 2018 Info: Command: quartus_pgm -c 1 -m jtag -o P;reprogram_temp.sof@1 Info (213045): Using programming cable "USB-BlasterII [3-3]" Info (213011): Using programming file reprogram_temp.sof with checksum 0x308535CE for device 10AX115S2F45@1 Info (209060): Started Programmer operation at Fri May 18 11:39:05 2018 Info (209016): Configuring device index 1 Info (209017): Device 1 contains JTAG ID code 0x02E060DD Info (209007): Configuration succeeded -- 1 device(s) configured Info (209011): Successfully performed operation(s) Info (209061): Ended Programmer operation at Fri May 18 11:39:20 2018 Info: Quartus Prime Programmer was successful. 0 errors, 0 warnings Info: Peak virtual memory: 1685 megabytes Info: Processing ended: Fri May 18 11:39:20 2018 Info: Elapsed time: 00:00:22 Info: Total CPU time (on all processors): 00:00:11 Kernel initialization is complete. Launching the kernel... and never completes. I see that the kernel is launched. But it waits for the events to get completed. And whenever I use aocl program command I get MMD INFO : Autodetect Cable not found!! MMD INFO : setting Cable to default value 1 MMD INFO : setting Device Index to default value 1 MMD INFO : executing "quartus_pgm -c 1 -m jtag -o "P;reprogram_temp.sof@1"" For some reason PCIe is not being used to program. When I cancel and quit the session, I have to kill the jtagd, and use quartus_pgm -a in order to reprogram. Otherwise I get Error (213013): Programming hardware cable not detected Why? Am I doing something wrong. Is this because of PCIe connection? I have checked lspci | grep Altera and everything seems to be alright! lspci | grep Altera 03:00.0 Processing accelerators: Altera Corporation Device 2494 (rev 01) Regards, Manoj.