Forum Discussion
An 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, Jiawen12 Replies
- Altera_Forum
Honored Contributor
So they put the blame on Altera, that is convenient for them. I have been using the same version of Quartus (16.1.2) with another manufacturer's board and BSP and I have no problems whatsoever. Being able to program the FPGA does not prove their BSP is working correctly, it just shows that their PCI-E driver is working. I am afraid I have no other solutions for you. You can contact Altera instead and show them your compilation log and ask what is wrong, but they will likely tell you to go contact Terasic because this is most likely a problem with Terasic's BSP.
- Altera_Forum
Honored Contributor
I just tried Terasic's 16.1 DE5A-Net BSP (both I2 and E1) with Quartus v16.1.2 on my own environment on a kernel I had previously compiled successfully using another manufacturer's BSP. I got the exact same compilation error as reported by jm1ppqpotss with both of the BSPs. The compilation fails while importing the static region from the BSP. The problem is DEFINITELY from the BSP and not Quartus. Their Windows BSP might work, but their Linux BSP is definitely broken.