Lecture 18 More Moore/Mealy machines.

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)
Analysis of Clocked Sequential Circuits
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Digital Electronics Chapter 5 Synchronous Sequential Logic.
Circuits require memory to store intermediate data
CSE Spring Verilog for Sequential Systems - 1 Today: Verilog and Sequential Logic zFlip-flops yrepresentation of clocks - timing of state.
A Sequential Parity Checker
FSM examples.
Nonlinear & Neural Networks LAB. CHAPTER 13 Analysis of Clocked Sequential Circuit 13.1 A Sequential Parity Checker 13.2 Analysis by Signal Tracing 13.3.
Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
Sequential Circuit Design
ECE 331 – Digital System Design Introduction to and Analysis of Sequential Logic Circuits (Lecture #20) The slides included herein were taken from the.
ECE 331 – Digital System Design
ECE C03 Lecture 101 Lecture 10 Finite State Machine Design Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
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.
Sequential Circuit Design
Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.
VII - Finite State Machines © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Finite State Machines Sequential circuits  primitive sequential elements.
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
ECE 368: CAD-Based Logic Design Lecture Notes # 5
1 COMP541 State Machines Montek Singh Feb 8, 2012.
ECE C03 Lecture 101 Lecture 10 Finite State Machine Design Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Elevator Controller We’re hired to design a digital elevator controller for a four-floor building st try: Design a counter that counts up.
State Machines.
Unit 14 Derivation of State Graphs
1 EECS 465: Digital Systems Lecture Notes # 8 Sequential Circuit (Finite-State Machine) Design SHANTANU DUTT Department of Electrical and Computer Engineering.
Hussein Bin Sama && Tareq Alawneh
1 Lecture 22 State encoding  One-hot encoding  Output encoding State partitioning.
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.
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,
1 CSE370, Lecture 18 Lecture 20 u Logistics n HW6 due Wednesday n Lab 7 this week (Tuesday exception) n Midterm 2 Friday (covers material up to simple.
CSIE.NCTU, DL-6-1 Basic Design Approach of FSM Six Step Process 1. Understand the statement of the Specification 2. Obtain an abstract specification of.
DLD Lecture 26 Finite State Machine Design Procedure.
Digital Logic Design.
ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
CEC 220 Digital Circuit Design Timing Analysis of State Machines
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.

CEC 220 Digital Circuit Design Sequence Detector Design Wednesday, April 01 CEC 220 Digital Circuit Design Slide 1 of 11.
CEC 220 Digital Circuit Design Mealy and Moore State Machines Friday, March 27 CEC 220 Digital Circuit Design Slide 1 of 16.
1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
1 CSE370, Lecture 24 Lecture 26 u Logistics n HW8 due Friday n Ant extra credit due Friday n Final exam a week from today, 12/8 8:30am-10:20am here n Review.
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Lecture 26 Logistics Last lecture Today HW8 due Friday
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 24 Logistics Last lecture Today HW7 due today
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
D Flip-Flop Schematic Block Symbol Truth Table D Q Clk Q Clk D Q(t+1)
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 24 Logistics Last lecture Today HW7 due today
Lecture 20 State minimization via row matching.
Lecture 20 Logistics Last lecture Today HW6 due Wednesday
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Instructor: Alexander Stoytchev
Lecture 18 Logistics Last Lecture Today HW6 due today Midterm 2
Lecture 18 Logistics Last lecture Today HW5 due today (with extra 10%)
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:

Lecture 18 More Moore/Mealy machines

Example: Parity checker Serial input string OUT=1 if odd # of 1s in input OUT=0 if even # of 1s in input Let’s do this for Moore and Mealy

1. State diagram Moore Mealy 0/0 1/1 1/0 0/1

2. State transition table Present Input Next Present State State Output Even 0 Even 0 Even 1 Odd 0 Odd 0 Odd 1 Odd 1 Even 1 Moore Present Input Next Present State State Output Even 0 Even 0 Even 1 Odd 1 Odd 0 Odd 1 Odd 1 Even 0 Mealy

3. State minimization Already minimized Need both states (even and odd) Use one flip-flop

4. State encoding Moore Mealy Present Input Next Present State State Output 0 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 Assignment Even 0 Odd 1 Moore Present Input Next Present State State Output 0 0 0 0 0 1 1 1 1 0 1 1 1 1 0 0 Mealy

5. Next-state logic minimization Assume D flip-flops Next state = (present state) XOR (present input)

6. Implement the design Moore Mealy CLK Input Current State D Q Output

Example: Vending machine Vending Machine FSM N D Reset Clock Open Coin Sensor Release Mechanism

Moore machine 0¢ Reset 5¢ N N + D 10¢ D 15¢ [open] symbolic state table present inputs next present state D N state output 0¢ 0 0 0¢ 0 0 1 5¢ 0 1 0 10¢ 0 1 1 – – 5¢ 0 0 5¢ 0 0 1 10¢ 0 1 0 15¢ 0 1 1 – – 10¢ 0 0 10¢ 0 0 1 15¢ 0 1 0 15¢ 0 1 1 – – 15¢ – – 15¢ 1

Mealy machine 0¢ Reset 5¢ N/0 N + D/1 10¢ D/0 15¢ D/1 symbolic state table present inputs next present state D N state output 0¢ 0 0 0¢ 0 0 1 5¢ 0 1 0 10¢ 0 1 1 – – 5¢ 0 0 5¢ 0 0 1 10¢ 0 1 0 15¢ 1 1 1 – – 10¢ 0 0 10¢ 0 0 1 15¢ 1 1 0 15¢ 1 1 1 – – 15¢ – – 15¢ 1

Moore machine: State encoding symbolic state table present inputs next present state D N state output 0¢ 0 0 0¢ 0 0 1 5¢ 0 1 0 10¢ 0 1 1 – – 5¢ 0 0 5¢ 0 0 1 10¢ 0 1 0 15¢ 0 1 1 – – 10¢ 0 0 10¢ 0 0 1 15¢ 0 1 0 15¢ 0 1 1 – – 15¢ – – 15¢ 1 present state inputs next state present Q1 Q0 D N D1 D0 output 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 1 – – – 0 1 0 0 0 1 0 0 1 1 0 0 1 0 1 1 0 1 1 – – – 1 0 0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 1 1 – – – 1 1 – – 1 1 1

Mealy machine: State encoding symbolic state table present inputs next present state D N state output 0¢ 0 0 0¢ 0 0 1 5¢ 0 1 0 10¢ 0 1 1 – – 5¢ 0 0 5¢ 0 0 1 10¢ 0 1 0 15¢ 1 1 1 – – 10¢ 0 0 10¢ 0 0 1 15¢ 1 1 0 15¢ 1 1 1 – – 15¢ – – 15¢ 1 present state inputs next state present Q1 Q0 D N D1 D0 output 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 1 – – – 0 1 0 0 0 1 0 0 1 1 0 0 1 0 1 1 1 1 1 – – – 1 0 0 0 1 0 0 0 1 1 1 1 1 0 1 1 1 1 1 – – – 1 1 – – 1 1 1

Logic minimization Moore Mealy 0 0 1 1 0 1 1 1 X X X X 1 1 1 1 Q1 D1 0 0 1 1 0 1 1 1 X X X X 1 1 1 1 Q1 D1 Q0 N D Moore 0 0 1 0 0 0 1 0 X X 1 X 0 0 1 0 Q1 Open Q0 N D 0 1 1 0 1 0 1 1 X X X X 0 1 1 1 Q1 D0 Q0 N D Mealy 0 0 1 1 0 1 1 1 X X X X 1 1 1 1 Q1 D1 Q0 N D 0 0 1 0 0 0 1 1 X X 1 X 0 1 1 1 Q1 Open Q0 N D 0 1 1 0 1 0 1 1 X X X X 0 1 1 1 Q1 D0 Q0 N D

Implementation Moore Mealy

7.24 A Moore machine has two inputs (X1, X2) and one output (Z). The output remains a constant value unless one of the following input sequence occurs: The input sequence 00,11 causes the output to become 0. The input sequence 01,11 causes the output to become 1. The input sequence 10,11 causes the output to toggle value.

7.23 A Mealy machine has one input (X) and two outputs (Z1 and Z2). An output Z1 = 1 occurs every time the input sequence 101 is observed, provided the sequence 011 has never been seen. An output Z2 = 1 occurs every time the input 011 is observed.