Visible to Intel only — GUID: kzr1518804667462
Ixiasoft
Visible to Intel only — GUID: kzr1518804667462
Ixiasoft
2.7. Creating the FPGA Hardware Configuration File of an OpenCL Kernel
- Verify that the QUARTUS_ROOTDIR_OVERRIDE environment variable points to the Intel® Quartus® Prime Standard Edition software. Open a Windows command window and then type echo %QUARTUS_ROOTDIR_OVERRIDE% at the command prompt.
If the path to the installation folder of the Intel® Quartus® Prime Standard Edition software is not returned, add it to the QUARTUS_ROOTDIR_OVERRIDE setting.
- Select your target FPGA board. To list the FPGA boards available in your Custom Platform, invoke the command aoc -list-boards at a command prompt.
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 Intel® FPGA SDK for OpenCL™ Standard Edition Programming Guide.
- At a command prompt, navigate to the hello_world design folder containing the hello_world.cl file that you used for emulation.
- To compile the kernel for your target FPGA board, invoke the following command:
aoc -v -board=<board_name> device/hello_world.cl -o=bin/hello_world.aocx
This command performs the following tasks:
- Generates the Intel® Quartus® Prime design project files from the OpenCL source code.
- Checks for initial syntax errors.
- Performs basic optimizations.
- Creates a hello_world folder containing necessary intermediate files.
- Creates the Intel® FPGA SDK for OpenCL™ Offline Compiler Object File (.aoco).
- Creates the .aocx file.
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. An example output is shown below.
aoc: Environment checks are completed successfully. You are now compiling the full flow!! aoc: Selected target board <board_name> aoc: Running OpenCL parser.... aoc: OpenCL parser completed successfully. aoc: Compiling.... aoc: Linking with IP library ... aoc: First stage compilation completed successfully. aoc: Setting up project for CvP revision flow.... aoc: Hardware generation completed successfully.
The offline compiler displays the line aoc: Hardware generation completed successfully. to signify the completion of the compilation process.
For more information about 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 Intel® FPGA SDK for OpenCL™ Standard Edition Programming Guide.
For more information about the -v option of the aoc command, refer to the Generating Compilation Progress Report (-v) section of the Intel® FPGA SDK for OpenCL™ Standard Edition Programming Guide.
For more information about the -o=<filename> option of the aoc command, refer to the Specifying the Name of an Intel® FPGA SDK for OpenCL™ Offline Compiler Output File (-o <filename>) section of the Intel® FPGA SDK for OpenCL™ Standard Edition Programming Guide.