Intel® High Level Synthesis Compiler Pro Edition: Getting Started Guide

ID 683680
Date 12/13/2021
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

1.6. Initializing the Intel® HLS Compiler Pro Edition Environment

Before you can compile your component with the Intel® HLS Compiler i++ command, a number of environment variables must be set for the i++ command to run successfully.

The Intel® HLS Compiler environment initialization script applies only to the environment variable settings in your current terminal or command prompt session. You must initialize the Intel® HLS Compiler environment each time that you start a terminal or command prompt session to develop your design.

To initialize your current terminal or command prompt session so that you can run the Intel® HLS Compiler:

  • On Linux systems, initialize your environment as follows:
    1. (Optional) Set the QUARTUS_ROOTDIR_OVERRIDE environment variable to point at the Intel® Quartus® Prime installation that Intel® HLS Compiler uses for Quartus compiles.

      Typically, you set the QUARTUS_ROOTDIR_OVERRIDE environment variable only when you have one Intel® HLS Compiler installation that you want to use with multiple Intel® Quartus® Prime installations.

      For more information about the QUARTUS_ROOTDIR_OVERRIDE environment variable and managing multiple installations of Intel® Quartus® Prime, refer to "Managing Multiple Versions and Copies of Intel FPGA Software" in Intel FPGA Software Installation and Licensing .

    2. Start a terminal session and run the following command from the command prompt:
      <quartus_installdir>/hls/init_hls.sh

      Where <quartus_installdir> is the path to your Intel® Quartus® Prime installation. For example, /home/<username>/intelFPGA_pro/21.4.

      This script creates a subshell that does not change the environment in your initial working shell.

      If you want modify your current working shell, use the source command to invoke the script:
      source <quartus_installdir>/hls/init_hls.sh
    The environment initialization script shows the environment variables that it set, and you can now run the i++ command from this terminal session.
  • On Windows systems, initialize your environment as follows:
    1. (Optional) Set the QUARTUS_ROOTDIR_OVERRIDE environment variable to point at the Intel® Quartus® Prime installation that Intel® HLS Compiler uses for Quartus compiles.

      Typically, you set the QUARTUS_ROOTDIR_OVERRIDE environment variable when you have one Intel® HLS Compiler installation that you want to use with multiple Intel® Quartus® Prime installations.

      For more information about the QUARTUS_ROOTDIR_OVERRIDE environment variable and managing multiple installations of Intel® Quartus® Prime, refer to "Managing Multiple Versions and Copies of Intel FPGA Software" in Intel FPGA Software Installation and Licensing .

    2. Start a Windows Command Prompt (cmd.exe) session and run the following command from the command prompt:
      <quartus_installdir>\hls\init_hls.bat

      Where <quartus_installdir> is the path to your Intel® Quartus® Prime installation. For example, C:\intelFPGA_pro\21.4 .

    You can now run the i++ command from this command prompt session.
Tip: To set the environment variables permanently, follow your operating system's standard procedure for making persistent changes to environment variable settings. Review the output of the environment initialization script to determine the environment variables to set permanently.