Fall 2007 L16: Memory Elements LECTURE 16: Clocks Sequential circuit design The basic memory element: a latch Flip Flops.

Slides:



Advertisements
Similar presentations
Tutorial 2 Sequential Logic. Registers A register is basically a D Flip-Flop A D Flip Flop has 3 basic ports. D, Q, and Clock.
Advertisements

Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
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
COE 202: Digital Logic Design Sequential Circuits Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
Computer Science 210 Computer Organization Clocks and Memory Elements.
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.
Computer Architecture CS 215
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /23/2013 Lecture 7: Computer Clock & Memory Elements Instructor: Ashraf Yaseen DEPARTMENT OF MATH &
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
1 Sequential Circuits –Digital circuits that use memory elements as part of their operation –Characterized by feedback path –Outputs depend not only on.
1 Lecture 20 Sequential Circuits: Latches. 2 Overview °Circuits require memory to store intermediate data °Sequential circuits use a periodic signal to.
Sequential Circuits : Part I Read Sections 5-1, 5-2, 5-3.
Circuits require memory to store intermediate data
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits – I Flip-Flops A sequential circuit is a logic components whose outputs.
ECE 3130 – Digital Electronics and Design Lab 5 Latches and Flip-Flops Fall 2012 Allan Guan.
Sequential Circuits A Basic sequential circuit is nothing but a combinational circuit with some feedback paths between its output and input terminals.
Sequential circuit Digital electronics is classified into combinational logic and sequential logic. In combinational circuit outpus depends only on present.
EECC341 - Shaaban #1 Lec # 13 Winter Sequential Logic Circuits Unlike combinational logic circuits, the output of sequential logic circuits.
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.
Sequential Circuits. 2 Sequential vs. Combinational Combinational Logic:  Output depends only on current input −TV channel selector (0-9) Sequential.
CS370 Counters. Overview °Counter: A register that goes through a prescribed series of states °Counters are important components in computers. °Counters.
A.Abhari CPS2131 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers:
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
ETE Digital Electronics Latches and Flip-Flops [Lecture:12] Instructor: Sajib Roy Lecturer, ETE, ULAB.
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Objectives: Given input logice levels, state the output of an RS NAND and RS NOR. Given a clock signal, determine the PGT and NGT. Define “Edge Triggered”
Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths.
1 Sequential Circuit Latch & Flip-flop. 2 Contents Introduction Memory Element Latch  SR latch  D latch Flip-flop  SR flip-flop  D flip-flop  JK.
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.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 9 Sequential.
Rabie A. Ramadan Lecture 3
Sequential Circuits. Two primary differences between combinational circuits and sequential circuits –Sequential circuits are synchronous (use a clock)
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.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Logic Design / Processor and Control Units Tony Diep.
Sequential Logic Computer Organization II 1 © McQuain A clock is a free-running signal with a cycle time. A clock may be either high or.
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
Sequential Circuit Latch & Flip-flop. Contents Introduction Memory Element Latch  SR latch  D latch Flip-flop  SR flip-flop  D flip-flop  JK flip-flop.
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.
Lecture 5. Sequential Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
CO5023 Latches, Flip-Flops and Decoders. Sequential Circuit What does this do? The OUTPUT of a sequential circuit is determined by the current output.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
7. Latches and Flip-Flops Digital Computer Logic.
1 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers: parallel and.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
Computer Science 210 Computer Organization
Computer Architecture & Operations I
Lecture 8 Dr. Nermi Hamza.
Digital Design Lecture 9
Flip Flops.
Flip Flop.
Computer Science 210 Computer Organization
Latches and Flip-flops
Digital Logic Design Sequential Circuits (Chapter 6)
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Computer Science 210 Computer Organization
Elec 2607 Digital Switching Circuits
Levels in Processor Design
Flip-Flops.
Levels in Processor Design
Clocks A clock is a free-running signal with a cycle time.
Presentation transcript:

Fall 2007 L16: Memory Elements LECTURE 16: Clocks Sequential circuit design The basic memory element: a latch Flip Flops

Fall 2007 L16: Memory Elements Clocks Just about like everything else in this world, many digital logic designs “run on the clock” Digital circuit designs that use a clock are called synchronous circuits The clock synchronizes when things happen in the digital circuit

Fall 2007 L16: Memory Elements Clock Signals Clocks send out a series of pulses, where the signal alternates between high and low Ideally, a clock signal will look like a square wave High Low Rising Clock Edge Falling Clock Edge One Clock Cycle

Fall 2007 L16: Memory Elements Synchronous Digital Circuits Synchronous digital circuits operation can be thought of as a series of discrete events The clock is used to trigger these discrete events Clock “triggers” can be: –Rising clock edge –Falling clock edge –Clock low –Clock high

Fall 2007 L16: Memory Elements How might you use a clock with the ALU to subtract two integers? (1 of 2) 1.Cycle 1 Get the value of B from a register and onto the input lines of the ALU Enable B Select the NOT B function –(store the intermediate results back into a register) 2.Cycle 2 Get the value of B from the intermediate results register and place on the input lines of the ALU Enable B Select the increment function (add with first stage’s carry in = 1) –(store the intermediate results back into a register)

Fall 2007 L16: Memory Elements How might you use a clock with the ALU to subtract two integers? (2 of 2) Cycle 3 Get the values of A and (NOT B + 1) from the appropriate registers and onto the input lines of the ALU Enable both A and B Select the ADD A + B function Store the result in the appropriate register

Fall 2007 L16: Memory Elements Memory and Sequential Logic Memory allows us to store information so that we can use that information in the future When we include memory in a circuit design, we call that type of circuit SEQUENTIAL LOGIC In digital electronic circuits, a memory element can store a single value, either a “0” or a “1” To enter a value into an memory element is called “writing” to memory Retrieving a value that is stored in memory is called “reading” memory

Fall 2007 L16: Memory Elements Memory, Sequential Logic and Clocks Memory functions and sequential logic have a sense of time (they remember what has happened before) Memory functions and sequential logic are generally associated with the use of clocks To enter a value into an memory element is called “writing” to memory Retrieving a value that is stored in memory is called “reading” memory

Fall 2007 L16: Memory Elements SR Latch - A Basic Memory Element Output “Qbar” of NOR logic gate 1 is “fed back” into the input of NOR logic gate 2 Output “Q” of NOR logic gate 2 is “fed back” into the input of NOR logic gate 1 Q is the value of the information bit that is stored in the latch Qbar is the complement of the stored value Set Q Q Reset

Fall 2007 L16: Memory Elements Latch Operation Set Q Q Reset Set Reset Q Q Q undefined Q

Fall 2007 L16: Memory Elements Storing Data in a Latch The SR latch will keep the data (Q and Qbar) in its “last known” state for as long as set and reset are both zero When a latch is first powered up, you don’t know which of its two stable states it will initialize to (with set=reset=0) One of the reasons why we initialize variables when we develop software

Fall 2007 L16: Memory Elements Clocked SR Latches “ANDing” a clock signal with the set and reset inputs will make sure that the latch can only change state when the clock input is high In some latch designs, the clock signal may be called the enable input Set Q Q Reset Clock Memory Element

Fall 2007 L16: Memory Elements The D Latch - A Variation on the SR Latch - “D” stands for data Whatever value you put on “D” when the clock is high will be stored as Q D Q Q Clock Memory Element

Fall 2007 L16: Memory Elements Latches vs. Flip-Flops Latches are LEVEL-TRIGGERED The data (D) input to the latch is entered only when the clock input is “1” (“HIGH”) Flip-flops are EDGE-TRIGGERED The data (D) input to the flip-flop is entered during a clock transition from either high- to-low or low-to-high (i.e., a clock edge)

Fall 2007 L16: Memory Elements D Latches and D Flip-Flops D Latch level triggered DQ CK DQ > CK D Flip-Flop edge triggered Some designs for latches and flip-flops include additional inputs (e.g., set, reset) and an additional output (Q bar)

Fall 2007 L16: Memory Elements Registers A group of flip-flops sharing a common clock (and set and reset inputs, if available) forms a register Register Bit “3” Register Bit “2” Register Bit “1” Register Bit “0” DQ > CK DQ DQ DQ Clock Input Bit “3” Input Bit “2” Input Bit “1” Input Bit “0”

Fall 2007 L16: Memory Elements One Way to Think About Register Files / Register Arrays CLOCK A0A0 A1A1

Fall 2007 L16: Memory Elements An Example of How Registers Might Work with an ALU Assume that we want to add the values of two variables stored in registers (register0 and register1) and place the result in register2  ADD R0, R1, R2 Assume that we have four, four-bit registers and a 4- bit ALU Assume that Register0 contains 0011 and that Register1 contains 0010 Process - synchronized by the clock signal: –Take the contents of the registers (R0 and R1) and load them into the ALU –Have the ALU add them (result = 0101) –Store the result back in the register (R2)

Fall 2007 L16: Memory Elements CPU Data Path Register Array Control Unit ALU Bus Memory Bus