Article ID: 000086476 Content Type: Install & Setup Last Reviewed: 12/04/2018

How do I compile an OpenCL kernel using the latest version of the Intel® SDK for OpenCL™ with a Board Support Package (BSP) from a previous version?

Environment

  • Intel® Quartus® Prime Pro Edition
  • Intel® Quartus® Prime Standard Edition
  • Intel® FPGA SDK for OpenCL™ Pro Edition
  • BUILT IN - ARTICLE INTRO SECOND COMPONENT
    Description

    Beginning with Intel® SDK for OpenCL™ and Intel Quartus Prime Pro version 18.1, it is possible to compile an OpenCL™ kernel using the latest version of the Intel® SDK for OpenCL™ while using a BSP compiled with a previous version. However, the Quartus Prime software version that matches the version of the BSP must also be installed and used .

    Resolution

    ·        Set environment variables to point the Quartus Prime version that was used to compile the BSP.

    ·        Set the environment variables to point to the BSP directory.

    ·        Set environment variables to point to the latest version of the Intel SDK for OpenCL.

    ·        Run the Intel® SDK for OpenCL™ initialization script.

    ·        Compile the kernel.

    ·        Run the design using the latest version of the Intel SDK for OpenCL or Intel RTE for OpenCL.

     

    For example, if you have a BSP from version 17.1, and you want to use the Intel® SDK for OpenCL™ version 18.1, you must have version 17.1 of the Quartus Prime software installed and you must set the environment variables as shown in the following scripts.

    Notes:

    Change the directories in the script to match your installation.

    Make sure there are no other versions of Quartus or the Intel® SDK for OpenCL™ in the path.

     

    Linux (mixed_compile.sh)

    # *** Set QUARTUS and QSYS 17.1 ***
    export QSYS_ROOTDIR=/IntelFPGA_pro/17.1/qsys/bin
    export QUARTUS_ROOTDIR=/IntelFPGA_pro/17.1/quartus/bin
    export QUARTUS_ROOTDIR_OVERRIDE=/IntelFPGA_pro/17.1/quartus/bin

    export PATH="/IntelFPGA_pro/17.1/quartus/bin/:$PATH"
    export PATH="/IntelFPGA_pro/17.1/qsys/bin:$PATH"
     
    # A10 ref BSP version 17.1
    export AOCL_BOARD_PACKAGE_ROOT=/IntelFPGA_pro/17.1/hld/board/a10_ref
    export PATH="/IntelFPGA_pro/17.1/hld/board/a10_ref/ip/:$PATH"
     
    # set OpenCL version 18.1
    export ALTERAOCLSDKROOT=/IntelFPGA_pro/18.1/hld
    export INTELFPGAOCLSDKROOT=/IntelFPGA_pro/18.1/hld


    #run the OpenCL Setup script in 18.1
    source /IntelFPGA_pro/18.1/hld/init_opencl.sh

     

    Windows  (mixed_compile.bat)

    rem *** Quartus and Qsys 17.1 ***

    set QSYS_ROOTDIR=c:\IntelFPGA_pro\17.1\qsys\bin

    set QUARTUS_ROOTDIR=c:\IntelFPGA_pro\17.1\quartus

    set QUARTUS_ROOTDIR_OVERRIDE=c:\IntelFPGA_pro\17.1%\quartus

    set path=%path%;c:\IntelFPGA_pro\17.1\quartus\bin64;

    set path=%path%;c:\IntelFPGA_pro\17.1\qsys\bin;

    rem *** A10 BSP 17.1  ***

    set AOCL_BOARD_PACKAGE_ROOT=c:\IntelFPGA_pro\17.1\hld\board\a10_ref

    set path=%path%;c:\IntelFPGA_pro\17.1\hld\board\a10_ref\ip;

    rem *** OpenCL SDK 18.1 ***

    set ALTERAOCLSDKROOT= c:\IntelFPGA_pro\18.1\hld

    set INTELFPGAOCLSDKROOT= c:\IntelFPGA_pro\18.1\hld

    %INTELFPGAOCLSDKROOT%\init_opencl.bat

     

    To verify the configuration is correct, run the following:

    (Linux)

    $cd /IntelFPGA_pro/18.1/hld/board/custom_platform_toolkit/tests/boardtest

    $aoc boardtest.cl 

    (Windows)

    > cd c:\IntelFPGA_pro\17.1\hld\board\custom_platform_toolkit\tests\boardtest

    > aoc boardtest.cl 


    If the configuration is correct, the following message should appear after compilation.

         aoc: Hardware generation completed successfully.

     

    Related Products

    This article applies to 1 products

    Intel® Programmable Devices