Recently I've been curious about Microchip's new PolarFire SoC FPGAs. And after getting ahold of a Discovery Kit demo board for the PolarFire, my first step naturally was to install Microchip's FPGA development software on my PC.
For Microchip FPGAs such as the PolarFire SoC, the HDL design is done in Libero SoC Design Suite while software applications for bare metal (no-OS) and RISC-V architectures are developed in their Eclipse-based IDE, SoftConsole.
One very important thing to note is that the latest version of Ubuntu officially supported by any of Microchip's FPGA development software is Ubuntu 20.04 LTS, which is what I'm using in this project write-up.
I haven't attempted to use Libero or SoftConsole in any other versions of Ubuntu, so I can't speak to what the software's functionality would potentially be like on later versions of Ubuntu since I know 20.04 LTS is on the older side at this point.
From what I can gleam from other forums posts though is that the license server tends to be where the incompatibilities pop up when trying to run the IDEs on unsupported versions of Linux. I would also strongly recommend switching your window manager back to X11 from the default Wayland if attempting to use Libero in Ubuntu 22.04 or later, or just creating an Ubuntu 20.04 VM to install/run Microchip software in.
Windows is the only other officially supported OS (specifically Windows 10 and 11), and both the Linux and Windows versions are only for the 64-bit x86 architecture. This is the second major FPGA design tools suite that doesn’t seem to have any plans in supporting ARM-based host computers, which I find interesting. So for those of you using VMs/Docker containers, make sure you're emulating a 64-bit x86 (amd64) platform if your native architecture differs.
Download Libero SoC Web InstallerStarting with Libero, both the Windows and Linux versions have a web installer for a hard-drive space optimized install process and a single-file download installer for an offline install (for the likely event that your company’s firewall blocks the proxies in the web installer).
Personally, I usually go straight for the single-file download installer because they tend to be a bit more robust, but I decided to see what Microchip's web installers were like. The Libero installers can be found on its product webpage here.
The single-file download installer is labeled Full Installer here, which I only mention so that it's not mistaken that the web installer isn't able to a full installation. "Full installation" in this context just means that all of the required files for installation are included in the installer download upfront versus the web installer that downloads files as needed while its running.
Request LicenseThe Libero SoC Design Suite IDE requires a license server with valid license on the system in order to run. There is a free license option (the silver license) which is what I'm opting for since the IPs I plan to use for my designs on my PolarFire SoC Discovery Kit are included in it.
A comparison chart of what the various license options include can be found here:
Before setting up the license daemon on the Ubuntu system locally though, a license file needs to be generated through Microchip's online user portal.
Click Learn More under the Request a Free License or Register and Manage Licenses option above the chart outlining the differences between the various licenses. This will redirect to the Microchip user portal, specifically the section for managing licenses for their software.
Log in with an existing account or create a new one (a Microchip account is also how you submit tickets to customer support if needed). Once logged in, the landing page will be the license management tab.
Select the Request Free License option then click Register on the line for Libero Silver 1Yr Floating License for Windows/Linux Server in the pop up window.
Microchip licenses are tied to a PC's MAC address, so to find your MAC address use a command such as ifconfig
:
~$ ifconfig | grep Eth
Then enter your PC's MAC address (without colons - this tripped me up initially) in the MAC ID field and click Register:
Once successfully submitted, Microchip will generate your license file (License.dat) then email it to you in about 30 - 45 minutes.
As far as package dependencies for Microchip software goes, I wasn't able to find an all-encompassing list to install everything beforehand (that doesn't mean I didn't miss it somewhere though). The only thing I was able to find is a script in the Libero installation directory that can be run after the installation process to check that all package dependencies are met and tell you if anything is missing. This script is what the Microchip setup guide recommends to do.
I found that my regular package dependency list for a fresh Ubuntu install had everything covered as I only found one missing package when I ran the post-installation checker script (which I went ahead and added):
~$ sudo apt install lsb xcb libxcb-cursor0
~$ sudo apt-get install gparted xinetd gawk gcc net-tools ncurses-dev openssl libssl-dev flex bison xterm autoconf libtool texinfo zlib1g-dev iproute2
~$ sudo apt-get install make tftpd libselinux1 wget diffstat chrpath socat tar unzip gzip tofrodos lsb libftdi1 libftdi1-2 libnspr4-dev libnss3-dev
~$ sudo apt-get install lib32stdc++6 libgtk2.0-0:i386 libfontconfig1:i386 libx11-6:i386 libxext6:i386 libxrender1:i386 libsm6:i386 tree openssh-server
~$ sudo apt-get install debianutils iputils-ping libegl1-mesa libsdl1.2-dev python3 pylint cpio tftpd-hpa gnupg zlib1g:i386 haveged perl xvfb
~$ sudo apt-get install gcc-multilib build-essential automake screen putty pax g++ python3-pip xz-utils python3-git python3-jinja2 python3-pexpect python3-setuptools python3-dev
~$ sudo apt-get install liberror-perl mtd-utils xtrans-dev libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev
~$ sudo apt-get install util-linux sysvinit-utils cython3 google-perftools patch diffutils ocl-icd-libopencl1 opencl-headers ocl-icd-opencl-dev
~$ sudo apt-get install libncurses5 libncurses5-dev libncursesw5 libncursesw5-dev libncurses5:i386 libtinfo5 libstdc++6:i386 dpkg-dev:i386
~$ sudo apt-get install libdeflate-dev libgdk-pixbuf-2.0-dev libgdk-pixbuf-xlib-2.0-0 libgdk-pixbuf-xlib-2.0-dev libgdk-pixbuf2.0-dev
~$ sudo apt-get install libjbig-dev libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev liblzma-dev libtiff-dev libtiffxx5
~$ sudo apt-get install icu-devtools libatk-bridge2.0-dev libatk1.0-dev libatspi2.0-dev libbrotli-dev libcairo2-dev libdatrie-dev libdbus-1-dev libegl-dev
~$ sudo apt-get install libegl1-mesa-dev libepoxy-dev libfontconfig-dev libfontconfig1-dev libfreetype-dev libfreetype6-dev libfribidi-dev libgles-dev libgles1 libc6-dev
~$ sudo apt-get install libglvnd-core-dev libglvnd-dev libgraphite2-dev libgtk-3-dev libharfbuzz-dev libharfbuzz-gobject0 libice-dev libicu-dev libopengl-dev libpango1.0-dev
~$ sudo apt-get install libpixman-1-dev libsm-dev libthai-dev libwayland-bin libwayland-dev libxcb-shm0-dev libxcomposite-dev libxcursor-dev libxdamage-dev
~$ sudo apt-get install libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxrender-dev libxtst-dev pango1.0-tools wayland-protocols libxss-dev
Then in order for the Microchip IDEs to be able to talk to FPGA hardware via serial connections, the user profile(s) on Ubuntu need to be added to the dialout group in order to be able to access the /dev/ttyUSB
serial port devices if it hasn't been done already:
~$ sudo adduser $USER dialout
And again, this prep can be done after the installer has been run but I personally like to have it all done ahead of time if possible.
Libero SoC Design Suite InstallerOnce the installer of choice has been downloaded (web or full installer), the next step is to extract the compressed file to access the installer script.
I found that there was no top level folder created when extracting the compressed installer download so I created one to extract the installer into just to keep everything organized in my downloads folder:
~/Downloads$ mkdir -p Libero_SoC_v2024.2
~/Downloads$ cd ./Libero_SoC_v2024.2/
Then run the launch_installer.sh
script (I used the Archive Manager GUI in Ubuntu, but the extraction can also be done from the command line using unzip
):
~/Downloads/Libero_SoC_v2024.2$ sudo ./launch_installer.sh
The first page of the installer is the user agreements:
Followed by the installation directory selection in the next window. I personally left it at the default /usr/local/microchip/
location, but a different desired installation directory could be specified:
The common files directory is the next to be selected in the installer. I also left this at the default location, but if a different install location was selected in the previous window, the common directory should also be changed to be co-located with the installation directory.
After selecting the installation and common directories, the next window specifies the desired feature set to install. By default the complete Libero SoC Design Suite is selected, which is what I chose.
The next window displays a summary of the specified installation configuration to verify before proceeding with the installation:
The installer GUI will show installation status messages as it goes. A quick note that the web installer will take a bit longer to run since it's also downloading installation files as needed.
Overall, the installation process with the web installer took about 20 minutes on my PC and ultimately took up 28GB of hard drive space.
As I previously mentioned, I ran the package dependency checker scripts post installation to validate all libraries required were installed. I always recommend running these types of scripts as a sanity check:
~$ cd /usr/local/microchip/Libero_SoC_v2024.2/Libero/bin/check_linux_req/
/usr/local/microchip/Libero_SoC_v2024.2/Libero/bin/check_linux_req$ sudo ./check_linux_req.sh
/usr/local/microchip/Libero_SoC_v2024.2/Libero/bin/check_linux_req$ cd ../../bin64/check_linux_req/
/usr/local/microchip/Libero_SoC_v2024.2/Libero/bin64/check_linux_req$ sudo ./check_linux_req.sh
With the Libero SoC Design Suite IDE installed, the Microchip license daemon needs to be setup to manage and distribute the license(s) for the Libero software before the IDE is able to be launched.
Starting with Libero version 2024.2, the Microchip licensing daemon is actually built into its installation directory. It uses the lmgrd
license manager daemon with saltd
vendor daemon for version 2024.2 (compared to the mgcld
vendor daemon for all earlier versions).
Since the Microchip licensing daemon already built into this version of Libero and there isn't the need to download and setup manually, the next step is to create the FlexLM directory to place the actual license file (License.dat) into.
Create a directory in your home directory titled flexlm
and move the license file (License.dat) emailed to you from Microchip:
~$ mkdir -p flexlm
~$ mv ./Downloads/License.dat ./flexlm/
While the license file was generated with your specific software ID per the online require through Microchip's online portal (from the previous steps in this post), it still needs to be modified slightly before its ready for use.
Open License.dat with your preferred text editor and add your PC's MAC ID to the first line (be sure it's the same the license file was requested with).
The path to where the licensing daemons are located in Libero's installation directory also needs to be specified for the daemon services, as well as which vendor daemon should be used. As previously mentioned, since I'm using version 2024.2 saltd
is the vendor daemon I need to use:
SERVER localhost <my PC's MAC ID> 1702
#DAEMON actlmgrd PATH/actlmgrd
DAEMON actlmgrd /usr/local/microchip/Libero_SoC_v2024.2/Libero/bin/actlmgrd
# Starting Libero SOC v2024.2, customers are recommended to stop using mgcld and use saltd license daemon to support both ModelSim and QuestaSim.
#DAEMON mgcld PATH/mgcld
#DAEMON saltd PATH/saltd
#VENDOR snpslmd PATH/snpslmd
DAEMON saltd /usr/local/microchip/Libero_SoC_v2024.2/Libero/bin/saltd
VENDOR snpslmd /usr/local/microchip/Libero_SoC_v2024.2/Libero/bin/snpslmd
After saving and closing the license file, the final step is to set the necessary environment variables to be able to successfully launch the Libero SoC application.
You can either pass each of the following commands into a terminal every time, but I optioned to append them to my bash environment configuration file (~./.bashrc
) to always be available:
export LM_LICENSE_FILE=1702@localhost
export SNPSLMD_LICENSE_FILE=1702@localhost
export LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu/:/usr/lib/x86_64-linux-gnu/:/usr/lib/:/usr/local/lib/
export LANG=en_US.UTF-8
#export DISPLAY=:1
export PATH=/usr/local/microchip/Libero_SoC_v2024.2/Libero/bin:${PATH}
export QT_DEBUG_PLUGINS=1
Note: I had to remove the option telling Qt specifically to connect to display 1 before Libero would actually launch. I'm not sure if this is just a glitch in version 2024.2 or if the installation instructions on Microchip's website are just out-of-date since the latest documentation is all labeled as being for version 2023.1.
The final line enabling QT_DEBUG_PLUGINS
is not necessary, I just had it enabled to print errors messages during the launch process when specifying display 1 was causing an issue.
Finally, to actually launch Libero, start the license server then the Libero application:
~$ /usr/local/microchip/Libero_SoC_v2024.2/Libero/bin/lmgrd -c /home/whitney/flexlm/License.dat -log /tmp/lmgrd.log
~$ libero &
With the Libero install complete and the Microchip license server validated, the next step is to install Microchip's Eclipse-based IDE for software development, SoftConsole.
This is where Microchip's software can be a bit confusing, they don't keep a unified release version across all of their development tools like some other vendors do. They also don't have yearly releases either.
At the time of writing this tutorial, the latest version of SoftConsole is v2022.2 and it's the only version that supports writing applications to run on a RISC-V target. So even though, I've installed Libero v2024.2, I'm installing and using it with SoftConsole v2022.2.
Go to the SoftConsole product webpage here and click SoftConsole v2022.2 Download for Linux under the Latest Software tab to download the SoftConsole installer.
Once downloaded, make the installer executable and run with admin privileges:
~/Downloads$ chmod +x Microchip-SoftConsole-v2022.2-RISC-V-747-linux-x64-installer.run
~/Downloads$ sudo ./Microchip-SoftConsole-v2022.2-RISC-V-747-linux-x64-installer.run
Once the installer launches, start by accepting the licensing agreement.
Then specify the desired installation directory. I decided not to go with the default installation directory in favor of installing it in the same directory as Libero in /usr/local/microchip/
. This is just a personal preference of mine to keep all relevant design tools grouped together on my PC.
There is some third party software running under the hood of SoftConsole that also requires a license agreement:
Then click Forward when you get to the final configuration screen to start the installation.
Again, this installation process took about 25 minutes on my PC over Wi-Fi (side note, the SoftConsole installer is also a web installer that will require internet access while running).
Once completed, click Finish with the option to view the post-installation instructions enabled or disabled as desired, otherwise the post-installation instructions can be found here.
SoftConsole requires gcc, make, and build-essential for basic functionality, all of which I had covered with my enviroment prep section above that I install on every fresh Ubuntu image. SoftConsole's embedded web-browser uses the libwebkit2gtk-4.0-37
library which was the only thing I was missing from that list:
~$ sudo apt-get install libwebkit2gtk-4.0-37
SoftConsole uses Renode as an underlying development framework which mainly depends on the Mono framework that is provided by mono-project, therefore Mono needs to be installed and its package repository added to your environment:
~$ sudo apt install gnupg ca-certificates
~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
~$ echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
~$ sudo apt update
~$ sudo apt install mono-devel mono-complete
Finally there are a few more package dependencies Renode requires specifically not already covered in the previous section:
~$ sudo apt-get install realpath policykit-1 libgtk2.0-0 uml-utilities gtk-sharp2 rpm libarchive-tools ruby ruby-dev
~$ sudo gem install fpm
With the SoftConsole install complete and all underlying dependencies met, the final thing I like to do is launch the SoftConsole Eclipse IDE as a quick sanity check.
On Ubuntu, the SoftConsole IDE can be launch using the icon from the Applications view or from the command line.
When launched using the application icon, it will default to opening the last used workspace (or your home directory if it's the first launch or cache as been cleared).
To launch from the terminal, change directories into the installation location and run the application script:
~$ cd /usr/local/microchip/SoftConsole-v2022.2-RISC-V-747/
/usr/local/microchip/SoftConsole-v2022.2-RISC-V-747$ ./softconsole.sh
When launching from the terminal, the workspace will default to the examples directory for Softconsole:
Since I have a PolarFire Discovery Kit, I poked around in the example applications to see what all supported it:
Finally, the last step is to check that the programmer cables installed correctly and validate that they work.
Plug in you FlashPro programmer and target development FPGA board. In my case, the PolarFire SoC Discovery Kit board has an Embedded FlashPro5 (eFP5) chip populated on it to program and debug the device through a USB-to-JTAG channel via its USB C connector.
Once connected, use a command such as lsusb
to validate the Ubuntu system can recognize the Actel part. The vendor ID of 1514 validates that the system recognizes correctly it as a FlashPro5 part:
~$ lsusb | grep Actel
Bus 003 Device 014: ID 1514:2008 Actel Goodix USB2.0 MISC
Next, using the OpenOCD command line tool, validate that the underlying drivers for Libero and SoftConsole can establish a debug connection with the target SoC/CPU (which in my case is a PolarFire SoC):
~$ cd /usr/local/microchip/SoftConsole-v2022.2-RISC-V-747/openocd/bin/
/usr/local/microchip/SoftConsole-v2022.2-RISC-V-747/openocd/bin$ ./openocd -c "set DEVICE MPFS" -f board/microsemi-riscv.cfg
The configuration script was able to successfully identify the FlashPro port for my Discovery Kit board:
Info : JTAG tap: mpfs.cpu tap/device found: 0x0f8181cf (mfg: 0x0e7 (GateField), part: 0xf818, ver: 0x0)
As well as the ID code of the JTAG tap:
Info : 1 1742868453778 microsemi_flashpro_server.c:1751 microsemi_flashpro_initialize() FlashPro ports available: E2009O2VBB
Info : 2 1742868453778 microsemi_flashpro_server.c:1752 microsemi_flashpro_initialize() FlashPro port selected: E2009O2VBB
However there was no RISC-V IDCODE despite each of the PolarFire SoC harts responding, which I'm guessing is due to the default design on the board not being pre-programmed with a RISC-V design (it's brand new out of the box still).
Since I was concerned that the configuration wasn't able to identify the RISC-V IDCODE, I went ahead an pulled the reference design for the PolarFire Discovery Kit and built the FIR demo design for it so that I could open the FlashPro Express tool to see if it could successfully detect my board (because Libero doesn't seem to let you just do a JTAG boundary scan without have a project open and built to define the target it should be looking for).
I got a little worried when it initially didn't show up, when then I remembered that I still had the OpenOCD command line running tying up the JTAG port. And once I killed that process, my PolarFire SoC Discovery Kit board appeared as expected in the FlashPro Express tool in Libero.
Conclusion + Next StepsNow that I have all of the Microchip FPGA design tools and supporting packages installed, I'm ready to start developing a custom design on my PolarFire SoC Discovery kit. I'm thinking I'd like to explore some DSP applications and compare Microchip's CoreDDS IP to DDS IPs I've used in the past.
Comments
Please log in or sign up to comment.