Install ModelSim on Linux

To use ModelSim on Linux is quite difficult. There is only .exe. file for installing ModelSim on Windows on the official website (https://www.mentor.com/products/fpga/model/). Here, I’m going to share some experiences about installing ModelSim on Linux.

Install

  • First, you need to download the .run file from https://drive.google.com/file/d/0BxghKvvmdklCSm0yTFJJYjNYQXM/view or the official website http://fpgasoftware.intel.com/?product=modelsim_ae#tabs-2.
  • Then you run:
chmod +x ModelSimSetup-16.1.0.196.run
./ModelSimSetup-13.1.0.162.run

The UI for installation will show up. And you can easily follow the UI to complete the installation.

  • Change to the directory intelFPGA/16.1/modelsim_ase/bin/, and run ./vsim to open ModelSim.

However…

There are a number of errors that prevent us from opening ModelSim.

  • If you get:

./…/linux/vish: error while loading shared libraries: libXft.so.2: cannot open shared object file: No such file or directory

Generally, our Linux system is 64-bit, but ModelSim is 32-bit. So we need to install some 32-bit Libs using the following commands.

sudo dpkg --add-architecture i386

sudo apt-get update

sudo apt-get install build-essential

sudo apt-get install gcc-multilib g++-multilib \
lib32z1 lib32stdc++6 lib32gcc1 \
expat:i386 fontconfig:i386 libfreetype6:i386 libexpat1:i386 libc6:i386 libgtk-3-0:i386 \
libcanberra0:i386 libpng12-0:i386 libice6:i386 libsm6:i386 libncurses5:i386 zlib1g:i386 \
libx11-6:i386 libxau6:i386 libxdmcp6:i386 libxext6:i386 libxft2:i386 libxrender1:i386 \
libxt6:i386 libxtst6:i386

There are many Libs in the last apt-get install. I got an error with libpng12-0:i386, then I just simply delete this Lib.

  • If you get:

Fatal: Read failure in vlm process (0,0)

This means we need a new version of freetype.
First, download the .tar.bz2 file from http://download.savannah.gnu.org/releases/freetype/freetype-2.4.12.tar.bz2.
Then, run the following commands:

sudo apt-get build-dep -a i386 libfreetype6
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

The finished libraries are now available inside the “objs/.libs” directory. As they are necessary to run ModelSim we need to copy them into the install directory so they don’t get lost and then modify ModelSim’s vsim script to use the new libraries instead of the system wide versions.
Change to the directory intelFPGA/16.1/modelsim_ase, and then run:

sudo mkdir lib32
sudo cp ~/Downloads/freetype-2.4.12/objs/.libs/libfreetype.so* ./lib32
sudo vim bin/vsim

Find the line

dir=`dirname $arg0`

And add

export LD_LIBRARY_PATH=${dir}/lib32
  • If you get:

Error: cannot find “bin/…/linux_rh60/vsim”

Run

intelFPGA/16.1/modelsim_ase/vco

and change “linux_rh60” into “linux”

References

  1. https://github.com/kevinsala/multicore-architecture/wiki/Running-ModelSim-on-Linux
  2. https://mattaw.blogspot.com/2014/05/making-modelsim-altera-starter-edition.html
  3. https://wiki.archlinux.org/index.php/Altera_Design_Software#With_the_kernel_4.x_and_Upwards

你可能感兴趣的:(Install ModelSim on Linux)