Lecture 22 Logistics Last lecture Today HW7 is due on Friday

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)
State-machine structure (Mealy)
Analysis of Clocked Sequential Circuits
CSE Spring Verilog for Sequential Systems - 1 Today: Verilog and Sequential Logic zFlip-flops yrepresentation of clocks - timing of state.
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.
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.
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 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.
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.
Lecture 17 General finite state machine (FSM) design
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.
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.
1 CSE370, Lecture 15 Lecture 15 u Logistics n HW5 due this Friday n HW6 out today, due Friday Feb 20 n I will be away Friday, so no office hour n Bruce.
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
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.
Analysis and Synthesis of Synchronous Sequential Circuits A “synchronizing” pulse/edge signal (clock) controls the operation of the memory portion of the.

CEC 220 Digital Circuit Design Mealy and Moore State Machines Friday, March 27 CEC 220 Digital Circuit Design Slide 1 of 16.
1 Lecture 3: Modeling Sequential Logic in Verilog HDL.
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.
Sequential Networks and Finite State Machines
Lecture 4. Sequential Logic #2
Figure 8.1. The general form of a sequential circuit.
Chapter #6: Sequential Logic Design
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Lecture 28 Logistics Today
Lecture 26 Logistics Last lecture Today HW8 due Friday
Lecture 27 Logistics Last lecture Today: HW8 due Friday
Analysis of Clocked Sequential Circuit
COMP541 Sequential Logic – 2: Finite State Machines
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
Lecture 23 Logistics Last lecture Today HW7 due Friday Lab8 going on
Lecture 27 Logistics Last lecture Today: HW8 due Friday
CSE 140L Discussion Finite State Machines.
Lecture 28 Logistics Today
Lecture 21 Logistics Today
EEL 3705 / 3705L Digital Logic Design
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 15 Logistics Last lecture Today HW4 is due today
Lecture 24 Logistics Last lecture Today HW7 due today
Lecture 23 Logistics Last lecture Today HW7 due Friday Lab8 going on
Introduction to Sequential Circuits
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Finite State Machines (FSMs)
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 24 Logistics Last lecture Today HW7 due today
Lecture 20 Logistics Last lecture Today Graded HW back today
Lecture 20 Logistics Last lecture Today HW6 due Wednesday
Lecture 23 Logistics Last lecture Today HW8 due Wednesday, March 11
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
EGR 2131 Unit 12 Synchronous Sequential Circuits
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

Lecture 22 Logistics Last lecture Today HW7 is due on Friday Lab 8 this week Last lecture FSMs Intro to Moore and Mealy machines Today More Moore and Mealy machines 22

The “WHY” slide Moore/Mealy machines There are two different ways to express the FSMs with respect to the output. Both have different advantages so it is good to know them. 22

Generalized FSM model: Moore and Mealy Combinational logic computes next state and outputs Next state is a function of current state and inputs Outputs are functions of Current state (Moore machine) Current state and inputs (Mealy machine) output logic Outputs Inputs Next-state logic Next State Current State 22

Moore versus Mealy machines Moore machine Outputs are a function of current state Outputs change synchronously with state changes outputs state feedback inputs reg combinational logic for next state logic for outputs inputs outputs state feedback reg combinational logic for next state logic for outputs Mealy machine Outputs depend on state and on inputs Input changes can cause immediate output changes (asynchronous) 22

Comparing Moore and Mealy machines Moore machines + Safer to use because outputs change at clock edge – May take additional logic to decode state into outputs Mealy machines + Typically have fewer states + React faster to inputs — don't wait for clock – Asynchronous outputs can be dangerous We often design synchronous Mealy machines Design a Mealy machine Then register the outputs 22

Synchronous (registered) Mealy machine Registered state and registered outputs No glitches on outputs inputs outputs state feedback reg combinational logic for next state logic for outputs 22

Example 0 -> 1: Moore or Mealy? Recognize A,B = 0,1 Mealy or Moore? Registered Mealy (actually Moore) Moore 22

FSM design procedure reminder Counter-design procedure 1. State diagram 2. State-transition table 3. Next-state logic minimization 4. Implement the design FSM-design procedure State diagram state-transition table 3. State minimization 4. State encoding 5. Next-state logic minimization 6. Implement the design 22 17

Example: A 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 22

Example: A parity checker State diagram Moore Mealy 0/0 1/1 1/0 0/1 22

Example: A parity checker 1. State-transition table Moore Present Input Next Present State State Output Even 0 Even 0 Even 1 Odd 0 Odd 0 Odd 1 Odd 1 Even 1 Mealy Present Input Next Present State State Output Even 0 Even 0 Even 1 Odd 1 Odd 0 Odd 1 Odd 1 Even 0 22

Example: A parity checker 3. State minimization: Already minimized Need both states (even and odd) Use one flip-flop 22

Example: A parity checker Assignment Even 0 Odd 1 4. State encoding Moore Present Input Next Present State State Output 0 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 Mealy Present Input Next Present State State Output 0 0 0 0 0 1 1 1 1 0 1 1 1 1 0 0 22

Example: A parity checker 5. Next-state logic minimization Assume D flip-flops Next state = (present state) XOR (present input) 6. Implement the design Mealy Moore Output CLK Input CLK Input D Q D Q Output Current State 22

Example: A vending machine 15 cents for a cup of coffee Doesn’t take pennies or quarters Doesn’t provide any change Last lecture We had mix of Moore and Mealy Reset N Vending Machine FSM Open Coin Sensor Release Mechanism D Clock 22 17

A vending machine: Moore machine 0¢ Reset 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 10¢ D 5¢ N 15¢ [open] D N N + D 22 17

A vending machine: Mealy machine 0¢ Reset 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 10¢ D/0 5¢ N/0 15¢ D/1 N/0 N + D/1 22 17

A vending machine: State encoding Mealy Moore 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 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 22 17

A vending machine: Logic minimization Moore 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 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 22 17

A vending machine: Implementation Moore Mealy 22