Forum Discussion
Altera_Forum
Honored Contributor
8 years ago --- Quote Start --- Actually I forgot something very important. Terasic's BSP for this board is for Quartus v16.0, you should NOT use Quartus v17.0 to compile kernels for this board. I suggest trying v16.0.2. If it worked, you can also try v16.1.2. v17.x will very likely not work due to the numerous changes done in Quartus compared to v16.x. --- Quote End --- The example worked in my installation, with Quartus v16.1.2 under Ubuntu 16.04.3. However, I had to modify the Makefile which generates the vector_add executable, since it fails to link the shared library libacl_emulator_kernel_rt.so. My diff with the original Makefile is as follows: 37a38,39 ># GS20170907: hackfix to ld warning (appended to 'all' target): > AOCL_LINK_CONFIG_EXT=-lacl_emulator_kernel_rt 41c43 < $(CROSS-COMPILE)g++ $(SRCS_FILES) $(COMMON_FILES) -o $(TARGET) $(AOCL_COMPILE_CONFIG) $(AOCL_LINK_CONFIG) --- > $(CROSS-COMPILE)g++ $(SRCS_FILES) $(COMMON_FILES) -o $(TARGET) $(AOCL_COMPILE_CONFIG) $(AOCL_LINK_CONFIG) $(AOCL_LINK_CONFIG_EXT) The same correction is to be made to the Makefile of the boardtest example. The aoc utility took 32 min. to compile the OpenCL kernel. The execution of the example on the board was very quick and gave the following output: root@socfpga:~/mytests/vector_add# ./vector_add Initializing OpenCL Platform: Altera SDK for OpenCL Using 1 device(s) de1soc_sharedonlyCyclone V SoC Development Kit Using AOCX: vectorAdd.aocx Reprogramming device with handle 1 Launching for device 0 (1000000 elements) Time: 164.118 ms Kernel time (device 0): 6.918 ms Verification: PASS