Article ID: 000086644 Content Type: Troubleshooting Last Reviewed: 11/21/2016

Does the OpenCL tool chain generate an AOCX file with debug information and source code embedded in it?

Environment

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

    Yes, when you compile a kernel file without the “-g0” aoc command option, the Intel® FPGA SDK for OpenCL™ offline compiler will generate a final .aocx file with embedded debugging information and source code. This occurs in the 16.1 version of the tool.

    When profiling your kernel, if you include both the --profile and the -g0offline compiler command options in your aoc command, the source code of your kernel and IP will still appear in the resulting .aocx file.

    Resolution

    Use the “-g0” flag when running the aoc compile to prevent the debug information and source code being embedded in the .aocx file

    Example:  aoc -g0 <kernelFileName.cl>

    To manually remove the source code from .aocx files after building with default options:

    1. Run the aocl binedit <.aocx file> list command and find all sections that start with ".acl.source" or ".acl.clang_ir".

    2. Run the aocl binedit <.aocx file> update <section> <null> command for every section identified in Step 1.

    - For Windows, <null> is nul

    - For Linux, <null> is /dev/null

    To remove the source code automatically using the Intel-provided Perl script:

    1. Download the strip_source Perl script

    2. Unzip the strip_source.zip file in the current working directory and then run the perl strip_source.pl <.aocx file> command.

    Note: To run the script on Windows, you must have Perl available on the command line.  Ensure that you add the path to Perl to the PATH user environment variable setting.

    This problem is scheduled to be fixed in a future release of the Intel FPGA SDK for OpenCL offline compiler.

    Related Products

    This article applies to 1 products

    Intel® Programmable Devices