CSE 370 – Winter Sequential Logic-2 - 1

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

Introduction to Sequential Circuits
Finite State Machines (FSMs)
COUNTERS Counters with Inputs Kinds of Counters Asynchronous vs
Sequential Circuits Storage elements
State-machine structure (Mealy)
CS 140 Lecture 10 Sequential Networks: Implementation Professor CK Cheng CSE Dept. UC San Diego 1.
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Give qualifications of instructors: DAP
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 Introduction to and Analysis of Sequential Logic Circuits (Lecture #20) The slides included herein were taken from the.
FSMs 1 Sequential logic implementation  Sequential circuits  primitive sequential elements  combinational logic  Models for representing sequential.
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.
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.
1 Lecture 15 Registers Counters Finite State Machine (FSM) design.
Lecture 17 General finite state machine (FSM) design
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.
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
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.
DLD Lecture 26 Finite State Machine Design Procedure.
Digital Logic Design.
Analysis and Synthesis of Synchronous Sequential Circuits A “synchronizing” pulse/edge signal (clock) controls the operation of the memory portion of the.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Logic Design (CE1111 ) Lecture 6 (Chapter 6) Registers &Counters Prepared by Dr. Lamiaa Elshenawy 1.
Sequential Networks and Finite State Machines
Figure 8.1. The general form of a sequential circuit.
Chapter #6: Sequential Logic Design
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Lecture 12 Analysis of Clocked Sequential Network
Introduction to Advanced Digital Design (14 Marks)
Analysis of Clocked Sequential Circuit
Figure 12-13: Synchronous Binary Counter
FIGURE 5.1 Block diagram of sequential circuit
Sequential Circuit: Counter
Typical Timing Specifications
CSE 140 MT 2 Review By Daniel Knapp.
FINITE STATE MACHINES (FSMs)
CSE 140L Discussion Finite State Machines.
Chapter 6 – Part 4 SYEN 3330 Digital Systems SYEN 3330 Digital Systems
Recap D flip-flop based counter Flip-flop transition table
CSE 370 – Winter Sequential Logic - 1
Lecture 15 Logistics Last lecture Today HW4 is due today
Introduction to Sequential Circuits
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
CSE 370 – Winter Sequential Logic-2 - 1
Digital Logic Department of CNET Chapter-6
Digital Logic Department of CNET Chapter-6
SYEN 3330 Digital Systems Chapter 6 – Part 3 SYEN 3330 Digital Systems.
Lecture 20 Logistics Last lecture Today HW6 due Wednesday
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
Outline Registers Counters 5/11/2019.
EGR 2131 Unit 12 Synchronous Sequential Circuits
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Announcements Assignment 7 due now or tommorrow Assignment 8 posted
Chapter5: Synchronous Sequential Logic – Part 3
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

CSE 370 – Winter 2002 - Sequential Logic-2 - 1 Overview Last lecture Intro to FSM’s Counters Today Counters (a little more) Finite state machines (Moore and Mealy examples) 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 1

CSE 370 – Winter 2002 - Sequential Logic-2 - 2 Another example Shift register input determines next state In C1 C2 C3 N1 N2 N3 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1 0 0 0 1 0 0 1 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 1 1 1 0 1 1 1 0 0 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 100 110 111 011 101 010 000 001 1 N1 := In N2 := C1 N3 := C2 D Q IN OUT1 OUT2 OUT3 CLK 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 2

More complex counter example repeats 5 states in sequence not a binary number representation Step 1: derive the state transition diagram count sequence: 000, 010, 011, 101, 110 Step 2: derive the state transition table from the state transition diagram 010 000 110 101 011 Present State Next State C B A C+ B+ A+ 0 0 0 0 1 0 0 0 1 – – – 0 1 0 0 1 1 0 1 1 1 0 1 1 0 0 – – – 1 0 1 1 1 0 1 1 0 0 0 0 1 1 1 – – – note the don't care conditions that arise from the unused state codes 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 3

More complex counter example (cont’d) Step 3: K-maps for next state functions 0 0 X 1 0 X A B C C+ 1 1 X 0 0 X X 1 A B C B+ 0 1 X 1 0 X X 0 A B C A+ C+ := A B+ := B' + A'C' A+ := BC' 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 4

Self-starting counters (cont’d) Re-deriving state transition table from don't care assignment 0 0 1 1 A B C C+ 1 1 1 0 0 1 A B C B+ 0 1 0 0 A B C A+ 010 000 110 101 011 001 111 100 Present State Next State C B A C+ B+ A+ 0 0 0 0 1 0 0 0 1 1 1 0 0 1 0 0 1 1 0 1 1 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 1 1 0 0 0 0 1 1 1 1 0 0 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 5

Self-starting counters Start-up states at power-up, counter may be in an unused or invalid state designer must guarantee that it (eventually) enters a valid state Self-starting solution design counter so that invalid states eventually transition to a valid state may limit exploitation of don't cares 010 000 110 101 011 001 111 100 implementation on previous slide 010 000 110 101 011 001 111 100 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 6

CSE 370 – Winter 2002 - Sequential Logic-2 - 7 Finite state machines FSM: A system that can visit only a finite number of logically distinct states Counters are simple FSMs Outputs and states are identical Counters visit states in a fixed sequence FSM behavior can be more complex than counting Outputs and next state can depend on input and present state 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 7

CSE 370 – Winter 2002 - Sequential Logic-2 - 8 State machine model Values stored in registers represent the state of the circuit Combinational logic computes: next state function of current state and inputs outputs function of current state and inputs (Mealy machine) function of current state only (Moore machine) Inputs Outputs Next State Current State output logic next state logic 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 8

State machine model (cont’d) States: S1, S2, ..., Sk Inputs: I1, I2, ..., Im Outputs: O1, O2, ..., On Transition function: Fs(Si, Ij) Output function: Fo(Si) or Fo(Si, Ij) Inputs Outputs Next State Current State output logic next state logic 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 9

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* 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 10

Example: Moore versus Mealy machines Circuits recognize AB = 01 What kinds of machines are they? B out A D Q B A clock out D Q clock out A B 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 11

Moore versus Mealy machines (ct’ed) Circuits recognize AB = 10, then AB=01 What kinds of machines are they? D Q A B clock out D Q A B clock out 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 12

FSM design is generalized counter design Counter-design procedure 1. State diagram 2. State-transition table 3. Next-state logic minimization 4. Implement the design FSM-design procedure 1. State diagram and state-transition table 2. State minimization 3. State assignment (or state encoding) 4. Next-state logic minimization 5. Implement the design 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 13

Example: A parity checker Serial input string OUT=1 if odd # of 1s in input OUT=0 if even # of 1s in input 1. State diagram and 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 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 14

Example: A parity checker (con’t) 2. State minimization: Already minimized Need both states (even and odd) Use one flip-flop 3. State assignment (or state encoding) Present Input Next Present State State Output 0 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 15

Example: A parity checker (con’t) 4. Next-state logic minimization Assume D flip-flops Next state = (present state) XOR (present input) Present output = present state 5. Implement the design 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 16

Real-life FSM implementation We can map our FSMs to programmable logic devices Macro-cell = DFF + two-level logic Other mapping options: Gate arrays, semicustom ICs, etc. D Q Q 12/2/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 17