Sequential Circuit Analysis

Similar documents
ELE2120 Digital Circuits and Systems. Tutorial Note 9

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

ELE2120 Digital Circuits and Systems. Tutorial Note 10

Sequential vs. Combinational

Lecture 17: Designing Sequential Systems Using Flip Flops

Sequential Logic Circuits

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

Chapter 5 Synchronous Sequential Logic

Latches. October 13, 2003 Latches 1

Synchronous Sequential Logic

Chapter 14 Sequential logic, Latches and Flip-Flops

Chapter 4. Sequential Logic Circuits

CprE 281: Digital Logic

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

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

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

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

Lecture (08) Synchronous Sequential Logic

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

Chapter 7 Sequential Logic

Synchronous Sequential Logic. Chapter 5

Finite State Machine. By : Ali Mustafa

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

Different encodings generate different circuits

Analysis and Design of Sequential Circuits: Examples

Sequential Circuit Design

Synchronous Sequential Circuit Design

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Fundamentals of Digital Design

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Synchronous Sequential Logic Part I

CSCI 2150 Intro to State Machines

Sequential Synchronous Circuit Analysis

ELCT201: DIGITAL LOGIC DESIGN

Chapter 4 Part 2 Sequential Circuits

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

6 Synchronous State Machine Design

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Lecture 14 Finite state machines

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

ELCT201: DIGITAL LOGIC DESIGN

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

Digital Circuits and Systems

CSE370 HW6 Solutions (Winter 2010)

Topic 8: Sequential Circuits

Simplify the following Boolean expressions and minimize the number of literals:

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

Logical design of digital systems

Chapter 3 Digital Logic Structures

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

CPS 104 Computer Organization and Programming Lecture 11: Gates, Buses, Latches. Robert Wagner

15.1 Elimination of Redundant States

Counters. We ll look at different kinds of counters and discuss how to build them

I. Motivation & Examples

Clocked Synchronous State-machine Analysis

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

Chapter 5 Synchronous Sequential Logic

Sequential Circuits Sequential circuits combinational circuits state gate delay

Digital Logic Design. Midterm #2

Introduction to Digital Logic

Unit 7 Sequential Circuits (Flip Flop, Registers)

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

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

CS221: Digital Design. Indian Institute of Technology Guwahati

EE 209 Logic Cumulative Exam Name:

Logic design? Transistor as a switch. Layered design approach. CS/COE1541: Introduction to Computer Architecture. Logic Design Review.

P2 (10 points): Given the circuit below, answer the following questions:

Philadelphia University Student Name: Student Number:

DE58/DC58 LOGIC DESIGN DEC 2014

COMBINATIONAL LOGIC FUNCTIONS

CS61C : Machine Structures

Chapter 7. Synchronous Sequential Networks. Excitation for

ALU A functional unit

CPE100: Digital Logic Design I

I. Motivation & Examples

Overview of Chapter 4

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

EEE2135 Digital Logic Design

Synchronous Sequential Circuit

Sample Test Paper - I

Lecture 13: Sequential Circuits, FSM

EET 310 Flip-Flops 11/17/2011 1

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

Schedule. ECEN 301 Discussion #25 Final Review 1. Date Day Class No. 1 Dec Mon 25 Final Review. Title Chapters HW Due date. Lab Due date.

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Computer Science Final Examination Friday December 14 th 2001

Lecture 12: Adders, Sequential Circuits

Logic. Basic Logic Functions. Switches in series (AND) Truth Tables. Switches in Parallel (OR) Alternative view for OR

Design of Sequential Circuits

CSE140: Digital Logic Design Registers and Counters

Gates and Flip-Flops

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

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

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

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

or 0101 Machine

Digital Logic Appendix A

CS/COE0447: Computer Organization

Analysis of clocked sequential networks

Transcription:

Sequential Circuit Analysis Last time we started talking about latches and flip-flops, which are basic one-bit memory units. Today we ll talk about sequential circuit analysis and design. First, we ll see how to analyze and describe sequential circuits. State tables show the inputs, outputs, and flip-flop state changes for sequential circuits. State diagrams are an alternative but equivalent way of showing the same information. Inputs Combinational circuit Outputs Memory Sequential circuit analysis 1

An example sequential circuit Here is a sequential circuit with two JK flip-flops. There is one input, X, and one output, Z. The values of the flip-flops (Q 1 ) form the state, or the memory, of the circuit. The flip-flop outputs also go back into the primitive gates on the left. This fits the general sequential circuit diagram at the bottom. X Inputs Combinational circuit Z Outputs Memory Q0 Q1 Sequential circuit analysis 2

How do you analyze a sequential circuit? For a combinational circuit we could find a truth table, which shows how the outputs are related to the inputs. A state table is the sequential analog of a truth table. It shows inputs and current states on the left, and outputs and next states on the right. For a sequential circuit, the outputs are dependent upon not only the inputs, but also the current state of the flip-flops. In addition to finding outputs, we also need to find the state of the flip-flops on the next clock cycle. Sequential circuit analysis 3

Analyzing our example circuit A basic state table for our example circuit is shown below. Remember that there is one input X, one output Z, and two flip-flops Q 1. The present state Q 1 and the input will determine the next state and the output. Present State Inputs Next State Outputs Q 1 X Q 1 Z 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Sequential circuit analysis 4

The outputs are easy The output depends on the current state Q0 and Q1 as well as the inputs. From the diagram, you can see that Z = Q 1 X Output at the current time Present State Inputs Next State Outputs Q 1 X Q 1 Z 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 Sequential circuit analysis 5

Flip-flop input equations Finding the next states is harder. To do this, we have to figure out how the flip-flops are changing. Step 1: Find Boolean expressions for the flip-flop inputs. I.e. How do the inputs (say, J & K) to the flipflops depend on the current state and input Step 2: Use these expressions to find the actual flip-flop input values for each possible combination of present states and inputs. I.e. Fill in the state table (with new intermediate columns) Step 3: Use flip-flop characteristic tables or equations to find the next states, based on the flip-flop input values and the present states. Sequential circuit analysis 6

Step 1: Flip-flop input equations For our example, the flip-flop input equations are: J 1 = X K 1 = X + J 0 = X + Q 1 K 0 = X JK flip-flops each have two inputs, J and K. (D and T flipflops have one input each.) Sequential circuit analysis 7

Step 2: Flip-flop input values With these equations, we can make a table showing J 1, K 1, J 0 and K 0 for the different combinations of present state Q 1 and input X. J 1 = X J 0 = X + Q 1 K 1 = X + K 0 = X Present State Inputs Flip-flop Inputs Q 1 X J 1 K 1 J 0 K 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0 1 1 0 Sequential circuit analysis 8

Step 3: Find the next states Finally, use the JK flip-flop characteristic tables or equations to find the next state of each flip-flop, based on its present state and inputs. The general JK flip-flop characteristic equation is: Q(t+1) = K Q(t) + JQ (t) In our example circuit, we have two JK flip-flops, so we have to apply this equation to each of them: Q 1 (t+1) = K 1 Q 1 (t) + J 1 Q 1 (t) (t+1) = K 0 (t) + J 0 (t) We can also determine the next state for each input/current state combination directly from the characteristic table. J K Q(t+1) Operation 0 0 Q(t) No change 0 1 0 Reset 1 0 1 Set 1 1 Q (t) Complement Sequential circuit analysis 9

Step 3 concluded Finally, here are the next states for Q 1 and, using these equations: Q 1 (t+1) = K 1 Q 1 (t) + J 1 Q 1 (t) (t+1) = K 0 (t) + J 0 (t) Present State Inputs FF Inputs Next State Q 1 X J 1 K 1 J 0 K 0 Q 1 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 0 1 0 1 0 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 1 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 0 0 1 1 1 0 1 1 0 0 1 Sequential circuit analysis 10

Getting the state table columns straight The table starts with Present State and Inputs. Present State and Inputs yield FF Inputs. Present State and FF Inputs yield Next State, based on the flipflop characteristic tables. Present State and Inputs yield Output. We really only care about FF Inputs in order to find Next State. Note: the outputs occur this cycle and the next state in the next cycle Present State Inputs FF Inputs Next State Outputs Q 1 X J 1 K 1 J 0 K 0 Q 1 Z 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 0 1 1 0 1 1 1 1 0 0 0 1 1 1 0 1 1 0 0 1 1 Sequential circuit analysis 11

State diagrams We can also represent the state table graphically with a state diagram. A diagram corresponding to our example state table is shown below. Present State Inputs Next State Outputs Q 1 X Q 1 Z 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 input 0/0 0/0 1/0 1/0 00 01 Sequential circuit analysis 12 11 state output 1/1 0/0 1/0 10 0/0

Sizes of state diagrams Always check the size of your state diagrams. If there are n flip-flops, there should be 2 n nodes in the diagram. If there are m inputs, then each node will have 2 m outgoing arrows. From each state In our example, We have two flip-flops, and thus four states or nodes. There is one input, so each node has two outgoing arrows. Present State Inputs Next State Outputs Q 1 X Q 1 Z 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0/0 1/0 A 00 01 11 1/0 1/1 0/0 1/0 0/0 D 0/0 B C 10 Sequential circuit analysis 13

Example Present State Inputs FF Inputs Next State Outputs Q 1 X J 1 K 1 J 0 K 0 Q 1 Z 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Sequential circuit analysis 14

Example 00 01 11 10 Present State Inputs FF Inputs Next State Outputs Q 1 X J 1 K 1 J 0 K 0 Q 1 Z 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 Sequential circuit analysis 15

Example 1 1/0 00 01 0/0 1/0 0/0 1/0 1/0 11 0/0 10 0/1 Present State Inputs FF Inputs Next State Outputs Q 1 X J 1 K 1 J 0 K 0 Q 1 Z 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 Sequential circuit analysis 16

Sequential circuit analysis summary To analyze sequential circuits, you have to: Find Boolean expressions for the outputs of the circuit and the flipflop inputs. Use these expressions to fill in the output and flip-flop input columns in the state table. Finally, use the characteristic equation or characteristic table of the flip-flop to fill in the next state columns. The result of sequential circuit analysis is a state table or a state diagram describing the circuit. Sequential circuit analysis 17