Microchip FPGA Tools Installation Guide#
Instructions for installing the Microchip FPGA tools on a Ubuntu 20.04 or Ubuntu 22.04 desktop.
Important
We will be providing instances of Libero that you can run from git.beagleboard.org’s gitlab-runners such that you do not need to install the tools on your local machine.
Todo
Make sure people know about the alternative and we provide links to details on that before we send them down this process.
Install Libero#
Note
Libero 2023.2, 2024.1 or 2024.2 should work. 2024.2 is used as an example.
Create a folder named Microchip in your /home folder
Download installer from the Microchip’s fpga and soc design tools section.
Install Libero
unzip Libero_SoC_v2024.2_lin.zip
./launch_installer.sh
Important
Do not use the default location suggested by the Libero installer. Instead of /usr/local/Microchip/Libero_SoC_v2024.2 install into ~/Microchip/Libero_SoC_v2024.2
Run the post installation script which will install missing packages:
sudo /home/$USER/Microchip/Libero_SoC_v2024.2/Logs/req_to_install.sh
No need to run the FlashPro hardware installation scripts. This will be taken care of as part of the SoftConsole installation.
Install SoftConsole 2022.2#
Download installer from Microchip website.
sudo chmod +x Microchip-SoftConsole-v2022.2-RISC-V-747-linux-x64-installer.run
./Microchip-SoftConsole-v2022.2-RISC-V-747-linux-x64-installer.run
Accept the license, Click Forward, Finish.
Perform the post installation steps as described in the html file opened when you click Finish.
Important
Please pay special attention to the “Enabling non-root user to access FlashPro” section of the post-installation instructions. This will actually allow you to program the board using Libero.
Install the Libero licensing daemon#
Download the latest 64 bit Licensing Daemons from the Microchip’s fpga and soc design tools section
Older Daemon downloads can be found at Microchip’s daemons section
Copy the downloaded file to the Microchip directory within your home directory and untar it.
cd ~/Microchip
tar -xvf Linux_Licensing_Daemon_11.19.6.0_64-bit.tar.gz
Install the Linux Standard Base:
sudo apt-get update
sudo apt-get -y install lsb
Request a Libero Silver license#
Choose “Libero Silver 1Yr Floating License for Windows/Linux Server” from the list.
Enter your MAC address and click register.
Note
A MAC address looks something like 12:34:56::78:ab:cd when you use the “ip address” command to find out its value on your Linux machine. However, you need to enter it as 123456abcd in this dialog box.
You will get an email with a License.dat file. Copy it into the ~/Microchip/license directory. Replace <put.hostname.here> in License.dat with localhost and add Linux_Licensing_Daemon as the path to the daemons.
The top of your license file should look something like this after editing. Your daemon files should be located in the Linux_Licensing_Daemon folder inside the Microchip folder.
SERVER localhost 001584731680 1702
DAEMON actlmgrd Linux_Licensing_Daemon/actlmgrd
# Starting Libero SOC v2024.2, customers are recommended ...
# DAEMON mgcld Linux_Licensing_Daemon/mgcld
DAEMON saltd Linux_Licensing_Daemon/saltd
VENDOR snpslmd Linux_Licensing_Daemon/snpslmd
Execute tool setup script#
Download the script:
#!/bin/bash
# Gets Libero version
dir=$(pwd)
while [[ "$dir" != "/" ]]; do
for subdir in "$dir"/*/; do
if [[ $subdir =~ Libero_SoC_v([0-9]+\.[0-9]+)/ ]]; then
Libero_ver="${BASH_REMATCH[1]}"
break 2
fi
done
dir=$(dirname "$dir")
done
#Set preferred Libero version here if needed
#Libero_ver=2023.2
echo "Using Libero version:" $Libero_ver
# Check if Libero_ver was set; if not, print an error and exit
if [[ -z "$Libero_ver" ]]; then
echo "Error: No directory found matching the pattern 'Libero_SoC_vXXXX.Y/'"
return 1
fi
#===============================================================================
# Edit the following section with the location where the following tools are
# installed if they aren't in the default location:
# - SoftConsole (SC_INSTALL_DIR)
# - Libero (LIBERO_INSTALL_DIR)
# - Licensing daemon for Libero (LICENSE_DAEMON_DIR)
#===============================================================================
export SC_INSTALL_DIR=/home/$USER/Microchip/SoftConsole-v2022.2-RISC-V-747
export LIBERO_INSTALL_DIR=/home/$USER/Microchip/Libero_SoC_v$Libero_ver
export LICENSE_DAEMON_DIR=/home/$USER/Microchip/Linux_Licensing_Daemon
export LICENSE_FILE_DIR=/home/$USER/Microchip/license
export SMARTHLS_INSTALL_DIR=$LIBERO_INSTALL_DIR/SmartHLS-$Libero_ver/SmartHLS
#===============================================================================
# The following was tested on Ubuntu 20.04 with:
# - Libero 2023.2 and 2024.1
# - SoftConsole 2022.2
# It was also tested on Ubuntu 22.04 with:
# - Libero 2024.2
# - SoftConsole 2022.2
#===============================================================================
#
# SoftConsole
#
export PATH=$PATH:$SC_INSTALL_DIR/riscv-unknown-elf-gcc/bin
export FPGENPROG=$LIBERO_INSTALL_DIR/Libero/bin64/fpgenprog
#
# Libero
#
export PATH=$PATH:$LIBERO_INSTALL_DIR/Libero/bin:$LIBERO_INSTALL_DIR/Libero/bin64
export PATH=$PATH:$LIBERO_INSTALL_DIR/SynplifyPro/bin
export PATH=$PATH:$LIBERO_INSTALL_DIR/ModelSimPro/modeltech/linuxacoem
export PATH=$PATH:$SMARTHLS_INSTALL_DIR/bin
export PATH=$PATH:$SMARTHLS_INSTALL_DIR/swtools/binutils/riscv-gnu-toolchain/bin
export LOCALE=C
export LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu:$LD_LIBRARY_PATH
#
# Libero License daemon
#
export LM_LICENSE_FILE=1702@localhost
export SNPSLMD_LICENSE_FILE=1702@localhost
$LICENSE_DAEMON_DIR/lmgrd -c $LICENSE_FILE_DIR/License.dat -l $LICENSE_FILE_DIR/license.log
Details:
You can create a folder named FPGA-Tools-Setup and store the file there, although this is not required, as long as it is inside the Microchip folder.
You shouldn’t need to edit the script, as long as you have installed Libero inside a folder that follows the Libero_SoC_vXXXX.X format, or if you have multiple Libero versions installed and want to select a preferred one to use.
Source the script:
sudo chmod +x setup-microchip-tools.sh
. ./setup-microchip-tools.sh
Important
Do not forget the leading dot. It matters. You will need to run this every time you restart your machine.
Optionally, add this to the end of your ~/.bashrc file to avoid running it each time on startup.
First, open ~/.bashrc:
nano ~/.bashrc
Then, add the following lines at the end:
cd /home/$USER/Microchip/
. ./setup-microchip-tools.sh
You can then start Libero to open an existing Libero project.
libero
However you will more than likely want to use Libero to run a TCL script that will build a design for you.
libero SCRIPT:BUILD_A_DESIGN.tcl