Ben's Blog

No description yet.

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that have been used in the blog.
  • Archives
    Archives Contains a list of blog posts that were created previously.
  • Login
    Login Login form

Altera (1) - Introduction, Installing Quartus 14.1 On Linux (3.11.10-21, x86-64)

Posted by on in Altera FPGAs
  • Font size: Larger Smaller
  • 0 Comments

 Altera Field Programmable Gate Arrays (FPGAs) are popular devices used world wide and  can be found on many high-end and not so high-end development kits and boards.  Some of the less expensive evaluations kits (and favourites of ours) that are ideal for rapid prototyping of their mid-range FPGAs include the DE0-Nano, the BeMicro CV and the BeMicro Max

 The application software used to program Altera's FPGAs is known as Quartus and is available for both the Windows and Linux platforms, although sadly, just like Xilinx's Vivado, it is not available for OS X. In this blog post we overcome the hurdles required  to run Quartus on Linux's OpenSuse 13.1 (Bottle), as the time approaches to put one of our BeMicro CVs to work.

a1sx2_Original1_002-002-000008.png

The Quartus or Quartus II software, as it is officially known, is available from Altera's website (www.alter.com) and as far as we know is not available from a Linux repository. Two versions are available a subscription edition and a web edition. The subscription edition is a huge investment and is typically used on commercial projects that are likely to see a return in the investment. Hence, evaluation kit users are more likely to install the web edition, that is license free, which could be a first for EDA vendors, maybe? Altera's SDK for OpenCL will be covered in  a separate post.

a1sx2_Original1_002-002-000016.png

Navigating to the download page offers one the option of downloading the latest version of Quartus II, which at the time of the release of this blog post is Quartus II version 14.1. A choice of operating system is also available, which for the purpose of this article is Linux. We also have Windows versions installed, however for the purpose of writing software to interact with our FPGAs we prefer Linux. Downloaders are also offered a choice of download methods, we typically use the direct download one. However, if your Internet connection doesn't cut the mustard you may wish to consider the Akamai DLM3 download manager.

a1sx2_Original1_002-002-000018.png

What do you get for your money? Well, since you haven't paid for the software the answer is not the full monty! Although Quartus software development goes hand in hand with selling FPGAs, Altera are not a registered charity and expect users to pay for their premium device support and service. Generally, the web edition of the software offers support for all devices found on the budget evaluation kits and boards, which are typically at the cheaper end of the price bracket.

I wonder what happened to Cyclone III support? It might be that a previous version of the Quartus software should be downloaded to work with Cyclone III based FPGA boards. It should be noted that multiple versions of Quartus can be installed on the same PC.

Once downloaded the installation of the software is relatively easy, as can be seen later on, by navigating to the download folder. The downloaded file does not have executable permissions, so it is left to the installer to provide them before commencing with the install. This can be down by issuing the following command in the download directory.

To run the now executable script we typically do so as root, again in the download directory.

An installation dialogue window, as seen in the image below,  now appears and it is only necessary to click on Next buttons to complete the installation process. Before we show the full dialogue process we will continue with the more important parts of what one should do when the software is installed and it doesn't actually work!

a1sx2_Original1_002-002-000002.png

 On completion of the installation you can navigate to the installation directory, which in our case is in the /opt/altera directory (you do not need to be root) and start Quartus by typing the following commands ...

This then launches the Quartus II, version 14.1 software, as seen in the image below, but we are not yet  fully in business! At this stage you can play around with the software only, but you cannot configure any devices.

a1sx2_Original1_002-002-000024.png

The reasons we are not yet fully in business is because we still need to create device rules, udev rules, for Altera's USB Blaster. This is used to program the FPGAs on our development boards and evaluation kits with a configuration file generated by Quartus. Also, we still need to take care of something exotically named the jtagd deamon.

Firstly, for Linux to recognise the USB Blaster we need to create udev rules by issuing the following command to navigate to the dev rules directory ... 

... then create a file called ...

... next add the following device rules to the file, created previously ... (N.B SYSFS has been deprecated and no longer works)

 Next we configure the jtagd daemon, which Quartus uses as an intermediary between itself and a configurable device. The daemon is configured so that it has access to the list of FPGA descriptors and runs as root. The descriptors can be found in the Quartus installation directory, which in our case is the file. 

This file must be added to the jtagd configuration directory, which if it does not exist you must create, like so ...

To check that you are capable of following even the most simple of instructions you can type the following ..

This should produce a list of incomprehensible numbers of the parts, as required by the jtagd. Finally, we need a way for jtagd to start at boot by typically placing it in the rc.d system or placing the following line in the /etc/rc.local file. However, starting with openSUSE 12 systemd is a replacement for the popular Sysv init daemon and the jtagd needs to be started at boot relative to the systemd. I do not yet have time to understand how to do this, but the jtagd can be started manually after each system boot and the jtag chain can be tested by issuing the following two commands.

 When the BeMicro CV deevelopment board is attached to the Linux machine's USB port I get the following output ...

... and finally, apart from the issue of starting the jtag daemon at boot,  we are open for business.

The full installation procedure is detailed below.

a1sx2_Original1_002-002-000002.png

The installation starts with welcoming screen informing you, in case you forgot, that you are installing the freebie Quartus II Web Edition.

a1sx2_Original1_002-002-000003.png

License agreements, one day I promise to read not just the first couple of lines, but get a law degree and read the full thing, but for now I merely accept and click on next. 

a1sx2_Original1_002-002-000004.png

I prefer for all my EDA software to reside in the /opt directory, as it is easier to manage and create backups and as Altera is an EDA application I do the same.

 a1sx2_Original1_002-002-000005.png

 The web edition includes the Nios II Embedded Development Suite (EDS). However, I not sure whether I would ever need it, as most Cyclone V FPGAs have embedded SoC variants consisting of the dual ARM Cortex A9s .

a1sx2_Original1_002-002-000006.png

The total installation will require about 5 GB of disk space, if you agree to using that amount of disk space then click on next ...  

a1sx2_Original1_002-002-000009.png

... then we are up and running with the installation process proper.

a1sx2_Original1_002-002-000010.png

It doesn't take too long to install either. At the end of the installation you have options to create a desktop shortcut, on Linux?, launch the application or provide feedback. You decide!

a1sx2_Original1_002-002-000011.png

 Next, the application launches and you are happy, until you realise that no devices have been installed. So you have to begin an additional installation process to install the devices you require and are permissible under the Quartus web edition. In Quartus you can navigate to Tools->Install Devices to begin the process.

a1sx2_Original1_002-002-000015.png

Another installation dialogue, but this time for the devices.

a1sx2_Original1_002-002-000014.png

The next dialogue is quite confusing, as it indicates that you need to use the text entry field, shown in the screenshot above, to point to the download directory on your hard drive to install the devices. I couldn't find the devices on my drive and realised that they need to be downloaded separately.

a1sx2_Original1_002-002-000017.png

So back to Altera's website and the page corresponding to the devices available for Quartus'  web edition can be found. 

002-002-000012.png

The device files downloaded appeared as .qdz files in my download folder. I could now correctly locate the download folder and clicking on next advanced the dialogue window.

a1sx2_Original1_002-002-000013.png

Here, I checked all the available devices, although I am currently only interested in the Cyclone IV and V devices and moved on by clicking on next.

a1sx2_Original1_002-002-000019.png

Approximately, another 2.5 GB of disk space would be required. I agreed and clicked on next.

a1sx2_Original1_002-002-000020.png

 Again, the installation was quick and pain free ...

a1sx2_Original1_002-002-000021.png

... and finally complete.

002-002-000022.png

Starting Quartus again from the command line in a terminal window, offers users to buy a Quartus software subscription edition license or run the Quartus II (web edition). After a long and hard decision, arrived at by intensely debating with myself, I decided that the web edition was good enough for my purposes ...

002-002-000023.png

... and checked the Run the Quartus II software option before clicking okay .

a1sx2_Original1_002-002-000024.png

That's it really. I still got the niggling problem of starting the jtagd at boot, but I am hoping to solve that problem either by googling and relying on someone else putting in the hard work or if all else fails putting in the hard work myself. 

Last modified on
0