This article describes how to set up an environment for using the SoC FPGA Embedded Development Suite ("SoC EDS") in combination with different versions of Quartus® Prime development software ("Quartus").
Introduction
Originally, it was recommended that SoC EDS and Quartus be developed using the same version, but since version v19.1, Quartus and SoC EDS have had different release cycles. This may result in the need to combine different versions in cases where the latest Quartus and the same version of SoC EDS have not been released (e.g., v19.2 and v19.4 do not have SoC EDS).
Please refer to the contents of this article when you have an unavoidable need to combine different versions in this way.
1. Checking environment variables
Check the environment variables on the Embedded Command Shell. If the result of the check shows that Quartus is selected differently from the version you plan to use, you will need to change the settings.
Start Embedded Command Shell and execute the following commands.
$ env | grep ROOT
As a result, the following information will be displayed.
If the variable QUARTUS_ROOTDIR is set to the path to the installation directory of Quartus to be used with SoC EDS, you are good to go. In the example above, the path to Quartus v19.3 is specified, but if you want to use it with v19.4, you will need to change the environment variable.
Similarly, run the following command to check the path to the tools for the Nios® II processor.
$ env | grep NIOS
Normally, the path should be set to the same version as Quartus.
The following variables do not need to be changed as they are determined by the version of Embedded Command Shell you are running.
Just to be safe, make sure that the path is set to the intended version.
- SOCEDS_DEST_ROOT
The following variables should be changed as necessary to match the path of the version you intend to use.
- QUARTUS_ROOTDIR
- SOPC_KIT_NIOS2
- QSYS_ROOTDIR
- INTELFPGAOCLSDKROOT ... Only when using Intel® FPGA SDK for OpenCL™.
2. Changing environment variables
For QUARTUS_ROOTDIR and SOPC_KIT_NIOS2, dedicated variables are provided for overwriting environment variables.
(For the <username> part, specify the user name on your PC environment.)
Example: In the case of Linux
$ export QUARTUS_ROOTDIR_OVERRIDE=/home/<username>/intelFPGA_pro/19.4/quartus
$ export SOPC_KIT_NIOS2_OVERRIDE=/home/<username >/intelFPGA_pro/19.4/nios2eds
When Embedded Command Shell is started with the above environment variables registered, the specified path information will be reflected in QUARTUS_ROOTDIR and SOPC_KIT_NIOS2.
For QSYS_ROOTDIR and INTELFPGAOCLSDKROOT, there are no variables available for overwriting, so change the corresponding environment variables directly.
Example: In the case of Linux
$ export QSYS_ROOTDIR=$QUARTUS_ROOTDIR_OVERRIDE/sopc_builder/bin
$ export INTELFPGAOCLSDKROOT=/home/<username>/intelFPGA_pro/19.4/hld
Memo:
In fact, changing QSYS_ROOTDIR may not affect the behavior of the tool; as far as I can tell from checking the setup script (env.sh) in the Embedded Command Shell environment, it does not use the QSYS_ROOTDIR variable, but rather the QSYS_ROOTDIR equivalent (To be sure, it is recommended that you also set QSYS_ROOTDIR to the version you are using.)
Formore information on setting Quartus environment variables,please refer to
"3.5. Intel Quartus Prime Environment Variables" in "Intel® FPGA Software Installation and Licensing".
The following is part of "3.5. Intel Quartus Prime Environment Variables," which explains that QSYS_ROOTDIR is used to add to the PATH variable (other uses are unknown).
"PATH
You must add $QSYS_ROOTDIR to the PATH variable. the $QSYS_ROOTDIR locates
the directory at QUARTUS_ROOTDIR_OVERRIDE/sopc_ builder/bin."
[taken from Intel® FPGA Software Installation and Licensing ].
3.3 Changing environment variables (recommended)
It is convenient to write the environment variable settings in the .sh file that is executed when the Embedded Command Shell is started.
The following is an example (for <username>, specify the user name in your PC environment).
Target file: ~/intelFPGA_pro/19.3/embedded/embedded_command_shell.sh
#! /bin/bash
############################################################
# #
# Intel FPGA SoC Embedded Command Shell #
# #
# #
# Copyright (c) 2019 Intel Corporation #
# All Rights Reserved. #
# #
############################################################
export QUARTUS_ROOTDIR_OVERRIDE=/home/<username>/intelFPGA_pro/19.4/quartus
export SOPC_KIT_NIOS2_OVERRIDE=/home/<username>/intelFPGA_pro/19.4/nios2eds
export QSYS_ROOTDIR=$QUARTUS_ROOTDIR_OVERRIDE/sopc_builder/bin
export INTELFPGAOCLSDKROOT=/home/<username>/intelFPGA_pro/19.4/hld
############################################################
#
# Get the Root SOCEDS directory
NOTES:
If you use this method, you must remove QSYS_ROOTDIR and INTELFPGAOCLSDKROOT, which are automatically set when the tool is installed.
In the Linux environment (bash), the corresponding definitions are located near the end of the .bashrc configuration file directly under the home directory, so comment them out with a # at the beginning of these lines. (In the case of Windows, remove the environment variables from the system properties)
Target file: ~/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
: (omitted)
# export INTELFPGAOCLSDKROOT="/home/altsoc/intelFPGA/19.1/hld"
# export QSYS_ROOTDIR="/home/altsoc/intelFPGA/19.1/quartus/sopc_builder/bin"
After completing the above settings, start Embedded Command Shell and perform the aforementioned " 1. Checking Environment Variables ".
To start Quartus, type "quartus" at the Embedded Command Shell prompt.
It is recommended that you also check the version information displayed in the Quartus menu: Help → About Quartus Prime.
Conclusion
This article describes the case where the versions of SoC EDS and Quartus are different, but you should be careful about environment variables even if you are using the same version of both. In particular, if you have multiple versions of development tools installed on your development machine, it is a good idea to check the environment variable settings at least once.
NOTES:
The information in this article is not intended to condone any combination of different versions. Even in cases where it is unavoidable to combine different versions, please use the closest version combination.