Digital Logic Design I

Similar documents
Sequential Logic Circuits

Synchronous Sequential Logic. Chapter 5

Chapter 5: Synchronous Sequential Logic

Synchronous Sequential Logic

B.Tech CSE Sem. 3 15CS202 DIGITAL SYSTEM DESIGN (Regulations 2015) UNIT -IV

Synchronous Sequential Logic

Part II. Chapter2: Synchronous Sequential Logic

Lecture 11: Synchronous Sequential Logic

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

Synchronous Sequential Logic

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

ELCT201: DIGITAL LOGIC DESIGN

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

Chapter 5 Synchronous Sequential Logic

Chapter 5 Synchronous Sequential Logic

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Other Flip-Flops. Lecture 27 1

Chapter. Synchronous Sequential Circuits

LATCHES & FLIP-FLOP. Chapter 7

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

MC9211 Computer Organization

`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

RS flip-flop using NOR gate

Chapter 5. Introduction

Chapter 5 Sequential Circuits

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

Unit 11. Latches and Flip-Flops

ECE 25 Introduction to Digital Design. Chapter 5 Sequential Circuits ( ) Part 1 Storage Elements and Sequential Circuit Analysis

Sequential Design Basics

Chapter 5 Synchronous Sequential Logic

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

EET2411 DIGITAL ELECTRONICS

Combinational / Sequential Logic

Chapter 8 Sequential Circuits

Digital Circuits ECS 371

Dr.Mohamed Elmahdy Winter 2015 Eng.Yasmin Mohamed. Problem Set 6. Analysis and Design of Clocked Sequential Circuits. Discussion: 7/11/ /11/2015

Engr354: Digital Logic Circuits

Problems with D-Latch

Final Exam review: chapter 4 and 5. Supplement 3 and 4

2 Sequential Circuits

Logic Design II (17.342) Spring Lecture Outline

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Chapter 3 Unit Combinational

RS flip-flop using NOR gate

Experiment 8 Introduction to Latches and Flip-Flops and registers

Chapter 11 Latches and Flip-Flops

CHAPTER 4: Logic Circuits

CHAPTER1: Digital Logic Circuits

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

WEEK 10. Sequential Circuits: Analysis and Design. Page 1

CHAPTER 4: Logic Circuits

CHAPTER 1 LATCHES & FLIP-FLOPS

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

ELCT201: DIGITAL LOGIC DESIGN

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

CHAPTER 6 COUNTERS & REGISTERS

Digital Fundamentals: A Systems Approach

ELCT201: DIGITAL LOGIC DESIGN

10.1 Sequential logic circuits are a type of logic circuit where the output of the circuit depends not only on

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Logic Design. Flip Flops, Registers and Counters

Analysis of Clocked Sequential Circuits

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Module -5 Sequential Logic Design

Course Administration

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

ECE 301 Digital Electronics

Synchronous Sequential Logic

INTRODUCTION TO SEQUENTIAL CIRCUITS

Flip-Flops and Sequential Circuit Design

FE REVIEW LOGIC. The AND gate. The OR gate A B AB A B A B 0 1 1

CPS311 Lecture: Sequential Circuits

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

CS T34-DIGITAL SYSTEM DESIGN Y2/S3

Universidad Carlos III de Madrid Digital Electronics Exercises

Sequential Logic and Clocked Circuits

D Latch (Transparent Latch)

Counters

UNIVERSITI TEKNOLOGI MALAYSIA

UNIT IV. Sequential circuit

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Introduction to Sequential Circuits

Department of Electrical and Computer Engineering Mid-Term Examination Winter 2012

LAB #4 SEQUENTIAL LOGIC CIRCUIT

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

Review of Flip-Flop. Divya Aggarwal. Student, Department of Physics and Astro-Physics, University of Delhi, New Delhi. their state.

CMSC 313 Preview Slides

Sequential Circuits: Latches & Flip-Flops

Digital Fundamentals. Lab 5 Latches & Flip-Flops CETT Name: Date:

Synchronous Sequential Logic

Chapter 2. Digital Circuits

IT T35 Digital system desigm y - ii /s - iii

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

Transcription:

Digital Logic Design I Synchronous Sequential Logic Mustafa Kemal Uyguroğlu

Sequential Circuits Asynchronous Inputs Combinational Circuit Memory Elements Outputs Synchronous Inputs Combinational Circuit Outputs Clock Flip-flops

Latches SR Latch S R = R S Initial Value Eastern Mediterranean University 2

Latches SR Latch R S R = = S Eastern Mediterranean University 3

Latches SR Latch R S R = = S Eastern Mediterranean University 4

Latches SR Latch R S R = = = S Eastern Mediterranean University 5

Latches SR Latch R S R = = = S Eastern Mediterranean University 6

Latches SR Latch R S R = = = = S Eastern Mediterranean University 7

Latches SR Latch R S R = = = = S Eastern Mediterranean University 8

Latches SR Latch R S S R = = = = = Eastern Mediterranean University 9

Latches SR Latch R S S R = = No change Reset Set Invalid S R S R = = Invalid Set Reset No change Eastern Mediterranean University

Latches SR Latch R S S R = = No change Reset Set Invalid S R S R = = Invalid Set Reset No change Eastern Mediterranean University

Controlled Latches SR Latch with Control Input R R S S C C S S R R C S R x x = No change No change Reset Set Invalid Eastern Mediterranean University 2

Controlled Latches D Latch (D = Data) Timing Diagram D C S C D R C D x No change Reset Set t Output may change Eastern Mediterranean University 3

Controlled Latches D Latch (D = Data) Timing Diagram D C S C D R C D x No change Reset Set Output may change Eastern Mediterranean University 4

Flip-Flops Controlled latches are level-triggered C Flip-Flops are edge-triggered CLK Positive Edge CLK Negative Edge Eastern Mediterranean University 5

Flip-Flops Master-Slave D Flip-Flop D D C D Latch (Master) D C D Latch (Slave) CLK CLK Master Slave Looks like it is negative edge-triggered D Master Slave Eastern Mediterranean University 6

Flip-Flops Edge-Triggered D Flip-Flop D CLK D Positive Edge D Negative Edge Eastern Mediterranean University 7

Flip-Flops JK Flip-Flop J K D CLK D = J + K J K Eastern Mediterranean University 8

Flip-Flops T Flip-Flop T J T D K D = J + K D = T + T = T T Eastern Mediterranean University 9

Flip-Flop Characteristic Tables D D (t+) Reset Set J K J K (t+) (t) (t) No change Reset Set Toggle T T (t+) (t) (t) No change Toggle Eastern Mediterranean University 2

Flip-Flop Characteristic Equations D D (t+) (t+) = D J K J K (t+) (t) (t) (t+) = J + K T T (t+) (t) (t) (t+) = T Eastern Mediterranean University 2

Flip-Flop Characteristic Equations Analysis / Derivation J K J K (t) (t+) No change Reset Set Toggle Eastern Mediterranean University 22

Flip-Flop Characteristic Equations Analysis / Derivation J K J K (t) (t+) No change Reset Set Toggle Eastern Mediterranean University 23

Flip-Flop Characteristic Equations Analysis / Derivation J K J K (t) (t+) No change Reset Set Toggle Eastern Mediterranean University 24

Flip-Flop Characteristic Equations Analysis / Derivation J K J K (t) (t+) No change Reset Set Toggle Eastern Mediterranean University 25

Flip-Flop Characteristic Equations Analysis / Derivation J K J K (t) (t+) (t+) = J + K K J Eastern Mediterranean University 26

Flip-Flops with Direct Inputs Asynchronous Reset D R D CLK (t+) x x R Reset Eastern Mediterranean University 27

Flip-Flops with Direct Inputs Asynchronous Reset D R R D CLK (t+) x x Reset Eastern Mediterranean University 28

Flip-Flops with Direct Inputs Asynchronous Preset and Clear Preset PR D PR CLR D CLK (t+) x x Reset CLR Eastern Mediterranean University 29

Flip-Flops with Direct Inputs Asynchronous Preset and Clear Preset Reset PR D CLR PR CLR D CLK (t+) x x x x Eastern Mediterranean University 3

Flip-Flops with Direct Inputs Asynchronous Preset and Clear Preset Reset PR D CLR PR CLR D CLK (t+) x x x x Eastern Mediterranean University 3

Analysis of Clocked Sequential Circuits The State State = Values of all Flip-Flops Example x D A A B = D B CLK y Eastern Mediterranean University 32

Analysis of Clocked Sequential Circuits State Equations A(t+) = D A x D A = A(t) x(t)+b(t) x(t) = A x + B x D B B(t+) = D B = A (t) x(t) CLK = A x y y(t) = [A(t)+ B(t)] x (t) = (A + B) x Eastern Mediterranean University 33

Analysis of Clocked Sequential Circuits State Table (Transition Table) Present State Input Next State Output A B x A B y t t+ t x CLK A(t+) = A x + B x B(t+) = A x y(t) = (A + B) x Eastern Mediterranean University 34 D D A B y

Analysis of Clocked Sequential Circuits State Table (Transition Table) Present State Next State Output x = x = x = x = A B A B A B y y x CLK D D A B y t t+ t A(t+) = A x + B x B(t+) = A x y(t) = (A + B) x Eastern Mediterranean University 35

Analysis of Clocked Sequential Circuits State Diagram AB input/output / / / Present State Next State Output x = x = x = x = A B A B A B y y / / / / x D A D B / CLK y Eastern Mediterranean University 36

Analysis of Clocked Sequential Circuits D Flip-Flops Example: Present State Input Next State A x y A x y CLK Eastern Mediterranean University 37 D A(t+) = D A = A x y,,,, A

Analysis of Clocked Sequential Circuits JK Flip-Flops J A Example: x K Present State I/P Next State Flip-Flop Inputs J B A B x A B J A K A J B K B CLK J A = B K A = B x J B = x K B = A x A(t+) = J A A + K A A = A B + AB + Ax B(t+) = J B B + K B B = B x + ABx + A Bx Eastern Mediterranean University 38 K

Analysis of Clocked Sequential Circuits JK Flip-Flops J A Example: x K Present Next Flip-Flop I/P State State Inputs A B x A B J A K A J B K B CLK Eastern Mediterranean University 39 J K B

Analysis of Clocked Sequential Circuits T Flip-Flops x T A y Example: Present Next F.F I/P State State Inputs O/P A B x A B T A T B y CLK T A = B x y = A B T B = x A(t+) = T A A + T A A = AB + Ax + A Bx B(t+) = T B B + T B B = x B Eastern Mediterranean University 4 T R R Reset B

Analysis of Clocked Sequential Circuits T Flip-Flops x T A y Example: Present Next F.F I/P State State Inputs O/P A B x A B T A T B y / / / CLK Eastern Mediterranean University 4 T R R Reset / B / / / /

Mealy and Moore Models The Mealy model: the outputs are functions of both the present state and inputs (Fig. 5-5). The outputs may change if the inputs change during the clock pulse period. The outputs may have momentary false values unless the inputs are synchronized with the clocks. The Moore model: the outputs are functions of the present state only (Fig. 5-2). The outputs are synchronous with the clocks. Eastern Mediterranean University 42

Mealy and Moore Models Fig. 5.2 Block diagram of Mealy and Moore state machine Eastern Mediterranean University 43

Mealy and Moore Models Present State Mealy I/P Next State O/P A B x A B y Present State Moore I/P Next State O/P A B x A B y For the same state, the output changes with the input For the same state, the output does not change with the input Eastern Mediterranean University 44

Moore State Diagram State / Output / / / / Eastern Mediterranean University 45

State Reduction and Assignment State Reduction Reductions on the number of flip-flops and the number of gates. A reduction in the number of states may result in a reduction in the number of flip-flops. An example state diagram showing in Fig. 5.25. Fig. 5.25 State diagram Eastern Mediterranean University 46

State Reduction State: a a b c d e f f g f g a Input: Output: Only the input-output sequences are important. Two circuits are equivalent Have identical outputs for all input sequences; The number of states is not important. Fig. 5.25 State diagram Eastern Mediterranean University 47

Equivalent states Two states are said to be equivalent For each member of the set of inputs, they give exactly the same output and send the circuit to the same state or to an equivalent state. One of them can be removed. Eastern Mediterranean University 48

Reducing the state table e = g (remove g); d = f (remove f); Eastern Mediterranean University 49

The reduced finite state machine State: a a b c d e d d e d e a Input: Output: Eastern Mediterranean University 5

The checking of each pair of states for possible equivalence can be done systematically using Implication Table. The unused states are treated as don't-care condition fewer combinational gates. Fig. 5.26 Reduced State diagram Eastern Mediterranean University 5

Implication Table The state-reduction procedure for completely specified state tables is based on the algorithm that two states in a state table can be combined into one if they can be shown to be equivalent. There are occasions when a pair of states do not have the same next states, but, nonetheless, go to equivalent next states. Consider the following state table: (a, b) imply (c, d) and (c, d) imply (a, b). Both pairs of states are equivalent; i.e., a and b are equivalent as well as c and d. Eastern Mediterranean University 52

Implication Table The checking of each pair of states for possible equivalence in a table with a large number of states can be done systematically by means of an implication table. This a chart that consists of squares, one for every possible pair of states, that provide spaces for listing any possible implied states. Consider the following state table: Eastern Mediterranean University 53

Implication Table The implication table is: Eastern Mediterranean University 54

Implication Table On the left side along the vertical are listed all the states defined in the state table except the last, and across the bottom horizontally are listed all the states except the last. The states that are not equivalent are marked with a x in the corresponding square, whereas their equivalence is recorded with a. Some of the squares have entries of implied states that must be further investigated to determine whether they are equivalent or not. The step-by-step procedure of filling in the squares is as follows:. Place a cross in any square corresponding to a pair of states whose outputs are not equal for every input. 2. Enter in the remaining squares the pairs of states that are implied by the pair of states representing the squares. We do that by starting from the top square in the left column and going down and then proceeding with the next column to the right. Eastern Mediterranean University 55

Implication Table 3. Make successive passes through the table to determine whether any additional squares should be marked with a x. A square in the table is crossed out if it contains at least one implied pair that is not equivalent. 4. Finally, all the squares that have no crosses are recorded with check marks. The equivalent states are: (a, b), (d, e), (d, g), (e, g). We now combine pairs of states into larger groups of equivalent states. The last three pairs can be combined into a set of three equivalent states (d, e,g) because each one of the states in the group is equivalent to the other two. The final partition of these states consists of the equivalent states found from the implication table, together with all the remaining states in the state table that are not equivalent to any other state: The reduced state table is: (a, b) (c) (d, e, g) (f) Eastern Mediterranean University 56

Implication Table Eastern Mediterranean University 57

State Assignment State Assignment To minimize the cost of the combinational circuits. Three possible binary state assignments. (m states need n-bits, where 2 n > m) Eastern Mediterranean University 58

Any binary number assignment is satisfactory as long as each state is assigned a unique number. Use binary assignment. Eastern Mediterranean University 59

Design Procedure Design Procedure for sequential circuit The word description of the circuit behavior to get a state diagram; State reduction if necessary; Assign binary values to the states; Obtain the binary-coded state table; Choose the type of flip-flops; Derive the simplified flip-flop input equations and output equations; Draw the logic diagram; Eastern Mediterranean University 6

Design of Clocked Sequential Circuits Example: Detect 3 or more consecutive s S / S / S 3 / S 2 / State A B S S S 2 S 3 Eastern Mediterranean University 6

Design of Clocked Sequential Circuits Example: Detect 3 or more consecutive s Present State Input Next State Output A B x A B y S / S / S 3 / S 2 / Eastern Mediterranean University 62

Design of Clocked Sequential Circuits Example: Detect 3 or more consecutive s Present State Input Next State Output A B x A B y Synthesis using D Flip-Flops A(t+) = D A (A, B, x) = (3, 5, 7) B(t+) = D B (A, B, x) = (, 5, 7) y (A, B, x) = (6, 7) Eastern Mediterranean University 63

Design of Clocked Sequential Circuits with D F.F. Example: Detect 3 or more consecutive s Synthesis using D Flip-Flops D A (A, B, x) = (3, 5, 7) = A x + B x D B (A, B, x) = (, 5, 7) = A x + B x y (A, B, x) = (6, 7) = A B B A x B A x Eastern Mediterranean University 64 B A x

Design of Clocked Sequential Circuits with D F.F. Example: Detect 3 or more consecutive s Synthesis using D Flip-Flops D A = A x + B x D B = A x + B x y = A B x D A y D B CLK Eastern Mediterranean University 65

Flip-Flop Excitation Tables Present State Next State (t) (t+) F.F. Input D Present State Next State F.F. Input (t) (t+) J K x x x x (No change) (Reset) (Set) (Toggle) (Reset) (Toggle) (No change) (Set) (t) (t+) T Eastern Mediterranean University 66

Design of Clocked Sequential Circuits with JK F.F. Example: Detect 3 or more consecutive s Present State Input Next State Flip-Flop Inputs A B x A B J A K A J B K B x x x x x x x x x x x x x x x x Synthesis using JK F.F. J A (A, B, x) = (3) d JA (A, B, x) = (4,5,6,7) K A (A, B, x) = (4, 6) d KA (A, B, x) = (,,2,3) J B (A, B, x) = (, 5) d JB (A, B, x) = (2,3,6,7) K B (A, B, x) = (2, 3, 6) d KB (A, B, x) = (,,4,5) Eastern Mediterranean University 67

Design of Clocked Sequential Circuits with JK F.F. Example: Detect 3 or more consecutive s Synthesis using JK Flip-Flops x J A = B x K A = x J B = x K B = A + x J A K y J B B A x x x x x B x x A x x x B x x x x A x B x x A x x x K CLK Eastern Mediterranean University 68

Design of Clocked Sequential Circuits with T F.F. Example: Detect 3 or more consecutive s Present State Input Next State F.F. Input A B x A B T A T B Synthesis using T Flip-Flops T A (A, B, x) = (3, 4, 6) T B (A, B, x) = (, 2, 3, 5, 6) Eastern Mediterranean University 69

Design of Clocked Sequential Circuits with T F.F. Example: Detect 3 or more consecutive s Synthesis using T Flip-Flops T A = A x + A B x T B = A B + B x x T A y B B T B A x A x CLK Eastern Mediterranean University 7