Altera_Forum
Honored Contributor
8 years agoAn issue about compiling the OpenCL to FPGA
Hi,
I met an issue about compiling the OpenCL HelloWorld/Vector_add code to FPGA. Quartus Prime can offload the VHDL code into the FPGA board but the OpenCL SDK and compiler can not program to the FPGA board instead. [root@localhost vector_add]# aoc -v device/vector_add.cl -o bin/vector_add.aocx --board de5a_net_i2 --report aoc: Environment checks are completed successfully. You are now compiling the full flow!! aoc: Selected target board de5a_net_i2 aoc: Running OpenCL parser.... /root/intelFPGA_pro/17.0/hld/board/de5a_net_i2/tests/vector_add/device/vector_add.cl:23:48: warning: declaring kernel argument with no 'restrict' may lead to low kernel performance __kernel void vector_add(__global const float *x, ^ /root/intelFPGA_pro/17.0/hld/board/de5a_net_i2/tests/vector_add/device/vector_add.cl:24:48: warning: declaring kernel argument with no 'restrict' may lead to low kernel performance __global const float *y, ^ 2 warnings generated. aoc: OpenCL parser completed successfully. aoc: Compiling.... aoc: Linking with IP library ... Checking if memory usage is larger than 100% +--------------------------------------------------------------------+ ; Estimated Resource Usage Summary ; +----------------------------------------+---------------------------+ ; Resource + Usage ; +----------------------------------------+---------------------------+ ; Logic utilization ; 19% ; ; ALUTs ; 10% ; ; Dedicated logic registers ; 10% ; ; Memory blocks ; 11% ; ; DSP blocks ; 5% ; +----------------------------------------+---------------------------; aoc: First stage compilation completed successfully. Error: Compiler Error, not able to generate hardware I set up all required driver/BSP (board supported package from Terasic)/env variables/libraries and followed the official manual carefully but still have this issue. [root@localhost vector_add]# aoc --list-boards Board list: de5a_net_i2 But whlie running the aocl diagnose: [root@localhost vector_add]# aocl diagnose aocl diagnose: Running diagnose from /root/intelFPGA_pro/17.0/hld/board/de5a_net_i2/linux64/libexec aocl diagnose: failed 32 times. First error below: Vendor: Terasic Found no active device installed on the host machine. Please make sure to: 1. Set the environment variable AOCL_BOARD_PACKAGE_ROOT to the correct board package. 2. Install the driver from the selected board package. 3. Properly install the device in the host machine. 4. Configure the device with a supported OpenCL design. 5. Reboot the machine if the PCI Express link failed. Configuration: FPGA board: Terasic De5a-Net FPGA with Arria 10 Quartus Prime Pro Edition with OpenCL SDK All the manuals and drivers can be found here: https://www.terasic.com.tw/cgi-bin/page/archive.pl?language=english&categoryno=231&no=970&partno=4 A similar question in the forum but still didn't have solutions yet: https://alteraforum.com/forum/archive/index.php/t-45872.html I am looking for any helps/advise! Thank you so much! All the best, Jiawen