Generalized FSM model: Moore and Mealy

Similar documents
Last lecture Counter design Finite state machine started vending machine example. Today Continue on the vending machine example Moore/Mealy machines

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

Example: A vending machine

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

EECS150 - Digital Design Lecture 23 - FSMs & Counters

Example: vending machine

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

Synchronous Sequential Circuit Design. Digital Computer Design

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec 09 Counters Outline.

Models for representing sequential circuits

Module 10: Sequential Circuit Design

EECS150 - Digital Design Lecture 16 Counters. Announcements

Digital Circuits ECS 371

Sequential Circuit Design

FYSE420 DIGITAL ELECTRONICS

EGR224 F 18 Assignment #4

ALU, Latches and Flip-Flops

Adders allow computers to add numbers 2-bit ripple-carry adder

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Timing Constraints in Sequential Designs. 63 Sources: TSR, Katz, Boriello & Vahid

Chapter 6. Synchronous Sequential Circuits

Finite State Machine (FSM)

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec09 Counters Outline.

FSM Optimization. Counter Logic Diagram Q1 Q2 Q3. Counter Implementation using RS FF 10/13/2015

CSE140: Digital Logic Design Registers and Counters

Symbolic State Minimization

EECS150 - Digital Design Lecture 15 SIFT2 + FSM. Recap and Outline

Lecture 13: Sequential Circuits, FSM

CPE100: Digital Logic Design I

ECE 341. Lecture # 3

Clocked Sequential Circuits UNIT 13 ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS. Analysis of Clocked Sequential Circuits. Signal Tracing and Timing Charts

CPE100: Digital Logic Design I

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters

EEE2135 Digital Logic Design

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters)

Synchronous Sequential Circuit Design

Present Next state Output state w = 0 w = 1 z A A B 0 B A C 0 C A C 1

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

State & Finite State Machines

Lecture 7: Logic design. Combinational logic circuits

Lecture 10: Synchronous Sequential Circuits Design

Topic 8: Sequential Circuits

Midterm review session tomorrow 4:15 EEB125 Midterm 2 in class (45min long, starts at 10:35am) Today Abi bigger example: Hungry Robot Ant in Maze

COE 202: Digital Logic Design Sequential Circuits Part 3. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

CPE100: Digital Logic Design I

ECE/Comp Sci 352 Digital Systems Fundamentals. Charles R. Kime Section 2 Fall Logic and Computer Design Fundamentals

State and Finite State Machines

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

or 0101 Machine

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

CprE 281: Digital Logic

State & Finite State Machines

ASYNCHRONOUS SEQUENTIAL CIRCUITS

EET 310 Flip-Flops 11/17/2011 1

IE1204 Digital Design. L10: State Machines (Part 2) Masoumeh (Azin) Ebrahimi Elena Dubrova

ECE380 Digital Logic. Synchronous sequential circuits

ENGG 1203 Tutorial. Solution (b) Solution (a) Simplification using K-map. Combinational Logic (II) and Sequential Logic (I) 8 Feb Learning Objectives

Appendix A: Digital Logic. CPSC 352- Computer Organization

CHAPTER 9: SEQUENTIAL CIRCUITS

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary

Clocked Synchronous State-machine Analysis

Topics for Lecture #9. Button input processor

CpE358/CS381. Switching Theory and Logical Design. Class 16

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF

EXPERIMENT Traffic Light Controller

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Lecture 13: Sequential Circuits, FSM

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

EECS 427 Lecture 15: Timing, Latches, and Registers Reading: Chapter 7. EECS 427 F09 Lecture Reminders

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

ELEN Electronique numérique

Topic 8: Sequential Circuits. Bistable Devices. S-R Latches. Consider the following element. Readings : Patterson & Hennesy, Appendix B.4 - B.

Combinational vs. Sequential. Summary of Combinational Logic. Combinational device/circuit: any circuit built using the basic gates Expressed as

Lecture 10: Sequential Networks: Timing and Retiming

Ch 9. Sequential Logic Technologies. IX - Sequential Logic Technology Contemporary Logic Design 1

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING COMPUTER SCIENCES DEPARTMENT UNIVERSITY OF WISCONSIN-MADISON

EECS150 - Digital Design Lecture 25 Shifters and Counters. Recap

COE 202: Digital Logic Design Sequential Circuits Part 3. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Instructor: Mohsen Imani. Slides from Tajana Simunic Rosing

Computers also need devices capable of Storing data and information Performing mathematical operations on such data

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop

Asynchronous sequence circuits

14.1. Unit 14. State Machine Design

Analysis of clocked sequential networks

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Gates and Flip-Flops

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

Different encodings generate different circuits

UNIT 8A Computer Circuitry: Layers of Abstraction. Boolean Logic & Truth Tables

EE141- Spring 2007 Digital Integrated Circuits

Philadelphia University Student Name: Student Number:

Sequential Synchronous Circuit Analysis

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Shift Register Counters

Transcription:

Lecture 18 Logistics HW7 is due on Monday (and topic included in midterm 2) Midterm 2 on Wednesday in lecture slot cover materials up to today s lecture Review session Tuesday 4:15pm in EEB125 Last lecture Finish counter design More complex finite-state machines Today More and machines 1 Generalized FSM model: and Combinational logic computes next state and ext state is a function of current state and inputs Outputs are functions of Current state ( machine) Current state and inputs ( machine) Inputs output logic ext-state logic ext State Outputs Current State 2

versus machines inputs combinational next state state feedback reg machine Outputs are a function of current state t Outputs change synchronously with state changes inputs combinational next state state feedback reg machine Outputs depend on state and on inputs Input changes can cause immediate output changes (asynchronous) 3 Example 1 -> 1: or? Circuits recognize AB=1 followed by AB=1 What kinds of machines are they? out A B clock A B clock out 4

Example 1/1 detector: a machine Output is a function of state only Specify output in the state bubble B/ 1 /1 reset A/ 1 1 1 C/ E/1 1 current next current reset input state state output 1 A A B 1 A C B B 1 B C E 1 C C E 1 1 C 1 E B 1 1 E 1 5 Example 1/1 detector: a machine Output is a function of state and inputs Specify on transition arcs reset/ / B / A /1 1/1 1/ C 1/ current next current reset input state state output 1 A A B 1 A C B B 1 B C 1 C B 1 1 C C 6

Comparing and machines machines + Safer to use because change at clock edge May take additional logic to decode state into machines + Typically have fewer states + React faster to inputs don't wait for clock Asynchronous can be dangerous We often design synchronous machines esign a machine Then register the 7 Synchronous (registered) machine Registered state and registered o glitches on o race conditions between communicating machines inputs reg combinational next state reg state feedback 8

Example -> 1: or? Recognize A,B =,1 or? A B clock out Registered (actually ) A out B clock 9 9 FSM design procedure reminder Counter-design procedure 1. State diagram 2. State-transition table 3. ext-state logic minimization 4. Implement the design FSM-design procedure 1. State diagram 2. state-transition table 3. State minimization 4. State encoding 5. ext-state logic minimization 6. Implement the design 1

Example: A parity checker Serial input string OUT=1 if odd # of 1s in input OUT= if even # of 1s in input Let s do this for and CSE37, Lecture 19, 2 18 11 Example: A parity checker 1. State diagram ay Even [] 1 1 Odd [1] / Even [] 1/11 11/ Odd [1] /1 12

Example: A parity checker 1. State-transition table Present Input ext Present State State Output Even Even Even 1 Odd Odd Odd 1 Odd 1 Even 1 Present Input ext Present State State Output Even Even Even 1 Odd 1 Odd Odd 1 Odd 1 Even 13 Example: A parity checker 3. State minimization: Already minimized eed both states (even and odd) Use one flip-flopflop CSE37, Lecture 19, 2 18 14

Example: A parity checker 4. State encoding Assignment Even Odd 1 Present Input ext Present State State Output 1 1 1 1 1 1 1 1 Present Input ext Present State State Output 1 1 1 1 1 15 Example: A parity checker 5. ext-state logic minimization Assume flip-flops ext state = (present state) XOR (present input) 6. Implement the design Output Input Output Input Current State CLK CLK 16

Example: A vending machine 15 cents for a cup of coffee oesn t take pennies or quarters Reset oesn t provide any change Last lecture Coin Sensor Vending Machine FSM Open Release Mechanism We had mix of and Clock 17 A vending machine: machine 5 Reset 1 + present inputs next output state state open 1 5 1 1 5 5 1 1 1 15 1 1 1 15 1 15 15 15 1 15 [open] symbolic state table 18

A vending machine: machine /1 Reset / / 5 / 1 + /1 15 present inputs next output state state open 1 5 1 1 5 5 1 1 1 15 1 1 1 1 15 1 1 15 1 15 15 1 symbolic state table 19 A vending machine: State encoding present state inputs next state output 1 1 open 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 present state inputs next state output 1 1 open 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2

A vending machine: Logic minimization 1 1 1 1 1 X X X X 1 1 1 1 1 1 1 X X X X 1 1 1 1 1 1 1 1 1 1 X X X X 1 1 1 1 1 1 X X X X Open Open 1 1 1 X X 1 X 1 1 1 1 1 X X 1 X 21 A vending machine: Implementation CSE37, Lecture 19, 2 18 22