Type: Answers

Type: Errata

Area: OpenCL

Area: Tools

Last Modified: December 14, 2016
Version Found: v16.1
Version Fixed: v17.0
Bug ID: FB422717;

Compiling an OpenCL kernel Using Both the --profile and -g0 Intel FPGA SDK for OpenCL Offline Compiler Command Options Does Not Remove Source Code from the .aocx File


When profiling your kernel, if you include both the -- profile and the -g0 Intel® FPGA SDK for OpenCL™ Offline Compiler command options in your aoc command, the source code of your kernel and IP will still appear in the resulting .aocx file.


You have two workaround options for removing the source code from existing .aocx files.

To manually remove the source code:

  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.
  3. 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 Perl script (https://www.altera.com/en_US/pdfs/literature/rn/opencl_rn_attachments/strip_source.zip).
  2. Unzip the strip_source.zip file in the current working directory and then run the perl strip_source.pl <.aocx file> command.
  3. 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.