FPGA RGB Matrix. Created by lady ada. Last updated on :15:42 PM UTC

Similar documents
Tutorial for Altera DE1 and Quartus II

CSE P567 - Winter 2010 Lab 1 Introduction to FGPA CAD Tools

NOTE: This tutorial contains many large illustrations. Page breaks have been added to keep images on the same page as the step that they represent.

Quick Tutorial for Quartus II & ModelSim Altera

FPGA Introductory Tutorial: Part 1

Chapter 2 Getting Hands on Altera Quartus II Software

University of Florida EEL 3701 Dr. Eric M. Schwartz Madison Emas, TA Department of Electrical & Computer Engineering Revision 1 5-Jun-17

Terasic DE0 Field Programmable Gate Array (FPGA) Development Board

Chapter 2: Hardware Design Flow Using Verilog in Quartus II

ECSE-323 Digital System Design. Lab #1 Using the Altera Quartus II Software Fall 2008

DOWNLOADING DESIGNS TO THE ALTERA DE10-LITE FPGA

University of Florida EEL 3701 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering Revision 0 12-Jun-16

Tutorial on Quartus II Introduction Using Verilog Code

CHAPTER 1 INTRODUCTION... 1 CHAPTER 2 ASSIGN THE DEVICE... 7 CHAPTER 3 DESIGN ENTRY CHAPTER 4 COMPILE AND VERIFY YOUR DESIGN...

Design Flow Tutorial

Tutorial on Quartus II Introduction Using Schematic Designs

NIOS CPU Based Embedded Computer System on Programmable Chip

Lab 2 EECE473 Computer Organization & Architecture University of Maine

SOPC LAB1. I. Introduction. II. Lab contents. 4-bit count up counter. Advanced VLSI Due Wednesday, 01/08/2003

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 7: VHDL and DE2 Board. Name: Date:

E85: Digital Design and Computer Engineering Lab 2: FPGA Tools and Combinatorial Logic Design

CSEE W4840 Embedded System Design Lab 1

Contents. Appendix B HDL Entry Tutorial 2 Page 1 of 14

ECE 3610 Microprocessing Systems Lab #1 Verilog Design of the TOC Using Quartus II

NIOS CPU Based Embedded Computer System on Programmable Chip

DE2 Function Library Manual

Banks, Jasmine Elizabeth (2011) The Spartan 3E Tutorial 1 : Introduction to FPGA Programming, Version 1.0. [Tutorial Programme]

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 6: Quartus II Tutorial and Practice. Name: Date:

EE 231 Fall Lab 1: Introduction to Verilog HDL and Altera IDE

AN 818: Static Update Partial Reconfiguration Tutorial

CHAPTER 1 Introduction of the tnano Board CHAPTER 2 tnano Board Architecture CHAPTER 3 Using the tnano Board... 8

Quartus II Introduction Using Verilog Design

AN 818: Static Update Partial Reconfiguration Tutorial

CPE 200L LABORATORY 4: INTRODUCTION TO DE2 BOARD UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND:

ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL

AN 825: Partially Reconfiguring a Design on Intel Stratix 10 GX FPGA Development Board

Configuration and programming minimodules MMfpga01 and MMfpga11

2 nd Year Laboratory. Experiment: FPGA Design with Verilog. Department of Electrical & Electronic Engineering. Imperial College London.

Tutorial: ISE 12.2 and the Spartan3e Board v August 2010

Using Synplify Pro, ISE and ModelSim

Quartus II Tutorial. September 10, 2014 Quartus II Version 14.0

Physics 536 Spring Illustrating the FPGA design process using Quartus II design software and the Cyclone II FPGA Starter Board.

Quartus II Version 14.0 Tutorial Created September 10, 2014; Last Updated January 9, 2017

SCHEMATIC DESIGN IN QUARTUS

NIOS CPU Based Embedded Computer System on Programmable Chip

Proper Debugging of ATSAMD21 Processors

RoastLogger Arduino/TC4 driver installation for Windows 9/10/13 By John Hannon (JackH) at Homeroasters.org

Implementing a Verilog design into the UWEE CPLD Development Board Using Xilinx s ISE 7.1i Software: A Tutorial

Xilinx ISE8.1 and Spartan-3 Tutorial (Prepared by Kahraman Akdemir based on Professor Duckworth's Tutorials updated September 2006)

Building Combinatorial Circuit Using Behavioral Modeling Lab

Laboratory Exercise 8

Intel Stratix 10 H-Tile PCIe Link Hardware Validation

EARTH PEOPLE TECHNOLOGY. ODIN-LINK BLE + MAXPROLOGIC Development System User Manual

Introduction to the Altera SOPC Builder Using Verilog Designs. 1 Introduction

CSCB58 - Lab 0. Intro to The Lab & The DE2 Board. Prelab /4 Part I (in-lab) /1 Part II (in-lab) /1

IMPLEMENTING COUNTERS

Sidewinder Development Board rev 1.0

High Speed Memory Interfacing 800MHz DDR3 Memory Lab

DKAN0011A Setting Up a Nios II System with SDRAM on the DE2

Quartus II Introduction Using Schematic Design

EE 367 Logic Design Lab #1 Introduction to Xilinx ISE and the ML40X Eval Board Date: 1/21/09 Due: 1/28/09

The University of Toledo EECS:6660:0xxField Programmable Gate Arrays s09l1.fm - 1 Dr. A.D. Johnson

ULTIMATE CART FIRMWARE UPGRADE GUIDE

Board Update Portal based on Nios II Processor with EPCQ (Arria 10 GX FPGA Development Kit)

Quartus II Introduction Using Verilog Designs. 1 Introduction. For Quartus II 12.0

Adafruit 1-Wire Thermocouple Amplifier - MAX31850K

Getting Started with Xilinx WebPack 13.1

and 32 bit for 32 bit. If you don t pay attention to this, there will be unexpected behavior in the ISE software and thing may not work properly!

AN 825: Partially Reconfiguring a Design on Intel Stratix 10 GX FPGA Development Board

Altera Quartus II Tutorial ECE 552

PRELAB! Read the entire lab, and complete the prelab questions (Q1- Q3) on the answer sheet before coming to the laboratory.

A Beginner's Guide to MAX+plus II

Experiment VERI: FPGA Design with Verilog (Part 1)

Circuit design with configurable devices (FPGA)

Verilog Design Entry, Synthesis, and Behavioral Simulation

My First FPGA Design Tutorial

HyperBus Memory Controller (HBMC) Tutorial

Intel Stratix 10 Low Latency 40G Ethernet Design Example User Guide

2. Learn how to use Bus Functional Models (BFM) and write test cases for verifying your design.

Actel Libero TM Integrated Design Environment v2.3 Structural Schematic Flow Design Tutorial

The development board used in this class is ALTERA s DE The board provides the following hardware:

DE2 Board & Quartus II Software

1 Introduction 2. 2 Background 3. 3 Getting Started 4. 4 Starting a New Project 6. 5 Design Entry Using VHDL Code 13

The board is powered by the USB connection, so to turn it on or off you plug it in or unplug it, respectively.

Adafruit 1-Wire GPIO Breakout - DS2413

Low Latency 100G Ethernet Intel Stratix 10 FPGA IP Design Example User Guide

QUARTUS II Altera Corporation

EE 231 Fall EE 231 Lab 2

University Program 3 Kit

TLL5000 Electronic System Design Base Module

Designing with Nios II Processor for Hardware Engineers

University of Massachusetts Amherst Computer Systems Lab 2 (ECE 354) Spring Lab 1: Using Nios 2 processor for code execution on FPGA

Stand-alone programming AVRs using CircuitPython

Digital Design LU. Lab Exercise 1

Engineering 303 Digital Logic Design Spring 2017

Driver Installation. Getting Started for Windows user (Setting up your Robot)

Xilinx Tutorial Basic Walk-through

Laboratory Exercise 3 Comparative Analysis of Hardware and Emulation Forms of Signed 32-Bit Multiplication

Adafruit 1-Wire Thermocouple Amplifier - MAX31850K

Programming Xilinx SPARTAN 3 Board (Simulation through Implementation)

Transcription:

FPGA RGB Matrix Created by lady ada Last updated on 2017-12-27 09:15:42 PM UTC

Guide Contents Guide Contents Overview Controlling the Adafruit 32x16 RGB LED Matrix with a DE0-Nano FPGA Board Prerequisites New Project User configuration Creating the Quartus II project Pin settings Pin settings Pin Assignments Making pin assignments Synthesize and Upload Synthesizing the design Uploading the bitfile Demos Running the Virtual JTAG interface server The included Processing demos and code More! 2 3 3 3 4 4 4 7 7 9 9 12 12 12 14 14 14 16 Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 2 of 16

Overview Controlling the Adafruit 32x16 RGB LED Matrix with a DE0-Nano FPGA Board Adafruit currently sells a really cool 16x32 RGB LED matrix panel in their store that is "designed to be driven by an FPGA or other high speed processor." The purpose of this tutorial is to help you get started driving a small handful of these displays with the DE0-Nano board, which contains a mid-range Altera FPGA. Prerequisites This tutorial is for those who are familiar with electronics, microcontrollers, programming IDEs and noodling around on a windows computer with drivers, command prompts, editing text files, etc. Its a good introductory FPGA project but not a good introductory microcontroller/electronics project. You need to have the Quartus II software installed on your computer. If not, you can download it from Altera's website or install it from the DVD that comes with the DE0-Nano board. You will also need to install the USB-Blaster drivers that enable your computer to communicate with the FPGA (see this short YouTube video). This tutorial was written by Brian Nez! Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 3 of 16

New Project User configuration Once you are all set up and ready to begin, download the necessary files for this project from its Github repository (click on the "ZIP" icon). Open the file vhdl/config.vhd in a text editor and change line 32 (constant NUM_PANELS...) to indicate the total number of LED panels you have daisy-chained together in your display. For example, if you are using a 1x2 or 2x1 grid, you will want to change the line to: constant NUM_PANELS : integer := 2 You may optionally edit line 33 (constant PIXEL_DEPTH...) in a similar manner to indicate how many bits-per-pixel you want to use. This will affect the level of brightness control available to you later. Finally, save the file! Creating the Quartus II project Start Quartus II and open the "New Project Wizard" from the "File" menu. On the first page, name the project rgbmatrix-fpga (or something similar) and name the top-level entity top_level. Click Next. Now we will add the source code files to the project. Click the "..." button to open the file browser and select the.vhd files in the vhdl folder you downloaded earlier (do not include the testbenches directory). Click "..." again and open the megawizard folder. Set the type drop-down menu to "All Files (*.*)" so you can select the.qip,.cmp, and megawizard_vjtag.vhd files (do not include megawizard_vjtag_inst.vhd). Add them to the project and click Next. Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 4 of 16

The FPGA chip in use on the DE0-Nano is the Cyclone IV EP4CE22F17C6N. You can find it by setting the device family to "Cyclone IV E", package to "FBGA", pin count to 256, and speed grade to 6. Select the chip and click Next. Set the "Simulation" tool name to "ModelSim-Altera" and the format to "VHDL". Leave everything else as "<None>" and Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 5 of 16

click Next. Click Finish to create the project! Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 6 of 16

Pin settings Pin settings Now that the project has been created, you need to change two more settings before we can move on. Go to the Project Navigator panel in the top left area of Quartus and right click on the device ("Cyclone IV E:..."). Select "Device" from the menu. A window will open. Click "Device and Pin Options...". In the left hand side of the new window that comes up, open the "Unused Pins" category. Change the "Reserve all unused pins" settings to "As input tri-stated". This will essentially prevent the unused pins on the FPGA from doing anything unwanted on the DE0-Nano when we program the design. Now select the "Voltage" category. Change the "Default I/O standard" to "3.3-V LVTTL". This is essential to do because the panels will not recognize a signal below this voltage. Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 7 of 16

Click OK, then click OK again. Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 8 of 16

Pin Assignments Making pin assignments Go to the "Assignments" menu and select "Import Assignments...". Import the de0-nano/rgbmatrix-fpga.qsf file. After you do this, a message should appear in the "System" console tab at the bottom of Quartus: "Import completed. 14 assignments were written (of of 14 read)." You can (optionally) customize the pin assignments that were imported by going to the "Assignments" menu and selecting "Assignment Editor". Additional information on the GPIO headers can be found in the DE0-Nano PDF manual (pages 18-20). A mapping of FPGA pins to GPIO headers can also be found in the de0-nano/de0_nano.qsf file (open it with a text editor). Save any changes. Now we are ready to connect the pins on the FPGA to the pins on the RGB LED matrix panel! Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 9 of 16

Please refer to the Adafruit guide for wiring details on the panel side. You may want to use female-female jumper wires to make the connections between the IDC pins! Important: DOUBLE-CHECK ALL YOUR CONNECTIONS BEFORE POWERING ON! Be sure the board's orientation matches the diagrams when you connect the wires! Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 10 of 16

Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 11 of 16

Synthesize and Upload Synthesizing the design To synthesize the design, go to the "Processing" menu and select "Start Compilation", or click on the purple arrow icon in the toolbar. Synthesis should be quite fast since the design is small. After compilation is successful, you should have a new.sof file in your Quartus project directory. It should be 703,642 bytes long. Uploading the bitfile Plug in your DE0-Nano board via the USB connector. Now, go to the "Tools" menu and select "Programmer". In the top left of the window that appears, you should see "USB-Blaster [USB-0]". If instead you see "No Hardware", click on "Hardware Setup..." and (re-)select your device. Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 12 of 16

Now, select the.sof file in the list, ensure "Program/Verify" is checked, and click "Start"! This should take about a second. The FPGA is now programmed with your design! (This only programmed the SRAM though, not the onboard EEPROM so the design is only stored until power is turned off.) Note: In the future, you can use the command script de0-nano/program.cmd to quickly program the FPGA's SRAM with your.sof file (it uses the Quartus command line programming utility). Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 13 of 16

Demos Running the Virtual JTAG interface server Open the command script tcl/run.cmd in a text editor and ensure that the path to the quartus_stp executable is correct. Then, double click the script to launch the Virtual JTAG interface server (tcl/vjtag_server.tcl). This binds to a TCP port to allow programs and scripts to write data to the FPGA through Altera's Tcl API. This allows you to send video to the FPGA from any device that can communicate over the network! For example, a remote Arduino with a Wi-Fi shield, or an Android cellphone. The included Processing demos and code Two demos written in the Processing programming language (a dialect of Java) are available in the processing folder. You can run either demo by copying its directory to your local sketchbook folder (usually ~/Processing). The first demo, Chaser is a basic test animation. The second demo, Magnify sends a real-time screen capture to the panels through the FPGA. Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 14 of 16

Adafruit Industries https://learn.adafruit.com/fpga-rgb-matrix Page 15 of 16

More! Stephen Goadhouse wrote in with an update to this project that eliminates the ghosting effect in the original writeup. Check it out by clicking below LED_Ctrl_Updates.zip https://adafru.it/dje Adafruit Industries Last Updated: 2017-12-27 09:15:41 PM UTC Page 16 of 16