Registers Computer Organization I 1 September 2009 ©2006-09 McQuain, Feng & Ribbens A clock is a free-running signal with a cycle time. A clock may.

Slides:



Advertisements
Similar presentations
1 Introduction Sequential circuit –Output depends not just on present inputs (as in combinational circuit), but on past sequence of inputs Stores bits,
Advertisements

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.
Give qualifications of instructors: DAP
Computer Science 210 Computer Organization Clocks and Memory Elements.
Flip-Flops Computer Organization I 1 June 2010 © McQuain, Feng & Ribbens A clock is a free-running signal with a cycle time. A clock may be.
1 Fundamentals of Computer Science Sequential Circuits.
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.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /23/2013 Lecture 7: Computer Clock & Memory Elements Instructor: Ashraf Yaseen DEPARTMENT OF MATH &
CSCE 211: Digital Logic Design. Chapter 6: Analysis of Sequential Systems.
+ CS 325: CS Hardware and Software Organization and Architecture Sequential Circuits 1.
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.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
1 Chapter 5: Datapath and Control CS 447 Jason Bakos.
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Digital Logic Design CHAPTER 5 Sequential Logic. 2 Sequential Circuits Combinational circuits – The outputs are entirely dependent on the current inputs.
Flip Flops. Clock Signal Sequential logic circuits have memory Output is a function of input and present state Sequential circuits are synchronized by.
Digital Computer Design Fundamental
COE 202: Digital Logic Design Sequential Circuits Part 1
Flip Flop
Rabie A. Ramadan Lecture 3
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.
Memory Intro Computer Organization 1 Computer Science Dept Va Tech March 2006 ©2006 McQuain & Ribbens Built using D flip-flops: 4-Bit Register Clock input.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
Feb. 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 12: State Elements, Registers, and Memory * Jeremy R. Johnson Mon. Feb.
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.
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.
CO5023 Latches, Flip-Flops and Decoders. Sequential Circuit What does this do? The OUTPUT of a sequential circuit is determined by the current output.
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.
TOPIC : Introduction to Sequential Circuits UNIT 1: Modeling and Simulation Module 4 : Modeling Sequential Circuits.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
Computer Science 210 Computer Organization
Computer Architecture & Operations I
Dr. Clincy Professor of CS
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
Computer Architecture & Operations I
Flip Flops.
LATCHED, FLIP-FLOPS,AND TIMERS
Clocks A clock is a free-running signal with a cycle time.
Computer Architecture & Operations I
Morgan Kaufmann Publishers
CSCE 211: Digital Logic Design
Flip Flops.
Synchronous Sequential Circuits
Flip Flops.
CS1104 – Computer Organization
Flip Flop.
Computer Science 210 Computer Organization
ECE Digital logic Lecture 16: Synchronous Sequential Logic
Latches and Flip-flops
Sequential logic circuits
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
LECTURE 15 – DIGITAL ELECTRONICS
Computer Science 210 Computer Organization
Elec 2607 Digital Switching Circuits
Synchronous Sequential Circuits
Dr. Clincy Professor of CS
Thought of the Day To be what we are, and to become
FLIP-FLOPS.
Synchronous sequential
Synchronous Sequential
Flip-Flops.
4-Bit Register Built using D flip-flops:
Clocks A clock is a free-running signal with a cycle time.
Presentation transcript:

Registers Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens 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 duration; the low duration is defined similarly. The cycle time of a clock is the sum of its high duration and its low duration. The frequency of the clock is the reciprocal of the cycle time. Clocks high low time rising edge falling edge

Registers Computer Organization I 2 September 2009 © McQuain, Feng & Ribbens State Elements A state element is a circuit component that is capable of storing a value. At the moment, we are interested primarily in state elements that store logical state information about the system, rather than data storage. A state element may be either unclocked or clocked. Clocked state elements are used in synchronous logic -When should an element that contains state be updated? -Edge-triggered clocking means that the state changes either on the rising or the falling edge. -Clock edge acts as a sampling signal that triggers the update of a state element. A signal that is to be written into a state element must be stable; i.e., it must be unchanging. If a function is to be computed in one clock cycle, then the clock period must be long enough to allow all the relevant signals to become stable.

Registers Computer Organization I 3 September 2009 © McQuain, Feng & Ribbens Set-reset Latch NOR gate output is only 1 when both inputs are 0 Feedback: output depends both on present inputs and past inputs If the output of one NOR gate is 1 then the output of the other must be 0 A latch is a circuit that has two stable states, and so can store 1 bit of data. Common contemporary terminology is that a latch does not receive a clock signal, and hence is transparent. However, usage does vary…

Registers Computer Organization I 4 September 2009 © McQuain, Feng & Ribbens Set-reset Latch … then Q == 1 Toggle the Set input to 1… Then, toggle the Set input to 0… … and Q == 1 So, toggling S on causes the latch to store 1; subsequently, toggling S does not change the state of the circuit.

Registers Computer Organization I 5 September 2009 © McQuain, Feng & Ribbens Set-reset Latch … then Q == 0 Toggle the Reset input to 0… Then, toggle the Reset input to 0… … and Q == 0 So, toggling R on causes the latch to store 0; subsequently, toggling R does not change the state of the circuit.

Registers Computer Organization I 6 September 2009 © McQuain, Feng & Ribbens Set-reset Latch … then both NOR gates would emit values of 0, breaking the Q/~Q relationship… … and there are instability issues in actual hardware implementations Setting both inputs to 1 simultaneously is not allowed… Setting both inputs to 0 simultaneously results in a "keep" state… … the latch will maintain its current value indefinitely (logically)

Registers Computer Organization I 7 September 2009 © McQuain, Feng & Ribbens The gated D-latch can be derived from the set-reset latch by adding an interface that makes it possible to essentially isolate the set-reset logic: Gated D-latch If the Enable input is 1 then the value of D will immediately be stored by the S-R mechanism. If the Enable input is 0 then the value of the S-R mechanism is fixed. The S = R = 1 case cannot occur for the embedded S-R latch, because…

Registers Computer Organization I 8 September 2009 © McQuain, Feng & Ribbens There is a small, but positive delay between changes in the input values to a logic gate and any resulting change in the gate's output. We call this the gate delay. Consider the following circuit: Timing Issues Logically, the output of the circuit should ALWAYS be 0. Why? Consider what happens if the input signal A is set to 1: - A0, A1 and A2 immediately become 1 -after one gate delay, the output X will become 1 since the XOR has inputs of 0 and 1 -at the same time, the output of the AND gate will become 1 -after one more gate delay, the output X will become 0 again What would happen if the output X were used as input to another circuit? We can prevent that if we use a clock signal to synchronize operations.

Registers Computer Organization I 9 September 2009 © McQuain, Feng & Ribbens We create a clocked D-latch by connecting the Enable input of the gated D-latch to a clock signal: Clocked D-latch The clocked D-latch accepts the input D only when the clock signal is high (1). However, there is still a hazard… what if the value of D can change more than once during the high-duration of the clock signal? The clocked D-latch is level-triggered… that is, whether its state can change depends on the level of the clock signal.

Registers Computer Organization I 10 September 2009 © McQuain, Feng & Ribbens Clocked D Flip-flop Consider what happens when we combine a clocked D-latch and a clocked S-R latch: clocked D-latchclocked S-R latch inverted clock The output of the device can only change once per clock cycle… shortly after the clock signal goes low. 2 gate delays D

Registers Computer Organization I 11 September 2009 © McQuain, Feng & Ribbens Clocked D Flip-flop Suppose that D is set to 1; nothing happens at all until the clock signal also goes high: clocked D-latchclocked S-R latch inverted clock The output of the D-latch goes high (i.e., takes the value of D ) but only after two gate delays. By then, the S-R latch is seeing a low clock signal, and so the S-R latch does not change state yet. 2 gate delays D

Registers Computer Organization I 12 September 2009 © McQuain, Feng & Ribbens Clocked D Flip-flop Then, when the clock goes low… clocked D-latchclocked S-R latch inverted clock The S-R latch sees a high clock signal (after 1 gate delay), and so it updates state. But, the D-latch sees a low clock signal immediately and so it cannot change state. 2 gate delays D

Registers Computer Organization I 13 September 2009 © McQuain, Feng & Ribbens Built using D flip-flops: 8-Bit Register Clock input controls when input is "written" to the individual flip-flops. However, the design above isnt quite what we want… QTPWhats wrong with this? How can we fix it?

Registers Computer Organization I 14 September 2009 © McQuain, Feng & Ribbens A register file is a collection of k registers (a sequential logic block) that can be read and written by specifying a register number that determines which register is to be accessed. Register File The interface should minimally include: -an n-bit input to import data for writing (a write port) -an n-bit output to export read data (a read port) -a log(k)-bit input to specify the register number -control bit(s) to enable/disable read/write operations -a control bit to clear all the registers, asynchronously -a clock signal Some designs may provide multiple read or write ports, and additional features. For MIPS, it is convenient to have two read ports and one write port. Why?

Registers Computer Organization I 15 September 2009 © McQuain, Feng & Ribbens Aggregating a collection of 4-bit registers, and providing the appropriate register selection and data input/output interface: A File of 8-Bit Registers 8-bit registers decoder to select write register multiplexor to select read register