Computer Laboratory

Course pages 2016–17

ECAD and Architecture Practical Classes


There are three routes to running the labs:

Virtual machine setup

To undertake the class you can either use the Managed Cluster Service machines in the Intel Lab at the Computer Laboratory, or a virtual machine on your own laptop. If you have a suitable laptop we recommend using it as you will likely find it quicker and you will be able to work away from the lab. You will still need to attend lab sessions for ticking and for demonstrator help: do not assume you can complete the tick work entirely on your own. If you bring a laptop, do not forget your charger: the labs involve some heavyweight computation and can rapidly flatten your battery.

If you are intending to use the MCS, skip down to the MCS and VM tool configuration section.

A suitable laptop is one of approximately the following spec:

  • Intel Core i5 or i7 (i3/m5/m7 possible but slower) or AMD quad-core
  • Virtualization support (VT-x or AMD-V) present and enabled in BIOS
  • 4GB RAM (8GB or more strongly recommended)
  • 24GB of free storage. It is possible to use USB storage but some USB sticks are very slow (the Sandisk Extreme USB 3.0 is one of the better ones we tested). If you are using USB, format to exFAT (Windows or Mac), ext3/ext4 (Linux), HFS+ (Mac), NTFS (Windows) - other combinations are likely to have poor performance.
  • 8GB of temporary storage (USB stick is fine, formatted something other than FAT32 which has a 4GB file size limit)
  • A 64-bit host OS supported by VirtualBox (Windows, OS X and Linux should be fine).

If you have a suitable laptop, download a virtual machine image to your temporary storage (requires Raven). Download the virtual machine before you arrive in the lab - the VM is 8GB and it will be very slow if everyone downloads it over wifi in the lab.

Install VirtualBox

First download VirtualBox and also download the `VirtualBox Oracle VM VirtualBox Extension Pack' for the same version (this is necessary for USB 2 support). If you are using a Linux distro with a package manager, instead install the VirtualBox package supplied by your distro and find the matching extension pack from the VirtualBox site (looking at the older builds downloads if need be).

Install VirtualBox on your machine. To install the Extension Pack, go to File->Preferences, click on the Extensions button, then click on the 'folder with triangle'. Navigate to the Extensions Pack file you downloaded (.vbox-extpack) and select it. Then follow the prompts to install the pack.

Importing the VM

Make sure you have the ECAD-Labs .vmdk (disc image) and .vbox (VirtualBox configuration file). You will need to uncompress the you downloaded to make the .vmdk

Start VirtualBox, go to the Machine->Add menu and choose your .vbox file. You should now see an ECAD-Labs entry in the VM list on the left.

Next we need to add the disc. Click on Settings, find the Storage panel and inside the Controller: SATA. Select this. An 'add hard disk' button should appear to the right. Pick 'Choose existing disk' from the popup and select your .vmdk file.

If you have more than 4GB RAM, before booting we recommend increasing System->Base Memory to 6GB (on an 8GB laptop) or more if you have more than 8GB RAM. This will reduce your FPGA synthesis time. If you have only 4GB of RAM, don't open too many other programs while the VM is running otherwise your system will become slow and memory constrained. You should also allocate as many cores to the VM as you have in your machine.

Your VM should now be ready to boot. The login information for the VM is : login:ecad, password:ecad.

Guest additions

Keep your working projects inside the VM, don't store them on your host OS and access them over shared folders - your builds will be much slower and may not work reliably.

You will probably want to install VirtualBox's Guest Additions, which enable features such as resize of the VM's display, shared clipboard, shared folders, and so on. To do this, boot your VM to the desktop. Then on the menu of the VM window go to Devices->Insert Guest Additions CD Image. This should insert a virtual CD into the VM system that will automatically install the additions and their kernel module (when prompted the password is 'ecad').

If the installer doesn't start automatically, open the terminal and type:

sudo /media/ecad/VBOXADDITIONS_5.0.16_105871/

(the number may be different on your version - press Tab to autocomplete it).

Reboot the VM afterwards for them to take effect. You can then enable Devices->Shared clipboard->Bidirectional and enlarge your window to resize the screen.

USB setup

Linux laptops

If you have a Linux laptop, to give VirtualBox access to your USB ports you will need to run the following outside of the VM:

sudo adduser $USER vboxusers

then reboot your laptop.

Windows laptops

On Windows, before starting the VM click on the 'ECAD-Labs' entry in the list of VMs and click on 'Settings'. Go to 'USB' and choose USB 1.1. OK the settings.

Now, find your VirtualBox install in Windows Explorer (probably C:\Program Files\Oracle\VirtualBox). Go to the drivers\USB\filter subdirectory. Right-click on VBoxUSBMon.inf (of type 'Setup Information') and select Install. Allow Windows to install it. Repeat the same for drivers\USB\device\VBoxUSB.inf.

You should now be able to boot the VM with USB support.


See below for how to check the tools are correctly functioning.


If you have problems with your VM installation, bring your laptop to the first session on 7th/11th October.

VT-x error

Either you have not enabled VT-x, Intel Virtualisation Technology or similar) in your BIOS/UEFI settings, or Hyper-V (Microsoft's own hypervisor) is enabled. See this guide for details how to disable Hyper-V and enable VT-x.

MCS setup with USB stick

If you plan to use the MCS, you can significantly improve Quartus build times (eg from 12 mins to 5 mins) by having a local copy of the Altera and ModelSim tools, and your project files, on a USB memory stick 32GB or larger (16GB may work but will be tight). We recommend the SanDisk Extreme USB 3.0 but other memory sticks with good random read/write (eg USB 3) should also give good performance. You will need to reformat it so will likely need to dedicate a stick for the duration of the labs.

First format the USB stick to ext4, which will erase all existing files. On the MCS, login to MCS Linux and plug the USB stick into the PC. Open a file manager window where you should see your stick appear in the list of drives to the left. Right click on it, and choose 'Format...'

Set Erase to 'quick' and Type to 'ext4'. Name the volume ecad_ followed by your CRSID (don't include any spaces). Accept that you really do want to format it and let the format complete.

Now download the MCS tools bundle and unpack it onto your new device (Cam-only link).

Each time you open a new terminal in which you want to use the tools, you will need to setup paths and environment variables. With your USB stick mounted (click on it in the file manager so that an 'eject' button shows next to it), open a terminal and type:

  source /media/<yourusername>/<volume_name>/setup.bash

(don't forget you can use the Tab key to complete filenames so you don't need to type this all). You'll need to source the setup script in each terminal you want to run the tools.

MCS setup without USB stick

If you're using the MCS without a USB stick, you'll use a copy of tools on the shared filesystem (which will get congested when lots of people are compiling). Each time you open a new terminal window, type:

source $CLTEACH/swm11/setup.bash

Testing the tools

You will now be able to use tools like "vsim" (simulator) and "quartus" (FPGA synthesis tool) from the command line. Check these each start a GUI to verify your setup is successful.

The first time you run Quartus it will ask to select a licensing option: simply say 'Run the Quartus II software'. Don't worry if there are messages about being unable to contact the licence server when you start Quartus (ask a demonstrator if your compiles fail due to licence errors).

Installing the Altera tools yourself

It is possible to install the MCS tools bundle on your own machine, however we don't recommend this. You will have to manually check that you have the right libraries (particularly 32-bit libraries) and USB configuration. Choice of distribution is also important: Altera test on RedHat Enterprise, but we usually have reasonable luck with a Ubuntu long term support distribution. Our own installation notes are on a wiki. Having said all of that, we recommend you use the virtual machine that we've setup and tested, and is available for local download.