0% found this document useful (0 votes)
150 views

Doing Tech Myself - Installation of Altera Quartus On Ubuntu 16.04 64bits

The document provides steps to install Altera Quartus II 13.0sp1 and troubleshoot issues on a 64-bit Ubuntu 16.04 system. It details downloading Quartus, running the setup, giving permissions to files, installing i386 libraries, and resolving errors with USB-Blaster and ModelSim by adding udev rules, installing more libraries, and editing configuration files.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views

Doing Tech Myself - Installation of Altera Quartus On Ubuntu 16.04 64bits

The document provides steps to install Altera Quartus II 13.0sp1 and troubleshoot issues on a 64-bit Ubuntu 16.04 system. It details downloading Quartus, running the setup, giving permissions to files, installing i386 libraries, and resolving errors with USB-Blaster and ModelSim by adding udev rules, installing more libraries, and editing configuration files.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Doing Tech Myself

Thursday, March 1, 2018

Installation of Altera Quartus on Ubuntu 16.04 64bits


Em Português

This post presents an installation procedure for Altera Quartus II 13.0sp1 on a 64bit Ubuntu system (16.04).

The steps here should be very similar to those performed on a 32bit system (14.04), except for some extra libraries that must be
installed.

1-Go to Altera Download Center: https://www.altera.com/downloads/download-center.html

2-Select
a Quartus II version. In my case, as I also have an old Cyclone II board, I had to download version 13.0sp1 - as this is the
latest version
to support Cyclone II family. Usually, for each version, there is a Subscription Edition and a Web Edition (which is free -
thus, choose this one!).

3-Decompress the file with tar -xvf

4-Execute ./setup.sh

First problem (this did not happen with the 32bits!): ./setup.sh: 1: exec: ./components/QuartusSetupWeb-13.0.1.232.run: Permission
denied

Thus, I had to give executing permission to QuartusSetupWeb-13.0.1.232.run.

chmod +x components/QuartusSetupWeb-13.0.1.232.run

Then the setup could start, but at end I had another permission error. Thus, I also gave executing permission to ModelSimSetup-
13.0.1.232.run and QuartusHelpSetup-13.0.1.232.run.

chmod +x components/QuartusHelpSetup-13.0.1.232.run

chmod +x components/ModelSimSetup-13.0.1.232.run

Then ./setup.sh again.

5-Choose installation directory: by default, it will be installed in ~/altera/13.0sp1

6-Select the components you want to install:

check the 64bit support;


in my case, I have a Cyclone II and two Cyclone IV boards, thus I will uncheck all other families;
let ModelSim Altera Starter Edition checked.

7-Wait some minutes for the installation to complete.

8-After
the installation is finished, execute the program. You'll be asked to configure the license. If you intend to use the Web Edition
(which is free - as in "free beer" not as in "free speech"), then choose the 2nd option: Run the Quartus II software.

Then quartus has started without any problem! And I was even able to compile a test code. However, after restarting my system,
quartus stopped working! The message was:

quartus: error while loading shared libraries: libSM.so.6: cannot open shared object file: No such file or directory

So, now is the time to install de i386 libraries! Maybe the ones I had to install are different from yours - depending on what you have
already on your system...

9- First, enable the i386 to run together with the  x86_64:

sudo dpkg --add-architecture i386


sudo apt-get update

10- now install one by one all of those libs that quartus is complaining about:

10.1-libSM.so.6 ->  sudo apt-get install libsm6:i386

Then try to run quartus again. I was in luck and only needed  libSM.so.6.

This solved the quartus problem! But, now you still might have to deal with usb-blaster problem and ModelSim problem:

-----------------------------------------------------------------------------------------------------------------

T.1-Trouble with USB-Blaster:


when trying to program my board, I've got a FAILED. The usb-blaster seem to be recognized in quartus
as USB-Blaster variant [2-2].

The first things to do is to check the drivers:

T.1.1-The command dmesg show some status of the several device drivers running on the machine. Following are last lines of my
dmesg. As you can see, it seems the Altera USB-Blaster is OK. Take a note on the idVendor and idProduct.

dmesg

[  384.855497] usb 2-2: new full-speed USB device number 3 using ohci-pci

[  385.140097] usb 2-2: New USB device found, idVendor=09fb, idProduct=6001

[  385.140106] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[  385.140112] usb 2-2: Product: USB-Blaster

[  385.140115] usb 2-2: Manufacturer: Altera

[  385.140119] usb 2-2: SerialNumber: 91d28408

T.1.2-We can also check the status of the usb devices with the command lsusb. Following is the line that matters in my lsusb. As you
can see, it seems it is recognized properly, with the same idVendor and idProduct that we saw with dmesg.

lsusb

Bus 002 Device 003: ID 09fb:6001 Altera Blaster

T.1.3-Then, you might check directly the jtagconfig command. In my case, I've got a problem! **You must type the path to where
jtagconfig is.

~/altera/13.0sp1/quartus/bin/jtagconfig

 1) USB-Blaster variant [2-2]

  Unable to lock chain (Insufficient port permissions)

Here
is the solution I've found (on google): You must create a new rule in /etc/udev/rules.d/ allowing the usb-blaster to use your usb
port.

T.1.4- With sudo privileges, create a file 51-altera- usb-blaster.rules in your /etc/udev/rules.d/. I'll be using gedit. You might prefer
another editor.

sudo gedit /etc/udev/rules.d/51-altera-usb-blaster.rules

 T.1.5- Copy the contents bellow to the file. Note that the idVendor and idProduct must be the same that you've found with dmesg.

SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666"

T.1.6- Now you must reload the rules in udev, by using the udevadm command. **Note that you must use sudo before.

sudo  udevadm control --reload

T.1.7- Now re-check the jtagconfig command. In theory,  only performing step T.1.6 should be enough - but, in my case, I also had to
reboot the machine!!!

~/altera/13.0sp1/quartus/bin/jtagconfig

1) USB-Blaster [2-2]

  020F70DD   EP3C120/EP4CE115

Now, everything looks fine! And quartus is programing my board.

-----------------------------------------------------------------------------------------------------------------

T.2-Trouble with ModelSim: when trying to execute ModelSim, the first error I've got was a

 Error: cannot find ./../linux_rh60/vsim

T2.1-The solution to this, I've found on https://askubuntu.com/questions/68146/modelsim-is-not-working-after-ubuntu-11-10-upgrade

Thus, we'll have edit the vsim script (we must wrtting permission - thus the gksu) and change the problematic line.

cd ~/altera/13.0sp1/modelsim_ase/

gksu gedit vsim

Search for the following line:

 *)                vco="linux_rh60" ;;

Now replace it with:

 *)                vco="linux" ;;

Save and try to execute vsim again.

T2.2-Now vsim will start complaining about the 32bit libraries. Thus, just like we did with quartus, we'll have to install them one by one.

T2.2.1-libXft.so.2 ->  sudo apt-get install libxft2:i386

Then try to run vsim again. I was in luck again and only needed  libXft.so.2.

T2.3-However, I had the problem below (which I also had on the 32bit Ubuntu - thus we already know the solution):

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

Segmentation fault (core dumped)

The solution to this problem I've found on http://mattaw.blogspot.com.br/2014/05/making-modelsim-altera-starter-edition.html

The
problem seems to be related with the fonts used in ModelSim not being compatible with the ones in Ubuntu. Thus, you'll need to
download and compile the source code of freetype 2.4.12.

T2.3.1- download the source-code at http://download.savannah.gnu.org/releases/freetype/freetype-2.4.12.tar.bz2

T2.3.2- uncompress it:

tar -xjvf  freetype-2.4.12.tar.bz2

T2.3.3- build it:

cd  freetype-2.4.12   

./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"

T2.3.4- Contrary to the 32bit Ubuntu, now I have a dependency problem. Thus, install the dependencies:

sudo apt-get install libc6-dev-i386

T2.3.5- Try to build it again (do not forget the make!!!):

./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"

make -j8

T2.3.6-
copy the built fonts to ModelSim (check the correct paths - both the path of ModelSim as well as the path were the fonts have
been built):

mkdir ~/altera/13.0sp1/modelsim_ase/lib32

cp ~/Downloads/freetype-2.4.12/objs/.libs/libfreetype.so* ~/altera/13.0sp1/modelsim_ase/lib32

T2.3.5-
now you must inform ModelSim to look for the new fonts at the directory
lib32 you just created. Thus, you are going to edit the
vco script (at your modelSim path). Just be sure you have writing permission to vco.

cd ~/altera/13.0sp1/modelsim_ase/

gksu gedit vco

T2.3.6- find the line which contains "dir=`dirname $arg0`"

T2.3.7- just below that line, insert the following:

export LD_LIBRARY_PATH=${dir}/lib32

Now ModelSim should work fine!

wcs
at
8:01 AM

Share

No comments:

Post a Comment

‹ Home ›
View web version

About Me

wcs
View my complete profile

Powered by Blogger.

You might also like