1 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 1/20 EE 42/100 Lecture 24: Latches and Flip Flops ELECTRONICS Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad University of California, Berkeley Copyright c 2010 by Ali M. Niknejad
2 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 2/20 Gate Propagation Delay In a logic gate, the output does not change instantaneously when the inputs change. This delay between the output and input is caused by the finite speed of light (time it takes signals to propagate along wires). More commonly, the delay is set by the non-zero capacitance and non-zero resistance of the transistors, which means there is an RC delay associated with the gate input/output The maximum time delay from when an input changes to the output reaching its final state is known as the propagation delay, or t pd.
3 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 3/20 Contamination Delay The contamination delay, tcd, is the minimum time from when an input changes until any output changes (not necessarily going to the steady value).
4 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 4/20 Example Consider the multi-level digital gate shown below. Notice that for inputs A and B there is a long path from the input to the output which has to go through three gates. The longest path from the input to the output is known as the critical path, because it sets the maximum speed at which we can run a circuit. The shortest path from the input to the output is known as the short path, and it sets the contamination delay for the circuit.
5 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 5/20 Glitches A B C n1 n2 Y Glitches can occur in a logic circuit if the output transitions to the wrong value but then finally settles to the correct value. The intermediate output is known as a glitch. Note that if the circuit is run sufficiently slow, determined by the propagation delay, no errors will result. But this extra transition is often unwanted (causes extra power dissipation) and may lead to problems. In this example, suppose A = 0, and B = C = 1. Next suppose B transitions from 1 0. Due to the propagation delay of the inverter, the B = 0 will initially cause both OR inputs to go to zero, which causes the output to drop to 0, but then after the B signal is inverted and applied to the AND, the output is restored. The circuit can be redesigned to avoid the glitch (homework problem?)
6 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 6/20 Bistable Circuits A bistable circuit has two possible stable states. If the circuit is put into a stable state, it will remain there. The circuit has memory. If the stable state is changed (flipped there are only two states), then it will remain in the new state. Two inverters feeding back on each other, or cross coupled (inputs/outputs interchanged), form a bistable circuit. Note that when we power on the circuit we have no idea which state the bistable circuit will be in! There is also a metastable state where each output is at the midpoint. But if there is any noise or disturbance in the circuit, it will leave the metastable state.
7 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 7/20 SR Latch The SR latch is essentially the same as the cross-coupled inverters, except we now have a way to set or reset it into a given state. To understand the operation, assume that we have R = 1, S = 0. Then the first NOR produces a 0 output (it only needs one 1 input to do so) and so Q = 0. But then the second NOR is fed by 0 on both inputs, so its output is 1, or Q = 1. By symmetry, if we apply R = 0 and S = 1, then Q = 1 and Q = 0. What if R = S = 1? Then both NOR gates produce a 0 output and Q = Q = 0.
8 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 8/20 SR Latch Truth Table Finally, if R = S = 0, then the first NOR has an input of 0 and Q. The second NOR has an input of 0 and Q. Assume that Q = 1 so that the second NOR then produces a 0 output, which then feeds the first NOR with both 0 inputs, and the output is 1, which is the original value of Q we assumed. This state is then stable and Q = 1 is maintained and regenerated. Now if we assume Q = 0, then the second NOR is fed with 0 on both inputs, so it produces a Q = 1, which then produces a zero back on Q again (first NOR has at least one input of 1). So this state is also stable and regenerated. From this analysis, we construct the truth table of the SR latch. Note that the if R = 1(S = 0), the latch resets. If S = 1(R = 0), the latch sets. If both S = R = 0, the latch maintains its previous value. The state R = S = 1 is particularly useless and it should be avoided!
9 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 9/20 D Latch The SR latch leaves something to be desired. First it requires us to avoid the bad input R = S = 1. Note that although we labeled our outputs as complementary, if we have R = S = 1 the outputs are both 0 (not complements). The D latch solves this problem by always generating complementary inputs to the SR latch. We also gate the latch so that it only changes state when the CLK is high. This is very important because we can design circuits that only change states during a positive clock cycle, and during the 0 of the clock the circuit retains its state.
10 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 10/20 D Latch Truth Table The truth table for the D latch is easily constructed. When CLK = 1, we say the latch is transparent. When CLK = 0, we say the latch is opaque.
11 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 11/20 D Flip Flop (FF) If we connect two latches back to back, as shown, with the clock inversion between the first and second, we obtain a flip-flop (FF). Sometimes the terms flip-flop and latch are used interchangeably, but there is a distinction. A latch is transparent during a positive clock, whereas a FF is only transparent during a brief interval during the clock transition (edge). To see why, let s analyze the circuit. When clock is low, the first latch is in transparent mode and it s sampling the input. When the clock transitions to high, the first latch goes into opaque mode and the second latch reads the last value of the input right before the clock rising edge. Hence we say the D FF is a positive edge triggered FF. You can also design a negative edge triggered FF (homework!).
12 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 12/20 Registers A parallel bank of FF form a register bank. They are all clocked together and read in a word of data (or other bit widths) on the clock edge.
13 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 13/20 Enabled FF Sometimes it s useful to enable a FF by adding an extra input. Then if the enable is low, the FF cannot read a new value. If enable is high, then the FF can read a value. This can be done by gating the clock with the enable signal, but gating the clock is a bad idea because it delays the clock, which means that the FF read is not perfect in sync with the clock (and perhaps the rest of the circuitry). A better solution is to MUX the input as shown.
14 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 14/20 Resettable FF A reset option is very handy if we want to put our FF into a known state. The reset signal as shown is active low, which then puts a 0 into the FF. This is an synchronous reset, meaning that the FF will e reset only on the rising edge of the next clock. We can also design an asynchronous reset (homework), which means that independent of the clock the FF is reset.
15 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 15/20 FF versus Latch The following timing diagram shows the difference between a latch and a FF. Note that the FF can only change on the positive edge of the clock.
16 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 16/20 Finite State Machine (FSM) Inputs Combinatoral Logic Flipflop Outputs State CLK A Finite State Machine (FSM) uses latches to hold the current state of the system. At each clock cycle, the output of the FSM depends on the current input and the current state, which is encoded by the registers. Examples of FSMs: A vending machine, traffic signals, elevator controls, automatic door opener (homework),..., a CPU!
17 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 17/20 State Transition Diagram Consider a light controller using a touch interface. Basically there are three four light levels, OFF, LOW, MEDIUM, and HIGH. Every time we touch the circuit, it should cycle through the states. The above state transition diagram shows the basic functionality. Each circle represents a state of the system. The arrows leaving the circle have input labels. An arrow can point back to the same state if no transition is necessary.
18 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 18/20 Light Switch More Functionality Suppose that it s dark and we have a simple light sensor (lab!). Then we can add another input to the system and light up the light control so that the user can find it in the dark. Here s the new diagram. Note that we only need to turn on the light when the light is in the OFF state.
19 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 19/20 State Transition Logic We need to now translate the state transition diagram into a truth table. This table has rows corresponding to the inputs and the current state, and the next state. It s a simple matter to fill this table.
20 A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 20/20 Circuit Realization From the state transition table, we can write Boolean expressions and design the equivalent circuits. Note that the current state will be read from a register set implemented with flip-flops.
Logic Design Lecture. Latches and Flip-Flops Prof. Hyung Chul Park & Seung Eun Lee Sequential Logic Outputs of sequential logic depend on current inputs and prior input values Sequential logic might explicitly
Module 4 : Propagation Delays in MOS Lecture 20 : Analyzing Delay in few Sequential Circuits Objectives In this lecture you will learn the delays in following circuits Motivation Negative D-Latch S-R Latch
Points Addressed in this Lecture Properties of synchronous and asynchronous sequential circuits Overview of flip-flops and latches Lecture 8: Flip-flops Professor Peter Cheung Department of EEE, Imperial
ENGIN 112 Intro to Electrical and Computer Engineering Lecture 19 Sequential Circuits: Latches Overview Circuits require memory to store intermediate data Sequential circuits use a periodic signal to determine
Sequential Circuits: Latches & Flip-Flops Sequential Circuits Combinational Logic: Output depends only on current input Able to perform useful operations (add/subtract/multiply/encode/decode/ select[mux]/etc
Design of Digital Systems II Sequential Logic Design Principles (1) Moslem Amiri, Václav Přenosil Masaryk University Resource: Digital Design: Principles & Practices by John F. Wakerly Introduction Logic
3.1 Bistable Element Let us look at the inverter. If you provide the inverter input with a 1, the inverter will output a 0. If you do not provide the inverter with an input (that is neither a 0 nor a 1),
Chapter 3 :: Sequential Logic Design Digital Design and Computer Architecture David Money Harris and Sarah L. Harris Copyright 2007 Elsevier 3- Bistable Circuit Fundamental building block of other state
Points Addressed in this Lecture Properties of synchronous and asynchronous sequential circuits Overview of flip-flops and latches Lecture 9: Flip-flops Professor Peter Cheung Department of EEE, Imperial
Harris Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems David Harris Harvey Mudd College David_Harris@hmc.edu Based on EE271 developed by Mark Horowitz, Stanford University MAH
Sequential Circuits Prof. MacDonald Sequential Element Review l Sequential elements provide memory for circuits heart of a state machine saving current state used to hold or pipe data data registers, shift
Lesson 12 Sequential Circuits: Flip-Flops 1. Overview of a Synchronous Sequential Circuit We saw from last lesson that the level sensitive latches could cause instability in a sequential system. This instability
ETEC 23 Programmable Logic Devices Chapter 9 Latches, Flip-Flops, and Timers Shawnee State University Department of Industrial and Engineering Technologies Copyright 27 by Janna B. Gallaher Latches A temporary
Objectives Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop. describe how such a flip-flop can be SET and RESET. describe the disadvantage
CS311 Lecture: Sequential Circuits Last revised 8/15/2007 Objectives: 1. To introduce asynchronous and synchronous flip-flops (latches and pulsetriggered, plus asynchronous preset/clear) 2. To introduce
Module-3 SEQUENTIAL LOGIC CIRCUITS Till now we studied the logic circuits whose outputs at any instant of time depend only on the input signals present at that time are known as combinational circuits.
Clock - key to synchronous systems Topic 7 Clocking Strategies in VLSI Systems Peter Cheung Department of Electrical & Electronic Engineering Imperial College London Clocks help the design of FSM where
ing Figure by MIT OCW. 6.884 - Spring 2005 2/18/05 L06 s 1 Why s and Storage Elements? Inputs Combinational Logic Outputs Want to reuse combinational logic from cycle to cycle 6.884 - Spring 2005 2/18/05
SEQUENTIAL CIRCUITS http://www.tutorialspoint.com/computer_logical_organization/sequential_circuits.htm Copyright tutorialspoint.com The combinational circuit does not use any memory. Hence the previous
et-eset () Latch Asynchronous Level sensitive cross-coupled Nor gates active high inputs (only one can be active) + + Function 0 0 0 1 0 1 eset 1 0 1 0 et 1 1 0-? 0-? Indeterminate cross-coupled Nand gates
5. Sequential CMOS Logic Circuits In sequential logic circuits the output signals is determined by the current inputs as well as the previously applied input variables. Fig. 5.1a shows a sequential circuit
Sequential Logic Design Principles.Latches and Flip-Flops Doru Todinca Department of Computers Politehnica University of Timisoara Outline Introduction Bistable Elements Latches and Flip-Flops S-R Latch
State and Finite State Machines See P&H Appendix C.7. C.8, C.10, C.11 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Stateful Components Until now is combinatorial logic Output
3 Flip-Flops Flip-flops and latches are digital memory circuits that can remain in the state in which they were set even after the input signals have been removed. This means that the circuits have a memory
June 8, 22 5:56 vra235_ch7 Sheet number Page number 349 black chapter 7 Flip-Flops, Registers, Counters, and a Simple Processor 7. Ng f3, h7 h6 349 June 8, 22 5:56 vra235_ch7 Sheet number 2 Page number
A New Paradigm for Synchronous State Machine Design in Verilog Randy Nuss Copyright 1999 Idea Consulting Introduction Synchronous State Machines are one of the most common building blocks in modern digital
Lecture 8: Synchronous Digital Systems The distinguishing feature of a synchronous digital system is that the circuit only changes in response to a system clock. For example, consider the edge triggered
Lecture 7: Sequential Networks CSE 14: Components and Design Techniques for Digital Systems Fall 214 CK Cheng Dept. of Computer Science and Engineering University of California, San Diego 1 What is a sequential
ESD I Lecture 3.b Sequential Circuits: Latches & Flip-Flops 1 Outline Memory elements Latch SR latch D latch Flip-Flop SR flip-flop D flip-flop JK flip-flop T flip-flop 2 Introduction A sequential circuit
Experiment # 9 Clock generator circuits & Counters Eng. Waleed Y. Mousa 1. Objectives: 1. Understanding the principles and construction of Clock generator. 2. To be familiar with clock pulse generation
Engr354: igital Circuits Chapter 7 Sequential Elements r. Curtis Nelson Sequential Elements In this chapter you will learn about: circuits that can store information; Basic cells, latches, and flip-flops;
Introduction to CMOS VLSI esign Lecture 10: Sequential Circuits avid Harris Harvey Mudd College Spring 2004 Outline q Sequencing q Sequencing Element esign q Max and Min-elay q Clock Skew q Time Borrowing
EEC 116 Lecture #6: Sequential Logic Rajeevan Amirtharajah University of California, Davis Jeff Parkhurst Intel Corporation Announcements Lab 3 extended, same due date as Lab 4 HW4 issued today Amirtharajah/Parkhurst,
Lecture 11: Sequential Circuit esign Outline Sequencing Sequencing Element esign Max and Min-elay Clock Skew Time Borrowing Two-Phase Clocking 2 Sequencing Combinational logic output depends on current
Chapter 5: Sequential Circuits (LATCHES) Latches We focuses on sequential circuits, where we add memory to the hardware that we ve already seen Our schedule will be very similar to before: We first show
8.1 Objectives To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC. 8.2 Introduction Circuits for counting events are frequently used in computers and other digital
Computer Science 220 Assembly Language & Comp. Architecture Siena College Fall 2011 opic Notes: Sequential Circuits We have seen many examples of what we can do with combinational logic taking a set of
Lecture-3 MEMORY: It is a storage device. It stores program data and the results. There are two kind of memories; semiconductor memories & magnetic memories. Semiconductor memories are faster, smaller,
ECE 223 Digital Circuits and Systems Synchronous Logic M. Sachdev Dept. of Electrical & Computer Engineering University of Waterloo Sequential Circuits Combinational circuits Output = f (present inputs)
CE 27 Introduction to igital ystems upplementary eading ome Basic Memory Elements In this supplementary reading, we will show some some basic memory elements. In particular, we will pay attention to their
Multivibrator ircuits Bistable multivibrators Multivibrators ircuits characterized by the existence of some well defined states, amongst which take place fast transitions, called switching processes. A
EE552 Advanced Logic Design and Switching Theory Metastability by Ashirwad Bahukhandi (Ashirwad Bahukhandi) firstname.lastname@example.org This is an overview of what metastability is, ways of interpreting it, the issues
PROGETTO DI SISTEMI ELETTRONICI DIGITALI Digital Systems Design Digital Circuits Advanced Topics 1 Sequential circuit and metastability 2 Sequential circuit - FSM A Sequential circuit contains: Storage
Zakład Mikroinformatyki i Teorii Automatów yfrowych Theory of Logic ircuits Laboratory manual Exercise 3 Bistable devices 2008 Krzysztof yran, Piotr zekalski (edt.) 1. lassification of bistable devices
Tutorial 1: hapter 1 1. Figure 1.1 shows the positive edge triggered D flip flop, determine the output of Q 0, assume output is initially LOW. Figure 1.1 2. For the positive edge-triggered J-K flip-flop
CHAPTER TEN Memory Cells The previous chapters presented the concepts and tools behind processing binary data. This is only half of the battle though. For example, a logic circuit uses inputs to calculate
IE1204 Digital Design F12: Asynchronous Sequential Circuits (Part 1) Elena Dubrova KTH / ICT / ES email@example.com BV pp. 584-640 This lecture IE1204 Digital Design, HT14 2 Asynchronous Sequential Machines
EE4800 CMOS igital IC esign & Analysis Lecture 10 Sequential Circuit esign Zhuo Feng 10.1 Z. Feng MTU EE4800 CMOS igital IC esign & Analysis 2010 Sequencing Outline Sequencing Element esign Max and Min-elay
NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter Description: The NTE2053 is a CMOS 8 bit successive approximation Analog to Digital converter in a 20 Lead DIP type package which uses a differential
Sequential Circuit Design Lan-Da Van ( 倫 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2009 firstname.lastname@example.org http://www.cs.nctu.edu.tw/~ldvan/ Outlines
Principles of VLSI esign Sequential Circuits Sequential Circuits Combinational Circuits Outputs depend on the current inputs Sequential Circuits Outputs depend on current and previous inputs Requires separating
Physics 3330 Experiment #10 Fall 1999 Purpose Counters and Decoders In this experiment, you will design and construct a 4-bit ripple-through decade counter with a decimal read-out display. Such a counter
Clocks 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. The length of time the clock is high before changing states is its high
Sistemas Digitais I LESI - 2º ano Lesson 7 - Sequential Systems Principles Prof. João Miguel Fernandes (email@example.com) Dept. Informática - Combinational vs. Sequential Circuits - Logic circuits are
Counters and State Machine Design November 25 Asynchronous Counters ENGI 25 ELEC 24 Asynchronous Counters The term Asynchronous refers to events that do not occur at the same time With respect to counter
Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill Objectives: Analyze the operation of sequential logic circuits. Understand the operation of digital counters.
Chapter 6 Latches and Flip-Flops Page 1 of 27 Contents Latches and Flip-Flops...2 6.1 Bistable lement...3 6.2 SR Latch...4 6.3 SR Latch with nable...6 6.4 Latch...7 6.5 Latch with nable...8 6.6 Clock...9
PROGETTO DI SISTEMI ELETTRONICI DIGITALI Digital Systems Design Digital Circuits Advanced Topics 1 Sequential circuit and metastability 2 Sequential circuit A Sequential circuit contains: Storage elements:
ETEC 2301 Programmable Logic Devices Chapter 10 Counters Shawnee State University Department of Industrial and Engineering Technologies Copyright 2007 by Janna B. Gallaher Asynchronous Counter Operation
LB no.. SYNCHONOUS COUNTES. Introduction Counters are sequential logic circuits that counts the pulses applied at their clock input. They usually have 4 bits, delivering at the outputs the corresponding
Chapter 2 Logic Gates and Introduction to Computer Architecture 2.1 Introduction The basic components of an Integrated Circuit (IC) is logic gates which made of transistors, in digital system there are
Chapter 7 Latches and Flip-Flops Page 1 of 18 7. Latches and Flip-Flops Latches and flip-flops are the basic elements for storing information. One latch or flip-flop can store one bit of information. The
Outline Last time: Combinational Testability and Test-pattern Generation Faults in digital circuits What is a test? : Controllability & Observability Redundancy & testability Test coverage & simple PODEM
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals of Computer Organization and Design. Introduction
RETRIEVING DATA FROM THE by Jim Todsen This application bulletin explains how to retrieve data from the. It elaborates on the discussion given in the data sheet and provides additional information to allow
CSE140 L Instructor: Thomas Y. P. Lee February 1,2006 Agenda Flip-Flops Combinational Logic vs. Sequential Logic Clock Signals SR Latch D Type Latch T Type Flip-Flop JK Type Flip-Flop DFF as Finite State
Latches, the D Flip-Flop & Counter Design ECE 52A Winter 22 Reading Assignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7. Basic Latch 7.2 Gated SR Latch 7.2. Gated SR
Chapter 5 Latches and Flip-Flops Page 1 of 17 5. Latches and Flip-Flops Latches and flip-flops are the basic elements for storing information. One latch or flip-flop can store one bit of information. The
Memory Elements Combinational logic cannot remember Output logic values are function of inputs only Feedback is needed to be able to remember a logic value Memory elements are needed in most digital logic
L4: Sequential Building Blocks (Flip-flops, Latches and Registers) Acknowledgements: Materials in this lecture are courtesy of the following sources and are used with permission. Prof. Randy Katz (Unified
ECE38 igital Logic Flip-Flops, Registers and Counters: Flip-Flops r.. J. Jackson Lecture 25- Flip-flops The gated latch circuits presented are level sensitive and can change states more than once during
Registers Timing Methodologies (cont d) Sample data using clock Hold data between clock cycles Computation (and delay) occurs between registers efinition of terms setup time: minimum time before the clocking
Analog & Digital Electronics Course No: PH-218 Lec-18: Multivibrators Course Instructor: Dr. A. P. VAJPEYI Department of Physics, Indian Institute of Technology Guwahati, India 1 Multivibrators A MULTIVIBRATOR
EGR 78 Digital Logic Lab File: N78L9A Lab # 9 Multivibrators A. Objective The objective of this laboratory is to introduce the student to the use of bistable multivibrators (flip-flops), monostable multivibrators
File: chap04, Chapter 04 1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1. 2. True or False? A gate is a device that accepts a single input signal and produces one
DIGITAL COUNTERS http://www.tutorialspoint.com/computer_logical_organization/digital_counters.htm Copyright tutorialspoint.com Counter is a sequential circuit. A digital circuit which is used for a counting
CDA 3200 Digital Systems Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 Outline SR Latch D Latch Edge-Triggered D Flip-Flop (FF) S-R Flip-Flop (FF) J-K Flip-Flop (FF) T Flip-Flop
igital Fundamentals with PL Programming Floyd Chapter 9 Floyd, igital Fundamentals, 10 th ed, Upper Saddle River, NJ 07458. All Rights Reserved Summary Latches (biestables) A latch is a temporary storage