CS61C L14 Synchronous Digital Systems & State Elements I (1) Pearce, Summer 2010 © UCB inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.

Slides:



Advertisements
Similar presentations
ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 2: Overview of Computer Organization Partially adapted from Computer Organization and.
Advertisements

Spring 2008, Jan. 14 ELEC / Lecture 2 1 ELEC / Computer Architecture and Design Spring 2007 Introduction Vishwani D. Agrawal.
CS 61C L13 Combinational Logic (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #13: Combinational.
CS61C L21 State Elements: CircuitsThat Remember (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L20 Caches I (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
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 L20 Synchronous Digital Systems (1) Garcia, Spring 2010 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
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 L26 CPU Design : Designing a Single-Cycle CPU II (1) Garcia, Spring 2007 © UCB 3.6 TB DVDs? Maybe!  Researchers at Harvard have found a way to use.
CS61C L20 Synchronous Digital Systems (1) Garcia, Fall 2006 © UCB Blu-ray vs HD-DVD war over?  As you know, there are two different, competing formats.
CS61C L22 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2008 © UCB 100 MPG Car contest!  The X Prize Foundation has put up two prizes;
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.
CS61C L18 Introduction to CPU Design (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS61C L14 Introduction to Synchronous Digital Systems (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
CS61C L22 Representations of Combinatorial Logic Circuits (1) Eric, Spring 2010 © UCB Cal Alumni Wins 2009 Turing Award! Charles P. Thacker was named.
CS61C L24 Latches (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS61C L18 Combinational Logic Blocks, Latches (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
CS / Schlesinger Lec1.1 1/20/99©UCB Spring 1999 Computer Architecture Lecture 1 Introduction and Five Components of a Computer Spring, 1999 Arie Schlesinger.
CIS 314 : Computer Organization Lecture 1 – Introduction.
CS 61C L20 Introduction to Synchronous Digital Systems (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L15 Blocks (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #15: Combinational Logic Blocks.
CS 61C L21 State Elements: CircuitsThat Remember (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L28 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L20 Synchronous Digital Systems (1) Garcia, Spring 2007 © UCB Disk failures 15x specs!  A recent conference reveals that drives fail in real life.
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.
Computer ArchitectureFall 2008 © August 20 th, Introduction to Computer Architecture Lecture 2 – Digital Logic Design.
CS 61C: Great Ideas in Computer Architecture Finite State Machines
CS61CL Machine Structures Lec 8 – State and Register Transfers David Culler Electrical Engineering and Computer Sciences University of California, Berkeley.
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 61C L15 State & Blocks (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #15: State 2 and Blocks.
CS3350B Computer Architecture Winter 2015 Lecture 5.2: State Circuits: Circuits that Remember Marc Moreno Maza [Adapted.
How circuits acquire memory: Sequential & Clocked Circuits. COS 116, Spring 2011 Sanjeev Arora.
CS 61C: Great Ideas in Computer Architecture Lecture 10: Finite State Machines, Functional Units Instructor: Sagar Karandikar
CS 61C: Great Ideas in Computer Architecture Lecture 9: Synchronous Digital Systems Instructor: Sagar Karandikar
CS61C L23 Synchronous Digital Systems (1) Garcia, Fall 2011 © UCB Senior Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
Fall 2015, Aug 17 ELEC / Lecture 1 1 ELEC / Computer Architecture and Design Fall 2015 Introduction Vishwani D. Agrawal.
CS 61C: Great Ideas in Computer Architecture Synchronous Digital Systems 1 Instructors: John Wawrzynek & Vladimir Stojanovic
CS35101 Computer Architecture Spring 2006 Week 1 Slides adapted from: Mary Jane Irwin ( Course url:
1 CSE370, Lecture 17 Lecture 17 u Logistics n Lab 7 this week n HW6 is due Friday n Office Hours íMine: Friday 10:00-11:00 as usual íSara: Thursday 2:30-3:20.
Computer Organization CS224 Fall 2012 Lesson 22. The Big Picture  The Five Classic Components of a Computer  Chapter 4 Topic: Processor Design Control.
1 chapter 1 Computer Architecture and Design ECE4480/5480 Computer Architecture and Design Department of Electrical and Computer Engineering University.
CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units 1 Instructors: John Wawrzynek & Vladimir Stojanovic
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.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Transistor: Building.
CS 61C L4.1.1 Combinational Logic (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture Logic Gates and Combinational Logic
CS61C L20 Synchronous Digital Systems (1) Beamer, Spring 2008 © UCB Scott Beamer, Guest Lecturer inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
Instructor: Justin Hsia 7/24/2013Summer Lecture #181 CS 61C: Great Ideas in Computer Architecture Combinational and Sequential Logic, Boolean Algebra.
Spring 2016, Jan 13 ELEC / Lecture 1 1 ELEC / Computer Architecture and Design Spring 2016 Introduction Vishwani D. Agrawal.
CS61C L24 State Elements : Circuits that Remember (1) Garcia, Fall 2014 © UCB Senior Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C: Great Ideas in Computer Architecture Sequential Elements, Synchronous Digital Systems 1 Instructors: Vladimir Stojanovic & Nicholas Weaver
CS 110 Computer Architecture Lecture 9: Finite State Machines, Functional Units Instructor: Sören Schwertfeger School of.
Revisão de Circuitos Lógicos PARTE I. What are “Machine Structures”? Coordination of many levels of abstraction I/O systemProcesso r Compiler Operating.
Flip Flops Lecture 10 CAP
Stateless Combinational Logic and State Circuits
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 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.
Lecturer PSOE Dan Garcia
TA David “The Punner” Eitan Poll
Lecturer PSOE Dan Garcia
Instructor: Michael Greenbaum
Presentation transcript:

CS61C L14 Synchronous Digital Systems & State Elements I (1) Pearce, Summer 2010 © UCB inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 14 Introduction to Synchronous Digital Systems & State Elements Springs instead of solder?  Instructor Paul Pearce Researchers in Palo Alto have devised a new way to integrate computer chips using springs and glue instead of solder. This technique leads to reversible integration, which reduces waste associated with a single broken component.

CS61C L14 Synchronous Digital Systems & State Elements I (2) Pearce, Summer 2010 © UCB In Review: Steps to Starting a Program

CS61C L14 Synchronous Digital Systems & State Elements I (3) Pearce, Summer 2010 © UCB 61C What are “Machine Structures”? Coordination of many levels of abstraction I/O systemProcessor Compiler Operating System (MacOS X) Application (Firefox) Digital Design Circuit Design Instruction Set Architecture Datapath & Control transistors Memory Hardware Software Assembler ISA is an important abstraction level: contract between HW & SW

CS61C L14 Synchronous Digital Systems & State Elements I (4) Pearce, Summer 2010 © UCB Below the Program High-level language program (in C) swap int v[], int k){ int temp; temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; } Assembly language program (for MIPS) swap: sll$2, $5, 2 add$2, $4,$2 lw$15, 0($2) lw$16, 4($2) sw$16, 0($2) sw$15, 4($2) jr$31 Machine (object) code (for MIPS) C compilerassembler ?

CS61C L14 Synchronous Digital Systems & State Elements I (5) Pearce, Summer 2010 © UCB Synchronous Digital Systems Synchronous: Means all operations are coordinated by a central clock.  It keeps the “heartbeat” of the system! Digital: Mean all values are represented by discrete values Electrical signals are treated as 1’s and 0’s and grouped together to form words. The hardware of a processor, such as the MIPS, is an example of a Synchronous Digital System

CS61C L14 Synchronous Digital Systems & State Elements I (6) Pearce, Summer 2010 © UCB Logic Design Next ~2 weeks: we’ll study how a modern processor is built; starting with basic elements as building blocks. Why study hardware design? In order to understand the capabilities and limitations of hardware in general (and processors in particular). What processors can do fast and what they can’t do fast (avoid slow things if you want your code to run fast!) Background for more detailed hardware courses (Digital Design CS 150, Computer Architecture CS 152) There is just so much you can do with processors. At some point you may need to design your own custom hardware. Understanding how hardware works is understanding the consequences of the decisions you make when writing software.

CS61C L14 Synchronous Digital Systems & State Elements I (7) Pearce, Summer 2010 © UCB PowerPC Die Photograph Let’s look closer…

CS61C L14 Synchronous Digital Systems & State Elements I (8) Pearce, Summer 2010 © UCB Intel Pentium 4 Die Photo

CS61C L14 Synchronous Digital Systems & State Elements I (9) Pearce, Summer 2010 © UCB Intel Core 2 Duo Die Photo

CS61C L14 Synchronous Digital Systems & State Elements I (10) Pearce, Summer 2010 © UCB Transistors 101 MOSFET Metal-Oxide-Semiconductor Field-Effect Transistor Come in two types:  n-type NMOSFET  p-type PMOSFET For n-type (p-type opposite) If voltage not enough between G & S, transistor turns “off” (cut-off) and Drain-Source NOT connected If the G & S voltage is high enough, transistor turns “on” (saturation) and Drain-Source ARE connected p-type n-type D G S S G D Side view

CS61C L14 Synchronous Digital Systems & State Elements I (11) Pearce, Summer 2010 © UCB Transistor Circuit Rep. vs. Block diagram Chips is composed of nothing but transistors and wires. Small groups of transistors form useful building blocks. Block are organized in a hierarchy to build higher-level blocks: ex: adders. abc “1” (voltage source) “0” (ground)

CS61C L14 Synchronous Digital Systems & State Elements I (12) Pearce, Summer 2010 © UCB Signals and Waveforms: Clocks Signals When digital is only treated as 1 or 0 Is transmitted over wires continuously Transmission is effectively instant -Implies that any wire only contains 1 value at a time

CS61C L14 Synchronous Digital Systems & State Elements I (13) Pearce, Summer 2010 © UCB Administrivia Midterm Friday 9:30am-12:30pm in 100 Lewis Remember to look at practice exams Lecture tomorrow is review. TA Eric will be leading. Discussion Monday is midterm recap This is a change to the posted schedule. My OH are now officially MTh 12-2 (extended by 1 hour each day) in 511 Soda. No Lab tomorrow. Instead, TA’s will be holding OH in the lab during that time. You can go to any TA’s office hours. This is 8 hours of OH for the TA’s (11am-7pm), plus my 2 hours!

CS61C L14 Synchronous Digital Systems & State Elements I (14) Pearce, Summer 2010 © UCB Signals and Waveforms

CS61C L14 Synchronous Digital Systems & State Elements I (15) Pearce, Summer 2010 © UCB Signals and Waveforms: Grouping

CS61C L14 Synchronous Digital Systems & State Elements I (16) Pearce, Summer 2010 © UCB Signals and Waveforms: Circuit Delay

CS61C L14 Synchronous Digital Systems & State Elements I (17) Pearce, Summer 2010 © UCB Type of Circuits Synchronous Digital Systems are made up of two basic types of circuits: Combinational Logic (CL) circuits Our previous adder circuit is an example. Output is a function of the inputs only. Similar to a pure function in mathematics, y = f(x). (No way to store information from one invocation to the next. No side effects) State Elements: circuits that store information.

CS61C L14 Synchronous Digital Systems & State Elements I (18) Pearce, Summer 2010 © UCB Circuits with STATE (e.g., register)

CS61C L14 Synchronous Digital Systems & State Elements I (19) Pearce, Summer 2010 © UCB Uses for State Elements 1. As a place to store values for some indeterminate amount of time: Register files (like $1-$31 on the MIPS) Memory (caches, and main memory) 2.Help control the flow of information between combinational logic blocks. State elements are used to hold up the movement of information at the inputs to combinational logic blocks and allow for orderly passage.

CS61C L14 Synchronous Digital Systems & State Elements I (20) Pearce, Summer 2010 © UCB 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.

CS61C L14 Synchronous Digital Systems & State Elements I (21) Pearce, Summer 2010 © UCB First try…Does this work? Nope! Reason #1… What is there to control the next iteration of the ‘ for ’ loop? Reason #2… How do we say: ‘ S=0 ’? Feedback XiXi

CS61C L14 Synchronous Digital Systems & State Elements I (22) Pearce, Summer 2010 © UCB Second try…How about this? Rough timing… Register is used to hold up the transfer of data to adder.

CS61C L14 Synchronous Digital Systems & State Elements I (23) Pearce, Summer 2010 © UCB Register Details…What’s inside? n instances of a “Flip-Flop” Flip-flop name because the output flips and flops between and 0,1 D is “data”, Q is “output” Also called “d-type Flip-Flop”

CS61C L14 Synchronous Digital Systems & State Elements I (24) Pearce, Summer 2010 © UCB What’s the timing of a Flip-flop? (1/2) 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:

CS61C L14 Synchronous Digital Systems & State Elements I (25) Pearce, Summer 2010 © UCB What’s the timing of a Flip-flop? (2/2) 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):

CS61C L14 Synchronous Digital Systems & State Elements I (26) Pearce, Summer 2010 © UCB Accumulator Revisited (proper 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.

CS61C L14 Synchronous Digital Systems & State Elements I (27) Pearce, Summer 2010 © UCB Accumulator Revisited (proper 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.

CS61C L14 Synchronous Digital Systems & State Elements I (28) Pearce, Summer 2010 © UCB 123 A: FFF B: FTF C: TFF D: TFT E: TTT Peer Instruction 1)SW can peek at HW (past ISA abstraction boundary) for optimizations 2)SW can depend on particular HW implementation of ISA 3)HW feedback akin to SW recursion ABCA: FFFB: FTFC: TFFD: TTFE: TTT ABCA: FFFB: FTFC: TFFD: TTFE: TTT

CS61C L14 Synchronous Digital Systems & State Elements I (29) Pearce, Summer 2010 © UCB Peer Instruction Answers 1)SW can peek at HW (past ISA abstraction boundary) for optimizations 2)SW can depend on particular HW implementation of ISA 3)HW feedback akin to SW recursion ABCA: FFFB: FTFC: TFFD: TTFE: TTT ABCA: FFFB: FTFC: TFFD: TTFE: TTT 123 A: FFF B: FTF C: TFF D: TFT E: TTT TRUE FALSE

CS61C L14 Synchronous Digital Systems & State Elements I (30) Pearce, Summer 2010 © UCB ISA is very important abstraction layer Contract between HW and SW Clocks control pulse of our circuits Voltages are analog, quantized to 0/1 Circuit delays are fact of life Two types of circuits: Stateless Combinational Logic (&,|,~) State circuits (e.g., registers) State elements are used to: Build memories Control the flow of information between other state elements and combinational logic D-flip-flops used to build registers Clocks tell us when D-flip-flops change Setup and Hold times important And in conclusion…

CS61C L14 Synchronous Digital Systems & State Elements I (31) Pearce, Summer 2010 © UCB Reference slides You ARE responsible for the material on these slides (they’re just taken from the reading anyway) ; we’ve moved them to the end and off-stage to give more breathing room to lecture!

CS61C L14 Synchronous Digital Systems & State Elements I (32) Pearce, Summer 2010 © UCB Sample Debugging Waveform