Laboratory 4 Design a Muti-bit Counter

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

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 # 10: Implementing Binary Adders. Name: Date:

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

Laboratory Exercise 3

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

Terasic DE0 Field Programmable Gate Array (FPGA) Development Board

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

FPGA Introductory Tutorial: Part 1

Introduction to VHDL Design on Quartus II and DE2 Board

QuartusII.doc 25/02/2005 Page 1

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

Laboratory Exercise 8

Experiment 8 Introduction to VHDL

Quick Tutorial for Quartus II & ModelSim Altera

Laboratory Exercise 7

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

Chip Design with FPGA Design Tools

Altera Quartus II Tutorial ECE 552

Tutorial for Altera DE1 and Quartus II

Tutorial on Quartus II Introduction Using Schematic Designs

UNIVERSITI MALAYSIA PERLIS

Engineering 303 Digital Logic Design Spring 2017

NIOS CPU Based Embedded Computer System on Programmable Chip

Lab 3: Standard Combinational Components

Laboratory Exercise 1

Chapter 2 Getting Hands on Altera Quartus II Software

NIOS CPU Based Embedded Computer System on Programmable Chip

NIOS CPU Based Embedded Computer System on Programmable Chip

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

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

Tutorial on Quartus II Introduction Using Verilog Code

Quartus II Introduction Using Schematic Design

ENEE 245 Lab 1 Report Rubrics

Lab #12: ArithmeticLogic Unit

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

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

EXPERIMENT 1. INTRODUCTION TO ALTERA

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

SCHEMATIC DESIGN IN QUARTUS

EET 1131 Lab #7 Arithmetic Circuits

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

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

QUARTUS II Altera Corporation

Laboratory Exercise 9

CS303 LOGIC DESIGN FINAL EXAM

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

CSEE W4840 Embedded System Design Lab 1

Lab 2 EECE473 Computer Organization & Architecture University of Maine

Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits

Experiment 18 Full Adder and Parallel Binary Adder

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

Advanced Electronics Lab.

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

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

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

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

TUTORIALS FOR MAX3000A CPLD DEVICES

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

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

CCE 3202 Advanced Digital System Design

Altera Quartus II Tutorial

TUTORIALS FOR MAX3000A CPLD DEVICES

CSEE W4840 Embedded System Design Lab 1

CCE 3202 Advanced Digital System Design

CSEE W4840 Embedded System Design Lab 1

LAB 2: INTRODUCTION TO LOGIC GATE AND ITS BEHAVIOUR

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

Quartus II Introduction Using Verilog Design

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

Chapter 2: Hardware Design Flow Using Verilog in Quartus II

Introduction to the Altera SOPC Builder Using Verilog Design

PART 1. Simplification Using Boolean Algebra

EE 231 Fall EE 231 Lab 2

Laboratory Exercise 5

Digital Systems Laboratory

DE2 Board & Quartus II Software

ENEE245 Digital Circuits and Systems Lab Manual

Using Library Modules in VHDL Designs

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.

ENEE245 Digital Circuits and Systems Lab Manual

Using Library Modules in VHDL Designs

CSCB58 - Lab 3. Prelab /3 Part I (in-lab) /2 Part II (in-lab) /2 TOTAL /8

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

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

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

ECE241 - Digital Systems. University of Toronto. Lab #2 - Fall Introduction Computer-Aided Design Software, the DE2 Board and Simple Logic

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

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

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

IMPLEMENTING COUNTERS

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

Experiment VERI: FPGA Design with Verilog (Part 1)

Field Programmable Gate Array

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

Chapter 13 Programmable Logic Device Architectures

Tutorial 2 Implementing Circuits in Altera Devices

Transcription:

Laboratory 4 Design a Muti-bit Counter Background A. Approach I: Design 3-bit counter with and clear 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 Truth Table Inputs Outputs CLRN (clr) T clock Q 1 1 Toggle 1 0 X No change 0 X X 0 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 Q 2Q 1Q 0: 000 001 010 011 100 101 110 111 000001 B. Design 3-bit counter with and VHDL design for three-bit counter (Figure 4) with and. three_bit_counter inst 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 three_bit_counter.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 (three_bit_counter.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 three_bit_counter inst 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 three_bit_counter dec7seg inst dec[2..0] inst1 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. Project: Your Turn to Design 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 8-bit counter design 7. Write a VHDL file or create a BDF file that defines a 8-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? 8. Create a waveform vector and simulate your circuit to verify its correctness of the design of 8-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.