Introduction to Sequential Circuits

Similar documents
Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Analysis of Clocked Sequential Circuits

Chapter. Synchronous Sequential Circuits

ELCT201: DIGITAL LOGIC DESIGN

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.

Other Flip-Flops. Lecture 27 1

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

ELCT201: DIGITAL LOGIC DESIGN

Unit 11. Latches and Flip-Flops

Sequential Circuits: Latches & Flip-Flops

Synchronous Sequential Logic

Combinational vs Sequential

MC9211 Computer Organization

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

D Latch (Transparent Latch)

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

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

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

ECE 341. Lecture # 2

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

CHAPTER 4: Logic Circuits

Logic Design. Flip Flops, Registers and Counters

Chapter 5 Synchronous Sequential Logic

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

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

CHAPTER 4: Logic Circuits

Experiment 8 Introduction to Latches and Flip-Flops and registers

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

LATCHES & FLIP-FLOP. Chapter 7

ELE2120 Digital Circuits and Systems. Tutorial Note 7

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

Chapter 8 Sequential Circuits

Chapter 5: Synchronous Sequential Logic

Chapter 11 Latches and Flip-Flops

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time.

Slide Set 7. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Last time, we saw how latches can be used as memory in a circuit

EET2411 DIGITAL ELECTRONICS

Flip-Flops and Sequential Circuit Design

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

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

Rangkaian Sekuensial. Flip-flop

Asynchronous (Ripple) Counters

Introduction to Microprocessor & Digital Logic

Chapter 5 Sequential Circuits

Engr354: Digital Logic Circuits

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

Synchronous Sequential Logic

Digital Circuits ECS 371

Chapter 4. Logic Design

Sequential Logic and Clocked Circuits

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

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS)

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

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

Synchronous Sequential Logic

RS flip-flop using NOR gate

The NOR latch is similar to the NAND latch

Latches, Flip-Flops, and Registers. Dr. Ouiem Bchir

Introduction to Digital Logic Missouri S&T University CPE 2210 Flip-Flops

INTRODUCTION TO SEQUENTIAL CIRCUITS

Switching Circuits & Logic Design

6. Sequential Logic Flip-Flops

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

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

CMSC 313 Preview Slides

Sequential Logic Circuits

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

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

Lecture 8: Sequential Logic

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

Vignana Bharathi Institute of Technology UNIT 4 DLD

Synchronous Sequential Logic. Chapter 5

CHAPTER 1 LATCHES & FLIP-FLOPS

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

CHAPTER1: Digital Logic Circuits

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

Counters

Chapter 2. Digital Circuits

Synchronous Sequential Logic

Sequential Design Basics

`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

RS flip-flop using NOR gate

UNIT IV. Sequential circuit

Part II. Chapter2: Synchronous Sequential Logic

Course Administration

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

Flip-Flops and Registers

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

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

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

LAB #4 SEQUENTIAL LOGIC CIRCUIT

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

CPS311 Lecture: Sequential Circuits

Electrical & Computer Engineering ECE 491. Introduction to VLSI. Report 1

Synchronous Sequential Logic

NAME SYMBOL CHARACTERISTIC TABLE EXCITATION TABLE. S R Q(next) 0 0 Q. (hold) (reset) (set) 1 1? (undefined) J K Q(next) (hold) (reset) (set) 1 1 Q'

CHAPTER 11 LATCHES AND FLIP-FLOPS

Transcription:

Introduction to Sequential Circuits COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Presentation Outline Introduction to Sequential Circuits Synchronous versus Asynchronous Latches Flip-Flops Characteristic Tables and Equations Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 2

Combinational versus Sequential Two classes of digital circuits Combinational Circuits Sequential Circuits Combinational Circuit Outputs = F(Inputs) Function of Inputs only NO internal memory Inputs Combinational Circuit Outputs Sequential Circuit Outputs is a function of Inputs and internal Memory There is an internal memory that stores the state of the circuit Time is very important: memory changes with time Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 3

Introduction to Sequential Circuits A Sequential circuit consists of: 1. Memory elements: Inputs Combinational Outputs Latches or Flip-Flops Logic Store the Present State Present State Memory Next State 2. Combinational Logic Elements Computes the Outputs of the circuit Outputs depend on Inputs and Current State Computes the Next State of the circuit Next State also depends on the Inputs and the Present State Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 4

Two Types of Sequential Circuits 1. Synchronous Sequential Circuit Uses a clock signal as an additional input Changes in the memory elements are controlled by the clock Changes happen at discrete instances of time 2. Asynchronous Sequential Circuit No clock signal Changes in the memory elements can happen at any instance of time Our focus will be on Synchronous Sequential Circuits Easier to design and analyze than asynchronous sequential circuits Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 5

Synchronous Sequential Circuits Inputs Present State Clock Combinational Logic Memory Elements Outputs Next State Synchronous sequential circuits use a clock signal The clock signal is an input to the memory elements The clock determines when the memory should be updated The present state = output value of memory (stored) The next state = input value to memory (not stored yet) Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 6

The Clock Clock cycle Clock cycle Positive Pulse Negative Pulse Time Clock is a periodic signal = Train of pulses (1's and 0's) The same clock cycle repeats indefinitely over time Positive Pulse: when the level of the clock is 1 Negative Pulse: when the level of the clock is 0 Rising Edge: when the clock goes from 0 to 1 Falling Edge: when the clock goes from 1 down to 0 Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 7

Clock Cycle versus Clock Frequency Clock cycle Clock cycle Clock cycle Clock cycle (or period) is a time duration Measured in seconds, milli-, micro-, nano-, or pico-seconds Time 1 ms = 10-3 sec, 1 µs = 10-6 sec, 1 ns = 10-9 sec, 1 ps = 10-12 sec Clock frequency = number of cycles per second (Hertz) 1 Hz = 1 cycle/sec, 1 KHz = 10 3 Hz, 1 MHz = 10 6 Hz, 1 GHz = 10 9 Hz Clock frequency = 1 / Clock Cycle Example: Given the clock cycle = 0.5 ns = 0.5 10-9 sec Then, the clock frequency = 1/(0.5 10-9 ) = 2 10 9 Hz = 2 GHz Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 8

Memory Elements Memory can store and maintain binary state (0's or 1's) Until directed by an input signal to change state Main difference between memory elements Number of inputs they have How the inputs affect the binary state Two main types: Latches are level-sensitive (the level of the clock) Flip-Flops are edge-sensitive (sensitive to the edge of the clock) Flip-Flips are used in synchronous sequential circuits Flip-Flops are built with latches Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 9

SR Latch A latch is binary storage element that can store 0 or 1 It is the most basic memory element An SR Latch can be built using two NOR gates Two inputs: (Set) and (Reset) Two outputs: and Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 10

SR Latch Operation If =1and =0then Set (=1, =0) If =0and =1then Reset (=0, =1) When ==0, and are unchanged The latch stores its outputs and as long as ==0 When ==1, and are undefined (should never be used) Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 11

S R Latch with NAND Gates Known as the Latch If =0and =1then Set (=1, =0) If =1and =0then Reset (=0, =1) When ==1, and are unchanged (remain the same) The latch stores its outputs and as long as = =1 When ==0, and are undefined (should never be used) Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 12

SR Latch with a Clock Input S R An additional Clock input signal C is used Clock controls when the state of the latch can be changed When C=0, the S and R inputs have no effect on the latch The latch will remain in the same state, regardless of S and R When C=1, then normal SR latch operation Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 13

D-Latch with a Clock Input S R Only one data input An inverter is added: = and = and can never be 11 simultaneously No undefined state When =0, remains the same (No change in state) When =1, =and = Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 14

Graphic Symbols for Latches h h h A bubble appears at the complemented output Indicates that is the complement of A bubble also appears at the inputs of an latch Indicates that logic-0 is used (not logic-1) to set (or reset) the latch (as in the NAND latch implementation) Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 15

Problem with Latches A latch is level-sensitive (sensitive to the level of the clock) As long as the clock signal is high Any change in the value of input appears in the output Output keeps changing its value during a clock cycle Final value of output is uncertain Due to this uncertainty, latches are NOT used as memory elements in =1 synchronous circuits h Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 16

Flip-Flops A Flip-Flop is a better memory element for synchronous circuits Solves the problem of latches in synchronous sequential circuits A latch is sensitive to the level of the clock However, a flip-flop is sensitive to the edge of the clock A flip-flop is called an edge-triggered memory element It changes it output value at the edge of the clock High Level Low Level Rising edge Falling edge Rising edge Falling edge Time Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 17

Positive Edge-Triggered D Flip-Flop Built using two latches in a master-slave configuration A master latch (D-type) receives external inputs A slave latch (SR-type) receives inputs from the master latch Only one latch is enabled at any given time When C=0, the master is enabled and the D input is latched (slave disabled) When C=1, the slave is enabled to generate the outputs (master is disabled) Master Slave Outputs change when C changes from 0 to 1 Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 18

Negative Edge-Triggered D Flip-Flop Similar to positive edge-triggered flip-flop The first inverter at the Master C input is removed Only one latch is enabled at any given time When C=1, the master is enabled and the D input is latched (slave disabled) When C=0, the slave is enabled to generate the outputs (master is disabled) Master Slave Outputs change when C changes from 1 to 0 Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 19

D Flip-Flop Timing Diagram The diagram shows the timing of a positive edge D Flip-Flop The rising edge of the clock triggers the D Flip-Flop Initially, the value of q might be unknown Notice the slight delay in the output q (after the rising edge) Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 20

Graphic Symbols for Flip-Flops D Flip D Flip Flop Flop A Flip-Flop has a similar symbol to a Latch The difference is the arrowhead at the clock input C The arrowhead indicates sensitivity to the edge of the clock A bubble at the C input indicates negative edge-triggered FF Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 21

D Flip-Flop with Asynchronous Reset When Flip-Flops are powered, their initial state is unknown Some flip-flops have an Asynchronous Reset input R Resets the state (to logic value 0), independent of the clock This is required to initialize a circuit before operation If the R input is inverted (bubble) then R = 0 resets the flip-flop D Flip Inputs Outputs Flop 0 X X 0 1 1 0 0 1 1 1 1 0 Function Table Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 22

JK Flip-Flop The D Flip-Flop is the most commonly used type The JK is another type of Flip-Flop with inputs: J, K, and Clk When JK = 10 Set, When JK = 01 Reset When JK = 00 No change, When JK = 11 Invert outputs JK can be implemented using two Clocked SR latches and gates Master SR Latch Slave SR Latch Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 23

T Flip-Flop The T (Toggle) flip-flop has inputs: T and Clk When T = 0 No change, When T = 1 Invert outputs The T flip-flop can be implemented using a JK flip-flop It can also be implemented using a D flip-flop and a XOR gate Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 24

Flip-Flop Characteristic Table Defines the operation of a flip-flop in a tabular form Next state is defined in terms of the current state and the inputs () refers to current state before the clock edge arrives (+1) refers to next state after the clock edge arrives D Flip-Flop D Q(t+1) 0 0 Reset 1 1 Set JK Flip-Flop J K Q(t+1) 0 0 Q(t) No change 0 1 0 Reset 1 0 1 Set 1 1 Q'(t) Complement T Flip-Flop T Q(t+1) 0 Q(t) No change 1 Q'(t) Complement Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 25

Flip-Flop Characteristic Equation The characteristic equation defines the operation of a flip-flop For D Flip-Flop: +1 = For JK Flip-Flop: +1 = + () For T Flip-Flop: +1 = () Clearly, the D Flip-Flop is the simplest among the three D Flip-Flop D Q(t+1) 0 0 Reset 1 1 Set JK Flip-Flop J K Q(t+1) 0 0 Q(t) No change 0 1 0 Reset 1 0 1 Set 1 1 Q'(t) Complement T Flip-Flop T Q(t+1) 0 Q(t) No change 1 Q'(t) Complement Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 26

Timing Considerations for Flip-Flops Setup Time (T s ): Time duration for which the data input must be valid and stable before the arrival of the clock edge. Hold Time (T h ): Time duration for which the data input must not be changed after the clock transition occurs. T s and T h must be ensured for the proper operation of flip-flops Rising Edge Clock T s T h Valid data-in Data Can be Modified after T h Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 27

Summary In a sequential circuit there is internal memory Output is a function of current inputs and present state The stored memory value defines the present state Similarly, the next state depends on current inputs and present state Two types of sequential circuits: Synchronous sequential circuits are clocked (easier to implement) Asynchronous sequential circuits are not clocked Two types of Memory elements: Latches and Flip-Flops Latches are level-sensitive, flip-flops are edge-triggered Flip-flops are better memory elements for synchronous circuits A flip-flop is described using a characteristic table and equation Introduction to Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 28