Skip to content

Downloading Project and Running it on Your FPGA

Addison Elliott edited this page Feb 21, 2017 · 2 revisions

How to build/compile this project to your FPGA

  1. Install Quartus Prime II and the appropiate device file from here.
    • You should have three installations: Quartus Prime II, ModelSim-Altera, and the Cyclone IV device file.
  2. Clone the repository.
  3. Open the project by double-clicking on LogiFindFPGATest.qpf.
  4. Switch the Project Navigator view from Hierarchy to Files [1]. This allows you to see all files in your project. Setup Quartus Prime Project
  5. Open the top-level Verilog HDL design file LogiFindFPGATest.v from the Project Navigator menu. This contains three modules named LogiFindFPGATest, which is the top-level module.
  • Two of the three modules need to be commented out at all times. You may comment/uncomment one module at a time to test functionality on the FPGA.
  • A descriptive header above the module includes what it does and how to use it.
  1. Make sure the Tasks combo-box reads Compilation and double-click on Compile Design [2]. Progress bars should go beside each task and it should start building. This may take a minute to complete. Setup Quartus Prime Project Setup Quartus Prime Project
  2. In the tasks menu, the very last item should say Program Device. Double-click this to open the programmer (can also be accessed by going to Tools->Programmer).
  3. Plug in your FPGA. Two USB connections are required: one from the USB port on the FPGA which powers the device (also used for UART communication), and another which connects through the USB blaster to the JTAG port on your FPGA to program the device.
  4. If you haven't already done so, install the USB driver for the USB blaster. This is provided in the ZIP file of necessary documents when you buy the FPGA.
  5. Slide the power switch to ON and a blue light on the FPGA should come on.
  6. In the Programmer window, you should see a textbox beside the Hardware Setup button that says No Hardware. Click Hardware Setup [1], drop down the currently selected hardware menu, and select USB-Blaster [2]. Finally, close the menu and the textbox should say USB-Blaster instead. Quartus Prime now knows HOW it's going to send data to your FPGA. Setup Quartus Prime Project
  7. Now we need to tell Quartus Prime WHAT device we are talking to. Click Auto-Detect [1] and a pop-up box should appear giving you a list of devices, select the applicable one [2]. In this case, it is EP4CE6. Click OK [3] and a chip icon should appear in the lower white box. Setup Quartus Prime Project
  • Note: If you are not able to automatically detect the device, click the Add Device button and manually enter the device information.
  1. Finally, we need to inform Quartus Prime WHAT to program to the device. Click Add File [1] and select the SOF file contained in the output_files of the project [2]. Click Open to select the file to be uploaded [3]. Setup Quartus Prime Project
  2. Select Start to program the file to the device and the progress bar in the upper-right should say it was successful. The file is now programmed to the device!
  • This program will not be present when you power-cycle the device. To make the program persist, you need to upload it to the 4MB flash chip on the development board. That is another story.
  • To save yourself from having to repeat steps 11-13, you can save the configuration in a chain file with extension CDF. When you save the file, it will be added to the list of files included in the project navigator. Double-click on this to open the configuration in the Programmer window and you can simply just click Start to program the device. Setup Quartus Prime Project
Clone this wiki locally