Faculty of Electrical & Electronics Engineering BEE3233 Electronics System Design. Laboratory 3: Finite State Machine (FSM)

Similar documents
CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Tajana Simunic Rosing. Source: Vahid, Katz

Experiment # 12. Traffic Light Controller

Lecture 11: Synchronous Sequential Logic

Traffic Light Controller

Administrative issues. Sequential logic

Chapter 5 Synchronous Sequential Logic

Laboratory Exercise 7

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Performance Evolution of 16 Bit Processor in FPGA using State Encoding Techniques

Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems

Modeling Latches and Flip-flops

Serial FIR Filter. A Brief Study in DSP. ECE448 Spring 2011 Tuesday Section 15 points 3/8/2011 GEORGE MASON UNIVERSITY.

FPGA Laboratory Assignment 4. Due Date: 06/11/2012

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

You will be first asked to demonstrate regular operation with default values. You will be asked to reprogram your time values and continue operation

FPGA Implementation of Sequential Logic

Implementation of Dynamic RAMs with clock gating circuits using Verilog HDL

LFSRs as Functional Blocks in Wireless Applications Author: Stephen Lim and Andy Miller

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

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

ELCT201: DIGITAL LOGIC DESIGN

Laboratory Exercise 7

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

FSM Implementations. TIE Logic Synthesis Arto Perttula Tampere University of Technology Fall Output. Input. Next. State.

Modeling Latches and Flip-flops

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

Main Design Project. The Counter. Introduction. Macros. Procedure

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Why FPGAs? FPGA Overview. Why FPGAs?

L11/12: Reconfigurable Logic Architectures

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

CPS311 Lecture: Sequential Circuits

Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: 2. Description of the Circuit:

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

Digital Fundamentals: A Systems Approach

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

University of Victoria Electrical and Computer Engineering CENG 241 Digital Design I Laboratory Manual

Combinational / Sequential Logic

CSC258: Computer Organization. Combinational Logic

Main Design Project. The Counter. Introduction. Macros. Procedure

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

1. Synopsis: 2. Description of the Circuit:

VHDL Design and Implementation of FPGA Based Logic Analyzer: Work in Progress

ECSE-323 Digital System Design. Datapath/Controller Lecture #1

FPGA-BASED EDUCATIONAL LAB PLATFORM

Digital Fundamentals: A Systems Approach

Chapter 11 State Machine Design

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

University of Pennsylvania Department of Electrical and Systems Engineering. Digital Design Laboratory. Lab8 Calculator

Read-only memory (ROM) Digital logic: ALUs Sequential logic circuits. Don't cares. Bus


Ryerson University Department of Electrical and Computer Engineering COE/BME 328 Digital Systems

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

CARLETON UNIVERSITY. Facts without theory is trivia. Theory without facts is bull 2607-LRB

EE 101 Lab 7 Crosswalk

FPGA Based Implementation of Convolutional Encoder- Viterbi Decoder Using Multiple Booting Technique

L12: Reconfigurable Logic Architectures

Dr.Mohamed Elmahdy Winter 2015 Eng.Yasmin Mohamed. Problem Set 6. Analysis and Design of Clocked Sequential Circuits. Discussion: 7/11/ /11/2015

CS8803: Advanced Digital Design for Embedded Hardware

Digital Systems Laboratory 1 IE5 / WS 2001

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

PLTW Engineering Digital Electronics Course Outline

Advanced Digital Logic Design EECS 303

Digital Electronics Course Outline

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output

Implementation of UART with BIST Technique

Application Note. Traffic Signal Controller AN-CM-231

Microprocessor Design

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

INC 253 Digital and electronics laboratory I

Design and implementation (in VHDL) of a VGA Display and Light Sensor to run on the Nexys4DDR board Report and Signoff due Week 6 (October 4)

General: Catalog Description: Grading Policy: Course Code: COE 203 Title: Digital Logic Laboratory Co-requisite(s): COE 202 (Digital Logic Design)

P U Q Q*

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Synchronous Sequential Design

ECT 224: Digital Computer Fundamentals Digital Circuit Simulation & Timing Analysis

2 Sequential Circuits

Digital Electronics II 2016 Imperial College London Page 1 of 8

Tutorial 11 ChipscopePro, ISE 10.1 and Xilinx Simulator on the Digilent Spartan-3E board

Chapter 12. Synchronous Circuits. Contents

Lab 5 FPGA Design Flow Based on Aldec Active-HDL. Fast Reflex Game.

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

Note that none of the above MAY be a VALID ANSWER.

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Programmable Logic Design I

Finite State Machine Design

Lab Assignment 5 I. THE 4-BIT CPU AND CONTROL

Figure 1 Block diagram of a 4-bit binary counter

Figure 1: Feature Vector Sequence Generator block diagram.

Vending Machine. Keywords FSM, Vending Machine, FPGA, VHDL

Logic Design II (17.342) Spring Lecture Outline

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

Authentic Time Hardware Co-simulation of Edge Discovery for Video Processing System

Chapter Contents. Appendix A: Digital Logic. Some Definitions

First Name Last Name November 10, 2009 CS-343 Exam 2

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Chapter 5: Synchronous Sequential Logic

Transcription:

Faculty of Electrical & Electronics Engineering BEE3233 Electronics System Design Laboratory 3: Finite State Machine (FSM) Mapping CO, PO, Domain, KI : CO2,PO3,P5,CTPS5 CO2: Construct logic circuit using HDL.[PO3, P5, CTPS3] CO4: Design finite state machines based on electrical & electronics engineering problem.[po2, C5] PO3: Identify, formulate and provide effective solution to engineering problem P5: Complex Overt Response CTPS3: Ability to get ideas and find alternative solutions Learning Outcomes: a) The concept of finite state machine b) Finite state machines programming in Verilog c) Create text fixture for the system d) Implement the proposed design on FPGA General Xilinx Tips 1. SAVE EARLY AND OFTEN (in your own memory device!!) Xilinx is notorious for crashing at the most inopportune times. Do yourself a favor and save. 2. At the end of a lab session (or any work session), archive your project using the Xilinx utility (this will ensure you save everything), and save this zip archive on your ENIAC drive or on a flash drive. Do NOT assume files will remain on the lab computers or that your computer will be available at a later time. 3. Make sure all components are connected. Loose wires are a frequent cause of problems. 4. Try your hand at debugging first before calling me. You will learn a lot by struggling through problems that seem hard at first. 5. Read all instructions carefully before starting the lab. Often, there will be a little detail that ends up being very important.

Introduction to Finite State Machines Figure 1. Schematic of a finite state machine Finite state machines, or FSMs, are a broad class of sequential circuits. A FSM is a system which transitions from one discrete state to another, and has a finite number of states. The state is stored in a state register, typically implemented as a set of D-flip flops. The next state of the FSM is determined from its inputs and its current state. The output of the FSM may be determined from the input and present state (known as a Mealy machine) or the present state only (a Moore machine). State diagrams are used to define how a state machine transitions from one state to the next. The first step in implementing a state machine is to draw its state diagram. A very simple state diagram is shown in Figure 2. Figure 2. An example state diagram, for a simple state machine

This bubble state diagram has two states, State 0 and State 1. The name of the state and any outputs that are set in that state (LED) are shown inside the bubble. The state transitions, which depend on the inputs (button(0) and button(1)) are shown using arrows. This state diagram shows that if the machine is in State 0, and we press button(1), we ll transition to State 1 and the LED will turn on. Pressing button(1) again will do nothing. Pressing button(0), however, will transition back to State 0 and turn the LED off. If we were to implement this (or any other) state machine in a hardware description language such as VHDL, we would structure the code as shown in Figure 3. Using this kind of structure allows the synthesis tool to detect and optimize the state machine. Figure 3. Typical FSM organization in HDL Figure 3 shows the three parts of a VHDL implementation of a finite state machine: 1. A combinational logic block that computes the output values given the current state, and optionally the input values. 2. A combinational logic block that computes the next state from the current state and the inputs. 3. A synchronous logic block that defines the state register s behavior. This should become clearer as you progress on with this lab.

Mini Project 3 Traffic Light Controller Question:- A busy highway is intersected by a little used farmroad. Detectors C sense the presence of cars waiting on the farmroad. With no car on farmroad, light remain green in highway direction. If vehicle on farmroad, highway lights go from Green to Yellow to Red, allowing the farmroad lights to become green. These stay green only as long as a farmroad car is detected but never longer than a set interval. When these are met, farm lights transition from Green to Yellow to Red, allowing highway to return to green. Even if farmroad vehicles are waiting, highway gets at least a set interval as green. Assume you have an interval timer that generates a short time pulse (TS) and a long time pulse (TL) in response to a set (ST) signal. TS is to be used for timing yellow lights and TL for green lights.

Design a traffic light controller that satisfies the condition mentioned above. 1. Sketch the state diagram for the system using either Moore model or Mealy model. 2. Tabulate the state transition. 3. Verify your design in Xilinx ISE 10.1. a. Use Verilog to implement your system b. Create a testbench and simulate your system

NAME:- ID:- Evaluation Laboratory 3 (8%) Print this and present it to me when you demonstrate your work. Requirement Points Complete the lab on time (2 lab sessions) /2 State diagram of the system /2 Show the Verilog syntax code for the system /2 Show simulations for the system /4 Accuracy Comprehensive text fixture Implementation on FPGA Spartan 3E Board /4 Correct.ucf assignment Display output on LCD Correct Answers /6 Q5, Q6, Q7 Total /20 1. State diagram of the system 2. State transition table 3. Write the Verilog syntax code for the system 4. Sketch / snapshot the simulation results 5. Record the FPGA resources consumed by your ALU design FPGA Resources Utilization Total Available Percentage Utilization Slice LUTs (LookUp Tables) Bounded IOBs

6. What is the maximum estimated frequency at which this design in your ALU can run? a. What is the corresponding minimum clock period? b. Maximum Frequency: MHz Minimum Clock Period: ns 7. Record the path reported under Pad to Pad Report Place and Route Report. Source Pad Destination Pad Delay * Please hand in the design summary report of your ALU design along with this Lab 3 Evaluation form.