Lecture 20 Logistics Last lecture Today HW6 due Wednesday

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

Finite State Machines (FSMs)
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
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
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.
Sequential Circuit Design
ENEE 408C Lab Capstone Project: Digital System Design Fall 2005 Sequential Circuit Design.
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)
Lecture 17 General finite state machine (FSM) design
1 COMP541 State Machines Montek Singh Feb 8, 2012.
VII - Finite State Machines © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Finite State Machines (FSM) Sequential circuits  primitive sequential.
Lecture 18 More Moore/Mealy machines.
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.
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.
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.
Digital System Design using VHDL
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.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
1 Lecture 3: Modeling Sequential Logic in Verilog HDL.
George Mason University Finite State Machines Refresher ECE 545 Lecture 11.
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.
Finite State Machines Mealy machine inputs Outputs next state function
Lecture 4. Sequential Logic #2
Chapter #6: Sequential Logic Design
ANALYSIS OF SEQUENTIAL CIRCUITS
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Lecture 28 Logistics Today
Introduction to Advanced Digital Design (14 Marks)
Lecture 26 Logistics Last lecture Today HW8 due Friday
Lecture 27 Logistics Last lecture Today: HW8 due Friday
COMP541 Sequential Logic – 2: Finite State Machines
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
CSE 140 MT 2 Review By Daniel Knapp.
FINITE STATE MACHINES (FSMs)
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 23 Logistics Last lecture Today HW7 due Friday Lab8 going on
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 20 Logistics Last lecture Today Graded HW back today
Lecture 23 Logistics Last lecture Today HW8 due Wednesday, March 11
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
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
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

Lecture 20 Logistics Last lecture Today HW6 due Wednesday Lab 7 this week (Tuesday exception) Midterm 2 Friday (covers material up to simple FSM (today)) Review on Thursday Yoky office hour on Friday moved to Thursday 12-1:20pm online Last lecture Counter design Finite state machine – started vending machine example Today Continue on the vending machine example Moore/Mealy machines 20

The “WHY” slide Finite State Machine (FSM) Moore/Mealy machines This is what we have been waiting for in this class. Using combinational and sequential logics, now you can design a lot of clever digital logic circuits for functional products. We will learn different steps you take to go from word problems to logic circuits. 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. 20

FSM design Counter-design procedure FSM-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 20

Example: A vending machine 15 cents for a cup of coffee Doesn’t take pennies or quarters Doesn’t provide any change FSM-design procedure State diagram state-transition table 3. State minimization 4. State encoding 5. Next-state logic minimization 6. Implement the design Reset N Vending Machine FSM Open Coin Sensor Release Mechanism D Clock 20

A vending machine: (conceptual) state diagram Reset (from all states) S1 N S2 D Draw self-loops for N’ D’ for S0 to S3 Also draw self-loops for 1 for S4 to S8 S3 N S4 [open] D S5 [open] N S6 [open] D S7 [open] N S8 [open] D 20

A vending machine: State transition table present inputs next output state D N state open S0 0 0 0 1 1 0 1 1 S0 0 S1 0 S2 0 X X S1 0 0 S1 0 0 1 S3 0 1 0 S4 0 1 1 X X S2 0 0 S2 0 0 1 S5 0 1 0 S6 0 1 1 X X S3 0 0 S3 0 0 1 S7 0 1 0 S8 0 1 1 X X S4 X X S4 1 S5 X X S5 1 S6 X X S6 1 S7 X X S7 1 S8 X X S8 1 20

A vending machine: State minimization 0¢ Reset symbolic state table present inputs next output state D N state open 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 1 15¢ 0 1 0 15¢ 0 1 1 – – 15¢ – – 15¢ 1 N’D’ 10¢ D N’D’ 5¢ N 15¢ [open] D N’D’ N N + D Reset 20

A vending machine: State encoding present state inputs next state output Q1 Q0 D N D1 D0 open 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 20

A vending machine: Logic minimization 0 0 1 1 0 1 1 1 X X X X 1 1 1 1 Q1 D1 Q0 N D 0 1 1 0 1 0 1 1 X X X X 0 1 1 1 Q1 D0 Q0 N D 0 0 1 0 0 0 1 0 X X 1 X 0 0 1 0 Q1 Open Q0 N D D1 = Q1 + D + Q0 N D0 = Q0’ N + Q0 N’ + Q1 N + Q1 D OPEN = Q1 Q0 20

A vending machine: Implementation 20

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 20

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) 20

Example 10 -> 01: Moore or Mealy? Circuits recognize AB=10 followed by AB=01 What kinds of machines are they? D Q A B clock out D Q A B clock out Moore Mealy 20

Example 01/10 detector: a Moore machine Output is a function of state only Specify output in the state bubble current next current reset input state state output D/1 E/1 B/0 A/0 C/0 1 reset 1 – – A 0 0 0 A B 0 0 1 A C 0 0 0 B B 0 0 1 B D 0 0 0 C E 0 0 1 C C 0 0 0 D E 1 0 1 D C 1 0 0 E B 1 0 1 E D 1 20

Example 01/10 detector: a Mealy machine Output is a function of state and inputs Specify outputs on transition arcs B A C 0/1 0/0 1/1 1/0 reset/0 current next current reset input state state output 1 – – A 0 0 0 A B 0 0 1 A C 0 0 0 B B 0 0 1 B C 1 0 0 C B 1 0 1 C C 0 20

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 20

Synchronous (registered) Mealy machine Registered state and registered outputs No glitches on outputs No race conditions between communicating machines inputs outputs state feedback reg combinational logic for next state logic for outputs 20

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