Sequential Logic Circuits

Slides:



Advertisements
Similar presentations
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.
Advertisements

Introduction to Sequential Logic Design Latches. 2 Terminology A bistable memory device is the generic term for the elements we are studying. Latches.
EE 5900 Advanced Algorithms for Robust VLSI CAD, Spring 2009 Sequential Circuits.
A. Abhari CPS2131 Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and.
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
Computer Architecture CS 215
Classification of Digital Circuits  Combinational. Output depends only on current input values.  Sequential. Output depends on current input values and.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 12 Basic (NAND) S – R Latch “Cross-Coupling” two NAND gates gives the S -R Latch:
1 Kuliah Rangkaian Digital Kuliah 8: Rangkaian Logika Sekuensial Teknik Komputer Universitas Gunadarma.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
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.
Introduction to Sequential Logic Design Bistable elements Latches.
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.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic A: Flip-Flops José Nelson Amaral.
1 Sequential Circuits –Digital circuits that use memory elements as part of their operation –Characterized by feedback path –Outputs depend not only on.
1 EE121 John Wakerly Lecture #8 Sequential Circuits Flip-flops Sequential PALs.
1 Sequential logic networks I. Motivation & Examples  Output depends on current input and past history of inputs.  “State” embodies all the information.
Sequential Logic Flip Flops Lecture 4.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 1 – Storage.
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.
EKT 124 / 3 DIGITAL ELEKTRONIC 1
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
Sequential circuit Digital electronics is classified into combinational logic and sequential logic. In combinational circuit outpus depends only on present.
Sequential Logic Flip-Flops and Related Devices Dr. Rebhi S. Baraka Logic Design (CSCI 2301) Department of Computer Science Faculty.
1 Sequential logic networks I. Motivation & Examples  Output depends on current input and past history of inputs.  “State” embodies all the information.
Sequential Circuits. 2 Sequential vs. Combinational Combinational Logic:  Output depends only on current input −TV channel selector (0-9) Sequential.
EE 4271 VLSI Design, Fall 2010 Sequential Circuits.
EE365 Adv. Digital Circuit Design Clarkson University Lecture #10 Latches, Flip Flops & Sequential PALS.
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Sequential Switching Networks.
So far, all of the logic circuits we have studied were basically based on the analysis and design of combinational digital circuits. The other major aspect.
Chapter 3: Sequential Logic Circuit EKT 121 / 4 ELEKTRONIK DIGIT 1.
Digital Logic Design CHAPTER 5 Sequential Logic. 2 Sequential Circuits Combinational circuits – The outputs are entirely dependent on the current inputs.
Digital Computer Design Fundamental
COE 202: Digital Logic Design Sequential Circuits Part 1
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 9 Sequential.
Synchronous Sequential Logic Chapter 5. Digital Circuits Sequential Circuits Combinational circuits contains no memory elements the outputs depends.
Chap 4. Sequential Circuits
Introduction to Sequential Logic Design Flip-flops FSM Analysis.
Introduction to Sequential Logic Design Flip-flops.
Sequential Logic Circuits. Combinational logic circuit A combinational logic circuit is one whose outputs depend only on its current inputs
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
FLIP FLOP By : Pn Siti Nor Diana Ismail CHAPTER 1.
Introduction to Sequential Logic Design Bistable elements.
Clock in Digital Systems. Combinational logic circuit A combinational logic circuit is one whose outputs depend only on its current inputs
1 Synchronous Sequential Logic Sequential Circuits Every digital system is likely to have combinational circuits, most systems encountered in practice.
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
5 Chapter Synchronous Sequential Circuits 1. Logic Circuits- Review 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates.
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.
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
2018/5/2 EE 4271 VLSI Design, Fall 2016 Sequential Circuits.
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
Clock in Digital Systems
2018/8/29 EE 4271 VLSI Design, Fall 2013 Sequential Circuits.
Synchronous Sequential Circuits
Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and so on require.
ECE Digital logic Lecture 16: Synchronous Sequential Logic
LECTURE 15 – DIGITAL ELECTRONICS
FLIP-FLOPS.
Synchronous sequential
Synchronous Sequential
Sequential Circuits UNIT- IV
2019/9/26 EE 4271 VLSI Design, Fall 2012 Sequential Circuits.
Presentation transcript:

Sequential Logic Circuits

Combinational logic circuit A combinational logic circuit is one whose outputs depend only on its current inputs. 1 2 3 4

Sequential Logic Circuits A Sequential Logic Circuit is one whose outputs depend not only on its current inputs, but also on the past sequence of inputs. 2

Sequential Logic Circuits The circuit controlled by the channel-up and channel-down pushbuttons on a TV is a sequential circuit. The channel selection depends on the past sequence of up/down pushes and the current push. 2

The current “state” It is inconvenient, and often impossible, to describe the behaviour of a sequential circuit by means of a table that lists outputs as a function of the input sequence that has been received up until the current time. To know where you are going next, you need to know where you are now. With the TV channel selector, it is impossible to determine what channel is currently selected by looking only at the preceding sequence of presses, whether we look at the preceding 10 presses or the preceding 1000. More information, the current “state” of the channel selector, is needed.

“state” The state of a sequential circuit is a collection of state variables whose values at any one time contain all the information about the past necessary to account for the circuit’s future behaviour. In the channel-selector example, the current channel number is the current state. Inside the TV, this state might be stored as seven binary state variables representing a decimal number between 1 and 9. Given the current state (channel number), we can always predict the next state as a function of the inputs (up/down pushes).

“finite-state machines” In a digital circuit, state variables have binary values. A circuit with n binary state variables has 2n possible states. As large it might be, 2n is always finite, so sequential circuits are sometimes called finite-state machines.

combinational circuit A logic circuit whose outputs depend only on its current inputs is called a combinational circuit.

combinational circuit Logic circuit using AND, OR and NOT gates:

Sequential Logic Circuits outputs depend on the sequence of past inputs. As a result, the circuit must “remember” something about the past.

Sequential Logic Circuit A circuit with memory, whose outputs depend on the current input and the sequence of past inputs, is called a sequential circuit. The behaviour of such a circuit may be described by a state table that specifies its output and next state as functions of its current state and input.

Sequential Logic Circuit A Sequential Logic circuit consists of a combinational circuit to which memory elements are connected to form a feedback path. The memory elements are devices capable of storing binary information within them. The binary information stored in the memory elements at any given time defines the state of the sequential circuit. The sequential circuit receives binary information from external inputs. These inputs, together with the present state of the memory elements, determine the binary value at the output terminals.

Sequential Logic Circuit The block diagram demonstrates that the external outputs in a sequential circuit are a function not only of external inputs, but also of the present state of the memory elements. The next state of the memory elements is also a function of external inputs and the present state. Thus a sequential circuit is specified by a time sequence of inputs, outputs, and internal states.

Memory elements The memory elements commonly used in sequential circuits are time-delay devices. The memory capability of a time-delay device is due to the finite time it takes for the signal to propagate through the device. In practice, the internal propagation delay of logic gates is of sufficient duration to produce the needed delay, so that physical time-delay units may be unnecessary. In gate-type sequential circuits, the memory elements consist of logic gates whose propagation delays constitute the required memory. Thus a sequential circuit may be regarded as a combinational circuit with feedback only.

Memory elements The output of this NOT gate holds the previous value for a length of time equals the propagation delay of this gate. For input 0 the output is 1. Now if we change the input to 1 the corresponding output will be 0 but after a certain amount of time (equal to the propagation delay). That is the gate is holding the previous value for a certain time and thus working as a memory.

Memory elements That is the gate is holding the previous value for a certain time and thus working as a memory.

Memory elements That is the gate is holding the previous value for a certain time and thus working as a memory.

Setup and Hold Times These times are related to the clock input. Input should not be changed during these times.

Memory elements The delay can be increased by cascading the gates.

Bistable element The simplest sequential circuit Two states - bistable circuit One state variable, say, Q HIGH LOW LOW HIGH

Bistable element The simplest sequential circuit Two states One state variable, say, Q LOW HIGH HIGH LOW

How to control a Bistable element? Screwdriver Control inputs The danger of connecting the control input to ground: You are basically connecting the output to the ground that has low internal resistance, i.e. short circuiting. +5 v LOW HIGH HIGH LOW

Solution…. R (Reset) Q Q S (Set)

SR Latch

A bistable with control inputs How to control it? Screwdriver Control inputs S-R latch

Analyse the operation of the FF_NOR circuit The output of a NOR gate is 0 if any input is 1, and the output is 1 when all inputs are 0. 1. As a starting point, assume that the S input is 1 and the R input is 0. Since the lower gate has an input of 1, its output Q must be 0, which puts both inputs of upper gate at 0, so that output Q is 1. 2. When the S input is returned to 0, the outputs remain the same, because Q remains at 1 that is one input of Q at 1 that causes Q to stay at 0. So, both inputs are at 0 results Q at 1.

Analyse the operation of the FF_NOR circuit In the same manner, it is possible to show that a 1 in the R input changes Q to 1 and Q’ to 0. 1. As a starting point, assume that the S input is 0 and the R input is 1. Since the upper gate has an input of 1, its output Q must be 0, which puts both inputs of lower gate at 0, so that output Q is 1. 3. When the R input is returned to 0, the outputs remain the same, because Q remains at 1 that is one input of Q at 1 that causes Q to stay at 0. So, both inputs are at 0 results Q at 1.

Analyse the operation of the FF-NAND circuit The output of a NAND gate is 1 if any input is 0, and the output is 0 when all inputs are 1. 1. As a starting point, assume that the S input is 0 and the R input is 1. Since the upper gate has an input of 0, its output Q must be 1, which puts both inputs of lower gate at 1, so that output Q is 0. 2. When the S input is returned to 1, the outputs remain the same, because Q remains at 1 that is one input of Q at 0 that causes Q to stay at 1. So, both inputs are at 1 results Q at 0. S_L R_L 1 S_L 1 R_L 1

Analyse the operation of the FF- NAND circuit In the same manner, it is possible to show that a 0 in the R input changes Q to 1 and Q to 0. 1. As a starting point, assume that the S input is 1 and the R input is 0. Since the lower gate has an input of 0, its output Q must be 1, which puts both inputs of upper gate at 0, so that output Q is 1. 3. When the R input is returned to 1, the outputs remain the same, because Q remains at 0 that is one input of Q at 0 that causes Q to stay at 1. So, both inputs are at 1 results Q at 0. S_L R_L 1 S_L 1 1 R_L

Types of sequential circuits There are two main types of sequential circuits: synchronous asynchronous their classification depends on the timing of their signals. A synchronous sequential circuit is a system whose behaviour can be defined from the knowledge of its signals at discrete instants of time. The behaviour of an asynchronous sequential circuit depends upon the order in which its input signals change and can be affected at any instant of time.

Asynchronous Sequential Logic Circuit An asynchronous sequential circuit uses ordinary gates and feedback loops. Propagation delay of these gates provide the needed memory, thereby creating sequential-circuit building blocks such as latches and flip-flops that are used in higher- level designs.

SR Latch behaviour

SR Latch with NOR gates

SR Latch with NAND gates S_L R_L 1 S_L 1 1 R_L

SR Flip-flop with Control Input

SR Flip_Flop with Clock input

SR Flip_Flop with Clock input Q is an abbreviation of Q(t), referred to as the present state. Q(t+1), referred to as the next state after application of a single pulse at the clock input.

Boolean equation for SR Flip-Flop

D Flip-Flop; ensures S & R are never equals 1 at the same time

D Flip-Flop with Clock input Q(t+1) = Q.D + Q.D = D.(Q +Q) = D.1 = D

Boolean equation for D Flip-Flop

Synchronous Sequential Logic Circuit A synchronous sequential circuit , by definition, must employ signals that affect the memory elements only at discrete instants of time. One way of achieving this goal is to use pulses of limited duration throughout the system. the device that generates these pulses are called clock and the train of pulses are called clock pulses.

Synchronous Sequential Logic Circuit A synchronous sequential circuit , by definition, must employ signals that affect the memory elements only at discrete instants of time. Storage elements

SR Flip_Flop with Clock input

Clock The state changes of most sequential circuits occur at times specified by a free-running clock signal. Active high clock signal:

Clock Active low clock signal:

Clock period, frequency The clock period is the time between successive transitions in the same direction. The clock frequency is the reciprocal of the period. i.e., the number of clock pulses per second. f = 1/t

Duty cycle Duty cycle is the percentage of time that the clock signal is at its asserted level.

Pentium 4 What is the clock frequency of the latest Pentium 4 processor? What is the clock period of the latest Pentium 4 processor?

sequential circuit A circuit with memory, whose outputs depend on the current input and the sequence of past inputs, is called a sequential circuit.

Sequential Logic Circuit A Sequential Logic circuit consists of a combinational circuit to which memory elements are connected to form a feedback path. The memory elements are devices capable of storing binary information within them. The binary information stored in the memory elements at any given time defines the state of the sequential circuit. The sequential circuit receives binary information from external inputs. These inputs, together with the present state of the memory elements, determine the binary value at the output terminals.

Bistable element The simplest sequential circuit Two states - bistable circuit One state variable, say, Q HIGH LOW LOW HIGH

Bistable element The simplest sequential circuit Two states One state variable, say, Q LOW HIGH HIGH LOW

Analog analysis Assume pure CMOS thresholds, 5V rail Theoretical threshold center is 2.5 V

Analog analysis Assume pure CMOS thresholds, 5V rail Theoretical threshold center is 2.5 V 2.5 V 2.5 V 2.5 V 2.5 V

Analog analysis Assume pure CMOS thresholds, 5V rail Theoretical threshold center is 2.5 V 2.5 V 4.8 V 2.51 V 2.0 V 0.0 V 2.5 V 2.5 V 0.0 V 5.0 V 4.8 V 2.5 V

Metastability Metastability is inherent in any bistable circuit Two stable points, one metastable point

Another look at metastability

“sube y baja” behavior

Why all the harping on metastability? All real systems are subject to it Problems are caused by “asynchronous inputs” that do not meet flip-flop setup and hold times. Details in Chapter-7 flip-flop descriptions and in Section 8.9 (later in quarter). Especially severe in high-speed systems since clock periods are so short, “metastability resolution time” can be longer than one clock period. Many digital designers, products, and companies have been burned by this phenomenom.

S-R latch operation Metastability is possible if S and R are negated simultaneously. (try it in Foundation)

S-R latch timing parameters Propagation delay Minimum pulse width

S-R latch symbols

D latch

D flip-flop timing parameters Although the D filp-flop eliminates the S=R=1 problem of the SR Flip-flop, it does not eliminate the metastability problem.

D flip-flop advantages This device has two advantages over the clocked RS flip-flop: (i) The indeterminate state is eliminated, and (ii) There is a single input that can be used for Setting or Resetting. It is really a clocked RS flip-flop. This device “remembers” the value of the input “D” (Data in) when CP was last “high.” When CP=0, D is ignored. When CP=1, D is accepted and effectively passed through to Q transparently. Often this device is called a “Transparent Latch.”

D- flip-flop timing parameters Propagation delay (from C or D) Setup time (D before C edge) Hold time (D after C edge)

D flip-flop timing parameters Propagation delay (from CLK) Setup time (D before CLK) Hold time (D after CLK)

Edge-triggered D flip-flop behavior

Other D flip-flop variations Negative-edge triggered Clock enable Scan

Scan flip-flops -- for testing TE = 0 ==> normal operation TE = 1 ==> test operation All of the flip-flops are hooked together in a daisy chain from external test input TI. Load up (“scan in”) a test pattern, do one normal operation, shift out (“scan out”) result on TO.

J-K flip-flops The most sophisticated flip flop is the “J-K Flip-Flop.” It has two inputs J and K which can be in any one of four states, 00, 01, 10, and 11. Each of these states will have a unique effect on the device. On the next CP, the device will do one of four things depending on the states of the J and K inputs. It may: 1/ Complement its current state 2/ Make no change to its current state 3/ Become “Set” (or stay set if it already is set) 4/ Become “Reset” (or stay reset if it already is reset)

J-K flip-flops A JK flip-flop is a refinement of the SR flip-flop in that the indeterminate state of the SR type is defined in the JK type. J is equivalent to S and K is equivalent to R. when both inputs J and K are equal to 1, the flip-flop switches to its complement state.

J-K flip-flops

J-K flip-flops

J-K flip-flops

T flip-flops

T flip-flops

level triggered All the flip flops studied so far were “level triggered” devices. The particular devices we looked at were all “Hi-level triggered flip flops.” This means that they respond to input conditions whenever CP is a logic 1. By inverting the clock signal with the addition of an inverter, we could have made these devices “Low-level triggered.”

edge triggered Often, it is desirable to have flip-flops respond to their input conditions only when there is a transition in the state of the clock input. i.e. we want the device to ignore inputs when the clock is high and when it is low too! We want it to respond only when the clock changes. If the device responds when the clock changes from a logic 1 to a logic 0, we say that the device is a “negative (going) edge triggered device.” If it responds when the clock changes from a logic 0 to a logic 1, we say that the device is a “positive (going) edge triggered device.” We will look at a timing diagram to further explain the concept of an edge.

master-slave” arrangement One way to achieve “edge-triggering” is to combine a “high level triggered” device with a “low level triggered” device in a “master-slave” arrangement. If the master responds to inputs only when CP is high, and the slave only when CP is low, then we have a device that responds to inputs only during a “negative going edge.” Likewise, if the master responds to inputs only when CP is low, and the slave only when CP is high, then we have a device that responds to inputs only during a “positive going edge.” We will look at an example of a “Master-Slave D-Type Flip-Flop” and a sample timing diagram of its behaviour.

Master-Slave flip-flop

Timing of Master-Slave flip-flop

Dynamic Indicator Finally, edge triggered devices have their clock inputs shown with a “Dynamic Indicator” to indicate that they respond to a transition. Both positive and negative dynamic indicators will be given in two diagrams.

J-K flip-flops

T flip-flops Important for counters

Flip-Flop Characteristic Tables

Standard Graphic Symbols for Latch and Flip-Flops

Standard Graphic Symbols for Latch and Flip-Flops