Lecture 5. Sequential Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.

Slides:



Advertisements
Similar presentations
Module 5 – Sequential Logic Design with VHDL
Advertisements

Introduction to Sequential Logic Design Latches. 2 Terminology A bistable memory device is the generic term for the elements we are studying. Latches.
Sequential Digital Circuits Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
1 Lecture 14 Memory storage elements  Latches  Flip-flops State Diagrams.
Give qualifications of instructors: DAP
Digital Logic Design ESGD2201
CS 151 Digital Systems Design Lecture 19 Sequential Circuits: Latches.
ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals.
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
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /23/2013 Lecture 7: Computer Clock & Memory Elements Instructor: Ashraf Yaseen DEPARTMENT OF MATH &
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
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.
Circuits require memory to store intermediate data
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 COMP541 Sequential Circuits Montek Singh Sep 17, 2014.
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
Sequential Logic Flip-Flops and Related Devices Dr. Rebhi S. Baraka Logic Design (CSCI 2301) Department of Computer Science Faculty.
EECC341 - Shaaban #1 Lec # 13 Winter Sequential Logic Circuits Unlike combinational logic circuits, the output of sequential logic circuits.
CSE 140 Lecture 8 Sequential Networks Professor CK Cheng CSE Dept. UC San Diego 1.
CS 140 Lecture 8 Sequential Networks Professor CK Cheng CSE Dept. UC San Diego.
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
Fall 2007 L16: Memory Elements LECTURE 16: Clocks Sequential circuit design The basic memory element: a latch Flip Flops.
COE 202: Digital Logic Design Sequential Circuits Part 1
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Introduction to Sequential Logic Design Flip-flops.
Sequential Logic Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer Organization and.
Company LOGO DKT 122/3 DIGITAL SYSTEM 1 WEEK #12 LATCHES & FLIP-FLOPS.
ECA1212 Introduction to Electrical & Electronics Engineering Chapter 9: Digital Electronics – Sequential Logic by Muhazam Mustapha, November 2011.
Sequential Logic Combinatorial components: the output values are computed only from their present input values. Sequential components: their output values.
Topic: Sequential Circuit Course: Logic Design Slide no. 1 Chapter #6: Sequential Logic Design.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
Computer Organization & Programming Chapter 5 Synchronous Components.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Introduction to Sequential Logic Design Bistable elements.
Lecture 7: Sequential Networks CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer Science and Engineering.
Chapter 3 Computer System Architectures Based on
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
Synchronous Sequential Logic Part I
Copyright © 2007 Elsevier3- Sequential Logic Circuits Design.
Chapter 6 – Digital Electronics – Part 1 1.D (Data) Flip Flops 2.RS (Set-Reset) Flip Flops 3.T Flip Flops 4.JK Flip Flops 5.JKMS Flip Flops Information.
Chapter5: Synchronous Sequential Logic – Part 1
CSE 140: Components and Design Techniques for Digital Systems Lecture 7: Sequential Networks CK Cheng Dept. of Computer Science and Engineering University.
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.
Flip Flops 3.1 Latches and Flip-Flops 3 ©Paul Godin Created September 2007 Last Edit Aug 2013.
CENG 241 Digital Design 1 Lecture 7 Amirali Baniasadi
ECE 331 – Digital System Design Introduction to Sequential Circuits and Latches (Lecture #16)
Counters and registers Eng.Maha Alqubali. Registers Registers are groups of flip-flops, where each flip- flop is capable of storing one bit of information.
Dept. of Electrical Engineering
7. Latches and Flip-Flops Digital Computer Logic.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
CSE 140 Lecture 8 Sequential Networks
Lecture 4. Sequential Logic #1
Lecture 3. Lateches, Flip Flops, and Memory
Chapter #6: Sequential Logic Design
Lecture 8 Dr. Nermi Hamza.
Prof. Hsien-Hsin Sean Lee
Learning Outcome By the end of this chapter, students are expected to refresh their knowledge on sequential logic related to HDL.
Flip Flops.
Assistant Prof. Fareena Saqib Florida Institute of Technology
Introduction to Sequential Logic Design
ECE Digital logic Lecture 16: Synchronous Sequential Logic
COMP541 Sequential Circuits
Sequential Digital Circuits
Lecture 3: Timing & Sequential Circuits
Presentation transcript:

Lecture 5. Sequential Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research

Korea Univ Sequential Logic Topics Latches and Flip-Flops Synchronous Logic Design Finite State Machines (FSM) Timing of Sequential Logic 2

Korea Univ Sequential Logic Outputs of sequential logic depend on current inputs and prior input values  Sequential logic might explicitly remember certain previous inputs, or it might distill (encode) the prior inputs into a smaller amount of information called state  The state is a set of bits that contain all the information about the past necessary to explain the future behavior of the circuit  State elements Bistable circuit SR Latch D Latch D Flip-flop 3

Korea Univ Bistable Circuit Bistable circuit is the fundamental building block of other state elements  A pair of inverters are connected in a loop 4  Two outputs: Q, Q  No inputs

Korea Univ Bistable Circuit Analysis Let’s consider the two possible cases –Q = 0: –Q = 1: then Q = 0 and Q = 1 (consistent) then Q = 1 and Q = 0 (consistent)

Korea Univ Bistable Circuit Analysis Bistable circuit stores 1 bit of state in the state variable  Q (or Q ) But, there are no inputs to control the state A subtle point is that the circuit could have a third possible state with both outputs approximately halfway between 0 and 1 (halfway between 0 and V dd )  It is called a metastable state 6 V dd /2

Korea Univ Bistable Circuit Even though the cross-coupled inverters can store a bit of information, they are not practical because they don’t have inputs to control the state. Other bistable elements such as latches and flip- flops provide inputs to control the value of the state variable 7

Korea Univ SR Latch One of the simplest sequential circuits is the SR (Set/Reset) latch  It is composed of 2 cross-coupled NOR gates It has 2 inputs (S, R) and 2 outputs (Q and Q)  When the set input (S) is 1 (and R = 0), Q is set to 1 Set makes the output (Q) to “1”  When the reset input (R) is 1 (and S = 0), Q is reset to 0 Reset makes the output (Q) to “0” 8

Korea Univ SR Latch Analysis Consider the four possible cases: a) S = 1, R = 0 b) S = 0, R = 1 c) S = 0, R = 0 d) S = 1, R = 1 9

Korea Univ SR Latch Analysis 10 a) S = 1, R = 0: b) S = 0, R = 1: then Q = 1 and Q = then Q = 0 and Q = 1

Korea Univ SR Latch Analysis 11 c) S = 0, R = 0: d) S = 1, R = 1: We got Memory! Invalid state: Q ≠ NOT Q 0 then Q = Q prev and Q = Q prev then Q = 0 and Q = 0

Korea Univ SR Latch Recap SR latch stores one bit of state  Where is it stored? SR latch can control the state with S, R inputs SR latch generates the invalid state when S =1 and R = 1 12

Korea Univ D Latch D latch solves the problem with SR latch  D latch blocks the invalid state when S =1 and R = 1  D latch separates when and what the state should be changed D latch has 2 inputs (CLK, D) and 2 outputs (Q, Q)  CLK controls when the output changes  D (data input) controls what the output changes to  Avoids invalid case (Q ≠ NOT Q when both S and R are 1) 13

Korea Univ D Latch Internal & Operation 14 D latch operation  When CLK = 1, D passes through to Q (D latch is transparent)  When CLK = 0, Q holds its previous value (D latch is opaque) Q prev

Korea Univ D Latch Waveform When evaluating latch, it would be confusing if you think previous value and current value things To get a good intuition, think with waveform  When CLK = 1, D latch transfers input data (D) to output (Q)  When CLK = 0, D latch maintains its previous value 15

Korea Univ D Flip-Flop In digital logic design, it would be very convenient if we can store input data at a certain moment (not during the whole time interval like D latch) D flip-flop provides that functionality  Q changes only on the rising edge of CLK When CLK rises from 0 to 1, D passes through to Q Otherwise, Q holds its previous value Thus, a flip-flop is called an edge-triggered device because it is activated on the clock edge 16

Korea Univ D Flip-Flop Internal Circuit Two back-to-back latches (L1 and L2) controlled by complementary clocks When CLK = 0  L1 is transparent  L2 is opaque  D passes through to N1 When CLK = 1  L2 is transparent  L1 is opaque  N1 passes through to Q Thus, on the edge of the clock (when CLK rises from 0 to 1)  D effectively passes through to Q 17

Korea Univ D Flip-Flop 18 Note that input data should not be changed around the clock edge for D flip-flop to work correctly

Korea Univ D Flip-Flop So, D flip-flop has the effect of sampling the current input data at the rising edge of the clock  Note that input data should not be changed around the clock edge for D flip-flop to work correctly 19

Korea Univ Registers 20 An N-bit register is a bank of N flip-flops that share a common CLK input, so that all bits of the register are updated at the same time  You can say N-bit flip-flops or N-bit register Registers are the key building block of sequential circuits

Korea Univ Flip-Flops There are several kinds of flip-flops  Enabled flip-flops  Resettable flip-flops  Settable flip-flops These flip-flops and just plain flip-flops are used extensively in the digital design  You will use these flip-flops when designing CPU in the next semester 21

Korea Univ Enabled Flip-Flops Enabled flip-flips are useful when we wish to load a new value into a flip-flop only during some of the time, rather than on every clock edge  Enabled flip-flop has one more input (EN)  The enable input (EN) controls when new data (D) is stored  When EN = 1, D passes through to Q on the clock edge  When EN = 0, the flip-flop retains its previous state 22

Korea Univ Resettable Flip-Flops Resettable flip-flops are useful when we want to force a known state (i.e., 0) into some flip-flops in a system when we first turn it on  Resettable flip-flop has “Reset” input  When Reset = 1, Q is reset to 0  When Reset = 0, the flip-flop behaves like an ordinary D flip-flop There are two types of resettable flip-flops  Synchronous resettable FF resets at the clock edge only  Asynchronous resettable FF resets immediately when Reset = 1 Asynchronously resettable flip-flop requires changing the internal circuitry of the flip-flop 23 Synchronously resettable flip- flop Resettable flip-flop

Korea Univ Settable Flip-Flops Settable flip-flops are also useful when we want to force a known state (i.e., 1) into some flip-flops in a system when we first turn it on  Settable flip-flop has “Set” input  When Set = 1, Q is set to 1  When Set = 0, the flip-flop behaves like an ordinary D flip-flop 24