Change history
Last updated: 24 Sep 2010. I've added a few sections on the USB Blaster and ByteBlaster programmers. This should resolve any permissions issues you folks might have noticed... sorry about the mistake!I've also added some stuff on installing ModelSim, if you swing that way... I'm an Icarus Verilog man, myself :)
Installing Quartus
Altera seem to have taken the strange step of including X11 libraries with the Quartus installation package. This has the unfortunate side effect of utterly breaking the installation on Ubuntu 10.04 and 10.10... Fortunately there's a workaround!
Grab the installation archive from Altera's website (10.0_quartus_free_linux.sh). Careful -- it's about 2.5GB!
Now open a shell and 'cd' into the directory in which you saved the Quartus installer. Run this command:
bash ./10.0_quartus_free_linux.sh --noexec
(thanks to Josy Boelen for the correction)
This will unpack the files necessary to run the Quartus Installer, but won't run the installer.
Once the self-extracting archive has finished unpacking itself (this takes a VERY long time, be patient...), you'll be left with a directory called '10.0_quartus_free_linux'. CD into it:
cd 10.0_quartus_free_linux
Now we need to zap the X11 library that Quartus comes with, thus forcing it to use the system libraries...
rm altera_installer/bin/libX11.so.6
Run the installer:
sudo bash ./setup
Now we're cooking on gas. Follow the on-screen instructions to install Quartus. I usually install it in /opt/altera/VERSION (i.e. /opt/altera/10.0) for sake of convention -- I have Xilinx ISE installed into /opt/Xilinx/VERSION, with a startup shell script in /opt/Xilinx).
Now you can (optionally) run Quartus to set up the licence. Run this command, either in the shell or a Ctrl-F2 (Run Application) window:
/opt/altera/10.0/quartus/bin/quartus
When Quartus starts, go to Tools, License Setup. Select "Internet Connectivity", then enter "/usr/bin/firefox" in the "Web Browser box. Click OK. Select Tools, then License Setup again, then click Web License Update. Select "Connect to the Altera Licensing Centre". Fill out the boxes on the page (the NIC ID is shown on the License Setup page in Quartus) and accept the offer of a free Modelsim license (if you want it, that is).
When the email with your licence file arrives, save the attached licence file to somewhere accessible (say, your home directory). Now you need to copy the licence file into the Quartus directory. Go back to the terminal and enter:
sudo mv ~/LICENSE_FILE.dat /opt/altera/10.0
Your licence file will be named differently -- the first part of the name is usually the NIC ID.
Switch back to Quartus and click the "..." button next to the "License file:" field. Select the licence file you just copied into /opt/altera/10.0. Click OK, then OK again.
This leaves one small problem: the USB Blaster cables don't work. To fix this, we need to do play some sneaky filesystem tricks. Edit /etc/rc.local, and insert this above the "exit 0" line:
mount --bind /dev/bus /proc/bus ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices
We also need to add a Udev rule to allow non-root users to access the USB Blaster. Create a file called /etc/udev/rules.d/altera-usb-blaster.rules, and insert the following into it:
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="666"
Note that this grants USB Blaster access indiscriminately to all users on the system. If you want to grant access to a specific group of users, create a new Group using the Users Settings tool (System -> Administration -> Users and Groups, Manage Groups, Add) and add the permitted users to it. Assuming you called your new group "usbblaster", the Udev rule should look something like this:
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", GROUP="usbblaster"
Note the lack of a MODE override -- the default Udev permissions (read/write for user and group, others read-only) are sufficient for this to work.
If you're using a parallel-port ByteBlaster, go into System -> Administration -> Users and Groups, then select Manage Groups. Scroll down to then double-click
lp
. Under "Group Members", check the box for your user account, then click OK, then Close twice. This will give you permission to access the parallel port directly, which Quartus requires to drive the ByteBlaster. If you're using a USB Blaster, you don't need to do this.Now reboot. The USB Blaster should work fine.
That's it! You're done! To start Quartus, hit Alt-F2 and enter:
/opt/altera/10.0/quartus/bin/quartus
You can add an Application Launcher icon for this command if you like. The Quartus icon is located in
/opt/altera/10.0/quartus/adm/quartusii.png
.
Installing ModelSim-Altera Starter Edition
It's always useful to have a simulation tool handy. Altera provide a cut-down version of ModelSim for free with Quartus, but you have to download it separately. Unfortunately the Linux installer is still just as bugged as the Quartus installer...
Grab the installation archive from Altera's website (10.0_modelsim_ase_linux.sh). It's about 500MB.
Now open a shell and 'cd' into the directory in which you saved the ModelSim installer. Run this command:
bash ./10.0_modelsim_ase_linux.sh --noexec
This will unpack the files necessary to run the ModelSim Installer, but won't run the installer.
Once the self-extracting archive has finished unpacking itself (this takes a LONG time, be patient...), you'll be left with a directory called '10.0_modelsim_ase_linux'. CD into it:
cd modelsim_ase
Now we need to zap the X11 library that Quartus comes with, thus forcing it to use the system libraries...
rm altera_installer/bin/libX11.so.6
Run the installer:
sudo bash ./setup
Follow the on-screen instructions. Make sure you install ModelSim in the same place as your Quartus installation -- that is, if you installed Quartus in
/opt/altera/10.0
, you should install ModelSim AE in the same location.Once the installer finishes, you'll find the ModelSim files in
INSTALLDIR/modelsim_ase
(whereINSTALLDIR
is the installation directory, for example/opt/altera/10.0
).(原文地址:http://www.philpem.me.uk/elec/fpga/quartus-ubuntu/)