Lesson 15 of 19 ↓
- 1.Fedora + Distrobox + Arch + AUR Setup Guide
- 2.Enabling Hibernate on Linux
- 3.A Practical Git Workflow
- 4.Useful Linux Commands & Tips
- 5.Mirroring Your Android Screen with Scrcpy
- 6.Downloading Media with Yt-dlp
- 7.Consistent C/c++ Style with Clang-format
- 8.Auto-mounting Drives at Boot
- 9.Customizing Grub
- 10.Linux Swap Files Explained
- 11.Zram: Compressed Swap in Ram
- 12.Custom App Launch Behavior Via .desktop Files
- 13.Custom Mime Icons in Gnome
- 14.Fixing Missing Dock Icons (startupwmclass)
- 15.Installing Questasim for Hdl Simulation
- 16.Building Python 2 From Source
- 17.Auto-Starting WhatsApp and Telegram (Minimized or Tray)
- 18.Custom Neovim Configuration Guide
- 19.Running Windows Applications on Linux Seamlessly with WinBoat (Docker)
2 min read
Installing Questasim for Hdl Simulation
QuestaSim is Mentor Graphics' HDL simulator, commonly used for Verilog/VHDL verification work. Getting 2021.2 running on a modern Ubuntu or Fedora install takes a bit of work, since it needs 32-bit compatibility libraries and a Python 2.7 environment purely for license generation — neither of which ships by default anymore.
Install Dependencies
Ubuntu/Debian:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y \
libxft2 libxft2:i386 \
lib32ncurses6 \
libxext6 libxext6:i386 \
build-essential wget curlFedora:
sudo dnf install -y \
libXft libXft.i686 \
ncurses-compat-libs.i686 \
libXext libXext.i686 \
gcc gcc-c++ make wget curlInstall Python 2.7 (for the License Generator Only)
Questa's license generator script needs Python 2.7, which no longer ships by default on modern distros. Build it from source:
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
tar xvf Python-2.7.18.tgz
cd Python-2.7.18
./configure --enable-optimizations
make -j$(nproc)
sudo make altinstallpython2.7 --version
sudo ln -s /usr/local/bin/python2.7 /usr/local/bin/python2Install pip for it:
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
sudo python2.7 get-pip.py
pip2 --versionIf a system-wide install isn't desirable, Python 2.7 can instead be built into a private prefix (e.g.
./configure --prefix=$HOME/myApps/python2) and aliased via~/.bashrc, or wrapped in avirtualenv— either avoids touching anything outside your home directory.
Generate the License
Get the host ID:
ip addr showRun the license generator against it:
cd /path/to/mgclicgen
python2 mgclicgen.py <hostid>This produces license.dat.
Install Questasim
./path/to/questa_sim-2021.2_1.aolFollow the GUI installer (a typical install path is /opt/questasim).
Copy the License Files and Verify
cp /path/to/license.dat /path/to/pubkey_verify /path/to/questasim
./pubkey_verify -yConfigure Environment Variables
export PATH="/path/to/questasim/linux_x86_64:$PATH"
export PATH="/path/to/questasim/RUVM_2021.2:$PATH"
export LM_LICENSE_FILE="/path/to/license.dat:$LM_LICENSE_FILE"Add the same three lines to ~/.bashrc to make them permanent, then source ~/.bashrc.
Test It
vsimThe GUI opening with no license errors means the install succeeded.
Optional: a Desktop Launcher
nano ~/.local/share/applications/questasim.desktop[Desktop Entry]
Version=1.0
Type=Application
Name=QuestaSim
Comment=Mentor Graphics QuestaSim
Exec=/path/to/questasim/bin/vsim -gui
Icon=/path/to/QuestaSim.png
Terminal=false
Categories=Development;
StartupNotify=true
StartupWMClass=Vsimchmod +x ~/.local/share/applications/questasim.desktop
update-desktop-database ~/.local/share/applicationsNote
QuestaSim requires the 32-bit compatibility libraries above — on Fedora specifically, make sure the
.i686packages are installed, not just their 64-bit counterparts. Python 2.7 is needed only for license generation, nowhere else in the workflow.
Comments
Loading the discussion…