Executing an opencl kernel on an soc, Executing an opencl kernel on an soc -13 – Altera SDK for OpenCL Cyclone V SoC User Manual

Page 36

Advertising
background image

You should see an output similar to the one below:

Board list:
c5soc
c5soc_sharedonly

6. To compile the kernel for your Cyclone V SoC Development Kit, invoke the following command:

aoc --board c5soc device/hello_world.cl -o bin/hello_world.aocx

This command performs the following tasks:
• Generates the Quartus II design project files from the OpenCL source code.

• Checks for initial syntax errors.

• Performs basic optimizations.

• Creates a

hello_world

subfolder or subdirectory containing necessary intermediate files.

• Creates the Altera Offline Compiler Object file (

.aoco

).

• Creates the

.aocx

hardware configuration file and saves it in the

bin

subfolder or subdirectory.

Attention: The

.aocx

file might take hours to build, depending on the complexity of the kernel. To

view the progress of the compilation on-screen, include the

-v

flag in your

aoc

command

(that is,

aoc -v <your_kernel_filename>.cl

).

The AOC displays the line

aoc: Hardware generation completed

successfully.

to signify the completion of the compilation process.

For more information on the

--list-boards

option of the

aoc

command, refer to the Listing the

Available FPGA Boards in Your Custom Platform (--list-boards) section of the Altera SDK for OpenCL

Programming Guide.
For more information on the

--board <board_name>

option of the

aoc

command, refer to the

Compiling a Kernel for a Specific FPGA Board (--board <board_name>) section of the Altera SDK for

OpenCL Programming Guide.
For more information on the

-v

option of the

aoc

command, refer to the Generating Compilation

Progress Report (-v) section of the Altera SDK for OpenCL Programming Guide.
For more information on the

-o <filename>

option of the

aoc

command, refer to the Specifying the

Name of an AOC Output File (-o <filename>) section of the Altera SDK for OpenCL Programming Guide.

Related Information

OpenCL Design Examples page on the Altera website

Listing the Available FPGA Boards in Your Custom Platform (--list-boards)

Compiling a Kernel for a Specific FPGA Board (--board <board_name>)

Generating Compilation Progress Report (-v)

Specifying the Name of an AOC Output File (-o <filename>)

Executing an OpenCL Kernel on an SoC

Build your host application using the GNU Compiler Collection (GCC) cross-compiler available with the

SoC Embedded Design Suite (EDS).

Related Information

Creating the Hardware Configuration File of an OpenCL Kernel for SoC

on page 3-11

OCL006-15.0.0

2015.05.04

Executing an OpenCL Kernel on an SoC

3-13

Setting Up the Altera SDK for OpenCL, SoC EDS, and the Cyclone V SoC Development Kit for Linux

Altera Corporation

Send Feedback

Advertising