You've set up the Arduino MKR Vidor 4000 — now learn how to program the powerful FPGA with the Intel Quartus IDE.

In my last article, I covered how to get started with the Arduino MKR Vidor 4000, showing you how to configure the FPGA on the board. For that purpose, I used a pre-compiled file.

In this article, I’ll introduce you to the basics of working with the Quartus, the default IDE that comes with the FPGA and show you the necessary steps to create a basic Verilog project that can be compiled and uploaded to the Arduino.

Quartus Installation and First Launch

During the set-up process, you’ll be asked to install support files for different Intel FPGAs. However, don’t install any boards for now. Instead, navigate to Intel’s download page and search for the FPGA family you want to use. Make sure to select the same version of Quartus that you installed on your computer:

download page for quartus prime lite edition

The download page for Quartus Prime Lite.

Then, scroll down and select "Cyclone V device support" if you're using the Arduino MKR Vidor 4000. For now, just download the support files and wait for the installation of the IDE to finish.

select cyclone 10 lp device support

Select Cyclone 10 LP device support.

Once it’s done, launch the device installer that came with the IDE. In it, select the folder where you just saved the support files. On the next page, pick the devices you want to install.

select devices to install

Select the devices you want to install.

When the assistant is done, start the Quartus IDE.

User Interface Basics

The user interface consists of six main elements in its default configuration.

quartus ide main elements

The six main elements of Quartus IDE.

  1. Main menu-bar (orange)
  2. Project Navigator (green): This displays your project’s hierarchy and a list of source files it contains.
  3. Tasks (light-blue): This section shows the status of the design and it can be used to run parts of the design flow.
  4. Messages (dark-blue): This panel outputs messages from each task you run, which can also be filtered by category.
  5. IP catalog (purple): This can be used to search and select IPs for your design. IPs (Intellectual Properties) are pre-built blocks for common recurring tasks, like communication protocols and signal generation.
  6. Main work area (middle of the screen)

How to Set Up a New Project

Launch the project wizard from the main menu-bar.

select new project wizard

Select New Project Wizard in Quartus IDE.

The assistant will take you through the process step by step. On the first screen, simply click Next. Then, enter your project’s name and the name of the top-level design entity.

directory name and top level entity

Enter your project's name and top-level entity.

On the third screen, choose “Empty Project” and click next. Skip the next screen, as we will add files to the project later. The fifth pane requires you to select the FPGA you’re using. In my case, it’s the “10CL016YU256C8G.”

select your fpga device

Select the FPGA you're using.

The exact model number is printed on the chip. Skip the sixth screen for now. This pane is only needed if you use other programs outside of the Quartus Toolchain that you need to integrate into the compile process. On the last screen, review the settings and click finish.

I/O Pin Assignment

Once the new project is created, launch the Pin Planner.

pin planner launch in quartus

Launch the Pin Planner in Quartus.

You should see something similar to the screenshot below. Note that, at the moment, no pins are assigned.

pin planner default

The Pin Planner with no pins assigned.

If you own a supported development board, you can load the pin assignments from a preset. Consult your device's manual for further information.

In my case, the pin assignment table was available from this official Arduino repository. Once you load it into your project and look at the pin planner, you should see something similar to this:

pin planner with vidor 4000 uploaded

The Pin Planner with the pins for the Vidor 4000 uploaded.

Loading and Creating Files

As you saw in the previous section, it’s possible to add external files, allowing the project to use them. To keep this article short, I'll use the data provided by Arduino. Download the following elements from their GitHub repository:

  1. Pin mapping
  2. Pin IP folder

The first element is the pin mapping. The second one contains their IPs you can use. Copy the files into the project folder. It should now look similar to this:

downloading the elements

Downloading the elements from GitHub.

Then, in Quartus, link the newly copied files to your project so that the IDE can locate them. To do this, double click the files node in the project navigator.

adding elements to quartus

Add the downloaded elements from GitHub to Quartus.

A new window will pop up. In it, select the aforementioned files.

in file name add elements

Select your new files.

When done correctly, the IP catalog should now list the imported elements.

files now available in the IP catalog

Downloaded files are now available in the IP catalog.

When everything is set up, create a new Verilog file that will serve as your top-level entity. Select "New" and then "File" from the main menu bar. In the window that opens up, choose "Verilog HDL File" and click OK.

select verilog hdl file

Select Verilog HDL file.

When you first save this file, make sure to enter the name that you chose as the top-level entity earlier. Then, create a second file that'll contain your custom Verilog code, and save it as "custom.v". Paste the contents of the Vidor FPGA Github into your file and make sure to change the module name, if necessary.

How to Start the Compilation Process

You should now be able to compile the entire project without any problems. To do so, you can either double-click the "Compile Design" task or you can use this button in the top menu bar (Shortcut: CTRL + L):

start compilation

Compiling your design in Quartus.

Uploading the Code

Unfortunately, Quartus can’t upload the compiled files to the Vidor directly. However, I demonstrated how you can send the compiled project to the board in the Getting Started with Arduino MKR Vidor 4000 article.

You can find all of the Empty Vidor Project files by following the link.

Vidor 4000's FPGA is Ready to Go!

This tutorial introduced you to the absolute basics of the Intel Quartus IDE. After reading it, you should be able to create a new project, link the pins of your FPGA, create new HDL files, import existing files, and compile your project. For additional tutorials, visit the Intel training catalog.

Daniel Hertz
Hi! I am a software engineer and owner of nerdhut.de who loves to experiment with electronics, gadgets and tech in general.