Chapter 5 Synchronous Sequential Logic

Similar documents
Analysis and Design of Sequential Circuits: Examples

Sequential Synchronous Circuit Analysis

Finite State Machine. By : Ali Mustafa

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

Lecture (08) Synchronous Sequential Logic

Synchronous Sequential Logic

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

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

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

Synchronous Sequential Logic Part I

Digital Circuits and Systems

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

Chapter 4. Sequential Logic Circuits

Lecture 17: Designing Sequential Systems Using Flip Flops

Sequential Logic Circuits

Philadelphia University Student Name: Student Number:

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

ELE2120 Digital Circuits and Systems. Tutorial Note 9

Sequential Circuit Analysis

Chapter 4 Part 2 Sequential Circuits

Synchronous Sequential Logic. Chapter 5

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

Philadelphia University Student Name: Student Number:

6 Synchronous State Machine Design

ELCT201: DIGITAL LOGIC DESIGN

Sequential Circuits Sequential circuits combinational circuits state gate delay


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

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

Chapter 7. Synchronous Sequential Networks. Excitation for

Sequential Circuit Design

I. Motivation & Examples

Chapter 7 Sequential Logic

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

ELCT201: DIGITAL LOGIC DESIGN

Sequential vs. Combinational

Chapter 5 Synchronous Sequential Logic

Topic 8: Sequential Circuits

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

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

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

Experiment 9 Sequential Circuits

Lecture 10: Synchronous Sequential Circuits Design

CSCI 2150 Intro to State Machines

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

Roger L. Tokheim. Chapter 8 Counters Glencoe/McGraw-Hill

Design of Sequential Circuits

Gates and Flip-Flops

Clocked Synchronous State-machine Analysis

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

Digital Logic Design - Chapter 4

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

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

CprE 281: Digital Logic

WORKBOOK. Try Yourself Questions. Electrical Engineering Digital Electronics. Detailed Explanations of

Overview of Chapter 4

Exam for Physics 4051, October 31, 2008

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

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

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

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

Random Number Generator Digital Design - Demo

ELE2120 Digital Circuits and Systems. Tutorial Note 10

Lecture 8: Sequential Networks and Finite State Machines

Analysis of Clocked Sequential Circuits

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

Lecture 9: Digital Electronics

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

Fundamentals of Digital Design

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

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

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

DIGITAL LOGIC CIRCUITS

Chapter 7. Sequential Circuits Registers, Counters, RAM

Different encodings generate different circuits

Computer Science Final Examination Friday December 14 th 2001

PAST EXAM PAPER & MEMO N3 ABOUT THE QUESTION PAPERS:

Synchronous Sequential Circuit Design. Digital Computer Design

Digital Electronics. Delay Max. FF Rate Power/Gate High Low (ns) (MHz) (mw) (V) (V) Standard TTL (7400)

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

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

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

DE58/DC58 LOGIC DESIGN DEC 2014

CHW 261: Logic Design

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

Chapter 14 Sequential logic, Latches and Flip-Flops

Digital Logic Design - Chapter 5

Synchronous Sequential Circuit

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4

S.E. Sem. III [ETRX] Digital Circuit Design. t phl. Fig.: Input and output voltage waveforms to define propagation delay times.

ECE 341. Lecture # 3

Digital Electronics Final Examination. Part A

Digital Design 2010 DE2 1

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

EET 310 Flip-Flops 11/17/2011 1

FSM model for sequential circuits

Vidyalankar S.E. Sem. III [EXTC] Digital Electronics Prelim Question Paper Solution ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD = B

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

Sample Test Paper - I

Chapter 7 Logic Circuits

Transcription:

Chapter 5 Synchronous Sequential Logic Sequential circuit: A circuit that includes memory elements. In this case the output depends not only on the current input but also on the past inputs. Memory A synchronous sequential circuit uses signals that affect the storage elements only at discrete instances of time. - timing device: clock pulse Memory Sequential Logic 1

Flip-Flops Flip-Flop: a circuit that can maintain a binary state indefinitely. RS Flip-Flop FF Q Q A flip-flop has two useful states: when Q = 1: set state; when Q = 0: reset or clear state. Sequential Logic 2

Clocked RS When C goes to 1, information from S and R goes through to the FF. Q S R Q(t+1) 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 indeterminate 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 indeterminate Characteristic table When both inputs are set to 1, the outputs momentarily go to 0. The state is indeterminate. Sequential Logic 3

D Flip-Flop D Q(t+1) 0 0 1 1 Q D Q(t+1) 0 0 0 0 1 1 1 0 0 1 1 1 Characteristic table JK Flip-Flop J K Q(t+1) 0 0 Q 0 1 0 1 0 1 1 1 Q Sequential Logic 4

T Flip-Flop T Q(t+1) 0 Q 1 Q Sequential Logic 5

Characteristic & Excitation Tables S R Q(t+1) 0 0 Q(t) 0 1 0 1 0 1 1 1? J K Q(t+1) 0 0 Q 0 1 0 1 0 1 1 1 Q D Q(t+1) 0 0 1 1 T Q(t+1) 0 Q 1 Q Q Q(t+1) J K 0 0 0 X 0 1 1 X 1 0 X 1 1 1 X 0 Q Q(t+1) D 0 0 0 0 1 1 1 0 0 1 1 1 Q Q(t+1) T 0 0 0 0 1 1 1 0 1 1 1 0 Sequential Logic 6

Analysis of Sequential Circuits State Equations: Behavior of clocked circuits is described by state equations State equations: specify next state as a function of the inputs and the present state A(t+1) = B(t+1) = y = Sequential Logic 7

Analysis of Sequential Circuits State Table: The time sequence of inputs, outputs and ffs can be shown in a state table A(t+1) = A(t) x(t) + B(t) x(t) B(t+!) = A (t) x(t) y = x [A(t) + B(t)] Present State Input Next State Output A B x A B y 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 0 0 0 1 1 1 1 1 0 0 Sequential Logic 8

Analysis of Sequential Circuits State Table: Present State Input Next State Output A B x A B y 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 0 0 0 1 1 1 1 1 0 0 Another form of state table is the following: Present State Next State Output x=0 x=1 x=0 x =1 A B A B AB y y 00 00 01 0 0 01 00 11 1 0 10 00 10 1 0 11 00 10 1 0 Sequential Logic 9

State Diagram State diagram represents graphically the information in a state table State: shown by a circle Transitions between states: lines connecting circles Binary # inside circle indicates state of the ff Input / output: #/# close to transition lines Present State Next State Output x=0 x=1 x=0 x =1 A B A B AB y y 00 00 01 0 0 01 00 11 1 0 10 00 10 1 0 11 00 10 1 0 Sequential Logic 10

Analysis with JK and T flip-flops Recall the JK flip-flop design based on a D flip-flop: The state equation at the input of the D flip-flop is: DA = For a T flip-flop: The state equation at the input of the D flip-flop is: DA = Sequential Logic 11

Analysis with JK flip-flops Example: Analyze the following sequential circuit: JA = B KA = Bx JB = x KB = A x + Ax 1) First find inputs to ff 2) Then next state Present State Input Next State F-F inputs A B x A B JA KA JB KB 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 Logic 12

Analysis with JK flip-flops Example: Analyze the following sequential circuit: JA = KA = JB = KB = Truth table with state states: (we do not need to know the ff input values since we can calculate the next state directly from the state equations) Then: A(t+1) = JA + K A = BA + (Bx ) A = B(t+1) = x B + (A x +Ax ) B = Sequential Logic 13

Design Procedure STEPS: 1 st - derive the state diagram 2 nd - assign binary values to the states 3 rd - derive state table 4 th - choose type of flip-flops 5 th derive equations for the ff inputs and the output 6 th draw the logic diagram Q: How many flip-flops are needed? A: the number is determined by the # of states. EXAMPLE: Design a circuit that detects 3 or more consecutive 1 s in a binary string. Sequential Logic 14

Design Procedure Present State Input Next State Output A B x A B y 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 0 0 1 1 1 1 1 1 1 Design the circuit using D flip-flops. Inputs for the flip-flops are the same as the next state Use K-maps to simplify the two inputs to flip-flops DA and DB and output y. Sequential Logic 15

Design Procedure Sequential Logic 16

Design using JK flip-flops Excitation table for JK Q Q(t+1) J K 0 0 0 X 0 1 1 X 1 0 X 1 1 1 X 0 The state table should also include the inputs to JK flip-flops which generate the desired transition sequence. Example: Assume the following state table Present State Input Next State FF inputs A B x A B JA KA JA KA 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 0 Sequential Logic 17

Simplify the inputs using K-maps Present State Input Next State FF inputs A B x A B JA KA JA KA 0 0 0 0 0 0 X 0 X 0 0 1 0 1 0 X 1 X 0 1 0 1 0 1 X X 1 0 1 1 0 1 0 X X 0 1 0 0 1 0 X 0 0 X 1 0 1 1 1 X 0 1 X 1 1 0 1 1 X 0 X 0 1 1 1 0 0 X 1 X 1 Sequential Logic 18

Design the circuit using JK flip-flops Equations: JA = Bx KA = Bx JA = x KB = Ax + A x Sequential Logic 19

Design of Counters A sequential circuit that goes through a defined sequence of states when the input (count) pulses are applied is called a counter Count number of occurrences of an event. Useful in generating timing sequences to control other operations in a digital system. Example: Design a counter that counts from 0 to 7 and returns to 0 after 7. State diagram No inputs or outputs Transitions occur during a clock edge (0 to 1) Next state depends entirely on the present state Sequential Logic 20

Design of Counters State table (for T flip-flops) Present State Next State FF inputs A2 A1 A0 A2 A1 A0 TA2 TA1 TA0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Simplify the inputs using K-maps Sequential Logic 21

Design of Counters Logic diagram hkjh Sequential Logic 22

State Reduction Objective: to reduce the number of flip-flops Effect: this process may increase the number of gates required to implement the circuit EXAMPLE Note that only input-output sequences are important (internal states are used just to provide the required sequences) For this reason, states are marked with letters There are an infinite number of input sequences. Each results in a unique output Sequential Logic 23

State Reduction Consider the following input: Input 0 1 0 1 0 1 1 0 1 0 0 Starting with the state a, let s determine the state transitions and output state a a b c d e f f g f g a Input 0 1 0 1 0 1 1 0 1 0 0 Output 0 0 0 0 0 1 1 0 1 0 0 To reduce the states we need to complete the state table Present State Next State Output x=0 x=1 x=0 x =1 a a b 0 0 b c d 0 0 c a d 0 0 d c f 0 1 e a f 0 1 f g f 0 1 g a f 0 1 Sequential Logic 24

State Reduction Equivalent states: for all input combinations they give the same output and send the circuit to the same state Present State Next State Output x=0 x=1 x=0 x =1 a a b 0 0 b c d 0 0 c a d 0 0 d c f 0 1 e a f 0 1 f g f 0 1 g a f 0 1 States g and e are equivalent So g is replaced by e Present State Next State Output x=0 x=1 x=0 x =1 a a b 0 0 b c d 0 0 c a d 0 0 d c f 0 1 e a f 0 1 f e f 0 1 Sequential Logic 25

State Reduction We observe that d is equivalent to f; f is removed Present State Next State Output x=0 x=1 x=0 x =1 a a b 0 0 b c d 0 0 c a d 0 0 d c d 0 1 e a d 0 1 State diagram for new state table: Let s apply the same input sequence: state a Input 0 1 0 1 0 1 1 0 1 0 0 Output 0 Sequential Logic 26