Difference between revisions of "Altera Design Software"

From ArchWiki
Jump to: navigation, search
(Flag out of date.)
(Update procedures for Quartus II Web Edition v13.0)
Line 2: Line 2:
 
[[Category:Mathematics and science]]
 
[[Category:Mathematics and science]]
 
[[zh-CN:Altera Design Software]]
 
[[zh-CN:Altera Design Software]]
This tutorial shows how to install the following softwares form the Altera ''Design Software''
+
This tutorial shows how to get, install and configure the following softwares from Altera:
* Quartus II (''Web edition'')
+
* Quartus II Web Edition v13.0
* USB-Blaster Driver
+
** USB-Blaster Download Cable Driver
* ModelSim (''starter edition'')
+
* ModelSim - Altera Starter Edition
{{Out of date|Only version 12.1 is provided in the download page. Need to update to the latest version.}}
+
== Quartus II ==
+
The following procedure shows how to install the '''10.2 sp2''' version of Quartus II
+
  
=== Installation ===
+
== Quartus II Web Edition v13.0 ==
  
Quartus II is downloadable at: https://www.altera.com/download/software/quartus-ii-we
+
The following procedure shows how to get, install and configure Altera Quartus II Web Edition v13.0 for Arch Linux.
Downloading Altera softwares requires registration. Once this is done, proceed with the download. Download the file ''12.0sp2_quartus_free_linux.tar.gz''.
+
Quartus II is Altera's big software collection to design and interact with about all their FPGAs/CPLDs/etc. products.
  
Once you have downloaded the file, unzip it. Now you can proceed with the installation
+
The procedure focuses on Arch Linux 64-bit systems, although guidelines are also provided for 32-bit installations.
$ cd <Download-folder>
+
$ sudo ./altera_installer/bin/altera_installer_gui --gui
+
  
Executing this script should open a setup GUI. Just follow the instructions. For the purpose of this tutorial, I assume that you are installing Quartus II in the {{ic|/opt/altera}} folder. Don't forget to select the file for the source of install if you don't want to download again quartus.
+
Quartus II Web Edition v13.0 is [http://www.altera.com/download/os-support/oss-index.html officially supported]
 +
for RHEL 5 and RHEL 6, but since it's one of those huge collections of proprietary software that doesn't
 +
interact so much with the distribution, it's fairly easy to install on Arch Linux.
  
Now you need to install manually the 64 bit edition
+
=== Getting Quartus II ===
$ cd <Download-folder>
+
$ sudo linux_installer/quartus_free_64bit/install
+
type your install folder path (/opt/altera)
+
choose "n" for not deleting the 32bit install
+
  
=== Libpng12 ===
+
In [http://dl.altera.com/13.0/?edition=web Altera's Downloads section], select Linux as the operating system
Quartus II requires libpng12 to work and can be found on aur.
+
and get the ''Combined Files'' tar archive (something like {{ic|Quartus-web-13.0.0.156-linux.tar}}).
 +
 
 +
=== 64-bit systems: get {{ic|lib32-glibc}} ===
 +
 
 +
64-bit systems will need [https://www.archlinux.org/packages/multilib/x86_64/lib32-glibc/ {{ic|lib32-glibc}}] in order to load the
 +
32-bit binary installer provided by Altera.
 +
 
 +
In order to install {{ic|lib32-glibc}} using Pacman, you need to enable the Multilib repository (if not already done). Open
 +
{{ic|/etc/pacman.conf}} and uncomment the following lines:
 +
 
 +
[multilib]
 +
Include = /etc/pacman.d/mirrorlist
 +
 
 +
Then, synchronize the repository.
 +
 
 +
# pacman -Sy
 +
 
 +
You should see {{ic|multilib}} being updated.
 +
 
 +
Next, simply install {{ic|lib32-glibc}}:
 +
 
 +
# pacman -S lib32-glibc
 +
 
 +
=== Installing ===
 +
 
 +
To install, first extract the downloaded tar archive:
 +
 
 +
$ tar -xvf Quartus-web-13.0.0.156-linux.tar
 +
 
 +
and launch {{ic|setup.sh}}. If you're going to install Quartus II anywhere outside your
 +
home directory, run it as root:
 +
 
 +
# ./setup.sh
 +
 
 +
You will then be asked to read thousands of lines of a license agreement. Simply press Enter
 +
and hold it down until you see a repeating question asking you to agree or not. Enter {{ic|y}}
 +
and press Enter.
 +
 
 +
When asked for the installation path, be careful not to put any space since Altera softwares
 +
do not like them in general. A standard install path is {{ic|/opt/altera/13.0}}.
 +
 
 +
Next, choose whatever software parts you want to include and accept your choice. Make sure to
 +
include the 64-bit option if you have a 64-bit Arch Linux system.
 +
 
 +
Quartus II will be installed and the install script will ask you to:
 +
 
 +
* create a desktop shortcut: '''say no'''
 +
* send feedback: '''say no'''
 +
* launch Quartus: '''say no'''
 +
 
 +
Before launching Quartus II, one more step is required.
 +
 
 +
=== One more step: a few required libraries ===
 +
 
 +
Quartus II requires {{ic|libpng12}} which is [https://www.archlinux.org/packages/community/x86_64/libpng12/ available on the AUR].
 +
If you're installing on a 32-bit system, get the i686 version. If you're installing on a 64-bit system, but planning to use the
 +
32-bit version of Quartus II, install {{ic|lib32-libpng12}}.
 +
 
 +
Also make sure you have the following libraries (regular packages):
 +
 
 +
* {{ic|libfreetype2}}
 +
* {{ic|libxrender}}
 +
* {{ic|libsm}}
 +
* {{ic|libxext}}
 +
* {{ic|fontconfig}}
 +
 
 +
If you are planning to run the 32-bit version of Quartus II on a 64-bit system, install the following packages from Multilib:
 +
 
 +
* {{ic|lib32-libfreetype2}}
 +
* {{ic|lib32-libxrender}}
 +
* {{ic|lib32-libsm}}
 +
* {{ic|lib32-libxext}}
 +
* {{ic|lib32-fontconfig}}
 +
 
 +
=== Launching Quartus II ===
 +
 
 +
Assuming you installed Quartus II in {{ic|/opt/altera/13.0}}, Quartus II binaries are located into {{ic|/opt/altera/13.0/quartus/bin}}.
 +
Run Quartus II (64-bit version):
 +
 
 +
$ /opt/altera/13.0/quartus/bin/quartus --64bit
 +
 
 +
or the 32-bit version:
 +
 
 +
$ /opt/altera/13.0/quartus/bin/quartus
  
 
=== Integrating Quartus II with the system ===
 
=== Integrating Quartus II with the system ===
Let's now add the Quartus bin folder to the {{ic|PATH}} variable as well as select if we want to run it in 64 bits mode. Create a {{ic|quartus.sh}} file in the {{ic|/etc/profile.d}} directory
+
 
 +
Quartus II can be integrated with the system in several ways, but those are optional.
 +
 
 +
==== {{ic|PATH}} variable ====
 +
 
 +
Let's now add the Quartus {{ic|bin}} folder to the {{ic|PATH}} variable so it can be executed without specifying its absolute path.
 +
Create a {{ic|quartus.sh}} file in the {{ic|/etc/profile.d}} directory
  
 
{{hc|/etc/profile.d/quartus.sh
 
{{hc|/etc/profile.d/quartus.sh
 
|2=<nowiki>
 
|2=<nowiki>
export PATH=$PATH:/opt/altera/quartus/bin
+
export PATH=$PATH:/opt/altera/13.0/quartus/bin
 
</nowiki>}}
 
</nowiki>}}
  
Other environment variables related to Quartus can be found in the official installation manual http://www.altera.com/literature/manual/quartus_install.pdf
+
Also, make sure it can be executed:
 +
 
 +
# chmod +x /etc/profile.d/quartus.sh
 +
 
 +
Please note that those {{ic|profile.d}} files are loaded at each ''login''. In the mean time, simply source
 +
that file in Bash:
  
And now you can try launching launching Quartus II
 
 
 
  $ source /etc/profile.d/quartus.sh
 
  $ source /etc/profile.d/quartus.sh
$ quartus
 
  
You can add Quartus II to your system application menu by creating a {{ic|quartus.desktop}} file in your {{ic|~/.local/share/applications}} directory
+
Other environment variables related to Quartus can be found in [http://www.altera.com/literature/manual/quartus_install.pdf the official installation manual].
 +
 
 +
Even if {{ic|quartus}} is now a command known by Bash, you still need to add the {{ic|--64bit}} argument in order to launch the 64-bit
 +
version. A shell alias, like {{ic|quartus64}}, is a great solution to avoid typing it each time.
 +
 
 +
==== Application menu entry ====
 +
 
 +
A freedesktop.org application menu entry (which a lot of desktop environments and window managers follow) can be added
 +
to the system by creating a {{ic|quartus.desktop}} file in your {{ic|~/.local/share/applications}}
 +
directory:
  
 
{{hc|~/.local/share/applications/quartus.desktop
 
{{hc|~/.local/share/applications/quartus.desktop
Line 51: Line 144:
 
[Desktop Entry]
 
[Desktop Entry]
 
Version=1.0
 
Version=1.0
Name=Quartus II
+
Name=Quartus II Web Edition v13.0
 
Comment=Quartus II design software for Altera FPGA's
 
Comment=Quartus II design software for Altera FPGA's
Exec=/opt/altera/quartus/bin/quartus
+
Exec=/opt/altera/13.0/quartus/bin/quartus --64bit
Icon=/opt/altera/quartus/adm/quartusii.png
+
Icon=/opt/altera/13.0/quartus/adm/quartusii.png
 
Terminal=false
 
Terminal=false
 
Type=Application
 
Type=Application
Line 60: Line 153:
 
</nowiki>}}
 
</nowiki>}}
  
=== USB-Blaster Driver ===  
+
=== USB-Blaster Download Cable Driver ===  
The USB-Blaster is a cable that allows you to download configuration data from you computer to you FPGA, CPLD or EEPROM configuration device. However Altera only provides support for RedHat Entreprise, SUSE Entreprise and Cent OS and we are required to do a little bit of work to make it work with Archlinux. If you want some more detail about this cable, please refer to http://www.altera.com/literature/ug/ug_usb_blstr.pdf
+
  
Create a new file :
+
The USB-Blaster Download Cable is a cable that allows you to download configuration data from your computer to your FPGA, CPLD or EEPROM configuration device. However,
 +
Altera only provides official support for RHEL, SUSE Entreprise and CentOS, so we are required to do a little bit
 +
of work to make it work with Arch Linux. If you want some more detail about this cable, please refer to
 +
the [http://www.altera.com/literature/ug/ug_usb_blstr.pdf USB-Blaster Download Cable User Guide].
 +
 
 +
Create a new udev rule:
 
{{hc|/etc/udev/rules.d/51-usbblaster.rules
 
{{hc|/etc/udev/rules.d/51-usbblaster.rules
 
|<nowiki>
 
|<nowiki>
Line 69: Line 166:
 
</nowiki>}}
 
</nowiki>}}
  
Then 'reload' that file using
+
Then, ''reload'' that file using {{ic|udevadm}}:
  
  $ sudo udevadm control --reload-rules
+
  # udevadm control --reload-rules
  
Now to check that everything is working, plug your FPGA or CPLD board using your USB-Blaster cable and run
+
To check that everything is working, plug your FPGA or CPLD board using your USB-Blaster Download Cable and run:
  
  $ sudo /opt/altera/quartus/bin/jtagconfig
+
  # /opt/altera/13.0/quartus/bin/jtagconfig
  
 
You should have an output similar to this one
 
You should have an output similar to this one
Line 82: Line 179:
 
   020B30DD  EP2C15/20
 
   020B30DD  EP2C15/20
  
If there seems to be an error message about linux64, create a symlink from linux to linux64 in /opt/altera/quartus
+
If there seems to be an error message about "linux64" and you didn't install the 64-bit version of Quartus II,
 +
create a symlink from {{ic|linux}} to {{ic|linux64}} in {{ic|/opt/altera/13.0/quartus}}:
 +
 
 +
# ln -s /opt/altera/13.0/quartus/linux /opt/altera/13.0/quartus/linux64
 +
 
 +
==ModelSim==
  
# ln -s linux linux64
+
{{Out of date|This section is intended for Quartus II v12.0 and should be updated for Quartus II v13.0}}
  
==Model Sim==
 
 
===Install===
 
===Install===
 
ModelSim is downloadable at: https://www.altera.com/download/software/modelsim-starter/12.0
 
ModelSim is downloadable at: https://www.altera.com/download/software/modelsim-starter/12.0

Revision as of 14:19, 9 May 2013

This tutorial shows how to get, install and configure the following softwares from Altera:

  • Quartus II Web Edition v13.0
    • USB-Blaster Download Cable Driver
  • ModelSim - Altera Starter Edition

Quartus II Web Edition v13.0

The following procedure shows how to get, install and configure Altera Quartus II Web Edition v13.0 for Arch Linux. Quartus II is Altera's big software collection to design and interact with about all their FPGAs/CPLDs/etc. products.

The procedure focuses on Arch Linux 64-bit systems, although guidelines are also provided for 32-bit installations.

Quartus II Web Edition v13.0 is officially supported for RHEL 5 and RHEL 6, but since it's one of those huge collections of proprietary software that doesn't interact so much with the distribution, it's fairly easy to install on Arch Linux.

Getting Quartus II

In Altera's Downloads section, select Linux as the operating system and get the Combined Files tar archive (something like Quartus-web-13.0.0.156-linux.tar).

64-bit systems: get lib32-glibc

64-bit systems will need lib32-glibc in order to load the 32-bit binary installer provided by Altera.

In order to install lib32-glibc using Pacman, you need to enable the Multilib repository (if not already done). Open /etc/pacman.conf and uncomment the following lines:

[multilib]
Include = /etc/pacman.d/mirrorlist

Then, synchronize the repository.

# pacman -Sy

You should see multilib being updated.

Next, simply install lib32-glibc:

# pacman -S lib32-glibc

Installing

To install, first extract the downloaded tar archive:

$ tar -xvf Quartus-web-13.0.0.156-linux.tar

and launch setup.sh. If you're going to install Quartus II anywhere outside your home directory, run it as root:

# ./setup.sh

You will then be asked to read thousands of lines of a license agreement. Simply press Enter and hold it down until you see a repeating question asking you to agree or not. Enter y and press Enter.

When asked for the installation path, be careful not to put any space since Altera softwares do not like them in general. A standard install path is /opt/altera/13.0.

Next, choose whatever software parts you want to include and accept your choice. Make sure to include the 64-bit option if you have a 64-bit Arch Linux system.

Quartus II will be installed and the install script will ask you to:

  • create a desktop shortcut: say no
  • send feedback: say no
  • launch Quartus: say no

Before launching Quartus II, one more step is required.

One more step: a few required libraries

Quartus II requires libpng12 which is available on the AUR. If you're installing on a 32-bit system, get the i686 version. If you're installing on a 64-bit system, but planning to use the 32-bit version of Quartus II, install lib32-libpng12.

Also make sure you have the following libraries (regular packages):

  • libfreetype2
  • libxrender
  • libsm
  • libxext
  • fontconfig

If you are planning to run the 32-bit version of Quartus II on a 64-bit system, install the following packages from Multilib:

  • lib32-libfreetype2
  • lib32-libxrender
  • lib32-libsm
  • lib32-libxext
  • lib32-fontconfig

Launching Quartus II

Assuming you installed Quartus II in /opt/altera/13.0, Quartus II binaries are located into /opt/altera/13.0/quartus/bin. Run Quartus II (64-bit version):

$ /opt/altera/13.0/quartus/bin/quartus --64bit

or the 32-bit version:

$ /opt/altera/13.0/quartus/bin/quartus

Integrating Quartus II with the system

Quartus II can be integrated with the system in several ways, but those are optional.

PATH variable

Let's now add the Quartus bin folder to the PATH variable so it can be executed without specifying its absolute path. Create a quartus.sh file in the /etc/profile.d directory

/etc/profile.d/quartus.sh
export PATH=$PATH:/opt/altera/13.0/quartus/bin

Also, make sure it can be executed:

# chmod +x /etc/profile.d/quartus.sh

Please note that those profile.d files are loaded at each login. In the mean time, simply source that file in Bash:

$ source /etc/profile.d/quartus.sh

Other environment variables related to Quartus can be found in the official installation manual.

Even if quartus is now a command known by Bash, you still need to add the --64bit argument in order to launch the 64-bit version. A shell alias, like quartus64, is a great solution to avoid typing it each time.

Application menu entry

A freedesktop.org application menu entry (which a lot of desktop environments and window managers follow) can be added to the system by creating a quartus.desktop file in your ~/.local/share/applications directory:

~/.local/share/applications/quartus.desktop
[Desktop Entry]
Version=1.0
Name=Quartus II Web Edition v13.0
Comment=Quartus II design software for Altera FPGA's
Exec=/opt/altera/13.0/quartus/bin/quartus --64bit
Icon=/opt/altera/13.0/quartus/adm/quartusii.png
Terminal=false
Type=Application
Categories=Development

USB-Blaster Download Cable Driver

The USB-Blaster Download Cable is a cable that allows you to download configuration data from your computer to your FPGA, CPLD or EEPROM configuration device. However, Altera only provides official support for RHEL, SUSE Entreprise and CentOS, so we are required to do a little bit of work to make it work with Arch Linux. If you want some more detail about this cable, please refer to the USB-Blaster Download Cable User Guide.

Create a new udev rule:

/etc/udev/rules.d/51-usbblaster.rules
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", RUN+="/bin/chmod 0666 %c"

Then, reload that file using udevadm:

# udevadm control --reload-rules

To check that everything is working, plug your FPGA or CPLD board using your USB-Blaster Download Cable and run:

# /opt/altera/13.0/quartus/bin/jtagconfig

You should have an output similar to this one

1) USB-Blaster [USB 1-1.1]
  020B30DD   EP2C15/20

If there seems to be an error message about "linux64" and you didn't install the 64-bit version of Quartus II, create a symlink from linux to linux64 in /opt/altera/13.0/quartus:

# ln -s /opt/altera/13.0/quartus/linux /opt/altera/13.0/quartus/linux64

ModelSim

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: This section is intended for Quartus II v12.0 and should be updated for Quartus II v13.0 (Discuss in Talk:Altera Design Software#)

Install

ModelSim is downloadable at: https://www.altera.com/download/software/modelsim-starter/12.0

You need to download these 3 files :

  • Modelsim v10.0d for Quartus II v12.0 (12.0_modelsim_ase_linux.tar.gz)
  • Service Pack 2 for Modelsim v10.0d (12.0sp2_modelsim_ase_linux.tar.gz)
  • Service Pack 1 for Modelsim v10.0d (12.0sp1_modelsim_ase_linux.tar.gz)

Unzip 12.0_modelsim_ase_linux.tar.gz

$ cd <Download-folder>
$ sudo ./setup

Executing this script should open a setup GUI. Just follow the instructions. For the purpose of this tutorial, I assume that you are installing Quartus II in the /opt/altera folder. Don't forget to select the file for the source of install if you don't want to download again quartus.

Repeat this procedure for the sp1 file then the sp2.

Compatibility with Archlinux

With the kernel 3.x

Modelsim has a problem with the version 3 of linux kernel. You need to edit the file to make it compatible :

change

/opt/altera/modelsim_ase/bin/vsim line 204
 *)                vco="linux_rh60" ;;

to

/opt/altera/modelsim_ase/bin/vsim line 204
 *)                vco="linux" ;;

Install libraries

Install library libxft and ncurses.

$ sudo pacman -S libxft ncurses libxext

For 64 bit edition, install these library from multilib repository

$ sudo pacman -S lib32-libxft lib32-ncurses lib32-libxext (from multilib repo)

Add icon to the system

You can add Modelsim to your system application menu by creating a modelsim.desktop file in your ~/.local/share/applications directory

~/.local/share/applications/modelsim.desktop
[Desktop Entry]
Version=1.0
Name=ModelSim
Comment=ModelSim simulation software for Altera FPGA's
Exec=/opt/altera/modelsim_ase/bin/vsim
Icon=/opt/altera/modelsim_ase/modesim.gif
Terminal=true
Type=Application
Categories=Development