Showing posts with label Modelsim. Show all posts
Showing posts with label Modelsim. Show all posts

Monday, July 14, 2014

Making ModelSim vsim and Questa vco work on Ubuntu 14.04

In my previous article, http://mattaw.blogspot.com/2014/05/making-modelsim-altera-starter-edition.html, I covered how to install and run the ModelSim-ALTERA starter edition on Ubuntu 14.04.

Subsequently it turns out this fix also applies to Mentor Graphic's ModelSim and Mentor Graphic's Questa (not that surprising as Questa is a superset of ModelSim with far greater capabilities).

The previous instructions for ModelSim ALTERA work for ModelSim.

Here are the detailed instructions to apply the fix to Questa:

Firstly complete installing everything including compiling the new libfreetype libraries and copying them into the questasim directory.

Now we need to edit the vco launch script to ensure the new freetype libraries are used:
sudo vim bin/vco
Search for the following line:
dir=`dirname $arg0`
and underneath add the following new line:
export LD_LIBRARY_PATH=${dir}/lib32
 
Test by running vco and hopefully you will be greeted by the Questa GUI.

Please email me any fixes or changes you would like so I can update this post and give credit.

Wednesday, May 28, 2014

Making ModelSim ALTERA STARTER EDITION vsim 10.1d work on Ubuntu 14.04

[WARNING: Some people are reporting that following the steps for them does not fix the problem. I am working on trying to find out what the issue is.]

Trying to get a version of ModelSim running on a very modern version of Linux often presents challenges. Luckily I had lots of helpful information on the internet (major sources linked below) to get it going. This article mostly adapts the work done by the Arch Linux crew.

Problem number one: The free version of ModelSim Altera Edition is 32 bit only while the normal Linux PC will be 64 bit.

On Linux this requires us to install the 32 bit versions of the libraries that it depends on. Luckily this is fully supported on a modern Linux like Ubuntu 14.

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

Problem number two: If you have the following error when running vsim:

** Fatal: Read failure in vlm process (0,0)
Segmentation fault (core dumped)
 
Then you probably need to build a new version of freetype, a font setting library and modify ModelSim to use it. For an unknown reason ModelSim has an issue with modern versions shipping in Arch and Ubuntu 14.04. First download the source code of freetype 2.4.12:

http://download.savannah.gnu.org/releases/freetype/freetype-2.4.12.tar.bz2

Now install the build dependencies needed for libfreetype6, extract the source (using tar) and configure and build libfreetype:
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 directory to the directory where you installed ModelSim, /opt/altera/13.1/modelsim_ase/, on my system. Note you may need to edit the directory paths to match those used on your system.
sudo mkdir lib32
sudo cp ~/Downloads/freetype-2.4.12/objs/.libs/libfreetype.so* ./lib32
Now we need to edit the vsim launch script to ensure the new freetype libraries are used:
sudo vim bin/vsim
Search for the following line:
dir=`dirname $arg0`
and underneath add the following new line:
export LD_LIBRARY_PATH=${dir}/lib32
 
Test by running vsim and hopefully you will be greeted by the ModelSim GUI.

[Tested on fresh install of Ubuntu 14.04]

Sources:
  1. https://wiki.archlinux.org/index.php/Altera_Design_Software
  2. http://stackoverflow.com/questions/3261909/build-32bit-on-64-bit-linux-using-a-configure-script 
  3. https://wiki.debian.org/Multiarch/CrossDependencies

Tuesday, August 12, 2008

Update to AHB Slave Shenanigans and Massive Modelsim Migranes

AHB Slave Shenanigans: The HREADY signal is supposed to be an input from all the other AHB slaves such that they all can note that a slave is hanging the master.


Massive Modelsim Migranes: After a lot of messing about I found out the following solution (for 64 bit linux on amd64 and intel amd64 ext systems):

libhm = $MODEL_TECH/../linux_x86_64/libhm.sl

instead of the libhm.sl line in step 4 of this article from Xilinx. This applies to Modelsim SE 6.3f and the Rocket IO (or Rocket I/O?) module called MGT internally and the SmartModel SWIFT models included in Xilinx ISE9.2i.

Wednesday, August 6, 2008

AHB Slave Shenanigans and Massive Modelsim Migranes

Setting up and running an ARM AMBA bus is not too tricky, and it is quite a neat standard. However in this case my student seems to have copied a rather cunning implementation from Gaisler Research's GRLIB. However the AMBA standard document seems to be rather inconsistent one one point: The HREADY signal is defined to be an input and an output for all AHB slaves, but for the life of me I can't find another mention of it, nor does it seem sensible. I shall consult Prof Flynn who is working here, as he developed AMBA and has worked with it for many years. If you are thinking of making your own GPL'ed AHB slave look no further than the Gaisler Research ahbram.vhd.

Modelsim and smartmodels (specifically the Rocket IO, MGT smartmodel). Good grief, this is a non-trivial procedure. Compile the models, install the models then make lots of opaque changes to the modelsim.ini file and it still doesn't work! Don't know why yet, but will post when I do.

Laird Tpcm 7250 is as good as Honeywell PTM7950 as thermal paste / interface for PC

[This is not very scientific, however it is notable. At 7.5W/m-K vs the installed SYY-157 at 15.7 W/m-K it performed better in real world lo...