Modelsim relies a some 32-bit libraries that are not all easily avaliable on Fedora 31, this guide will walk you through the different steps needed to get it running.
The following 32-bit libraries are required for Modelsim to work:
- unixODBC.i686
- unixODBC-devel.i686
- ncurses-compat-libs.i686
- zeromq-devel.i686
- libXext.i686
- alsa-lib.i686
- libXtst.i686
- libXft.i686
- libxml2.i686
- libedit.i686
- libX11.i686
- libXi.i686
sudo dnf install unixODBC.i686 unixODBC-devel.i686 ncurses-compat-libs.i686 zeromq-devel.i686 libXext.i686 alsa-lib.i686 libXtst.i686 libXft.i686 libxml2.i686 libedit.i686 libX11.i686 libXi.i686
Next we need to install modelsim somewhere on the system (/opt/intelFPGA
for example). Once it is installed, navigate to the bin directory (/opt/intelFPGA/19.1/modelsim_ase/bin
) and modify vsim in a text editor (as root, since it is read only). There are two changes we need here:
- Find the line that contains
mode=$(MTI_VCO_MODE:-"")
and change it tomode=$(MTI_VCO_MODE:-"32")
- Find the line that contains
vco="linux_rh60"
and change it tovco="linux"
The tarball for this library can be downloaded from here but before we can compile this library, we need to install two packages:
sudo dnf install glibc-devel.i686 libxml2-devel.i686
Next, we need to set up a location for keeping our manually compiled 32-bit libraries:
sudo mkdir /opt/intelFPGA/19.1/modelsim_ase/lib32
We need to now modify vsim (/opt/intelFPGA/19.1/modelsim_ase/bin/vsim
) so it is aware of this directory. Find the line that contains dir=`dirname $arg0`
and add the following line below it export LD_LIBRARY_PATH=${dir}/lib32
. Now we can extract, compile and install the library as follows:
tar -xzvf fontconfig-2.12.6.tar.gz
cd fontconfig-2.12.6
./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" --enable-libxml2
make -j8
sudo cp objs/.libs/libfreetype.so* /opt/intelFPGA/19.1/modelsim_ase/lib32
The tarball can be downloaded from here and installed as follows:
tar -xjvf freetype-2.4.12.tar.bz2
cd freetype-2.4.12
./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
make -j8
sudo cp objs/.libs/libfreetype.so* /opt/intelFPGA/19.1/modelsim_ase/lib32
Now you should be able to run modelsim (hopefully).
I adapted parts of this guide to instead run modelsim in a toolbox container which seems to work:
https://gist.github.com/vchernin/04b30f0eb72385592d4a2ece615476a8
Thanks for writing this one up!