ENGIN112 L25: State Reduction and Assignment October 31, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 25 State Reduction and Assignment.

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
Introduction to Sequential Circuits
Finite State Machines (FSMs)
Lecture #24 Page 1 EE 367 – Logic Design Lecture #24 Agenda 1.State Machines Review Announcements 1.n/a.
Give qualifications of instructors: DAP
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.
Give qualifications of instructors: DAP
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
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
ECE 331 – Digital System Design
ECE C03 Lecture 111 Lecture 11 Finite State Machine Optimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
FSMs 1 Sequential logic implementation  Sequential circuits  primitive sequential elements  combinational logic  Models for representing sequential.
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.
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
Sequential Circuits and Finite State Machines Prof. Sin-Min Lee
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.
Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.
CS 140L Lecture 7 Professor CK Cheng 11/12/02. Transformation between Mealy and Moore Machines Algorithm: 1) For each NS, z = S i, j create a state S.
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)
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 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.
Introduction to Sequential Logic Design Finite State-Machine Design.
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.
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits Previously, we described the basic building blocks of sequential circuits,
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
DLD Lecture 26 Finite State Machine Design Procedure.
Digital Logic Design.

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.
EMT 351/4 DIGITAL IC DESIGN Verilog Behavioral Modeling  Finite State Machine -Moore & Mealy Machine -State Encoding Techniques.
Pusat Pengajian Kejuruteraan Mikroelektronik EMT 351/4 DIGITAL IC DESIGN Verilog Behavioural Modeling (Part 4) Week #
Sequential Networks and Finite State Machines
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Chapter #6: Sequential Logic Design
FIGURE 5.1 Block diagram of sequential circuit
ECE 301 – Digital Electronics
FINITE STATE MACHINES (FSMs)
Sequential Networks and Finite State Machines
CSE 140L Discussion Finite State Machines.
Instructor: Alexander Stoytchev
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
Implement FSM with fewest possible states • Least number of flip flops
Guest Lecture by David Johnston
CSE 370 – Winter Sequential Logic-2 - 1
Counters.
Lecture 20 State minimization via row matching.
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
CS M51A/EE M16 Winter’05 Section 1 Logic Design of Digital Systems Lecture 11 February 23 W’05 Yutao He 4532B Boelter Hall
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

ENGIN112 L25: State Reduction and Assignment October 31, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 25 State Reduction and Assignment

ENGIN112 L25: State Reduction and Assignment October 31, 2003 Overview °Important to minimize the size of digital circuitry °Analysis of state machines leads to a state table (or diagram) °In many cases reducing the number of states reduces the number of gates and flops This is not true 100% of the time °In this course we attempt state reduction by examining the state table °Other, more advanced approaches, possible °Reducing the number of states generally reduces complexity.

ENGIN112 L25: State Reduction and Assignment October 31, 2003 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

ENGIN112 L25: State Reduction and Assignment October 31, 2003 State Transition Diagram Solution A IN PS NS OUT ZERO CHANGE ONE

ENGIN112 L25: State Reduction and Assignment October 31, 2003 Solution A, circuit derivation IN PS NS OUT ZERO CHANGE ONE

ENGIN112 L25: State Reduction and Assignment October 31, 2003 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?

ENGIN112 L25: State Reduction and Assignment October 31, 2003 Edge detector timing diagrams °Solution A: output follows the clock °Solution B: output changes with input rising edge and is asynchronous wrt the clock.

ENGIN112 L25: State Reduction and Assignment October 31, 2003 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:

ENGIN112 L25: State Reduction and Assignment October 31, 2003 FSM Recap Moore MachineMealy Machine Both machine types allow one-hot implementations.

ENGIN112 L25: State Reduction and Assignment October 31, 2003 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 next state logic -fewer gates in next state logic Simpler to design with extra states then reduce later. °Example: Odd parity checker Moore machine

ENGIN112 L25: State Reduction and Assignment October 31, 2003 State Reduction °“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 NS output PS x=0 x=1 S0 S0 S1 0 S1 S1 S2 1 S2 S2 S1 0 State Transition Table

ENGIN112 L25: State Reduction and Assignment October 31, 2003 FSM Optimization °Merge state S2 into S0 °Eliminate S2 °New state machine shows same I/O behavior °Example: Odd parity checker. NS output PS x=0 x=1 S0 S0 S1 0 S1 S1 S0 1 State Transition Table

ENGIN112 L25: State Reduction and Assignment October 31, 2003 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

ENGIN112 L25: State Reduction and Assignment October 31, 2003 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

ENGIN112 L25: State Reduction and Assignment October 31, 2003 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. (not responsible for chapter 9 material)

ENGIN112 L25: State Reduction and Assignment October 31, 2003 Encoding State Variables °Option 1: Binary values °000, 001, 010, 011, 100 … °Option 2: Gray code °000, 001, 011, 010, 110 … °Option 3: One hot encoding °One bit for every state °Only one bit is a one at a given time °For a 5-state machine °00001, 00010, 00100, 01000, 10000

ENGIN112 L25: State Reduction and Assignment October 31, 2003 State Transition Diagram Solution B IN PS NS OUT ZERO CHANGE ONE °How does this change the combinational logic?

ENGIN112 L25: State Reduction and Assignment October 31, 2003 Summary °Important to create smallest possible FSMs °This course: use visual inspection method °Often possible to reduce logic and flip flops °State encoding is important One-hot coding is popular for flip flop intensive designs.