Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.

Slides:



Advertisements
Similar presentations
ENGIN112 L23: Finite State Machine Design Procedure October 27, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 23 Finite State Machine.
Advertisements

Chapter #8: Finite State Machine Design 8
Finite State Machines (FSMs)
Lecture #24 Page 1 EE 367 – Logic Design Lecture #24 Agenda 1.State Machines Review Announcements 1.n/a.
Sequential Circuits Storage elements
State-machine structure (Mealy)
VIII - Working with Sequential Logic © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Finite state machine optimization State minimization  fewer.
Analysis of Clocked Sequential Circuits
Counters. In class excercise How to implement a “counter”, which will count as 0,3,1,4,5,7,0,3,1,…… Q2Q1Q0D2D1D
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Circuits require memory to store intermediate data
Chapter 3 Digital Logic Structures
No. 9-1 Chapter #9: Finite State Machine Optimization.
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
ECE 331 – Digital System Design State Reduction and State Assignment (Lecture #22) The slides included herein were taken from the materials accompanying.
ECE 331 – Digital System Design
Sequential Circuit Design. 2 State Optimization Equivalent States:  Two states are equivalent if, for each member of the set of inputs,  they give exactly.
ECE C03 Lecture 111 Lecture 11 Finite State Machine Optimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE C03 Lecture 101 Lecture 10 Finite State Machine Design Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE C03 Lecture 131 Lecture 13 Finite State Machine Optimization Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
Spring 2002EECS150 - Lec14-seq1 Page 1 EECS150 - Digital Design Lecture 14 - Sequential Circuits I (State Elements) March 12, 2002 John Wawrzynek.
Give qualifications of instructors: DAP
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
Spring 2002EECS150 - Lec0-intro Page 1 EECS150 - Digital Design Lecture 9 - Finite State Machines 1 February 19, 2002 John Wawrzynek.
ENEE 408C Lab Capstone Project: Digital System Design Fall 2005 Sequential Circuit Design.
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
ENGIN112 L25: State Reduction and Assignment October 31, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 25 State Reduction and Assignment.
CSCI 3301 Transparency No. 9-1 Chapter #9: Finite State Machine Optimization Contemporary Logic Design.
Lecture 17 General finite state machine (FSM) design
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Topics n Basics of sequential machines. n Sequential machine specification. n Sequential.
SEQUENTIAL CIRCUITS Introduction
1 COMP541 State Machines Montek Singh Feb 8, 2012.
Elevator Controller We’re hired to design a digital elevator controller for a four-floor building st try: Design a counter that counts up.
Lecture 18 More Moore/Mealy machines.
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
1 CSE370, Lecture 19 Lecture 19 u Logistics n Lab 8 this week to be done in pairs íFind a partner before your lab period íOtherwise you will have to wait.
Announcements Assignment 8 posted –Due Friday Dec 2 nd. A bit longer than others. Project progress? Dates –Thursday 12/1 review lecture –Tuesday 12/6 project.
Module : FSM Topic : types of FSM. Two types of FSM The instant of transition from the present to the next can be completely controlled by a clock; additionally,
Introduction to State Machine
9-1 Introduction Chapter #9: Finite State Machine Optimization.
Counters. In class excercise How to implement a “counter”, which will count as 0,3,1,4,5,7,0,3,1,…… Q2Q1Q0D2D1D
Review of Digital Logic Design Concepts OR: What I Need to Know from Digital Logic Design (EEL3705)
Lecture 5. Sequential Logic 2 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
DLD Lecture 26 Finite State Machine Design Procedure.
Digital Logic Design.
Digital Circuits State Reduction and Assignment State Reduction reductions on the number of flip-flops and the number of gates a reduction in the.
DESIGN OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
1 State Reduction Goal: reduce the number of states while keeping the external input-output requirements unchanged. State reduction example: a: input 0.
CEC 220 Digital Circuit Design Mealy and Moore State Machines Friday, March 27 CEC 220 Digital Circuit Design Slide 1 of 16.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Sequential Circuit Design 05 Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.
Finite state machine optimization
Sequential Networks and Finite State Machines
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Finite state machine optimization
Chapter #6: Sequential Logic Design
Lecture 12 Analysis of Clocked Sequential Network
FIGURE 5.1 Block diagram of sequential circuit
FINITE STATE MACHINES (FSMs)
David Culler Electrical Engineering and Computer Sciences
CSE 370 – Winter Sequential Logic-2 - 1
EECS Components and Design Techniques for Digital Systems Lec 08 – Using, Modeling and Implementing FSMs David Culler Electrical Engineering.
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 20 State minimization via row matching.
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John Wawrzynek

Spring 2002EECS150 - Lec15-seq2 Page 2 Finite State Machines Example: Edge Detector Bit are received one at a time (one per cycle), such as: time Design a circuit that asserts its output for one cycle when the input bit stream changes from 0 to 1. Try two different solutions. FSM CLK IN OUT

Spring 2002EECS150 - Lec15-seq2 Page 3 State Transition Diagram Solution A IN PS NS OUT ZERO CHANGE ONE

Spring 2002EECS150 - Lec15-seq2 Page 4 Solution A, circuit derivation IN PS NS OUT ZERO CHANGE ONE

Spring 2002EECS150 - Lec15-seq2 Page 5 Solution B Output depends non only on PS but also on input, IN IN PS NS OUT Let ZERO=0, ONE=1 NS = IN, OUT = IN PS’ What’s the intuition about this solution?

Spring 2002EECS150 - Lec15-seq2 Page 6 Edge detector timing diagrams Solution A: output follows the clock Solution B: output changes with input rising edge and is asynchronous wrt the clock.

Spring 2002EECS150 - Lec15-seq2 Page 7 FSM Comparison Solution A Moore Machine output function only of PS maybe more state synchronous outputs –no glitching –one cycle “delay” –full cycle of stable output Solution B Mealy Machine output function of both PS & input maybe fewer states asynchronous outputs –if input glitches, so does output –output immediately available –output may not be stable long enough to be useful:

Spring 2002EECS150 - Lec15-seq2 Page 8 FSM Recap Moore Machine Mealy Machine Both machine types allow one-hot implementations.

Spring 2002EECS150 - Lec15-seq2 Page 9 FSM Optimization State Reduction: Motivation: lower cost fewer flip-flops in one-hot implementations possibly fewer flip-flops in encoded implementations more don’t cares in NS logic fewer gates in NS logic Simpler to design with extra states then reduce later. Example: Odd parity checker. Two machines - identical behavior.

Spring 2002EECS150 - Lec15-seq2 Page 10 State Reduction State Reduction is based on: Two states are equivalent if, for each member of the set of inputs, they give exactly the same output and send the circuit either to the same state or to an equivalent state. If two states are equivalent, one can be eliminated without effecting the behavior of the FSM. Several algorithms exist: –Row matching method. –Implication table method. “Row Matching” is based on the state-transition table: If two states have the same output, and both transition to the same next state, or both transition to each other, or both self-loop, then they are equivalent. Combine the equivalent states into a new renamed state. Repeat until no more states are combined. –Note: This algorithm is slightly different than the book.

Spring 2002EECS150 - Lec15-seq2 Page 11 Row Matching Example NS output PS x=0 x=1 x=0 x=1 a a b 0 0 b c d 0 0 c a d 0 0 d e f 0 1 e a f 0 1 f g f 0 1 g a f 0 1 State Transition Table

Spring 2002EECS150 - Lec15-seq2 Page 12 Row Matching Example NS output PS x=0 x=1 x=0 x=1 a a b 0 0 b c d 0 0 c a d 0 0 d e f 0 1 e a f 0 1 f e f 0 1 NS output PS x=0 x=1 x=0 x=1 a a b 0 0 b c d 0 0 c a d 0 0 d e d 0 1 e a d 0 1 Reduced State Transition Diagram

Spring 2002EECS150 - Lec15-seq2 Page 13 State Reduction The “row matching” method is not guaranteed to result in the optimal solution in all cases, because it only looks at pairs of states. For example: Another (more complicated) method guarantees the optimal solution: “Implication table” method: See Mano, chapter 9.

Spring 2002EECS150 - Lec15-seq2 Page 14 State Assignment (from Katz) In encoded (non-one-hot) FSMs, the choice of binary encodings for the states has an influence on the number of logic gates (or LUTs) needed to compute the next state and outputs. For n states, at least s bits are needed for a binary encoding. Where different encodings exist. We will look at several “by-hand” heuristic methods for choosing good assignments. Some CAD tools will make assignments automatically.

Spring 2002EECS150 - Lec15-seq2 Page 15 State Maps Assignment State q2 q1 q0 S S S S S Assignment State q2 q1 q0 S S S S S “K-maps” are used to help visualize good encodings. Adjacent states in the STD should be made adjacent in the map.

Spring 2002EECS150 - Lec15-seq2 Page 16 State Assignment Alternative heuristics based on input and output behavior as well as transitions: Adjacent assignments to: states that share a common next state (group 1's in next state map) states that share a common ancestor state (group 1's in next state map) states that have common output behavior (group 1's in output map)

Spring 2002EECS150 - Lec15-seq2 Page 17 Example Example: 3-bit Sequence Detector Highest Priority: (S3', S4') Medium Priority: (S3', S4') Lowest Priority: 0/0: (S0, S1', S3') 1/0: (S0, S1', S3', S4')

Spring 2002EECS150 - Lec15-seq2 Page 18 Example Paper and Pencil Methods Reset State = 00 Highest Priority Adjacency Not much difference in these two assignments Not much difference in these two assignments S0S1’ S3’S4’ S0S3 S1’S4’ Q0 Q1

Spring 2002EECS150 - Lec15-seq2 Page 19 State Assignment Example Highest Priority: 2x(S1, S2) (S3', S4'), (S7', S10') Medium Priority: (S1, S2), 2x(S3', S4'), (S7', S10') Lowest Priority: 0/0: (S0, S1, S2, S3', S4', S7') 1/0: (S0, S1, S2, S3', S4', S7') Another Example: 4 bit String Recognizer

Spring 2002EECS150 - Lec15-seq2 Page 20 State Assignment 00 = Reset = S0 (S1, S2), (S3', S4'), (S7', S10') placed adjacently

Spring 2002EECS150 - Lec15-seq2 Page 21 State Assignment Effect of Adjacencies on Next State Map First encoding exhibits a better clustering of 1's in the next state map