CS 61C: Great Ideas in Computer Architecture Sequential Elements, Synchronous Digital Systems 1 Instructors: Vladimir Stojanovic & Nicholas Weaver

Slides:



Advertisements
Similar presentations
Penn ESE370 Fall DeHon 1 ESE370: Circuit-Level Modeling, Design, and Optimization for Digital Systems Day 24: November 4, 2011 Synchronous Circuits.
Advertisements

Introduction to Sequential Logic Design Bistable elements Latches.
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
EKT 124 / 3 DIGITAL ELEKTRONIC 1
1 Lecture 28 Timing Analysis. 2 Overview °Circuits do not respond instantaneously to input changes °Predictable delay in transferring inputs to outputs.
Assume array size is 256 (mult: 4ns, add: 2ns)
ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 2: Overview of Computer Organization Partially adapted from Computer Organization and.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
ENGIN112 L28: Timing Analysis November 7, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 28 Timing Analysis.
CS61C L21 State Elements: CircuitsThat Remember (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L14 State (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #14: State and FSMs Andy.
CS 61C L14 Combinational Logic (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #14: Combinational.
CS61C L23 Synchronous Digital Systems (1) Garcia, Fall 2011 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C.
CS61C L21 State Elements : Circuits that Remember (1) Spring 2007 © UCB 161 Exabytes In 2006  In 2006 we created, captured, and replicated 161 exabytes.
CS61C L21 State Elements : Circuits that Remember (1) Garcia, Fall 2006 © UCB One Laptop per Child  The OLPC project has been making news recently with.
Sequential Logic 1  Combinational logic:  Compute a function all at one time  Fast/expensive  e.g. combinational multiplier  Sequential logic:  Compute.
CS61C L14 Introduction to Synchronous Digital Systems (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
CS61C L14 Synchronous Digital Systems & State Elements I (1) Pearce, Summer 2010 © UCB inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
CS 61C L20 Introduction to Synchronous Digital Systems (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L21 State Elements: CircuitsThat Remember (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L20 Introduction to Synchronous Digital Systems (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L17 Combinational Logic (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #17.
CS 61C: Great Ideas in Computer Architecture Finite State Machines
CS61C L14 Introduction to Synchronous Digital Systems (1) Garcia, Fall 2005 © UCB Lecturer PSOE, new dad Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L15 Synchronous Digital Systems (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS 151 Digital Systems Design Lecture 28 Timing Analysis.
Fall 2007 L16: Memory Elements LECTURE 16: Clocks Sequential circuit design The basic memory element: a latch Flip Flops.
Chapter 3: Sequential Logic Circuit EKT 121 / 4 ELEKTRONIK DIGIT 1.
Instructor: Justin Hsia
CS3350B Computer Architecture Winter 2015 Lecture 5.2: State Circuits: Circuits that Remember Marc Moreno Maza [Adapted.
CS 61C: Great Ideas in Computer Architecture Lecture 10: Finite State Machines, Functional Units Instructor: Sagar Karandikar
COE 202: Digital Logic Design Sequential Circuits Part 1
1 COMP541 State Machines Montek Singh Feb 8, 2012.
Lecture 5. Sequential Logic 3 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
CS 61C: Great Ideas in Computer Architecture Lecture 9: Synchronous Digital Systems Instructor: Sagar Karandikar
Rabie A. Ramadan Lecture 3
CS 61C: Great Ideas in Computer Architecture Synchronous Digital Systems 1 Instructors: John Wawrzynek & Vladimir Stojanovic
Company LOGO DKT 122/3 DIGITAL SYSTEM 1 WEEK #12 LATCHES & FLIP-FLOPS.
Computer Organization CS224 Fall 2012 Lesson 22. The Big Picture  The Five Classic Components of a Computer  Chapter 4 Topic: Processor Design Control.
SEQUENTIAL LOGIC By Tom Fitch. Types of Circuits Combinational: Gates Combinational: Gates Sequential: Flip-Flops Sequential: Flip-Flops.
Introduction to Sequential Logic Design Bistable elements.
CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units 1 Instructors: John Wawrzynek & Vladimir Stojanovic
MicroComputer Engineering DigitalCircuits slide 1 Combinational circuits Changes at inputs propagate at logic speed to outputs Not clocked No internal.
CS 61C L4.1.2 State (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture State and FSMs Kurt Meinz inst.eecs.berkeley.edu/~cs61c.
Instructor: Justin Hsia 7/24/2013Summer Lecture #181 CS 61C: Great Ideas in Computer Architecture Combinational and Sequential Logic, Boolean Algebra.
EKT 121 / 4 ELEKTRONIK DIGIT I
Lecture 5. Sequential Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
CS61C L24 State Elements : Circuits that Remember (1) Garcia, Fall 2014 © UCB Senior Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
Chapter 1_0 Registers & Register Transfer. Chapter 1- Registers & Register Transfer  Chapter 7 in textbook.
EE3A1 Computer Hardware and Digital Design Lecture 9 Pipelining.
CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units 1 Instructors: Vladimir Stojanovic and Nicholas Weaver
CS 110 Computer Architecture Lecture 9: Finite State Machines, Functional Units Instructor: Sören Schwertfeger School of.
Lecture 4. Sequential Logic #3 Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Logic Design.
Flip-Flop Flip-flops Objectives Upon completion of this chapter, you will be able to :  Construct and analyze the operation of a latch flip-flop made.
Revisão de Circuitos Lógicos PARTE I. What are “Machine Structures”? Coordination of many levels of abstraction I/O systemProcesso r Compiler Operating.
Appendix C Basics of Logic Design. Appendix C — Logic Basic — 2 Logic Design Basics §4.2 Logic Design Conventions Objective: To understand how to build.
Flip Flops Lecture 10 CAP
6. Sequential circuits Rocky K. C. Chang 17 October 2017.
6. Sequential circuits (v2)
State Circuits : Circuits that Remember
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #21 State Elements: Circuits that Remember Hello to James Muerle in the.
Instructor: Justin Hsia
Guerilla Section #4 10/05 SDS & MIPS Datapath
Instructor Paul Pearce
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Inst.eecs.berkeley.edu/~cs61c CS61CL : Machine Structures Lecture #8 – State Elements, Combinational Logic Greet class James Tu, TA.
Instructor: Michael Greenbaum
Presentation transcript:

CS 61C: Great Ideas in Computer Architecture Sequential Elements, Synchronous Digital Systems 1 Instructors: Vladimir Stojanovic & Nicholas Weaver

Levels of Representation/Interpretation lw $t0, 0($2) lw $t1, 4($2) sw $t1, 0($2) sw $t0, 4($2) High Level Language Program (e.g., C) Assembly Language Program (e.g., MIPS) Machine Language Program (MIPS) Hardware Architecture Description (e.g., block diagrams) Compiler Assembler Machine Interpretation temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; Logic Circuit Description (Circuit Schematic Diagrams) Architecture Implementation Anything can be represented as a number, i.e., data or instructions 2

Boolean Algebra: Circuit & Algebraic Simplification 3

Laws of Boolean Algebra 4 X X = 0 X 0 = 0 X 1 = X X X = X X Y = Y X (X Y) Z = Z (Y Z) X (Y + Z) = X Y + X Z X Y + X = X X Y + X = X + Y X Y = X + Y X + X = 1 X + 1 = 1 X + 0 = X X + X = X X + Y = Y + X (X + Y) + Z = Z + (Y + Z) X + Y Z = (X + Y) (X + Z) (X + Y) X = X (X + Y) X = X Y X + Y = X Y Complementarity Laws of 0’s and 1’s Identities Idempotent Laws Commutativity Associativity Distribution Uniting Theorem Uniting Theorem v. 2 DeMorgan’s Law

Boolean Algebraic Simplification Example 5

6 a b c y

Signals and Waveforms: Grouping

Signals and Waveforms: Circuit Delay

Sample Debugging Waveform

Clickers/Peer Instruction Simplify Z = A+BC + A(BC) A: Z = 0 B: Z = A(1+ BC) C: Z = (A + BC) D: Z = BC E: Z = 1 10

Type of Circuits Synchronous Digital Systems consist of two basic types of circuits: Combinational Logic (CL) circuits – Output is a function of the inputs only, not the history of its execution – E.g., circuits to add A, B (ALUs) Sequential Logic (SL) Circuits that “remember” or store information aka “State Elements” E.g., memories and registers (Registers) 11

Uses for State Elements Place to store values for later re-use: – Register files (like $1-$31 in MIPS) – Memory (caches and main memory) Help control flow of information between combinational logic blocks – State elements hold up the movement of information at input to combinational logic blocks to allow for orderly passage 12

Accumulator Example Want: S=0; for (i=0;i<n;i++) S = S + X i Why do we need to control the flow of information? Assume: Each X value is applied in succession, one per cycle After n cycles the sum is present on S 13 SUM XiXi S

First Try: Does this work? 14 No! Reason #1: How to control the next iteration of the ‘for’ loop? Reason #2: How do we say: ‘S=0’? Feedback

Register Internals n instances of a “Flip-Flop” Flip-flop name because the output flips and flops between 0 and 1 D is “data input”, Q is “data output” Also called “D-type Flip-Flop” 15

Flip-Flop Operation Edge-triggered d-type flip-flop – This one is “positive edge-triggered” “On the rising edge of the clock, the input d is sampled and transferred to the output. At all other times, the input d is ignored.” Example waveforms:

Flip-Flop Timing Edge-triggered d-type flip-flop – This one is “positive edge-triggered” “On the rising edge of the clock, the input d is sampled and transferred to the output. At all other times, the input d is ignored.” Example waveforms (more detail):

Camera Analogy Timing Terms Want to take a portrait – timing right before and after taking picture Set up time – don’t move since about to take picture (open camera shutter) Hold time – need to hold still after shutter opens until camera shutter closes Time click to data – time from open shutter until can see image on output (viewscreen) 18

Hardware Timing Terms Setup Time: when the input must be stable before the edge of the CLK Hold Time: when the input must be stable after the edge of the CLK “CLK-to-Q” Delay: how long it takes the output to change, measured from the edge of the CLK 19

Accumulator Timing 1/2 Reset input to register is used to force it to all zeros (takes priority over D input). S i-1 holds the result of the i th -1 iteration. Analyze circuit timing starting at the output of the register.

Accumulator Timing 2/2 reset signal shown. Also, in practice X might not arrive to the adder at the same time as S i-1 S i temporarily is wrong, but register always captures correct value. In good circuits, instability never happens around rising edge of clk.

Model for Synchronous Systems 22 Collection of Combinational Logic blocks separated by registers Feedback is optional Clock signal(s) connects only to clock input of registers Clock (CLK): steady square wave that synchronizes the system Register: several bits of state that samples on rising edge of CLK (positive edge-triggered) or falling edge (negative edge-triggered)

Maximum Clock Frequency What is the maximum frequency of this circuit? 23 Period = Max Delay = CLK-to-Q Delay + CL Delay + Setup Time Hint: Frequency = 1/Period

Critical Paths Timing… Note: delay of 1 clock cycle from input to output. Clock period limited by propagation delay of adder/shifter.

Pipelining to improve performance Timing… Insertion of register allows higher clock frequency More outputs per second (higher bandwidth) But each individual result takes longer (greater latency)

Recap of Timing Terms Clock (CLK) - steady square wave that synchronizes system Setup Time - when the input must be stable before the rising edge of the CLK Hold Time - when the input must be stable after the rising edge of the CLK “CLK-to-Q” Delay - how long it takes the output to change, measured from the rising edge of the CLK Flip-flop - one bit of state that samples every rising edge of the CLK (positive edge-triggered) Register - several bits of state that samples on rising edge of CLK or on LOAD (positive edge-triggered)

Clickers/Peer Instruction What is maximum clock frequency? (assume all unconnected inputs come from some register) A: 5 GHz B: 200 MHz C: 500 MHz D: 1/7 GHz E: 1/6 GHz Clock->Q 1ns Setup 1ns Hold 1ns AND delay 1ns

Administrivia No lecture on Wed – study for midterm Midterm 1 is on Thu 2/25 – Time 6-8pm – Location 2050 VLSB(aa-lz) 1 Pimentel(ma-zz) – Covers up to and including 02/17 lecture (CALL 2) – 1 handwritten, double sided, 8.5”x11” cheat sheet – We’ll give you MIPS green sheet s sent-out to students requiring special accommodation for the exam – please respond 28

Study Advice 1.Review slides, book, worksheets, etc. and add to your cheatsheet as you do so a.This step is not the end 2.Take a mock exam in the allotted time, using only your cheatsheet 3.Go over solutions, look at why the answers are what they are (especially for questions you answered incorrectly) 4.Update cheatsheet as necessary 5.if (!perfect) goto 2; 29