Caltech CS184 Winter2003 -- DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 5: January 17, 2003 What is required for Computation?

Slides:



Advertisements
Similar presentations
1/1/ /e/e eindhoven university of technology Microprocessor Design Course 5Z008 Dr.ir. A.C. (Ad) Verschueren Eindhoven University of Technology Section.
Advertisements

Caltech CS184a Fall DeHon1 CS184a: Computer Architecture (Structures and Organization) Day17: November 20, 2000 Time Multiplexing.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Caltech CS184a Fall DeHon1 CS184a: Computer Architecture (Structures and Organization) Day8: October 18, 2000 Computing Elements 1: LUTs.
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Computer ArchitectureFall 2007 © November 7th, 2007 Majd F. Sakr CS-447– Computer Architecture.
Caltech CS184a Fall DeHon1 CS184a: Computer Architecture (Structures and Organization) Day4: October 4, 2000 Memories, ALUs, and Virtualization.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
CS294-6 Reconfigurable Computing Day 3 September 1, 1998 Requirements for Computing Devices.
Computer ArchitectureFall 2007 © Sep 10 th, 2007 Majd F. Sakr CS-447– Computer Architecture.
Penn ESE Spring DeHon 1 FUTURE Timing seemed good However, only student to give feedback marked confusing (2 of 5 on clarity) and too fast.
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 5: January 24, 2007 ALUs, Virtualization…
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
Basic Operational Concepts of a Computer
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.
Caltech CS184b Winter DeHon 1 CS184b: Computer Architecture [Single Threaded Architecture: abstractions, quantification, and optimizations] Day3:
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Penn ESE534 Spring DeHon 1 ESE534: Computer Organization Day 9: February 24, 2014 Operator Sharing, Virtualization, Programmable Architectures.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
Multiple-bus organization
Caltech CS184b Winter DeHon 1 CS184b: Computer Architecture [Single Threaded Architecture: abstractions, quantification, and optimizations] Day14:
Processor: Datapath and Control
Caltech CS184 Winter DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 7: January 24, 2003 Instruction Space.
Caltech CS184 Spring DeHon 1 CS184b: Computer Architecture (Abstractions and Optimizations) Day 2: April 2, 2003 Instruction Set Architecture.
Computer Architecture And Organization UNIT-II General System Architecture.
Computer Science 101 Computer Systems Organization.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 13: February 20, 2002 Routing 1.
Computer Organization CDA 3103 Dr. Hassan Foroosh Dept. of Computer Science UCF © Copyright Hassan Foroosh 2002.
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Chapter 2 Parallel Hardware and Parallel Software An Introduction to Parallel Programming Peter Pacheco.
December 26, 2015©2003 Craig Zilles (derived from slides by Howard Huang) 1 A single-cycle MIPS processor  As previously discussed, an instruction set.
Computer Architecture Lecture 9 MIPS ALU and Data Paths Ralph Grishman Oct NYU.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
February 22, 2016©2003 Craig Zilles (derived from slides by Howard Huang) 1 A single-cycle MIPS processor  As previously discussed, an instruction set.
Instruction Sets. Instruction set It is a list of all instructions that a processor can execute. It is a list of all instructions that a processor can.
Caltech CS184 Winter DeHon CS184a: Computer Architecture (Structure and Organization) Day 4: January 15, 2003 Memories, ALUs, Virtualization.
Caltech CS184 Winter DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 11: January 31, 2005 Compute 1: LUTs.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations.
Datapath and control Dr. ir. A.B.J. Kokkeler 1. What is programming ? “Programming is instructing a computer to do something for you with the help of.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Computer Systems Nat 4/5 Computing Science Computer Structure:
Dr.Ahmed Bayoumi Dr.Shady Elmashad
What Computers Can and Cannot Do
Control Unit Operation
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
Basic Processing Unit Unit- 7 Engineered for Tomorrow CSE, MVJCE.
CSCE Fall 2013 Prof. Jennifer L. Welch.
Intel 8080 Processor The 8080 was an 8-bit processor
Chapter 5: Computer Systems Organization
ESE534: Computer Organization
Systems Architecture I
CSCE Fall 2012 Prof. Jennifer L. Welch.
Overview Last lecture Digital hardware systems Today
ESE 150 – Digital Audio Basics
ECE 352 Digital System Fundamentals
ESE534: Computer Organization
Basic components Instruction processing
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Caltech CS184 Winter DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 5: January 17, 2003 What is required for Computation?

Caltech CS184 Winter DeHon 2 Last Time Generalize compute elements/datapaths for reuse Instructions to tell datapaths how to behave Memories pack state compactly Memories can serve as programmable control Virtualize computing operators –store descript. and state compactly in memory –generalize and reuse datapath

Caltech CS184 Winter DeHon 3 Today Review Datapath Operation Memory –unbounded –impact on computability Computing Requirements (Review)

Caltech CS184 Winter DeHon 4 Defining Terms Computes one function (e.g. FP- multiply, divider, DCT) Function defined at fabrication time Computes “any” computable function (e.g. Processor, DSPs, FPGAs) Function defined after fabrication Fixed Function: Programmable:

Caltech CS184 Winter DeHon 5 Programmable Memory Control

Caltech CS184 Winter DeHon 6 Programmable Memory Control Use two memories as cheap dual- ported memory Read independently Write to both

Caltech CS184 Winter DeHon 7 Programming an Operation Consider:  C = (A+2B) & Cannot do this all at once But can do it in pieces

Caltech CS184 Winter DeHon 8 Programming an Operation Consider: C = (A+2B) &  Find a place for A, B, C A – slot 0 B – slot 1 C – slot – slot 4

Caltech CS184 Winter DeHon 9 Programming an Operation Consider: C = (A+2B) & Decompose into pieces Compute 2B Add A and 2B AND sum with mask

Caltech CS184 Winter DeHon 10 ALU Encoding Each operation has some bit sequence ADD 0000 SUB 0010 INV 0001 SLL 1110 SLR 1100 AND 1000

Caltech CS184 Winter DeHon 11 Programming an Operation Decompose into pieces Compute 2B Add A and 2B AND sum with mask Op w src1 src2 dst

Caltech CS184 Winter DeHon 12 Instruction Control Add a counter to sequence through operations

Caltech CS184 Winter DeHon 13 Programming the Operation Consider:  C = (A+2B) & Decompose into pieces Compute 2B Add A and 2B AND sum with mask Now becomes the task of filling in the memory

Caltech CS184 Winter DeHon 14 Instruction Control 000: : : Op w src1 src2 dst

Caltech CS184 Winter DeHon 15 Executing the Program To execute program –Keep track of state of machine 1.Value of counter 2.Contents of instruction memory 3.Contents of data memory

Caltech CS184 Winter DeHon 16 Machine State: Initial Counter: 0 Instruction Memory: 000: : : Data Memory: 000: A 001: B 010: ? 011: ? 100: : ? 110: ? 111: ?

Caltech CS184 Winter DeHon 17 First Operation Counter: 0 Instruction Memory: 000: : : Data Memory: 000: A 001: B 010: ? 011: ? 100: : ? 110: ? 111: ?

Caltech CS184 Winter DeHon 18 First Operation Complete Counter: 0 Instruction Memory: 000: : : Data Memory: 000: A 001: B 010: 2B 011: ? 100: : ? 110: ? 111: ?

Caltech CS184 Winter DeHon 19 Update Counter Counter: 1 Instruction Memory: 000: : : Data Memory: 000: A 001: B 010: 2B 011: ? 100: : ? 110: ? 111: ?

Caltech CS184 Winter DeHon 20 Second Operation Counter: 1 Instruction Memory: 000: : : Data Memory: 000: A 001: B 010: 2B 011: ? 100: : ? 110: ? 111: ?

Caltech CS184 Winter DeHon 21 Second Operation Complete Counter: 1 Instruction Memory: 000: : : Data Memory: 000: A 001: B 010: 2B 011: A+2B 100: : ? 110: ? 111: ?

Caltech CS184 Winter DeHon 22 Update Counter Counter: 2 Instruction Memory: 000: : : Data Memory: 000: A 001: B 010: 2B 011: A+2B 100: : ? 110: ? 111: ?

Caltech CS184 Winter DeHon 23 Third Operation Counter: 2 Instruction Memory: 000: : : Data Memory: 000: A 001: B 010: 2B 011: A+2B 100: : ? 110: ? 111: ?

Caltech CS184 Winter DeHon 24 Third Operation Complete Counter: 2 Instruction Memory: 000: : : Data Memory: 000: A 001: B 010: 2B 011: A+2B 100: : ? 110: ? 111: (A+2B) & …

Caltech CS184 Winter DeHon 25 Result Can sequence together primitive operations in time Communicating state through memory To perform “arbitrary” operations

Caltech CS184 Winter DeHon 26 “Any” Computation? (Universality) Any computation which can “fit” on the programmable substrate Limitations: hold entire computation and intermediate data

Caltech CS184 Winter DeHon 27 Motivating Questions What is required for recursion? What is the role of –new –malloc –cons

Caltech CS184 Winter DeHon 28 Consider –routine to produce an n-element vector sum –downloading an image off the web –decompressing a downloaded file –read input string from user

Caltech CS184 Winter DeHon 29 “Any” Computation Computation can be of any size Consider UTM with unbounded input tape to describe computation

Caltech CS184 Winter DeHon 30 Computation Evolves During Execution Conventional think: –program graph unfolds with procedure calls thread spawns –unfold state with new malloc

Caltech CS184 Winter DeHon 31 Computing Evolves During Execution What’s happening? –new, malloc -- allocating new state for virtual operators –procedure calls and spawns -- unfolding the actual compute graph from a range of possible graphs –use computation to define the computation

Caltech CS184 Winter DeHon 32 Example: Contrast Vsum(a,b) –c = new int[a.length()]; –for(I=0;I<a.length();I++) c[I]=a[I]+b[I]; –return(c) Vsum4(a,b,c) –c[0]=a[0]+b[0]; –c[1]=a[1]+b[1]; –c[2]=a[2]+b[2]; –c[3]=a[3]+b[3];

Caltech CS184 Winter DeHon 33 Computation: vsum4 Vsum4(a,b,c) –c[0]=a[0]+b[0]; –c[1]=a[1]+b[1]; –c[2]=a[2]+b[2]; –c[3]=a[3]+b[3];

Caltech CS184 Winter DeHon 34 Computation: vsum Vsum(a,b) –c = new int[a.length()]; –for(I=0;I<a.length();I++) c[I]=a[I]+b[I]; –return(c)

Caltech CS184 Winter DeHon 35 Compute Vsum4 on datapath Vsum4(a,b,c) –c[0]=a[0]+b[0]; –c[1]=a[1]+b[1]; –c[2]=a[2]+b[2]; –c[3]=a[3]+b[3]; Put A’s in A, B’s in B Store C’s in A at end. ADD 0,0  0 ADD 1,1  1 ADD 2,2  2 ADD 3,3  3

Caltech CS184 Winter DeHon 36 Compute Vsum4 Vsum4(a,b,c) –c[0]=a[0]+b[0]; –c[1]=a[1]+b[1]; –c[2]=a[2]+b[2]; –c[3]=a[3]+b[3]; ADD 0,0  0 ADD 1,1  1 ADD 2,2  2 ADD 3,3  3 Op w src1 src2 dst 000: : : :

Caltech CS184 Winter DeHon 37 Compute Vsum Vsum(a,b) –c = new int[a.length()]; –for(I=0;I<a.length();I++) c[I]=a[I]+b[I]; –return(c)

Caltech CS184 Winter DeHon 38 Compute Vsum Vsum(a,b) –c = new int[a.length()]; –for(I=0;I<a.length();I++) c[I]=a[I]+b[I]; –return(c) Can’t do it. Must be able to apply operations to arbitrary data. Must run data dependent set of ops.

Caltech CS184 Winter DeHon 39 Add Branching

Caltech CS184 Winter DeHon 40 Add Data Indirect

Caltech CS184 Winter DeHon 41 Add Data Indirect Instr: ALUOP Bsel Write Bsrc Asrc DST Baddr

Caltech CS184 Winter DeHon 42 New Ops Important new operations: –DST  B[Asrc] –B[Asrc]  Bsrc Instr: ALUOP Bsel Write Bsrc Asrc DST Baddr B r 1 xxx Asrc DST xxx Instr: ALUOP Bsel Write Bsrc Asrc DST Baddr B w 1 Bsrc Asrc xxx xxx

Caltech CS184 Winter DeHon 43 Compute Vsum Vsum(a,b) –c = new int[a.length()]; –for(I=0;I<a.length();I++) c[I]=a[I]+b[I]; –return(c) a, b addresses in Bmem Values at offset 0, 1, … length Length at offset -1 a, b in slots 0, 1 respectively Put c in slot 2 top unallocated memory in slot 3

Caltech CS184 Winter DeHon 44 Compute Vsum Vsum(a,b) –c = new int[a.length()]; –for(I=0;I<a.length();I++) c[I]=a[I]+b[I]; –return(c) // allocate c Slot 2  Slot 3 // start at top mem Slot 4  SUB Slot 1, #1 // a-1 Slot 4  [Slot 4] // read a.length Slot 3  Slot 3 + Slot 4 // increase Slot 3  Slot // +1 length [Slot 2]  Slot 4 // store length Slot 2  Slot // incr past len

Caltech CS184 Winter DeHon 45 Compute Vsum Vsum(a,b) –c = new int[a.length()]; –for(I=0;I<a.length();I++) c[I]=a[I]+b[I]; –return(c) Plan: 4: a.length (already there) 5: i 6: cptr 7: aptr 8: bptr

Caltech CS184 Winter DeHon 46 Compute Vsum Vsum(a,b) –c = new int[a.length()]; –for(I=0;I<a.length();I++) c[I]=a[I]+b[I]; –return(c) Slot 5  #0 // initialize I Slot 6  Slot 2 // cptr Slot 7  Slot 0 // aptr Slot 8  Slot 1 // bptr Plan: 4: a.length 5: i 6: cptr 7: aptr 8: bptr

Caltech CS184 Winter DeHon 47 Compute Vsum Vsum(a,b) –c = new int[a.length()]; –for(I=0;I<a.length();I++) c[I]=a[I]+b[I]; –return(c) Loop: Slot 9  SUB Slot 4, Slot 5 BRZ Slot 9 End Slot 10  [Slot 7] // a[I] Slot 11  [Slot 8] // b[I] Slot 10  Slot 10+Slot 11 [Slot 6]  Slot 10 // c[I] Slot 6  Slot 6 + #1 Slot 7  Slot 7 + #1 Slot 8  Slot 7 + #1 Slot 5  Slot 5 + #1 BRZ #0 Loop: End: Plan: 4: a.length 5: i 6: cptr 7: aptr 8: bptr

Caltech CS184 Winter DeHon 48 Memory Function Allow unbounded computation Allow computational graph to evolve during computation

Caltech CS184 Winter DeHon 49 Computational Strength With memory appropriately arranged: –can now compute unbounded computations –…but finite As close as we’ll come to a Turing Machine

Caltech CS184 Winter DeHon 50 Computing Capability Review Gates: –boolean logic –finite functions Gates and registers: –Finite Automata –some infinite functions Memories with allocation –unbounded functions –TM w/in the limits of available memory

Caltech CS184 Winter DeHon 51 Computing Requirements (review)

Caltech CS184 Winter DeHon 52 Requirements In order to build a general-purpose (programmable) computing device, we absolutely must have? –_

Caltech CS184 Winter DeHon 53

Caltech CS184 Winter DeHon 54 Primitive compute elements enough?

Caltech CS184 Winter DeHon 55

Caltech CS184 Winter DeHon 56

Caltech CS184 Winter DeHon 57 Compute and Interconnect

Caltech CS184 Winter DeHon 58 Sharing Interconnect Resources

Caltech CS184 Winter DeHon 59 Sharing Interconnect and Compute Resources What role are the memories playing here?

Caltech CS184 Winter DeHon 60 Memory block or Register File Interconnect: moves data from input to storage cell; or from storage cell to output.

Caltech CS184 Winter DeHon 61 What do I need to be able to use this circuit properly? (reuse it on different data?)

Caltech CS184 Winter DeHon 62

Caltech CS184 Winter DeHon 63 Requirements In order to build a general-purpose (programmable) computing device, we absolutely must have? –Compute elements –Interconnect: space –Interconnect: time (retiming) –Interconnect: external (IO) –Instructions

Caltech CS184 Winter DeHon 64 Admin MLK Monday Next Class Wed. –Assignment turnin Wed. OK

Caltech CS184 Winter DeHon 65 Big Ideas [MSB Ideas] Basic elements of a programmable computation –Compute –Interconnect (space and time, outside system [IO]) –Instructions For unbounded computation –computational graph evolve/computed by computation

Caltech CS184 Winter DeHon 66 Big Ideas [MSB-1 Ideas] Two key functions of memory –retiming –instructions description of computation