Wednesday, 28 May 2014

[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.

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:

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.

Thanks a lot sir.I am new to ubuntu.I was facing no problem during normal use but when i tried to install model sim,I was unable to do so.These lines of code solved my problem.I am an Electronics Engineer.So i always need a Verilog/vhdl/Sys verilog Compiler. I also have my own website on HDLs[ If you have some free time ,please have a look and give some feedback.WEBSITE- www.veriloghdl.inEMAIL- veriloghdl.in@gmail.comYour feedback will be highly valuable,please email or comment there ]#FINAL_YEAR_ENGINEERING_STUDENT#INDIA

So I followed all of the steps and double checked that all the changes and files were downloaded/editted. But still getting the same fault. How can I find out what caused the fault? or should I try using a 32 install of ubuntu in a virtual machine

Hum - that is rather odd. Perhaps another build tool is missing? have you tried a "apt-get install build-essential" first? build-essential is a metapackage with a lot of the UNIX basic build tools under it.

I have thought about it however I don't have a file sharing system setup right now and I worry that these things age too quickly. If you build from scratch it will be the right one for your system pretty much all the time.Normally adding all the build tools and installing the dependencies are automatic if you follow the instructions.I shall have to look into serving a file from blogger or trying to get a third party to host it without it dissapearing etc.Matthew

I did all the step mentioned above, all them worked without getting an error, restarted my laptop still ./vsim gives me the error** Fatal: Read failure in vlm process (0,0)Segmentation fault (core dumped)Please help.Im using ubuntu 14.04

Hum, those look correct. Can you cd into the "linux" directory inside the modelsim directory and type "pwd; LD_LIBRARY_PATH=directory of modelsim/lib32 ldd ./vsim" and paste the command you ran and all the output?

It's in portuguese, but it says that the following signatures couldn't be verified because the public key wasn't available.The apt-get install alerted that 25 packages are not updated, but all the listed libraries were already up-to-date.

Oh dear - I think that your linux system is not updating properly which means you will be missing some pieces of the puzzle. That would lead to what you are seeing. It looks, and I am no expert, that your download server settings are broken. Please could you post the errors from apt-get on an ubuntu forum asking for help? When apt-get is working properly you can then try the advice again. Please post more when you have apt-get working cleanly.

I got tired of messing with this and that library, etc, etc... I used this incredibly heavy handed and ridiculous method. First, I did all the above to get a libfreetype (though, I think installing from the lib32 like Matthew Swabey would have been plenty). then I noticed ldd vsim pointed to some libs that exist in both /lib/x86_64-linux-gnu and in /lib/i386-linux-gnu ... also, gdb vsim (run) shows the sagfault in an x86_64 pthread library (comes with libc) ... so I did this:

I had the exact same problem. The ModelSim installed that was giving me this issue was from the Quartus II .tar bundle ~18GB.

Uninstalled it, went back to Altera website and downloaded the individual installer for ModelSim 10.3c~1.2GB and reinstalled again, and it works. Maybe the bundled installer is having some license file issues? OS is Ubuntu 14.04. And it works right way. No 32-bit library and font fixes were required (Btw many thanks to the original author-Matthew for this fix, it helped to get the previous version running without issues).

With this guide I was able to get vsim running from the bin directory, but the one in the linuxaloem directory (which Quartus uses) still segfaults. It maybe because I get a dpkg error trying to installl some of the 32-bit libs:

With this guide I was able to get vsim running from the bin directory, but the one in the linuxaloem directory (which Quartus uses) still segfaults. It maybe because I get a dpkg error trying to installl some of the 32-bit libs:

Hi Mr. Swabey,thank you for the post. I have had a problem with launch of vsim (to simulate a Leon3 processor). The error is the following:** Fatal: Read failure in vlm process (0,0)Segmentation fault (core dumped)I have performed all the steps but I have the same problem.My working environment is: 32-bit Ubuntu 13.04 running as Virtual Machine (host is a Windows 8), with ModelSim Starter Edition 13.1.Can you help me?If needed, I can re-run the steps and put messages in a comment.PS: sorry for a repeated question, but peoples in the previous posts that have had my same problem doesn't complete the discussion..

Hi Mr. Swabey,thank you for the post. I have had a problem with launch of vsim (to simulate a Leon3 processor). The error is the following:** Fatal: Read failure in vlm process (0,0)Segmentation fault (core dumped)I have performed all the steps but I have the same problem.My working environment is: 32-bit Ubuntu 13.04 running as Virtual Machine (host is a Windows 8), with ModelSim Starter Edition 13.1.Can you help me?If needed, I can re-run the steps and put messages in a comment.PS: sorry for a repeated question, but peoples in the previous posts that have had my same problem doesn't complete the discussion..

I'd like to thank you Mr. Swabey for the time and effort you have invested in this project and especially publishing this post. By following the instructions I ended up to the same out come as Alex Fuhr. The program must be started with ./vsim inside the folder /modelsim_ase/bin in order to avoid segfaulting. Sofar I have not encountered problem with compiling or simulating. I managed to compile simple vhd testbench without any errors and also the simulation worked fine.

So thank you very much and also thank you Alex Fuhr for trying the /bin executable!

Thank you for the time and effort to solve the problem and especially publishing these instructions. By following them I ended up to the same conclusion as Alex Fuhr. The program must be run from /modelsim_ase/bin folder in order to dodge segfaulting. Program seems to be working sofar, I managed to compile simple .vhd file and also simulating it worked without any problems whatsoever and the waveforms of the signals worked also.

So thank you mr. Swabey and mr. Fuhr for your posts and I wish you all the best!

It worked, but it took me a while to figure it out why it was not working after following all the steps in this tutorial. The problem, I believe, is the backup file of vsim that is created when opening the script to edit it with gedit (vsim~). Just by erasing this backup file should do it. I hope you find this helpful. :)

Consultancy

I am happy to discuss any of the topics or tools listed here for free, however if you want something done that will take a long time then I would be pleased to do some consultancy for you. Email me on matthew@swabey.org. If you are curious about my background and experience feel free to check my CV.

About Me

Boring but Important:

The views expressed on this website are my own and do not represent either the School of Electrical and Computer Engineering or the University of Purdue.

All items posted are done so in good faith in the hopes of being useful to people using the tools or technologies legally. If you feel any information here is objectionable or reveals important information please contact me to discuss having it modified or removed.