2010-08-23

Altera Quartus II Web Edition 10.0 with Lucid 64-bit

Had some spare time at hand and decided to revisit the idea of doing something with an FPGA devkit that I have (Altera Cyclone II, basic devkit). Last time, Altera didn't really support Linux in any way and using windows to run the huge blob of software (Quartus II v7.0) didn't seem like a good idea.

So, congratulations to Altera on their first Linux version of Quartus. Things are looking up finally.

As is common with other commercial/closed softwares, Quartus only supports a limited set of target distributions (the RPM -based usual suspects), so getting stuff running on Lucid on 64-bit contained some surprises (however, not as many as I feared when I started).

The main problem is in the installer itself. It wants to use a version of libXi (X input client library) that contains a function ( XESetWireToEventCookie ) which isn't available in 6.1 version of the library anymore (one that Lucid uses). Also, the installer is a 32-bit binary (which is to be expected).

Here's the exact error that happens when running the installer directly:

./altera_installer_gui: symbol lookup error: /usr/lib32/libXi.so: undefined symbol: XESetWireToEventCookie

So, step by step guide to getting the blob to work on Lucid 64-bit:

  1. Download the installer from Altera website (it's a shell script containing a compressed binary installer). Do not yet execute the script.
  2. Download the Karmic version of libXi for 32-bit. Do not install the deb.
  3. Extract the deb: mkdir deb-extract && dpkg -x libxi6_1.2.1-2ubuntu1_i386.deb deb-extract
  4. Now, switch to the directory where you downloaded the Altera installer script. It needs to be extracted, but not yet run. Execute the following: sh altera_installer.external.sh --confirm
  5. The script will ask whether it's ok to extract stuff, answer yes.
  6. Then, the script will ask whether it's ok to run the installer ("OK to execute: ./altera_installer_gui --gui?"). Answer No.
  7. cd bin
  8. cp ../deb-extract/usr/lib/libXi.so.6 libXi.so
  9. LD_LIBRARY_PATH=$PWD ./altera_installer_gui --gui
  10. Enter ~/altera as the install directory and /tmp to hold the temp files.
  11. The installer will take a lot of time downloading the stuff (at least it did for me, and it wasn't for the lack of bandwidth at my side). Sometimes it will also abort the download (because "it failed") and ask you to restart the install. The partial downloads are kept in /tmp so eventually your installation should complete.
  12. Once the installer has downloaded everything, you have the option to start Quartus. You might want to check that it will run.

The program can be now run like this: ~/altera/10.0/quartus/bin/quartus (you may want to create a symlink or a menu entry, since those are not created on Lucid).

Interestingly enough, I was expecting to have to do a similar library copy for the installed Quartus, but it seems that it doesn't actually have the problem at all. Looks like only the installer has the issue. The software does run as a 32-bit process (verified via cat /proc/`pgrep quartus`/maps), but oddly, the installed directories contain a subdirectory with a name 'linux64' with 64-bit versions of "stuff". I haven't had the time to investigate whether it would be possible to get a 64-bit version running as well (seems that Altera wants extra money for the 64-bit Linux version, while a 64-bit Windows version is still available as Web Edition. Sheesh).

Now, you have to understand that I know pretty little of FPGAs and even less about Quartus. So, while I can definitely say that the main program will start with the above instructions, I have no idea whether all the pieces actually work (like ModelSim and all that). I'll continue this post once I have some time to actually learn something about the huge beast.

2 comments: