Altera SDK for OpenCL Cyclone V SoC Manual do Utilizador Página 37

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 39
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 36
Building the Host Application
Build your SoC-specific OpenCL host application using the GNU Compiler Collection (GCC) cross-
compiler available with the SoC Embedded Design Suite (EDS).
1. Perform the following tasks to download the hello_world design example.
a. Download the SoC-specific hello_world design example (<version> Arm32 Linux package (.tgz))
from the Hello World Design Example page within the Altera website.
b. Extract exm_opencl_hello_world_arm32_linux_<version>.tar to a location to which you have write
access.
c. Ensure that you set the environment variable AOCL_BOARD_PACKAGE_ROOT to point to the
Cyclone V SoC Development Kit Reference Platform (that is, $ALTERAOCLSDKROOT/board/c5soc).
2. At a command prompt, invoke the following command to set the PATH environment variable:
export PATH=<path_to_SoCEDS_installation_dir>/ds-5/sw/gcc/bin:$PATH
3. Navigate to the <path_to_exm_opencl_hello_world_arm32_linux_<version>>/hello_world directory.
4.
Invoke the make -f Makefile command. Alternatively, you can simply invoke the make
command.
The hello_world executable will be in the <path_to_exm_opencl_hello_world_arm32_linux_<version>>/hello_
world/bin directory.
Related Information
Hello World Design Example page on the Altera website
Running the Host Application
To execute the hello_world.aocx Altera Offline Compiler Executable file on the SoC, run the host
application you built from the ARM-specific Makefile.
1. Log into your SoC board.
2. Copy the hello_world.aocx hardware configuration file and the hello_world host executable from the
<exm_opencl_hello_world_arm32_linux_<version>>/hello_world/bin to the board.
3. Ensure that the LD_LIBRARY_PATH environment variable includes the $ALTERAOCLSDKROOT/host/
arm32/lib.
4. To execute the kernel on the SoC, at a command prompt, navigate to the host executable directory and
run the hello_world host executable.
Output from Successful Kernel Execution on the Cyclone V SoC Development Kit
When you run the host application to execute your OpenCL kernel on the Cyclone V SoC Development
Kit, the software notifies you of a successful kernel execution.
Example output:
Found 1 OpenCL platforms.
Querying platform for info:
==========================
CL_PLATFORM_NAME = Altera SDK for OpenCL
CL_PLATFORM_VENDOR = Altera Corporation
CL_PLATFORM_VERSION = OpenCL 1.0 Altera SDK for OpenCL, Version <version>
Querying device for info:
========================
CL_DEVICE_NAME = c5soc : Cyclone V SoC Development Kit
3-14
Building the Host Application
OCL006-15.0.0
2015.05.04
Altera Corporation
Setting Up the Altera SDK for OpenCL, SoC EDS, and the Cyclone V SoC Development Kit for Linux
Send Feedback
Vista de página 36
1 2 ... 32 33 34 35 36 37 38 39

Comentários a estes Manuais

Sem comentários