This tutorial shows how to download, install, and configure the following software from Altera:
- Quartus II Subscription Edition v14.1
- USB-Blaster (I and II) Download Cable Driver
- ModelSim-Altera Edition 10.3c (As included with Quartus II Subscription Edition v14.1)
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 v14.1.
Quartus II Subscription EditionThe following procedure shows how to download, install, and configure Altera Quartus II Subscription Edition v14.1 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 v14.1.
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 v14.1 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.
Get Quartus IIIn
Altera's Downloads section, select Linux as the operating system and get the
Combined Files tar archive (something like Quartus-14.1.0.186-linux-complete.tar).
Install dependenciesAlthough 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 don't need the Multilib versions.
In order to install Multilib packages using
pacman, you need to enable the
multilib repository first (if not already done).
You are now ready to install and launch Quartus II.
Installing | This article or section needs language, wiki syntax or style improvements.Reason: The installation should be handled with pacman through a PKGBUILD. (Discuss)
| |
To install, first extract the downloaded tar archive:
$ tar -xvf Quartus-14.1.0.186-linux-complete.tarand launch setup.sh. If you're going to install Quartus II anywhere outside your home directory, run it as root:
# ./setup.shYou 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/14.1, but some prefer /opt/altera/14.1, which we assume for the rest of this document.
Make sure to include the 64-bit option of Quartus II when installing.
Launching Quartus IIAssuming you installed Quartus II in /opt/altera/14.1, Quartus II binaries are located into /opt/altera/14.1/quartus/bin. Run Quartus II (64-bit version):
$ /opt/altera/14.1/quartus/bin/quartus --64bitor the 32-bit version:
$ /opt/altera/14.1/quartus/bin/quartusAll 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 systemQuartus II can be integrated with the system in several ways, but those are optional.
PATH variableLet'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.shexport PATH=$PATH:/opt/altera/14.1/quartus/binAlso, make sure it can be executed:
# chmod +x /etc/profile.d/quartus.shPlease 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.shEven 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 IIA 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.0Name=Quartus II Subscription Edition v14.1Comment=Quartus II design software for Altera FPGA'sExec=/opt/altera/14.1/quartus/bin/quartus --64bitIcon=/opt/altera/14.1/quartus/adm/quartusii.pngTerminal=falseType=ApplicationCategories=DevelopmentUSB-Blaster Download Cable DriverThe 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:
/etc/udev/rules.d/51-altera-usb-blaster.rulesSUBSYSTEM=="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:
# udevadm control --reloadTo check that everything is working, plug your FPGA or CPLD board using your USB-Blaster Download Cable and run:
$ /opt/altera/14.1/quartus/bin/jtagconfigYou should have an output similar to this one
1) USB-Blaster [USB 1-1.1] 020B30DD EP2C15/20If jtagconfig output doesn't 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/14.1/quartus/linux/pgm_parts.txt /etc/jtagd/jtagd.pgm_partsand restart jtagd:
$ jtagconfig1) USB-Blaster [2-4]020F30DD $ killall jtagd$ jtagd$ jtagconfig1) USB-Blaster [2-4]020F30DD EP3C25/EP4CE22If 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/14.1/quartus:
# ln -s /opt/altera/14.1/quartus/linux /opt/altera/14.1/quartus/linux64ModelSim-Altera EditionInstallModelSim-Altera Edition 10.3c is downloaded and installed from the Combined Files tar archive Quartus-14.1.0.186-linux-complete.tar as part of the Quartus II installation procedure above.
Compatibility with ArchlinuxWith the kernel 3.xNote: ModelSim Starter Edition installation uses the path /opt/altera/14.1/modelsim_ase/ where ModelSim Subscription Edition installation uses the path /opt/altera/14.1/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 :
change
/opt/altera/14.1/modelsim_ae/bin/vsim line 210 *) vco="linux_rh60" ;;to
/opt/altera/14.1/modelsim_ae/bin/vsim line 210 *) vco="linux" ;;With freetype2 2.5.0.1-1The upgrade from freetype2 version 2.5.0.1-1 to 2.5.0.1-2 (October 2013
[1]) causes the following error in ModelSim:
$ vsimError in startup script:Initialization problem, exiting.Initialization problem, exiting.Initialization problem, exiting. while executing"EnvHistory::Reset" (procedure "PropertiesInit" line 3) invoked from within"PropertiesInit" invoked from within"ncFyP12 -+" (file "/opt/questasim/linux_x86_64/../tcl/vsim/vsim" line 1)** Fatal: Read failure in vlm process (0,0)- Copy the freetype library and simlinks somewhere in the altera folder, eg: $HOME/altera/xx.x/lib32/
libfreetype.solibfreetype.so.6libfreetype.so.6.10.2- Edit the ModelSim script in /opt/altera/14.1/modelsim_ae/bin/vsim and add near the top (after the #!/bin/sh)
export LD_LIBRARY_PATH=/home/user/altera/xx.x/lib32Note: The quartus script will need to have write permissions added to it.
Install librariesInstall library libxft and ncurses.
$ sudo pacman -S libxft ncurses libxextFor 64 bit edition, install these library from multilib repository
$ sudo pacman -S lib32-libxft lib32-ncurses lib32-libxextApplication Menu Entry - ModelSim-Altera EditionYou 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.0Name=ModelSim-Altera Edition 10.3cComment=ModelSim simulation software for Altera FPGA'sExec=/opt/altera/14.1/modelsim_ae/bin/vsimIcon=/opt/altera/14.1/modelsim_ae/modesim.gifTerminal=trueType=ApplicationCategories=DevelopmentResolving the "ModelSim Failed to access library 'work'" errorIf 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