Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
754 Views

opencl in DE5NET board

Hi,  

 

I set up the OpenCL environment according to the DE5-NET OpenCL manual for Altera SDK OpenCL 16.0. My computer environment is shown as follows. 

 

OS: CentOS 6.5 X86_64 

 

Altera SDK: AOCL-16.0.0.211; Quartus-16.0.0.211. 

I run the testing program provided by the DE5NET_openCL_BSP_16.0, some errors occur.  

 

(1) In the example hello_world, the flash memory can be programmed successfully by executing the command "aocl flash acl0 hello_world.aocx", but when I run the command "aocl program acl0 hello_world.aocx", system shows errors to load the shared library "libterasic_apb_16_0_mmd.so" (please refer to the attached file screenshot1.png). I checked the library. It is on the directory DE5NET_openCL_BSP_16.0\linux64\lib, and I have already added the path on the .bashrc file. The .bashrc file is shown as follows. 

# altera 

export ALTERAOCLSDKROOT=/home/tan/altera/16.0/hld 

export QSYS_ROOTDIR=/home/tan/altera/16.0/quartus/sopc_builder/bin 

export AOCL_BOARD_PACKAGE_ROOT=/home/tan/altera/16.0/hld/board/DE5NET_openCL_bsp_16.0 

export QUARTUS_ROOTDIR_OVERRIDE=/home/tan/altera/16.0/quartus 

export QUARTUS_ROOTDIR=/home/tan/altera/16.0/quartus 

export QUARTUS_64BIT=1 

# opencl 

export PATH=/home/tan/altera/16.0/hld/bin:$PATH 

export PATH=/home/tan/altera/16.0/quartus/bin/quartus:$PATH 

export LD_LIBRARY_PATH="$AOCL_BOARD_PACKAGE_ROOT"/linux64/lib:"$ALTERAOCLSDKROOT"/host/linux64/lib 

export PATH=$PATH:"$QUARTUS_ROOTDIR"/bin:"$ALTERAOCLSDKROOT"/linux64/bin:"$ALTERAOCLSDKROOT"/bin:"$AOCL_BOARD_PACKAGE_ROOT"/linux64/bin 

 

(2) in the example vector_add, when I compile the OpenCL kernel by using the command "aoc device/vector_add.cl -o bin/vector_add.aocx --board de5net_a7", the error information is shown in the attached file screenshot2.png.  

 

I also tried the system on the CentOS 6.8, the errors are same. Please give me some suggestions how to solve it. 

Thanks a lot. 

 

steven
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
43 Views

Why are you programming the FPGA offline? The host code will automatically program the FPGA at runtime. 

 

You should probably remove the quotation marks from your LD_LIBRARY_PATH. 

 

Also your screenshots are too small and cannot be read. 

 

Finally, you are using an old version of Quartus/AOC; always try to use the latest version compatible with your BSP, which in your case would be 16.1.2.
Reply