Intel® FPGA SDK for OpenCL™ Pro Edition: Programming Guide

ID 683846
Date 6/21/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

11.1.10. OpenCL Library Command-Line Options

Both the Intel® FPGA SDK for OpenCL™ Offline Compiler's set of commands and the SDK utility include options you can invoke to perform OpenCL library-related tasks.
Table 19.  Library-Related Intel® FPGA SDK for OpenCL™ Offline Compiler Command Options
Command Option Description
-shared

In conjunction with the -rtl command option, compiles an OpenCL source file into an object file (.aoco) that you can then include into a library.

aoc -rtl -shared <OpenCL source file name>.cl -o <OpenCL object file name>.aoco

-I=<library_directory> Adds <library directory> to the header file search path.

aocl -I <library_header_file_directory> -l <library_file_name>.aoclib <kernel_file_name>.cl

-L=<library directory> Adds <library directory> to the OpenCL library search path.

Space after "-L" is optional.

aoc -l=<library_file_name>.aoclib [-L=<library directory>] <kernel file name>.cl

-l=<library_file_name>.aoclib Specifies the OpenCL library file ( <library_file_name>.aoclib).

Space after -l is optional.

aoc -l=<library_file_name>.aoclib [-L=<library directory>] <kernel file name>.cl

-library-debug Generates debug output that relates to libraries. Part of the additional output appears in stdout, the other part appears in the <kernel_file_name>/<kernel_file_name>.log file.

aoc -l=<library_file_name>.aoclib -library-debug <kernel_file_name>.cl

Table 20.   Intel® FPGA SDK for OpenCL™ Library Utility (aocl library) Command Options
Command Option Description
hdl-comp-pkg <XML_specification_ file>.xml

Packages a single HDL component into a .aoco file that you then include into a library. Invoking this command option is similar to invoking aoc -rtl <XML_specification_file>.xml. However, the processing time is faster because the aocl utility does not perform any environment checks.

aocl library hdl-comp-pkg <XML_specification_ file>.xml -o <output_file>.aoco

-rtl <XML_specification_ file>.xml

Same function as hdl-comp-pkg <XML_specification_ file>.xml.

aocl library -rtl <XML_specification_ file>.xml

create

Creates a library file from the .aoco files that you created by invoking the hdl-comp-pkg utility option or the aoc -shared command, and any other .aoclib libraries.

aocl library create [-name <library_name>] [-vendor <library_vendor>] [-version <library_version>] [-o <output_file>.aoclib] [.aoco...] [.aoclib...]

where -name, -vendor, and -version are optional information strings you can specify and add to the library.

list <library_name>

Lists all the RTL components in the library. Currently, this option is not available for use to list OpenCL functions.

aocl library list <library_name>

help Prints the list of Intel® FPGA SDK for OpenCL™ library utility options and their descriptions on screen.

aocl library help