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

Similar documents
Laboratory 4 Design a Muti-bit Counter

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

CET4805 Component and Subsystem Design II. EXPERIMENT # 5: Adders. Name: Date:

CET4805 Component and Subsystem Design II. EXPERIMENT # 2: VHDL(VHSIC Hardware Descriptive Language) Name: Date:

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

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 10: Implementing Binary Adders. Name: Date:

Laboratory Exercise 3

Terasic DE0 Field Programmable Gate Array (FPGA) Development Board

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

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

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

Introduction to VHDL Design on Quartus II and DE2 Board

Tutorial for Altera DE1 and Quartus II

Laboratory Exercise 7

Laboratory Exercise 8

ENEE 245 Lab 1 Report Rubrics

Quick Tutorial for Quartus II & ModelSim Altera

FPGA Introductory Tutorial: Part 1

Chip Design with FPGA Design Tools

Chapter 2 Getting Hands on Altera Quartus II Software

QuartusII.doc 25/02/2005 Page 1

TUTORIALS FOR MAX3000A CPLD DEVICES

CSEE W4840 Embedded System Design Lab 1

QUARTUS II Altera Corporation

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

Lab 3: Standard Combinational Components

Altera Quartus II Tutorial ECE 552

NIOS CPU Based Embedded Computer System on Programmable Chip

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

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

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

NIOS CPU Based Embedded Computer System on Programmable Chip

Tutorial on Quartus II Introduction Using Schematic Designs

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

TUTORIALS FOR MAX3000A CPLD DEVICES

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

Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits

CSEE W4840 Embedded System Design Lab 1

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

UNIVERSITI MALAYSIA PERLIS

NIOS CPU Based Embedded Computer System on Programmable Chip

CSEE W4840 Embedded System Design Lab 1

EET 1131 Lab #7 Arithmetic Circuits

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

Engineering 303 Digital Logic Design Spring 2017

CS303 LOGIC DESIGN FINAL EXAM

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Lab Assignment 3 Altera Richards Controller and Logic Analyzer Laboratory Rev.

Lab #12: ArithmeticLogic Unit

Lab 2 EECE473 Computer Organization & Architecture University of Maine

EXPERIMENT 1. INTRODUCTION TO ALTERA

ECE 437 Computer Architecture and Organization Lab 6: Programming RAM and ROM Due: Thursday, November 3

ENEE245 Digital Circuits and Systems Lab Manual

Quartus II Introduction Using Schematic Design

Tutorial on Quartus II Introduction Using Verilog Code

CSC / EE Digital Systems Design. Summer Sample Project Proposal 01

Advanced Electronics Lab.

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

ENEE245 Digital Circuits and Systems Lab Manual

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

Laboratory Exercise 5

Laboratory Exercise 9

Experiment 18 Full Adder and Parallel Binary Adder

Chapter 2: Hardware Design Flow Using Verilog in Quartus II

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.

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

SCHEMATIC DESIGN IN QUARTUS

ECE 353 Lab 4. MIDI Receiver in Verilog. Professor Daniel Holcomb UMass Amherst Fall 2016

EXPERIMENT NUMBER 7 HIERARCHICAL DESIGN OF A FOUR BIT ADDER (EDA-2)

Using Library Modules in VHDL Designs. 1 Introduction. For Quartus II 12.1

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

DE2 Board & Quartus II Software

EE 231 Fall EE 231 Lab 2

Lab 3. Advanced VHDL

Laboratory Exercise 1

Experiment 8 Introduction to VHDL

Digital Circuit Design Using Xilinx ISE Tools

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

Using Library Modules in VHDL Designs

CCE 3202 Advanced Digital System Design

Using Library Modules in VHDL Designs

Introduction to the Altera SOPC Builder Using Verilog Design

Using Library Modules in Verilog Designs. 1 Introduction. For Quartus II 13.0

EE 1315 DIGITAL LOGIC LAB EE Dept, UMD

Field Programmable Gate Array

Laboratory Exercise 4

Embedded Systems. "System On Programmable Chip" Design Methodology using QuartusII and SOPC Builder tools. René Beuchat LAP - EPFL

Embedded Systems. "System On Programmable Chip" Design Methodology using QuartusII and SOPC Builder tools. René Beuchat LAP - EPFL

Chapter 13 Programmable Logic Device Architectures

CCE 3202 Advanced Digital System Design

Quartus II Introduction Using Verilog Design

COSC 3215 Embedded Systems Laboratory

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

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

University of Florida EEL 3701 Drs. Eric M. Schwartz & Karl Gugel. Quartus ROM Creation Instructions (in Quartus Prime Lite 17.1)

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

Programmable Logic Design Techniques I

LAB 2: INTRODUCTION TO LOGIC GATE AND ITS BEHAVIOUR

Design Flow Tutorial

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

Transcription:

Laboratory 4 Design a Muti-bit Counter and Programming a FPGA For your report: The problem written in English The flowchart or function table to solve the problem if it is necessary The design entry included (VHDL and Schematic) The RTL Viewer has to be included The simulation result for designed digital component The analysis for the simulation The pin assignment- the table for assigning the circuit inputs and outputs to specific pins on the FPGA The configuration for the FPGA Device (JTAG) The test table you designed to record and verify the designed circuit on hardware Picture taken for your test if it is necessary The conclusion Background A. Approach I: Design 3-bit counter T-type flip-flop is shown in Figure 1. A T flip-flop is obtained from a JK flip-flop by tying the J and K inputs together to form the T input. Figure 1 Figure 2 shows BDF design for three-bit counter by using three T-type flip-flops Figure 2 Figure 3 is the simulation result. Check the relation among clock, Q0, Q1, and Q2 (set clr as high, en is high). For your simulation, you should consider clr as high and low, en as high and low, and observe the outputs of Q0, Q1, and Q2.

Figure 3 Suppose a clock frequency is clock = 24kHz The frequency of the 2 0 output line (Q0) is 1/2 of the input clock line (12kHz) The frequency of the 2 1 output line (Q1) is 1/4 of the input clock line (6kHz) The frequency of the 2 2 output line (Q2) is 1/8 of the input clock line (3kHz) B. Approach II: Design 3-bit counter VHDL design for three-bit counter (Figure 4) with and. Figure 4 Step 1. Start the Quartus II software. Select File New Project Wizard. And create a new project name under the directory C:\temp\your initial \Lab. Assign the project name counter3, assign Cyclone II for the device family, and select the EP2C35F672C6 chip in the Family & device settings, which is the FPGA used on Altera s DE2 board. Figure 5

Step 2. Open a new VHDL Device Design file (File > New) by highlighting VHDL File. And click OK. Type the VHDL code Step 3. Save the VHDL file (Figure 5) as.vhd as part of our project under your subfolder. Place a check mark in the space labeled Add file to current project and press Save Step 4. Select File Create/Update Create Symbol Files for Current File (.bsf symbol) to create a symbol file for the VHDL code entered. A Compilation Report window initially displays Report not available ; however, be patient. A display window should soon appear stating that the Create Symbol File was (or not) successful. Click OK and close the Compilation Report window. Step 5. Open a new Schematic file (File > New) by highlighting Block Diagram/Schematic File. And click OK. Find the symbol file (bsf file you just created for VHDL in Step 4) from Project folder to support your design in BDF view. Insert the symbol and input/output pins OUTPUT Figure 6 Step 6. Before compiling this bdf file, we need to name this bdf file and save it as part of our project under your subfolder. Choose File > Save As and enter File name as counter3. Place a check mark in the space labeled Add file to current project and press Save. Step 7. create a Vector Waveform File (vwf) to simulate a design(bdf) file. Set an end time 30 µs for simulation from Edit and then run simulation based on Figure 3. You may have to expand the size of the Simulation Waveforms to suit your need and choose View > Fit in Window to see the entire 30µs waveform. Figure 7 is the simulation result. Check the relation among clock,,, count_out[0], count_out[1], count_out[2]. Integrated the decoder with 3-bit counter Step 1. design a decode in vhdl (Figure 8) Figure 7

Figure 8 Step 2. Save the VHDL file as dec7seg.vhd as part of our project under your subfolder. Place a check mark in the space labeled Add file to current project and press Save Step 3. Select File Create/Update Create Symbol Files for Current File (dec7seg.bsf symbol) to create a symbol file for the VHDL code entered. Step 4. Open a new Schematic file (File > New) by highlighting Block Diagram/Schematic File. And click OK. Find the symbol file (bsf file you created for VHDL) from Project folder to support your design in BDF view. Insert the symbol and input/output pins dec7seg dec[2..0] 1 display[0..6] OUTPUT display[0..6] Figure 9 Step 5. Before compiling this bdf file, we need to name this bdf file and save it as part of our project under your subfolder. Choose File > Save As and enter File name as counter3. Place a check mark in the space labeled Add file to current project and press Save. Step 6. Compile this integrated design (Figure 9) Step 7. You can make a pin configuration, compile your design, and download your design to FPGA board to test your digital system. Step 8. Use the pushbutton KEY0 as the Clock input, switches SW1 and SW0 as Enable and Reset inputs, and 7-segment displays HEX0 to display the hexadecimal count as your circuit operates.

Your Turn to Design Project: Consider the circuit in Figure 10. It is a 4-bit synchronous counter which uses four T-type flip-flops. The counter increments its count on each positive edge of the clock if the Enable signal is asserted. The counter is to 0 by using the Reset signal. Figure 10. A 4-bit counter 4-bit counter 1. Write a VHDL file or create a BDF file that defines a 4-bit counter by using the structure depicted in bdf (Figure 2) or vhdl(figure 5), and compile the circuit. What is the frequency relation between the clock and four outputs from four T-type flip-flops, respectively? 2. Create a waveform vector and simulate your circuit to verify its correctness of the design of 4-bit counter. 3. Is this counter counting up or counting down? 4. Augment your VHDL file or BDF file to use the pushbutton KEY0 as the Clock input, switches SW1 and SW0 as Enable and Reset inputs, and 7-segment displays HEX0 to display the hexadecimal count as your circuit operates. 5. Make the necessary pin assignments and compile the circuit. 6. Programming FPGA and test your implementation. You may use the following library in your VHDL design entry: LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_unsigned.all; your code 12-bit counter design 7. Write a VHDL file or create a BDF file that defines a 12-bit counter by reusing the component of 4-bit counter, and compile the circuit. What is the frequency relation between the clock and all 12 outputs of Q namely Q 0, Q 1, Q 2, Q 3, Q 4, Q 5, Q 6, Q 7, Q 8, Q \9, Q 10, Q 11? 8. Create a waveform vector and simulate your circuit to verify its correctness of the design of 12-bit counter. 9. Augment your VHDL file to use the pushbutton KEY0 as the Clock input, switches SW1 and SW0 as Enable and Reset inputs, and 7-segment displays HEX2, HEX1, HEX0 (or LCD) to display the hexadecimal count as your circuit operates. 10. Make the necessary pin assignments and compile the circuit. 11. Programming FPGA and test your implementation.