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

Similar documents
NIOS CPU Based Embedded Computer System on Programmable Chip

NIOS CPU Based Embedded Computer System on Programmable Chip

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

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

Tutorial on Quartus II Introduction Using Schematic Designs

University Program 3 Kit

Tutorial on Quartus II Introduction Using Verilog Code

Chapter 2 Getting Hands on Altera Quartus II Software

QUARTUS II Altera Corporation

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

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

TUTORIALS FOR MAX3000A CPLD DEVICES

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180A DIGITAL SYSTEMS I Winter 2015

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

NIOS CPU Based Embedded Computer System on Programmable Chip

Tutorial for Altera DE1 and Quartus II

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

Quartus II Introduction Using Schematic Design

QuartusII.doc 25/02/2005 Page 1

Using Synplify Pro, ISE and ModelSim

SCHEMATIC DESIGN IN QUARTUS

FPGA Introductory Tutorial: Part 1

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

Terasic DE0 Field Programmable Gate Array (FPGA) Development Board

ViCoN-Bot Tutorial. Users Guide Summer 2002 Version 1.0. Jeff Vickers Kwabena Bosompem Kevin Walker Andre Moore

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

Lab 2: Introduction to Verilog HDL and Quartus

TUTORIALS FOR MAX3000A CPLD DEVICES

Altera Quartus II Tutorial ECE 552

Quick Tutorial for Quartus II & ModelSim Altera

Chapter 2: Hardware Design Flow Using Verilog in Quartus II

Quartus II Introduction Using Verilog Design

Lab 6: Integrated the Decoder with Muti-bit Counter and Programming a FPGA

EE 231 Fall EE 231 Lab 2

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

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

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

EXPERIMENT 1. INTRODUCTION TO ALTERA

Laboratory 4 Design a Muti-bit Counter and Programming a FPGA

Design Verification Using the SignalTap II Embedded

Engineering 303 Digital Logic Design Spring 2017

Laboratory Exercise 8

ECE 491 Laboratory 1 Introducing FPGA Design with Verilog September 6, 2004

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

Board-Data Processing. VHDL Exercises. Exercise 1: Basics of VHDL Programming. Stages of the Development process using FPGA s in Xilinx ISE.

COSC 3215 Embedded Systems Laboratory

UNIVERSITI MALAYSIA PERLIS

Quartus. Tutorial. Programmable Logic Development System

Introduction. Design Hierarchy. FPGA Compiler II BLIS & the Quartus II LogicLock Design Flow

SignalTap II with Verilog Designs. 1 Introduction. For Quartus II 13.1

University of Massachusetts Amherst Computer Systems Lab 1 (ECE 354) LAB 1 Reference Manual

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

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

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

ChipScope Demo Instructions

Laboratory 4 Design a Muti-bit Counter

June 2003, ver. 1.2 Application Note 198

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

DOWNLOADING DESIGNS TO THE ALTERA DE10-LITE FPGA

Verilog Design Entry, Synthesis, and Behavioral Simulation

ECE 4305 Computer Architecture Lab #1

University of California, Davis Department of Electrical and Computer Engineering. Lab 1: Implementing Combinational Logic in the MAX10 FPGA

A Beginner's Guide to MAX+plus II

Simulating a Design Circuit Using Qsim

Xilinx ChipScope ICON/VIO/ILA Tutorial

16. Design Debugging Using In-System Sources and Probes

Exercise 1 In this exercise you will review the DSSS modem design using the Quartus II software.

Xilinx Schematic Entry Tutorial

Design Flow Tutorial

9. Building Memory Subsystems Using SOPC Builder

Chip Design with FPGA Design Tools

Introduction to the Altera SOPC Builder Using Verilog Design

Simulating Nios II Embedded Processor Designs

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

Using SOPC Builder. with Excalibur Devices Tutorial. 101 Innovation Drive San Jose, CA (408)

13. LogicLock Design Methodology

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

Estimating Nios Resource Usage & Performance

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

Experiment VERI: FPGA Design with Verilog (Part 1)

Debugging Nios II Systems with the SignalTap II Logic Analyzer

Xilinx Vivado/SDK Tutorial

Xilinx Tutorial Basic Walk-through

Lab 2 EECE473 Computer Organization & Architecture University of Maine

AN 839: Design Block Reuse Tutorial

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

Tutorial 2 Implementing Circuits in Altera Devices

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

Circuit design with configurable devices (FPGA)

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

AN 826: Hierarchical Partial Reconfiguration Tutorial for Stratix 10 GX FPGA Development Board

EE 1315 DIGITAL LOGIC LAB EE Dept, UMD

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

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

AN 818: Static Update Partial Reconfiguration Tutorial

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

Using ChipScope. Overview. Detailed Instructions: Step 1 Creating a new Project

AN 818: Static Update Partial Reconfiguration Tutorial

Programmable Logic Design I

Transcription:

SOPC LAB1 I. Introduction The purpose of this lab is to familiarize you with all the items in the kit. This tutorial tells you how to develop FPGA system in Quartus II. You are ready to begin using the Nios Development Kit to create your own design. Once you finish your design, you should measure your signal by using LA (Logic Analyzer) and PG (Pattern Generator). II. Lab contents At lab1 you have to design a 4-bit (0 ~ 15) positive edge trigger count up counter. It can load input value when Load = 1 and clear output value when Reset = 1. When Enable = 1 it has output value. So we have 4-input data pins, 4-input control pins (Clock, Reset, Load, and Enable), and 4-output data pins. Use Quartus II to compile your design and download it to APEX20K (we take it as a FPGA board in this Lab). Verify your design by PG and LA. Reset Load Data_in 4 Enable 4-bit count up counter 4 Data_out Clock 12/25/2002 ACCESS IC LAB P. 1

Clock Reset Enable Load Data_out H/L/ No Change (Hold) 1 Clear 0 0 No Change (Hold) 0 1 Data_in 0 1 0 Count (Increment) III. Tutorial 1. Start the Quartus II Software In this section, you start the Quartus II software and begin creating your project. To start the Quratus II software, use the following methods: Choose Start menu programs Altera Quaruts II <version> 2. Create a project Before you begin, you must create a new Quartus II project. To crate a new project, perform the following steps: (1) Choose File New Project Wizard. (2) Click Next. (3) Specify the working directory for your project. This walkthrough uses the directory C:\my documents\avlsi\<your id no.>\lab1. (4) Specify the name of the project and the top-level design entity. This lab 12/25/2002 ACCESS IC LAB P. 2

uses My_project. (5) Click Finish. 3. Create a New.bdf In this step you create a new BDF called My_project.bdf. This file is the top-level design entity of the counter project. To create a new BDF, follow these steps: (1) Choose File New. The Device Design Files tab of the New dialog box appears automatically. (2) In the Device Design Files tab, select Block Diagram / Schmatic file. (3) Click OK. A new Block Editor window appears. (4) Choose File Save As (5) The Save As dialog box automatically displays the project directory C:\my documents\avlsi\<your id no.>\lab1. You will save the file into this directory. (6) In the File name box, type counter as the name of the BDF, if necessary. (7) Make sure Add file to current project is turned on. (8) Click Save. The file is saved and added to the project. Leave the.bdf 12/25/2002 ACCESS IC LAB P. 3

open for the remainder of the Design Entry section. 4. Add the Symbol to the BDF In this section you create a new symbol for your Verilog code and add it to your BDF. Follow these steps to add the symbol: (1) Click the Block tool in the Block Editor Toolbar. (2) Click and drag on the block diagram counter.bdf. You can see the block symbol on the diagram. (3) Right click on the Block symbol and choose Block Property. A Block Property window shows. (4) In the Name box, Type counter as the name of the block. (5) Choose I/O and type your I/O pin Name and Type. When you input one pin, click Add to display on Existing block I/Os section. (6) When input all pins, click OK. (7) Right click on the Block symbol and select AutoFit to adjust your block symbol size. 12/25/2002 ACCESS IC LAB P. 4

5. Add Pins & Primitives Before you do compilation, you have to enter input, output, and bidirectional pins. Perform the following steps: (1) Click the Symbol Tool button on the Block Editor toolbar. The Symbol dialog box appears. (2) In the libraries list of the Symbol dialog box, click the + icon to expand the C:\quartus\library folder. Expand the primitives folder and then expand the pin folder. (3) In the pin folder, select the input primitive. (4) Click OK. (5) Click an empty space five times to insert a total of 5 INPUT pin symbols. (6) Repeat steps (3) through (4) to inset 1 OUTPUT pin symbol. (7) Double-click the pin symbol that you entered. The General tab of the Pin Properties dialog box appears. (8) Type pin name in the Pin name(s) box. Repeat this until all the pins has it pin name. (9) Move the input pin to touch the Block Symbol, and then move away. You can see they make connection. Repeat this until all the pins have connected. Of course you can use the wire or bus in the Block Editor toolbar to draw the line. 12/25/2002 ACCESS IC LAB P. 5

6. Create a Verilog file Now you can write your Verilog code in the block diagram. To write your Verilog code, follow the steps: (1) Right click on the Block symbol and select Create Design file from Selected Block. The Create Design File tab appears automatically. (2) Choose Verilog HDL and input file counter.v in the File name tap. Click OK. (3) You can see the counter.v file that has some information and it creates Module counter and Port Declaration automatically. Write your Verilog code into this file. (4) Repeat steps (1) through (3) to create VHDL code if you are familiar with it. (5) Choose File Save. 12/25/2002 ACCESS IC LAB P. 6

7. Create compiler settings You can create Compiler settings to control the compilation process. The compiler settings specify the compilation focus, the type of compilation to perform, the device to target, and other options. This section includes the following steps: (1) Choose Processing Compile Mode (2) Choose Processing Compiler Settings (3) View the Compiler General Settings. It displays only the default compiler general settings created by the Quartus II software when the project was initially created. (4) Specify the Chips & Devices. In the family list, select APEX 20KE then you can see many types listed in the Available devices. Choose EP20K200EFC484-2X for our FPGA design. Under Target device, select Specific device selected in Available device list. You can go to step 8 to do Pin Assignment. (5) Select Mode. In the Compilation level, choose Full compilation, including programming file generation and actual timing data. In compilation speed/disk usage tradeoff, choose Smart compilation/mode disk space. (6) Click Synthesis & Fitting. In the Timing-driven compilation, choose Optimize timing and Optimize I/O cell register placement for timing. (7) Specify Verification. Choose Run timing analysis. (8) Choose Processing Start compilation. You also click the compile toolbar button. (9) When compilation completes, you can view the results in the counter Compilation Report windows. If the Compiler displays any error messages, you should correct them in your design and recompile it until it is error-free. (10) You can select Pin-Out File in the Results for My_project to check if the pin assignment is correct. 12/25/2002 ACCESS IC LAB P. 7

8. Specify the Pin Assignments You have to assign your pins in order that we can use LA & PG to verify your design. To verify the pin assignments, follow these steps. (1) Choose Processing Compiler Settings (2) Click the Chips & Devices tab. (3) Click Assign Pins. The Pin Assignments dialog box appears with the new pin assignments listed in the Available Pins & Existing Assignments list. (4) You can see the Connector JP11 in the Figure 1. We use these pins to input and output our values. You also can use other pins that showed in our slides. Choose K1 in the Available Pins & Existing Assignments list. (5) Input Clock (your pin name in the Verilog or VHDL code, for example) in the Pin name. Click Add. (6) Repeat this step until all the pin names are in the Available Pins & Existing Assignments list. (7) Click OK. 12/25/2002 ACCESS IC LAB P. 8

Figure 1 9. Create simulate settings You can create Simulate settings to control the simulation process. The simulate settings specify the simulation focus, the type of simulation to perform, time period, and other options. Before you begin, you have to create a new waveform file. Follow these steps to start simulation: 12/25/2002 ACCESS IC LAB P. 9

(1) Choose File New. The Device Design Files tab of the New dialog box appears automatically (2) Click Other Files. (3) In the Other Files tab, select Vector Waveform File. (4) Click OK. Then the Waveform Editor Window shows. (5) Choose Time End time. The New Time dialog box appears. You can input the whole time that you want to see. Input 200, for example. Then click OK. (6) Choose View Auxiliary Windows Node Finder. The Node Finder block shows. Select Pins: all in the Filter tab and you can see the counter in the Look tab. (7) Click Start. You can see the I/O pin name display in the Nodes Found. Select the I/O ports you want, and drag them to the Name block of the Waveform. (8) Close Node Finder block. You can see the pins you select display on the Name block and they have their initial value. (9) Next we assign the values on each I/O pins. Right click on the name and choice value count value. The Count Value block shows. Input your test pattern in the Counting block. Keeping doing this until you specify all the input pins values. (10) Choose File Save As. In the File name box, type My_project as the name of the waveform. (11) Choose Processing Simulation. (12) Choose Processing Simulator Settings. View the simulator General Settings. It displays only the default compiler general settings created by the Quartus II software when the project was initially created. (13) Select Time/Vectors. In the simulation period, choose Run simulation 12/25/2002 ACCESS IC LAB P. 10

until all vector stimuli are used. (14) Click Mode. In the simulation mode, choose Timing. (15) Specify Options. Choose simulation coverage reporting. (16) Choose Process Run simulation. Then you can see the waveforms in the block and know if it works correctly. 10. Download our program Once you have properly connected and set up the ByteBlasterMV cable to transmit configuration data over the JTAG port, you can configure the APEX device on the Nios development board with your design. To configure the APEX device on the Nios Development board with the counter design, follow these steps: (1) Choose Process Open Programmer. The Programmer window opens a blank Chain Description File (.cdf). (2) Choose File Save AS. (3) In the Save As dialog box, type My_project.cdf in the File name box. (4) Click Save. (5) In the Mode list of the Programmer window, make sure JTAG is selected. (6) Under Programming Hardware, click Setup. The Hardware Setup dialog box appears. (7) In the Hardware Type list, select ByteBlasterMV. (8) In the Port list, select the port that is connect to the ByteBlasterMV cable. Click OK. (9) Click Close to exit the Hardware Setup window. (10) Click Add File. The Select Programming File dialog box appears. (11) Specify the My_project.sof file in the File name box. (12) Click Open. The SOF is listed in the Programmer window. (13) In the Programmer window, turn on Program/Configure. See figure. (14) On the Nios development board, make sure switch SW8 is in the CONNECT position, and that switches SW9 and SW10 are in the BYPASS position. Figure illustrates the correct configuration of the JTAG switches: 12/25/2002 ACCESS IC LAB P. 11

(15) Click Start. The Programmer begins to download the configuration data to the APEX device. The Progress filed displays the percentage of data that is downloaded. A message appears when the configuration is complete. 11. Connect Pattern Generator (PG) and Logic Analyzer (LA) Now we connect PG and LA to our Board in order to verify our code. Perform the following steps: (1) Connect the probe of the PG and LA to the input and output pins, respectively, of APEX20K that we defined in step 8. Check carefully with your pin connections and ground also connect to board. (2) Execute the PG. (3) Set work frequency in environment parameter setting. Be sure that 12/25/2002 ACCESS IC LAB P. 12

the frequency is not so fast that LA cannot sample it. We set it 20MHz. (4) Set all input pins in signal menu and edit their waveforms. (5) Execute the LA. (6) Set trigger level in trigger level setting. (7) Set all output pins in signal menu. (8) Set sampling frequency. Make sure that the sampling frequency is four times or more the work frequency so that the LA can sample it. We set it 100MHz. (9) Set trigger condition in trigger parameter settings. (10) Push sampling data in the LA. (11) Push output waveform in the PG. (12) Push stop sampling data in the LA. You can see the output waveform. IV. Demands 1. Show your Verilog code (4-bit positive edge trigger counter). 2. Show your Pin-out file. (You can go your My_project directory and find the file.) 3. Show your simulation waveform diagram under the Quartus II simulation mode. 4. Show your result by PG and LA. V. Bonus Is there possible to make your design run at more high frequency? If we can, how do you make it? If not, why? Please discuss this more. 12/25/2002 ACCESS IC LAB P. 13