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

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

Sequential Synchronous Circuit Analysis

Synchronous Sequential Logic

Chapter 5 Synchronous Sequential Logic

Analysis and Design of Sequential Circuits: Examples

Finite State Machine. By : Ali Mustafa

Chapter 4 Part 2 Sequential Circuits

Lecture (08) Synchronous Sequential Logic

Clocked Synchronous State-machine Analysis

ELE2120 Digital Circuits and Systems. Tutorial Note 9

Lecture 8: Sequential Networks and Finite State Machines

Synchronous Sequential Logic Part I

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

Synchronous Sequential Logic Part I. BME208 Logic Circuits Yalçın İŞLER

Synchronous Sequential Circuit Design. Digital Computer Design

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

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

Sequential Circuit Analysis

FSM model for sequential circuits

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

CPE100: Digital Logic Design I

Digital Circuits and Systems

Different encodings generate different circuits

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

The Design Procedure. Output Equation Determination - Derive output equations from the state table

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

Lecture 17: Designing Sequential Systems Using Flip Flops

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

Overview of Chapter 4

CprE 281: Digital Logic

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

Lecture 10: Synchronous Sequential Circuits Design

ECE380 Digital Logic. Synchronous sequential circuits

Finite State Machine (FSM)

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

Chapter 7 Sequential Logic

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

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

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

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

Sequential Circuit Design

ELCT201: DIGITAL LOGIC DESIGN

Lecture 3 Review on Digital Logic (Part 2)

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

CSE 140: Components and Design Techniques for Digital Systems. Lecture 9: Sequential Networks: Implementation

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

FYSE420 DIGITAL ELECTRONICS

Digital Design. Sequential Logic

Chapter 7. Synchronous Sequential Networks. Excitation for

Synchronous Sequential Logic. Chapter 5

Sequential vs. Combinational

Sequential Circuits Sequential circuits combinational circuits state gate delay

Sequential logic and design

Topic 8: Sequential Circuits

Models for representing sequential circuits

Chapter 5 Synchronous Sequential Logic

Chapter 4. Sequential Logic Circuits

Digital Logic Design. Midterm #2

Digital Logic Design - Chapter 5

EE 209 Logic Cumulative Exam Name:

ALU, Latches and Flip-Flops

Sequential Logic Circuits

Chapter 15 SEQUENTIAL CIRCUITS ANALYSIS, STATE- MINIMIZATION, ASSIGNMENT AND CIRCUIT IMPLEMENTATION

CE1911 LECTURE FSM DESIGN PRACTICE DAY 1

ELCT201: DIGITAL LOGIC DESIGN

14:332:231 DIGITAL LOGIC DESIGN

Homework #4. CSE 140 Summer Session Instructor: Mohsen Imani. Only a subset of questions will be graded

EGR224 F 18 Assignment #4


or 0101 Machine

Philadelphia University Student Name: Student Number:

CSE140: Digital Logic Design Registers and Counters

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

EEE2135 Digital Logic Design

Fundamentals of Digital Design

Logical design of digital systems

Chapter 3 Digital Logic Structures

14.1. Unit 14. State Machine Design

EXPERIMENT Traffic Light Controller

EECS150 - Digital Design Lecture 23 - FSMs & Counters

Week-5. Sequential Circuit Design. Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.

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

CPE100: Digital Logic Design I

6 Synchronous State Machine Design

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

Digital Design 2010 DE2 1

Chapter 14 Sequential logic, Latches and Flip-Flops

Problem Set 9 Solutions

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

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

Digital Logic Design - Chapter 4

Digital Electronics Sequential Logic

Synchronous Sequential Circuit

EE 209 Spiral 1 Exam Solutions Name:

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

Lecture 7: Logic design. Combinational logic circuits

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

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

ECE 341. Lecture # 3

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

Transcription:

Indian Institute of Technology Jodhpur, Year 2017-2018 Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd.. Course Instructor: Shree Prakash Tiwari Email: sptiwari@iitj.ac.in Webpage: http://home.iitj.ac.in/~sptiwari/ Course related documents will be uploaded on http://home.iitj.ac.in/~sptiwari/dld/ Note: The information provided in the slides are taken form text books Digital Electronics (including Mano & Ciletti), and various other resources from internet, for teaching/academic use only 1

Combinational vs. Sequential Combinational Logic Circuit Output is a function of the inputs. Does not have state information. Does not require memory. Sequential Logic Circuit Output is a function of the present state (and of the inputs). Has state information Requires memory. Uses Flip-Flops to implement memory.

Synchronous vs. Asynchronous Synchronous Sequential Circuit Clocked All Flip-Flops use the same clock and change state on the same triggering edge. Asynchronous Sequential Circuit No clock Can change state at any instance in time. Faster but more complex than synchronous sequential circuits.

Flip-Flop Summary Flip flops are powerful storage elements They can be constructed from gates and latches! D flip flop is simplest and most widely used Asynchronous inputs allow for clearing and presetting the flip flop output Multiple flops allow for data storage The basis of computer memory! Combine storage and logic to make a computation circuit Next: Analyzing sequential circuits.

Overview Understanding flip flop state: Stored values inside flip flops Clocked sequential circuits: Contain flip flops Representations of state: State equations State table State diagram Finite state machines Mealy machine Moore machine

Flip Flop State Behavior of clocked sequential circuit can be determined from inputs, outputs and FF state x D 0 Q 1 Q 0 D 1 D D Q Q Q Q Q 0 Q 1 y Clk y(t) = x(t)q 1 (t)q 0 (t) Q 0 (t+1) = D 0 (t) = x(t)q 1 (t) Q 1 (t+1) = D 1 (t) = x(t) + Q 0 (t)

Output and State Equations Next state dependent on previous state. x D 0 Q 1 Q 0 D 1 D D Q Q Q Q Q 0 Q 1 y Output equation State equations Clk y(t) = x(t)q 1 (t)q 0 (t) Q 0 (t+1) = D 0 (t) = x(t)q 1 (t) Q 1 (t+1) = D 1 (t) = x(t) + Q 0 (t)

State Table Sequence of outputs, inputs, and flip flop states enumerated in state table Present state indicates current value of flip flops Next state indicates state after next rising clock edge Output is output value on current clock edge State Table Present State 0 0 0 1 1 0 1 1 Next State x=0 x=1 Output x=0 x=1 00 10 0 0 10 10 0 0 00 11 0 0 10 11 0 1 Q 1 (t) Q 0 (t) Q 1 (t+1) Q 0 (t+1)

State Table All possible input combinations enumerated All possible state combinations enumerated Separate columns for each output value. Sometimes easier to designate a symbol for each state. Let: s 0 = 00 s 1 = 01 s 2 = 10 s 3 = 11 Present State s 0 s 1 s 2 s 3 Next State x=0 x=1 Output x=0 x=1 s 0 s 2 0 0 s 2 s 2 0 0 s 0 s 3 0 0 s 2 s 3 0 1

State Diagram Circles indicate current state Arrows point to next state For x/y, x is input and y is output Present State Next State x=0 x=1 Output x=0 x=1 0 0 0 1 1 0 1 1 00 10 0 0 10 10 0 0 00 11 0 0 10 11 0 1 0/0 00 0/0 1/0 0/0 1/0 01 10 1/0 0/0 11 1/1

State Diagram Each state has two arrows leaving One for x = 0 and one for x = 1 Unlimited arrows can enter a state Note use of state names in this example Easier to identify 0/0 0/0 0/0 1/0 s 0 s 1 s 2 1/0 1/0 0/0 s 3 1/1

Flip Flop Input Equations Boolean expressions which indicate the input to the flip flops. x D 0 Q 1 Q 0 D 1 D D Q Q Q Q Q 0 Q 1 y Clk D Q0 = xq 1 D Q1 = x + Q 0 Format implies type of flop used

Mealy Machine Output based on state and present input X(t) present input Comb. Logic Q(t+1) next state Flip Flops Q(t) present state Comb. Logic Y(t) clk

Moore Machine Output based on state only X(t) present input Comb. Logic Q(t+1) next state Flip Flops Q(t) present state Comb. Logic Y(t) clk

Mealy versus Moore Mealy Model Inputs Input Logic Output Logic Outputs Combinational Combinational Memory Element Moore Model Inputs Input Logic Output Logic Outputs Combinational Combinational Memory Element

Finite State Machine: Models Mealy Machine Moore Machine Outputs are a function of the present state and the input. State diagram includes an input and output value for each transition (between states). Outputs are a function of the present state. Outputs are independent of the inputs. State diagram includes an output value for each state. There is an equivalent Mealy machine for each Moore machine.

State Diagram with One Input & One Mealy Output Mano text focuses on Mealy machines State transitions are shown as a function of inputs and current outputs. e.g. 1 1/1 0/0 S1 1/0 Input(s)/Output(s) shown in transition 0/0 S4 1/0 0/0 S3 1/0 S2 0/0

FSM: State Diagram (Moore) State Output A Input C B

FSM Analysis: Procedure, siplified Determine the Flip-Flop input equations In terms of the present state and input variables Determine the FSM output equation(s) Determine the next state values in the state table Assume binary encoding Use Flip-Flop Characteristic Equation Construct the state table Assign a state to each binary state assignment Draw the corresponding state diagram Determine the behavior of the FSM

Clocked Synchronous State-machine Analysis Given the circuit diagram of a state machine: 1 Analyze the combinational logic to determine flip-flop input (excitation) equations: D i = F i (Q, inputs) The input to each flip-flop is based upon current state and circuit inputs. 2 Substitute excitation equations into flip-flop characteristic equations, giving transition equations: Q i (t+1) = H i ( D i ) 3 From the circuit, find output equations: Z = G (Q, inputs) The outputs are based upon the current state and possibly the inputs. 4 Construct a state transition/output table from the transition and output equations: Similar to truth table. Present state on the left side. Outputs and next state for each input value on the right side. Provide meaningful names for the states in state table, if possible. 5 Draw the state diagram which is the graphical representation of state table.

FSM Analysis: Example (D FF) input state What type of FSM is this? output A(t+1) = A.x + B.x B(t+1) = A.x Y = (A+B).x

FSM Analysis: Example (D FF) A time sequence of inputs, outputs and multiple flipflop states can be enumerated in a state table or transition table

Another State Table for the Circuit A time sequence of inputs, outputs and multiple flipflop states can be enumerated in a state table or transition table

State diagram of the circuit A graphical representation of the time sequence of inputs, outputs and flip-flop states is state diagram State diagram follows directly from the state table

Analysis with D Flip-Flops Identify flip flop input equations Identify output equation D A = A x y A(t+1) = A x y Note: this example has no output

Sequential circuit with JK flip-flop Input equations Characteristic/state equations next-state values Input Equations: J A = B, K A = B.x, J B = x, K B = A.x + A.x = A x

State Table Characteristic Equations: A(t+1) = J.A + K A, B(t+1) = J.B + k B A(t+1) = B.A + (B.x ).A = A.B + A.B + A.x B(t+1) = x.b + (A x ).B = B.x + A.B.x + A.B.x

State diagram of the circuit

Sequential circuit with T flip-flops (Binary Counter)

State Table and Diagram

Summary Flip flops contain state information State can be represented in several forms: State equations State table State diagram Possible to convert between these forms Circuits with state can take on a finite set of values Finite state machine Two types of machines Mealy machine Moore machine

FSM Design: Procedure, simplified Understand specifications Derive state diagram Create state table Perform state minimization (if necessary) Encode states (state assignment) Create state-assigned table Select type of Flip-Flop to use Determine Flip-Flop input equations and FSM output equation(s) Draw logic diagram 32

What next Sequential Circuits contd