Introduction

This document provides information on installation and setup of Quartus II v8.1 under Ubuntu 8.04 (Hardy Heron). At the end of this how-to you should be able to use Quartus II IDE both to design digital circuits and to load them in Altera devices using the following configuration:

Although it is possible that the following instructions work under a different version of Ubuntu, it is very important to use the indicated version of Quartus II software, as it has been reported that previous releases have some problems during installation on Linux flavors that are different from the ones officially supported (Red Hat Linux Enterprise 4/5 (32/64 bit), SUSE Linux Enterprise 9 (32/64-bit) and CentOS 4/5 (32/64 bit)).

About Quartus II

At the time of writing this document, Altera provides Quartus II software in two different versions:

Quartus II Web Edition - Free version available only for Windows

Quartus II Subscription Edition - Free 30 day trial. After that period, subscription license is required. Available for Windows and Linux

Although Quartus II Subscription Edition needs a license in order to work, several command line tools that are provided as part of the installation can be used without the need of it. Two important commands of these tools that we will use are jtagd and jtagconfig.

jtagd communicates with and loads compiled designs into Altera devices using JTAG standard in two different connection modes:

Local mode - The Altera device is fisically connected to the computer in which jtagd is running

Remote mode - The Altera device is fisically connected to a remote computer that acts as a server. Quartus II software running on the local computer communicates with the remote Altera device via the remote server

jtagconfig allows us to register and configure connection cables and Altera devices, and setup jtagd to act as a JTAG server

Setting up configuration

The following is a big picture of the steps that will be explained in the following sections:

Install Quartus II Web Edition in the guest system to be able to create, compile and load designs into Altera devices

Install Quartus II Subscription Edition

Untar 81_quartus_linux.tar in the the host computer, in a directory of your choice

Go to the directory where you untared the software and execute the installation script

./install

Follow the instructions to complete the default installation. If you decide to do a custom installation, read readme.txt or the installation script help

./install --help

If you are using USB Blaster to connect the Altera device to the host computer, you will need to enable usbfs, which is disabled by default on Ubuntu 8.04 (Hardy Heron). Follow this instructions to do so. If you want to enable USB access to your VirtualBox installation (currently not available for OSE version) follow the instructions as is. Otherwise, change the group vboxusers for a group you'd like to provide the access to usbfs.

Test your installation

Connect and turn on the Altera device to the host computer. Follow the instructions according to the connection cable you are using:

USB Blaster - USB cable connection is automatically detected when connected to the host computer, so executing jtagconfig should list the available Altera devices currently connected

$ALTERA_HOME/quartus/bin/jtagconfig

1) USB-Blaster [USB 3-1.2]
020B40DD

LPT cable - (instructions for LPT1 cable missing)

You should now be able to execute jtagd and jtagconfig, that should be found in $ALTERA_HOME/quartus/bin. You will also be able to execute Quartus II IDE with free 30 day trial. In this version, binary compilation and design loading into Altera devices are disabled.

$ALTERA_HOME/quartus/bin/quartus

Create a service for jtagd

jtagd should be run as a service to be able to work as a JTAG server. The correct way to do this is installing jtagd in the system run levels mechanism:

Create a virtual network between guest and host systems

In this section we will create a simple virtual network between guest virtual machine and host computer using VirtualBox's HIC Networking. In order to keep this how-to as simple as possible, the network will just allow communication between guest, host and other computers connected to the same network. No bridge configuration will be covered here.

If you would like to setup a different type of virtual network, please refeer to VirtualBox networking howto. Just make sure that the configuration you choose allows communication between guest and host systems (you should be able to ping the guest from the host and viceversa).

In order to create the virtual network, we will provide two scripts to VirtualBox: onen will create and setup a temporal virtual network interface (so-called TAP interface), and the other one will shutdown and remove the created interface from the host system.

The following hipothetic settings will be used to setup the virtual network configuration:

Setting up VirtualBox HIC Network

Create the virtual interface setup script.

# Create a new TAP interface for the user 'vboxuser' and remember its name.
interface=`VBoxTunctl -b -u vboxuser`
# If for some reason the interface could not be created, return 1 to
# tell this to VirtualBox.
if [ -z "$interface" ]; then
exit 1
fi
# Write the name of the interface to the standard output.
echo $interface
# Bring up the interface.
/sbin/ip link set "$interface" up
# Add information to kernel routing tables.
ip route add 192.168.1.200/32 dev "$interface"

The script shown above creates and sets up a temporal TAP interface in the host system. It also adds routing information that allows the kernel to identify the created interface (using the IP 192.168.1.200). Save it in a location of your choice and make it executable.

Create the virtual interface deletion script

# Bring down the interface. The second script parameter is
# the interface name.
/sbin/ip link set "$2" down
# Remove information from kernel routing tables.
ip route del 192.168.1.200/32 dev "$2"
# And use VBoxTunctl to remove the interface.
VBoxTunctl -d $2

The script shown above tears down and removes the temporal TAP interface created by the script shown in the previous step. It also removes the routing information assigned to that interface. Save the script in a location of your choice and make it executable.

Configure HCI networking in VirtualBox using the start up and teardown scripts

Select a the network adapter of your choice and enable networking on that adapter by clicking on the "Enable network Adapter" checkbox

In the "Attached to" combo, select the "Host Interface" option

In the "Host Interface Settings" section, insert gksudo full_path_to_creation_script/creation_script_name.sh in the Setup Application text field and gksudo full_path_to_deletion_script/deletion_script_name.sh in the Terminate Application text field

Press OK button

Start Windows guest virtual machine

Configure the network interface from windows to use 192.168.1.200 as static ip and 192.168.1.1 as default gateway

You should now be able to ping the host machine from the windows guest and viceversa

Test configuration

Start jtagd if is not already running in the host

Turn on and connect an Altera device to the host computer

Start Windows guest and Quartus II software

In Quartus II IDE, go to Tools->Programmer

In the programmer window, go to "Hardware Setup" and select the "JTAG Settings" tab

Insert the host computer's IP and the password you used when setting up the JTAG server. Press OK button

You should see the host's IP and the name of the Altera device that is connected to the host computer

Go back to "Hardware Settings" tab and select the Altera device from "Currently Selected Hardware" combo

Close the "Hardware Setup" Dialog

Now you should be able to load a compiled digital circuit by using Quartus II programmer