Difference between revisions of "Altera Design Software"

From ArchWiki
Jump to navigation Jump to search
m (here it wasn't working because the jtag device was plugged and the new permission was not loading)
(fix header, update interlanguage links (https://github.com/lahwaacz/wiki-scripts/blob/master/update-interlanguage-links.py))
Line 1: Line 1:
[[Category:Mathematics and science]]
[[Category:Mathematics and science]]
[[zh-CN:Altera Quartus II and ModelSim-Altera Edition Design Software]]
[[zh-CN:Altera Design Software]]
This tutorial shows how to download, install, and configure the following software from Altera:
This tutorial shows how to download, install, and configure the following software from Altera:
* Quartus II Subscription Edition v15.0
* Quartus II Subscription Edition v15.0

Revision as of 13:20, 19 July 2015

zh-CN:Altera Design Software This tutorial shows how to download, install, and configure the following software from Altera:

  • Quartus II Subscription Edition v15.0
    • USB-Blaster (I and II) Download Cable Driver
  • ModelSim-Altera Edition 10.3d (As included with Quartus II Subscription Edition v15.0)
Note: The following tutorial works for older Quartus II and ModelSim versions, including both Subscription Editions and Web Editions, from at-least v13.0 through v15.0.

Quartus II Subscription Edition

The following procedure shows how to download, install, and configure Altera Quartus II Subscription Edition v15.0 for Arch Linux.

Note: The following tutorial works for older Quartus II and ModelSim versions, including both Subscription Editions and Web Editions, from at-least v13.0 through v15.0.

Quartus II is Altera's design software collection to design and interact with all their FPGAs/CPLDs/etc. products.

The procedure focuses on Arch Linux 64-bit systems, although 32-bit installations should work fine too.

Quartus II Subscription Edition v15.0 is officially supported for RHEL 5 and RHEL 6, but since it is one of those huge collections of proprietary software that does not interact so much with the distribution, it is fairly easy to install on Arch Linux.

Get Quartus II

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

Install dependencies

Although the main Quartus II software is 64-bit, lots of Altera tools shipped with Quartus II are still 32-bit softwares. Those include the Nios II EDS and Qsys, for example. This is why we need to install lots of lib32- libraries and other programs from the Arch Linux Multilib repo. Obviously, if you have a 32-bit Arch Linux system, you do not need the Multilib versions.

In order to install Multilib packages using pacman, you need to enable the multilib repository first (if not already done).

All the packages required below are taken from Altera Software Installation and Licensing (sect. 1-4).

Let us first install the native versions of the required packages: expat fontconfig freetype2 glibc gtk2 libcanberra libpng libpng12AUR libice libsm util-linux ncurses tcl tcllib zlib libx11 libxau libxdmcp libxext libxft libxrender libxt libxtst.

And the Multilib versions: lib32-expat lib32-fontconfig lib32-freetype2 lib32-glibc lib32-gtk2 lib32-libcanberra lib32-libpng lib32-libpng12AUR lib32-libice lib32-libsm lib32-util-linux lib32-ncurses lib32-zlib lib32-libx11 lib32-libxau lib32-libxdmcp lib32-libxext lib32-libxft lib32-libxrender lib32-libxt lib32-libxtst.

You are now ready to install and launch Quartus II.


Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: The installation should be handled with pacman through a PKGBUILD. (Discuss in Talk:Altera Design Software#)

To install, first extract the downloaded tar archive:

$ tar -xvf Quartus-

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

# ./setup.sh

You will probably get a GUI install wizard if you installed all the aforementioned packages. You might also get a command-line interactive install wizard, which will do the same.

The default install path is /root/altera/15.0, but some prefer /opt/altera/15.0, which we assume for the rest of this document.

Make sure to include the 64-bit option of Quartus II when installing.

Launching Quartus II

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

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

or the 32-bit version:

$ /opt/altera/15.0/quartus/bin/quartus

All other Altera tools, like Qsys, the Nios II EDS, Chip Planner and SignalTap II may be launched without any problem from the Tools menu of Quartus II.

Integrating Quartus II with the system

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

PATH variable

Let us 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

export PATH=$PATH:/opt/altera/15.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 - Quartus II

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:

[Desktop Entry]
Name=Quartus II Subscription Edition v15.0
Comment=Quartus II design software for Altera FPGA's
Exec=/opt/altera/15.0/quartus/bin/quartus --64bit

Subscription Edition License Validation

Configuring the path to your Quartus II Subscription Edition license file from the Quartus II settings interface is not enough for successful license validation. The license validation routine looks for your MAC address on device eth0. This was the legacy name for your ethernet controller; now systemd dynamically allocates a name to your device on boot - this can be different from machine to machine. We need to rename that device back to the expected eth0.

Create a new udev rule:

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="eth0"

where xx:xx:xx:xx:xx:xx is your networking device's IP address. Then, reload that file using udevadm:

# udevadm control --reload

The Quartus II Subscription Edition license validation routine also uses the deprecated networking tool ifconfig to validate your networking devices MAC address as per your Quartus II license. The deprecated networking package net-tools contains the ifconfig tool. Thus one must also install the net-tools package for Quartus II Subscription Edition licensing validation success.

USB-Blaster Download Cable Driver

The USB-Blaster (I and II) 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:

SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6002", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6003", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6010", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6810", MODE="0666"

Then, reload that file using udevadm (disconnect any Altera device from port USB port before this command):

# udevadm control --reload

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

$ /opt/altera/15.0/quartus/bin/jtagconfig

You should have an output similar to this one

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

If jtagconfig output does not contain board name, you might have problems with launching nios2 tools. In order to workaround this issue, you should copy jtagd settings to /etc/jtagd:

# mkdir /etc/jtagd
# cp /opt/altera/15.0/quartus/linux/pgm_parts.txt /etc/jtagd/jtagd.pgm_parts

and restart jtagd:

$ jtagconfig
1) USB-Blaster [2-4]
$ killall jtagd
$ jtagd
$ jtagconfig
1) USB-Blaster [2-4]
020F30DD EP3C25/EP4CE22

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

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

ModelSim-Altera Edition


ModelSim-Altera Edition 10.3d is downloaded and installed from the Combined Files tar archive Quartus- as part of the Quartus II installation procedure above.

Compatibility with Archlinux

With the kernel 4.x and Upwards

Note: ModelSim Starter Edition installation uses the path /opt/altera/15.0/modelsim_ase/ where ModelSim Subscription Edition installation uses the path /opt/altera/15.0/modelsim_ae/; the following assumes the ModelSim Subcription Edition installation.

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


/opt/altera/15.0/modelsim_ae/bin/vsim line 210
 *)                vco="linux_rh60" ;;


/opt/altera/15.0/modelsim_ae/bin/vsim line 210
 *)                vco="linux" ;;

With freetype2

The upgrade from freetype2 version to (October 2013[1]) causes the following error in ModelSim:

$ vsim
Error in startup script:
Initialization problem, exiting.
Initialization problem, exiting.
Initialization problem, exiting.
   while executing
   (procedure "PropertiesInit" line 3)
   invoked from within
   invoked from within
"ncFyP12 -+"
   (file "/opt/questasim/linux_x86_64/../tcl/vsim/vsim" line 1)
** Fatal: Read failure in vlm process (0,0)

There are two solutions to solve this problem. The first involves downgrading the Package ( http://seblu.net/a/arm/2013/10/11/multilib/os/x86_64/lib32-freetype2- or http://seblu.net/a/arm/2013/10/11/extra/os/x86_64/freetype2- ). The second and more elegant solution involves replacing the old freetype version for ModelSim only without withholding updates on the whole system (originally proposed at the now-dead link http://communities.mentor.com/mgcx/message/46770):

  • Copy the freetype library and simlinks somewhere in the altera folder, eg: $HOME/altera/xx.x/lib32/
  • Edit the ModelSim script in /opt/altera/15.0/modelsim_ae/bin/vsim and add near the top (after the #!/bin/sh)
export LD_LIBRARY_PATH=/home/user/altera/xx.x/lib32
Note: The quartus script will need to have write permissions added to it.

When ModelSim is launched directly from Quartus the error may persist. In this case, add the same line to quartus/bin/quartus_sh.

Install libraries

Install library libxft and ncurses: libxft, ncurses, libxext.

For 64 bit edition, install these library from multilib repository: lib32-libxft, lib32-ncurses, lib32-libxext.

Application Menu Entry - ModelSim-Altera Edition

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

[Desktop Entry]
Name=ModelSim-Altera Edition 10.3d
Comment=ModelSim simulation software for Altera FPGA's

Resolving the "ModelSim Failed to access library 'work'" error

The solution was originally documented here: http://jackeyblog.blogspot.com/2005/07/note-myself-modelsim-failed-to-access.html

If you receive the error:

Error: (vcom-19) Failed to access library 'work' at "work". 

when running a simulation in a new directory, you must create a new work directory. Execute the following in the ModelSim console:

ModelSim> vlib work