Sequential Logic ENEL 111. Sequential Logic Circuits So far we have only considered circuits where the output is purely a function of the inputs With.

Slides:



Advertisements
Similar presentations
Latches/Flip-Flops. Overview We focuses on sequential circuits – We add memory to the hardware that we’ve already seen Our schedule will be very similar.
Advertisements

Changes in input values are reflected immediately (subject to the speed of light and electrical delays) on the outputs Each gate has an associated “electrical.
Sequential Digital Circuits Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Give qualifications of instructors: DAP
COE 202: Digital Logic Design Sequential Circuits Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
Sequential Logic Building Blocks – Flip-flops
A. Abhari CPS2131 Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and.
1 Fundamentals of Computer Science Sequential Circuits.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 10.1 Sequential Logic  Introduction  Bistables  Memory Registers  Shift.
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
CS 151 Digital Systems Design Lecture 19 Sequential Circuits: Latches.
Classification of Digital Circuits  Combinational. Output depends only on current input values.  Sequential. Output depends on current input values and.
Digital Logic Chapter 5 Presented by Prof Tim Johnson
Digital Logic Design Lecture # 17 University of Tehran.
Sequential circuits The digital circuits considered thus far have been combinational, where the outputs are entirely dependent on the current inputs. Although.
Fall 2004EE 3563 Digital Systems Design EE 3563 Sequential Logic Design Principles  A sequential logic circuit is one whose outputs depend not only on.
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
1 Lecture 20 Sequential Circuits: Latches. 2 Overview °Circuits require memory to store intermediate data °Sequential circuits use a periodic signal to.
Sequential Logic Flip Flops Lecture 4.
Circuits require memory to store intermediate data
Dr. ClincyLecture1 Appendix A – Part 2: Logic Circuits Current State or output of the device is affected by the previous states Circuit Flip Flops New.
Digital Logic Design Lecture 22. Announcements Homework 7 due today Homework 8 on course webpage, due 11/20. Recitation quiz on Monday on material from.
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits – I Flip-Flops A sequential circuit is a logic components whose outputs.
EKT 124 / 3 DIGITAL ELEKTRONIC 1
Chapter 10 Flip-Flops and Registers Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. William Kleitz.
Sequential circuit Digital electronics is classified into combinational logic and sequential logic. In combinational circuit outpus depends only on present.
Digital Logic Design Lecture 23. Announcements Homework 8 due Thursday, 11/20 Exam 3 coming up on Tuesday, 11/25.
Sequential Logic Flip-Flops and Related Devices Dr. Rebhi S. Baraka Logic Design (CSCI 2301) Department of Computer Science Faculty.
Chapter 3: Sequential Logic Circuit EKT 121 / 4 ELEKTRONIK DIGIT 1.
A presentation on Counters
Digital Logic Design CHAPTER 5 Sequential Logic. 2 Sequential Circuits Combinational circuits – The outputs are entirely dependent on the current inputs.
Registers and Counters
COE 202: Digital Logic Design Sequential Circuits Part 1
Flip Flop
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 9 Sequential.
CS1Q Computer Systems Lecture 11 Simon Gay. Lecture 11CS1Q Computer Systems - Simon Gay2 The D FlipFlop A 1-bit register is called a D flipflop. When.
Flip-Flops and Registers
Sequential Logic Circuits. Combinational logic circuit A combinational logic circuit is one whose outputs depend only on its current inputs
D Latch Delay (D) latch:a) logic symbolb) NAND implementationc) NOR implementation.
Company LOGO DKT 122/3 DIGITAL SYSTEM 1 WEEK #12 LATCHES & FLIP-FLOPS.
JK Flip-Flop. JK Flip-flop The most versatile of the flip-flops Has two data inputs (J and K) Do not have an undefined state like SR flip-flops – When.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Introduction to Sequential Logic
Chapter 10 Flip-Flops and Registers 1. Objectives You should be able to: Explain the internal circuit operation of S-R and gated S-R flip-flops. Explain.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2007.
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
EKT 121 / 4 ELEKTRONIK DIGIT I
Synchronous Sequential Logic Part I
Sahar Mosleh PageCalifornia State University San Marcos 1 More on Flip Flop State Table and State Diagram.
Chapter5: Synchronous Sequential Logic – Part 1
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
Sequential Logic.
Sequential Logic Jess 2006.
Sequential Logic and Flip Flops
LECTURE 15 – DIGITAL ELECTRONICS
Sequential Logic and Flip Flops
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Sequential Logic.
FLIP-FLOPS.
Synchronous sequential
Synchronous Sequential
Flip-Flops.
Sequential Digital Circuits
Presentation transcript:

Sequential Logic ENEL 111

Sequential Logic Circuits So far we have only considered circuits where the output is purely a function of the inputs With sequential circuits the output is a function of the values of past and present inputs This particular example is not very useful X = X + A

Sequential Circuits - Aims  To be able to differentiate between the various types of bistable circuits (and know when it is appropriate to use one type or another)  To describe the structure and operation of simple registers, shift registers and binary counters  To sketch and explain the features of a timing diagram for an n- bit register  To be able to connect an IC (integrated circuit) counter to create a modulo-n counter or to cascade several counters to extend the range  To generate a state transition diagram from the description of a problem, or to follow the flow of a given state transition diagram  To apply the general sequential machine design method to sequential circuits such as counters

Latches and Flip Flops Latches  SR latch  Clocked SR latch  D Latch Flip flops  Master-slave  Edge triggered  JK

Sequential circuit concepts The addition of a memory device to a combinational circuit allows the output to be fed back into the input: circuit memory Input(s) Output(s) Introduction to Digital Electronics, Crowe and Hayes Gill, Newnes, ISBN

Synchronous and Asynchronous With synchronous circuits a clock pulse is used to regulate the feedback, input signal only enabled when clock pulse is high – acts like a “gate” being opened. circuit memory Input(s) Output(s) Clock pulse

Latches The SR Latch  Consider the following circuit S R Q Q R S Q Q Circuit Symbol Function Table RSQ n+1 00Q n ? Q Q S R n+1 represents output at some future time n represents current output.

SR Latch operation Assume some previous operation has Q as a 1 Assume R and S are initially inactive S = 0 R = 0 Q = 1 Q = 0 Circuit RSQ n+1 00Q n ? Indicates a stable state at some future time (n+ = now plus) ~Q = Q, ie is the complement of Q. Now assume R goes first to 1 then returns to 0, what happens:

Reset goes active When R goes active 1, the output from the first gate must be 0. S = 0 R = 1 Q = 0 ~Q = 1 This 0 feeds back to gate 2 Since both inputs are 0 the output is forced to 1 The output ~Q is fed back to gate 1, both inputs being 1 the output Q stays at 0. S = 0 R = 1 Q = 0 ~Q = 1

Reset goes in-active When R now goes in- active 0, the feedback from ~Q (still 1), holds Q at 0. S = 0 R = 0 Q = 0 ~Q = 1 The “pulse” in R has changed the output as shown in the function table: RSQ n+1 00Q n ? We went from here To here And back again In that process, Q changed from 1 to 0. Further signals on R will have no effect.

Set the latch Similar sequences can be followed to show that setting S to 1 then 0 – activating S – will set Q to a 1 stable state. When R and S are activated simultaneously both outputs will go to a 0 S = 1 R = 1 Q = 0 ~Q = 0 When R and S now go inactive 0, both inputs at both gates are 0 and both gates output a 1. This 1 fedback to the inputs drives the outputs to 0, again both inputs are 0 and so on and so on and so on and so on.

Metastable state In a perfect world of perfect electronic circuits the oscillation continues indefinitely. However, delays will not be consistent in both gates so the circuit will collapse into one stable state or another. RSQ n+1 00Q n ? This collapse is unpredictable. Thus our function table: Future output = present output Set the latch Reset the latch Don’t know

Latches The SR Latch  NAND Form produces similar result from inverted inputs Q Q Q Q Circuit Symbol Function Table RSQ n+1 00? Q n R S R S Q Q R S You ought to be able to figure this one out yourself!

Application of the SR Latch  An important application of SR latches is for recording short lived events e.g. pressing an alarm bell in a hospital

The Clocked SR Latch In some cases it is necessary to disable the inputs to a latch This can be achieved by adding a control or clock input to the latch  When C = 0 R and S inputs cannot reach the latch Holds its stored value  When C = 1 R and S inputs connected to the latch Functions as before S R Q Q C

Clocked SR Latch RSCQ n+1 XX0Q n Hold 001Q n Hold 0111Set 1010Reset 111?Unused S R Q Q Q Q R S C C

Clocked D Latch Simplest clocked latch of practical importance is the Clocked D latch S R Q Q C D It means that both active 1 inputs at R and S can’t occur. Notice we’ve reversed S and R so when D is 1 Q is 1.

D Latch It removes the undefined behaviour of the SR latch Often used as a basic memory element for the short term storage of a binary digit applied to its input Symbols are often labeled data and enable/clock (D and C) DCQ n+1 X0Q n Hold 010Reset 111Set Circuit D C Q Q SymbolFunction Table S R Q Q Q Q C C D

Transparency  The devices that we have looked so far are transparent That is when C = 1 the output follows the input There will be a slight lag between them C D Q t t t When the clock “gate” opens, changes in input take effect at outputs – transparency. Also known as “level- triggered”.

Propagation Delay, set-up and hold (for transparent circuits) Propagation delay: Time taken for any change at inputs to affect outputs (change on D to change on Q). Setup time: Data on inputs D must be held steady for at least this time before the clock changes. Hold time: Data on inputs D must be held steady for at least this time after the clock changes.

Clocked D Latch – Timing Diagram output follows input in here clock enables input to be “seen” clock D Q

Latches - Summary Two cross-coupled NOR gates form an SR (set and reset) latch A clocked SR latch has an additional input that controls when setting and resetting can take place A D latch has a single data input  the output is held when the clock input is a zero  the input is copied to the output when the clock input is a one The output of the clocked latches is transparent The output of the clocked D latch can be represented by the following behaviour DCQ n+1 X0Q n Hold 010Reset 111Set

Latches and Flip Flops Terms are sometimes used confusingly: A latch is not clocked whereas a flip-flop is clocked. A clocked latch can therefore equally be referred to as a flip flop (SR flip flop, D flip flop). However, as we shall see, all practical flip flops are edge-triggered on the clock pulse. Sometimes latches are included within flip flops as a sub-type.

Flip-flops Propagation Delay  Will the output of the following circuit ever be a 1?  The brief pulse or glitch in the output is caused by the propagation delay of the signals through the gates

Latches and Flip Flops Clocked latches are level triggered. While the clock is high, inputs and thus outputs can change. This is not always desirable. A Flip Flop is edge-triggered – either by the leading or falling edge of the clock pulse. Ideally, it responds to the inputs only at a particular instant in time. It is not transparent.

D-type Latch – Timing Review The high part represents active 1, the low part active 0. S Q Q C D C D Q t t t

Positive edge-triggered D Flip-flop Timing Q ~Q D C D C Q initially unknown

Master Slave D Flip-flop A negative edge triggered flip-flop On the negative edge of the clock, the master captures the D input and the slave outputs it. D C Y D C Q Q Master Slave

The master-slave Flip-flop D C Q Q Master Slave P P No matter how long the clock pulse, both circuits cannot be active at the same time.

D-type Positive Edge Triggered Flip-flop CLK D Q Q’ S R The most economical flip-flop - uses fewest gates

JK Flip-flop The most versatile of the flip-flops Has two data inputs (J and K) Do not have an undefined state like SR flip-flops  When J & K both equal 1 the output toggles on the active clock edge Most JK flip-flops based on the edge-triggered principle J K Q Q JKCQ n+1 00  Q n Hold 01  0Reset 10  1Set 11  Q n Toggle XXXQ n Hold +ve edge triggered JK flip-flop The C column indicates +ve edge triggering (usually omitted)

Example JK circuit J K Ck Q ~Q JKCQ n+1 00  Q n Hold 01  0Reset 10  1Set 11  Q n Toggle XXXQ n Hold F E A B C D Assume Q = 0, ~Q = 1, K = 1 Gate B is disabled (Q = 0, F = 1) Make J = 1 to change circuit, when Ck = 1, all inputs to A = 1, E goes to 0, makes Q = 1 Now Q and F are both 1 so ~Q = 0 and the circuit has toggled.

Timing diagram for JK Flip-flop clock J K Q toggle J=K=1 hold J=K=0 reset J= 0 K=1 set J= 1 K=0 Negative Edge Triggered

Clock Pulse The JK flip flop seems to solve all the problems associated with both inputs at 1. However the clock rise/fall is of finite duration. If the clock pulse takes long enough, the circuit can toggle. For the JK flip flop it is assumed the pulse is quick enough for the circuit to change only once. ideal / actual edge pulse

JK from D Flip-flop D C Q Q’ J K CLK

Summary Flip flops are circuits controlled by a clock. Triggered on the edge of the pulse to avoid races with both inputs at 1 during the clock pulse. Because modern ic’s have a small propagation delay races can still occur. The master-slave configuration solves this problem by having only master or slave active at any one time.

What you should be able to do Explain the difference between combinational and sequential circuits Explain the basic operation of SR and D latches. Explain the operation of SR and JK flip flops. Explain the operation of master-slave flip flops. Draw simple timing diagrams for clocked latches and edge-triggered flip flops. Define setup and hold times for a transparent latch.