AN 780: Compiling and Customizing an Intel® Arria® 10 Custom Platform for OpenCL*

ID 683045
Date 10/30/2018
Public
Document Table of Contents

1.6.3.1. Compiling a Kernel without Regenerating the Custom Platform

Step 1 in the Intel® Arria® 10 Custom Platform customization flow is to verify the functionality of the existing Reference Platform by compiling it with a simple OpenCL kernel but without regenerating the platform. Compiling the existing platform checks the platform’s setup and verifies that the Intel® FPGA SDK for OpenCL™ Offline Compiler works as expected. A main advantage to compiling a kernel without regenerating the Reference Platform is that it preserves placement and routing as well as timing, which saves compilation time.

Intel assumes that you have set up your Windows or Linux environment correctly to run the Intel® FPGA SDK for OpenCL™ Offline Compiler.

  1. Obtain the Intel® Arria® 10 GX FPGA Development Kit Reference Platform (for example, a10_ref_18.1_b222.zip) from your Intel representative.
  2. Unpack the Reference Platform and store it in a directory named <your_custom_platform> . For this example, <your_custom_platform> is a10gx_ref_18.1.
  3. Choose one of the board variants in the a10gx_ref_18.1/hardware directory as the basis of your design (for example, a10gx).
  4. Open the a10gx_ref_18.1/board_env.xml file in a text editor and perform the following tasks:
    1. Change the board name setting from a10_ref to a10gx_ref_18.1.
    2. Verify that the board default setting is a10gx_es3.
    3. Save and then close the board_env.xml file.
  5. Open the a10gx_ref_18.1/hardware/a10gx/board_spec.xml file in a text editor and perform the following tasks:
    1. Verify that the board name setting is a10gx_es3.
    2. Save and then close the board_spec.xml file.
  6. To set the AOCL_BOARD_PACKAGE_ROOT environment variable, at a command prompt, invoke the set AOCL_BOARD_PACKAGE_ROOT=<path to a10gx_ref_18.1> command, where a10gx_ref_18.1 is the new design directory.
  7. To test the environment, first invoke the aocl board-xml-test command to read the board_env.xml file and display the Custom Platform information on-screen.
  8. Invoke the aoc --list-boards command to display the board variants that are available in the a10gx_ref_18.1 Custom Platform.
    Figure 4. Sample Output from the aocl board-xml-test and aoc --list-boards Commands
  9. To compile an OpenCL kernel without regenerating a10gx_ref_18.1, perform the following tasks:
    1. Download the Vector Addition design example from the OpenCL Design Examples page.
    2. Copy the vector_add.cl file to the project directory a10gx_ref_18.1.
    3. Invoke the aoc vector_add.cl –v --no-interleaving default command.
    4. After the compilation is completed, you can review the resulting files in the vector_add directory within your working directory.
  10. Refer to the Analyzing the Results from Compilation section to check the Fitter, Timing Analyzer reports and placement in the Floorplanner.