DE2 under Linux
However, with a little virtualization and a little ingenuity, you can still get everything up and running.
Pre-requisite: Ubuntu Linux
It is assumed that you already have a modern build of Ubuntu (Hardy or Interpid) installed, configured and connected to the internet.If not, you can download Ubuntu for free right now, or you can request installation CDs be shipped to you, free of charge!.
Pre-requisite: Altera Web Edition Tools
Since you are going to be downloading about 1.6GB of software, now is a good time to get a head start (so it can download while you install windows).Visit this direct link to the Quartus Web Edition Download Page and download both Quartus® II Web Edition Software v8.1 and Nios II Embedded Design Suite. I have not personally tried to use ModelSim-Altera, so it's safe to skip if you don't know what it is.
You will have to make an account with Altera to download the software but other then some personal information, it's all free.
Step 1: Install VirtualBox
There are two versions of VirtualBox: OSE (Open-source Edition) and CSE (Closed-source edition). The major feature of VirtualBox that we need (USB pass-through support) is only available in the Closed-Source edition.. so we are going to need to do a little bit of extra work to install it correctly (such that updates will be delivered to via the system-wide update mechanisms).
Please visit VirtualBox on Ubuntu, and follow the instructions given there for installing VirtualBox CSE.
Step 2: Configure VirtualBox
If you have not done so already, add yourself to the vboxusers group:
sudo usermod -G vboxusers -a `whoami`
You must now enable usbfs support. The exact process is different for Gutsy and Intrepid, but it's covered in the detail by the Ubuntu Community documentation. Instead of reproducing it here, I now direct you to follow their guide to VirtualBox USB under Ubuntu.
Once you are done, reboot your computer before continuing (remember to bookmark this page!)
Step 3: Install Windows XP
Click the "New" button in the toolbar. Click Next.
Give your virtual machine a descriptive name (such as "XP FPGA"). Under Operating System select "Microsoft Windows" and under Version select "Windows XP". Click Next.
The amount of memory you need largely depends upon the size of your designs. Between 512mb - 1024mb should be appropriate (it is recommended that your host have at least 2GB of RAM). Click Next.
On the hard disk screen, click the 'New' button. The new hard disk wizard will open up. Click Next, 3 times. Click Finish. Back on the hard disk selection screen, the drive you just made will be highlighted. Click Next then click Finish.
The virtual machine is created, but not configured. Right-click on it in the list of machines, and chose Settings.
Under "CD/DVD Rom", check off "Mount CD/DVD Drive". You can either insert your 32-bit Windows XP disk into the CDROM and select "Host CD/DVD Drive", or if you have already made an ISO Image then select "ISO Image File".
This is a good time to pass through a past of your host filesystem to the XP guest.
Under "Shared Folders", click on Add New Shared Folder (looks like a little folder with a green + on it), under Folder Path select Other and click Select (this selects your home directory). Click Ok.
Repeat this process for any other folders you would like to share (such as the download location you used for the files in Step 2).
Finally, click Ok to exit the settings window.
You can now start the virtual machine by right-clicking on it and selecting Start from the menu. A window will pop up explaining pointer capture and the host key; read it! A few seconds after you accept, the Windows XP installer should appear.
The actual XP installation is outside the scope of this guide, so follow the next section only after you've completely installed windows and have downloaded all of the latest security patches.
Step 4: Configure Windows XP
At the top of your XP Guest window, click on Devices -> Install Guest Extensions from the menubar. This mounts the guest extensions CD image in the CDROM of your XP guest, and an installer should autorun. Click Next a few times, and reboot XP.
Now, we need to mount the shared folders to drives in XP. Open the Network Neighborhood and double click on "Entire Network" then "VirtualBox Shared Folders". If you do not see "Entire Network" listed, click on Tools -> Folder Options, and under Tasks select "Use Windows Classic folders" then click OK.
Right click on each of your shared folders, and click on Map Network Drive. Assign them each a drive letter.
Your download of the development tools should be finishing up about now. Start by installing Quartus. Aside from the 3 required components, the only component that's required for the DE2 is "Cyclone II support". Specifically, the EP2C35. You can turn the rest of the device support off to save some disk space.
When Quartus setup has completed, you can install the NIOS 2 IDE. This is a complete embedded Eclipse and gcc-based development suite. If you select the Custom setup, you can disable the two Hardware Design Examples to save some more disk space.
Step 5: Install USB Blaster
VBoxManage list usbhost
You should see some clusters of output, one per USB device in your system. Find the one that lists the Altera USB-Blaster, such as this:
VendorId: 0x09fb (09FB)
ProductId: 0x6001 (6001)
Revision: 4.0 (0400)
Manufacturer: Altera
Product: USB-Blaster
SerialNumber: 91d28408
Address: /proc/bus/usb/005/004
Current State: Available
Make sure that under "Current State", your system reads the USB Blaster as "Available" and not as "Unavailable".
If the device is showing up as Unavailable on your system, then you should go back and ensure you followed all of the steps in the USB configuration guide in Step 2.
If your device is Available, then you are ready to move on to the next step! Leave the DE2 plugged in and turned on.
Shut down your XP Guest.
Right click on it in the machine list, and select Settings.
Select "USB" in the list on the left.
Check off both "Enable USB Controller" and "Enable USB 2.0 (EHCI) Controller".
Click on the Add Filter From Device icon (looks like a little USB plug with a green + on it), and select "Altera USB Blaster" from the list.
Click OK.
Start up the XP Guest again.
The Found New Hardware wizard will open. Select "No, Not this time" and click Next.
Select "Install from a list or specific location" and click Next.
Select "Search for the Driver", and under "Include This Location in the Search" put in the path to the USB blaster drivers (the default location is C:\altera\81\quartus\drivers\usb-blaster). Click Next.
Windows should now be able to find and install the driver. Click Finish.
We're done! What's next?
DE2 Projects
Labs and Projects from the around the web
Do you know of any good DE2-related resources? Add them below!.
Altera DE2 Board Resources
Several ready to download pre-compiled (.sof) demo more...0 points
Digital Labs using the Altera DE2 Board
Lots of good labs, grouped into categories: LCD Di more...0 points
TERASIC - Products - FPGA Systems - Altera DE2
Terasic is the company that actually designed the more...0 points
Altera DE2 SDRAM controller
Simple DE2 SDRAM controller with a Wishbone bus in more...0 points
Resources
- Altera DE2 Official Site
- Official Development and Education board (DE2) homepage
- Ubuntu Linux Homepage
- Reliable, well supported and freely available open-source operating system.
- Sun VirtualBox Homepage
- Advanced x86 and x86_64 virtualization software, supporting USB pass-through from host to guest.
- Ubuntu Community Documentation
- Excellent 'unofficial' documentation for Ubuntu, created by volunteers.
