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

7.3. Compiling and Linking Your Kernels or Object Files without Building Hardware (-rtl)

To direct the Intel® FPGA SDK for OpenCL™ Offline Compiler to compile your OpenCL™ kernels (.cl), generate an intermediate .aoco object file for each kernel, and then link them together to create a .aocr file without creating a hardware configuration file, include the -rtl option in your aoc command.
  • To compile one or more kernel source files, at a command prompt, invoke the aoc -rtl <your_kernel_filename1>.cl [<your_kernel_filename2>.cl ...] command.
    Where [ <your_kernel_filename2>.cl ...] are the optional space-delimited file names of kernels that you can compile in addition to <your_kernel_filename1>.cl.
    When you invoke the aoc command with the -rtl flag, the offline compiler compiles the kernels and creates the following files and directories:
    • An intermediate .aoco file for each .cl kernel source file. It is not presented unless you specify the -save-temps aoc command option. The offline compiler then links them and generates a .aocr file. It takes the offline compiler a matter of seconds to minutes to create a .aoco file or the .aocr file.
    • A <your_kernel_filename> folder or subdirectory. It contains intermediate files that the SDK uses to build the hardware configuration file necessary for FPGA programming.
  • To compile one or more .aoco object files, at a command prompt, invoke the aoc -rtl <your_kernel_filename>.aoco [<your_kernel_filename2>.aoco ...] command.
    Where [ <your_kernel_filename2>.aoco ...] are the optional space-delimited file names of object files that you can compile in addition to <your_kernel_filename1>.aoco.
    When you invoke the aoc command with the -rtl flag, the offline compiler creates the following files and directories:
    • The offline compiler links all the .aoco files and generates a .aocr file.
    • A <your_kernel_filename> folder or subdirectory. It contains intermediate files that the SDK uses to build the hardware configuration file necessary for FPGA programming.