CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units 1 Instructors: Vladimir Stojanovic and Nicholas Weaver

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

CS61C L15 Representations of Combinatorial Logic Circuits (1) Garcia, Fall 2005 © UCB Lecturer PSOE, new dad Dan Garcia
CS 61C L13 Combinational Logic (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #13: Combinational.
CS 61C L29 Combinational Logic Blocks (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L23 Combinational Logic Blocks (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
CS61C L23 Combinational Logic Blocks (1) Garcia, Spring 2007 © UCB Salamander robot!  Swiss scientists have built a robot that can both swim and walk.
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 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 L17 Combinatorial Logic Blocks (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS61C L22 Representations of Combinatorial Logic Circuits (1) Eric, Spring 2010 © UCB Cal Alumni Wins 2009 Turing Award! Charles P. Thacker was named.
Give qualifications of instructors: DAP
CS61C L18 Combinational Logic Blocks, Latches (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
CS61C L23 Combinational Logic Blocks (1) Garcia, Fall 2006 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c UC.
CS 61C L23 Combinational Logic Blocks (1) Garcia, Fall 2004 © UCB slashdot.org/article.pl?sid=04/10/21/ &tid=126&tid=216 Lecturer PSOE Dan Garcia.
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.
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 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.
Instructor: Justin Hsia
CS 105 Digital Logic Design
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
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
CS61C L23 Synchronous Digital Systems (1) Garcia, Fall 2011 © UCB Senior Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
Chapter 6-1 ALU, Adder and Subtractor
CS61C L26 Combinational Logic Blocks (1) Garcia, Spring 2014 © UCB Very fast 3D Micro Printer  A new company called Nanoscribe has developed a fabrication.
CS 61C: Great Ideas in Computer Architecture Synchronous Digital Systems 1 Instructors: John Wawrzynek & Vladimir Stojanovic
Computer Organization and Design Lecture 16 – Combinational Logic Blocks Close call!   Cal squeaked by Washington in Overtime We win, and then.
CS3350B Computer Architecture Winter 2015 Lecture 5.4: Combinational Logic Blocks Marc Moreno Maza [Adapted from lectures.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
DLD Lecture 26 Finite State Machine Design Procedure.
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell 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.
CS 61C L4.1.1 Combinational Logic (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture Logic Gates and Combinational Logic
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
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 61C: Great Ideas in Computer Architecture Hardware intro, Digital Logic 1 Instructors: Nicholas Weaver & Vladimir Stojanovic
1 Lecture 24 Transistors A look ahead Course summary.
CS 110 Computer Architecture Lecture 9: Finite State Machines, Functional Units Instructor: Sören Schwertfeger School of.
CS 61C: Great Ideas in Computer Architecture MIPS Datapath 1 Instructors: Nicholas Weaver & Vladimir Stojanovic
Revisão de Circuitos Lógicos PARTE III. Review Use this table and techniques we learned to transform from 1 to another.
Flip Flops Lecture 10 CAP
Stateless Combinational Logic and State Circuits
State Circuits : Circuits that Remember
Instructor: Alexander Stoytchev
Inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #21 State Elements: Circuits that Remember Hello to James Muerle in the.
Instructors: Randy H. Katz David A. Patterson
Instructor: Justin Hsia
minecraft.gamepedia.com/Tutorials/Basic_Logic_Gates
Instructor Paul Pearce
Senior Lecturer SOE Dan Garcia
Lecturer SOE Dan Garcia
Hello to Casey Holgado listening from Oklahoma State!
robosavvy.com/forum/viewtopic.php?p=32542
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Inst.eecs.berkeley.edu/~cs61c CS61CL : Machine Structures Lecture #8 – State Elements, Combinational Logic Greet class James Tu, TA.
Instructor Paul Pearce
TA David “The Punner” Eitan Poll
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Instructor: Michael Greenbaum
Presentation transcript:

CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units 1 Instructors: Vladimir Stojanovic and 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

Maximum Clock Frequency What is the maximum frequency of this circuit? 3 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. 4

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) 5

Clickers – How was the midterm? Emotion Spectrum 6 AE

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 2ns AND delay 1ns 7

Finite State Machines (FSM) Intro A convenient way to conceptualize computation over time We start at a state and given an input, we follow some edge to another (or the same) state The function can be represented with a “state transition diagram”. With combinational logic and registers, any FSM can be implemented in hardware. 8

FSM Example: 3 ones… Draw the FSM… FSM to detect the occurrence of 3 consecutive 1’s in the input. Assume state transitions are controlled by the clock: on each clock cycle the machine checks the inputs and moves to a new state and produces a new output… Input/Output 9

Hardware Implementation of FSM + = ? … Therefore a register is needed to hold the a representation of which state the machine is in. Use a unique bit pattern for each state. Combinational logic circuit is used to implement a function that maps from present state and input to next state and output. 10

FSM Combinational Logic OutputNSInputPS Truth table… Specify CL using a truth table 11

Building Standard Functional Units Data multiplexers Arithmetic and Logic Unit Adder/Subtractor 12

Data Multiplexer (“Mux”) (here 2-to-1, n-bit-wide) 13

N instances of 1-bit-wide mux How many rows in TT? 14

How do we build a 1-bit-wide mux? 15

4-to-1 multiplexer? How many rows in TT? 16

Another way to build 4-1 mux? Hint: NCAA tourney! Ans: Hierarchically! 17

Arithmetic and Logic Unit Most processors contain a special logic block called the “Arithmetic and Logic Unit” (ALU) We’ll show you an easy one that does ADD, SUB, bitwise AND, bitwise OR 18

Our simple ALU 19

How to design Adder/Subtractor? Truth-table, then determine canonical form, then minimize and implement as we’ve seen before Look at breaking the problem down into smaller pieces that we can cascade or hierarchically layer 20

Adder/Subtractor – One-bit adder LSB… 21

Adder/Subtractor – One-bit adder (1/2)… 22

Adder/Subtractor – One-bit adder (2/2) 23

N 1-bit adders  1 N-bit adder What about overflow? Overflow = c n ? +++ b0b0 24

Extremely Clever Subtractor xyXOR(x,y) XOR serves as conditional inverter! 25

Clicker Question Convert the truth table to a boolean expression (no need to simplify): A: F = xy + x(~y) B: F = xy + (~x)y + (~x)(~y) C: F = (~x)y + x(~y) D: F = xy + (~x)y E: F = (x+y)(~x+~y) 26 xyF(x,y)

In Conclusion Finite State Machines have clocked state elements plus combinational logic to describe transition between states – Clocks synchronize D-FF change (Setup and Hold times important!) Standard combinational functional unit blocks built hierarchically from subcomponents 27