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

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
  • 6
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值