Download Computer Architecture and Organization Course at Princeton University and more Study Guides, Projects, Research Design and Analysis of Algorithms in PDF only on Docsity! 1 Lecture 1: Introduction COS 375 / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 2 The Usual Suspects Me: Prof. David August, 221 CS Building, august@ Office Hours: M/W after class and by appointment TAs: Bochao Wang, E-Quad C-319B, bochaow@ Office Hours: Th/F 10:30-11:30AM Debajit Bhattacharya, E-Quad C-319D, dbhattac@ Office Hours: T/Th 3-4PM Hansen Zhang, 241 CS Building, hansenz@ Office Hours: M/W 3-4PM Course Objectives • Enable you to design and build a computer • Get a lump of matter to do your bidding • Understand and evaluate tradeoffs in design • Appreciate theory vs. practice • Become a better implementer of algorithms • Learn assembly/machine language programming • Essential for OS and Compiler Work • Essential for understanding processor design • Understand modern Computer Organization • High-level languages -> execution on physical material • Help you to revolutionize computing • Discuss the latest research • Contribute some of our own? 4 1. Performance Evaluation • Measures of performance • Benchmarks and metrics 2. Instruction Set Architecture • Instruction formats & semantics • Addressing modes 3. Machine Arithmetic • ALU design • Integer multiplication & division • Floating-point arithmetic 4. Processor Design • Datapath design • Instruction exec. & sequencing • Hardwired & microcode control • Pipelining 5. Hardware Design Languages • Design with a Verilog • Modeling and simulation 6. Memory Hierarchy • Cache design & evaluation • Virtual addressing • Performance evaluation 7. Input/Output • Types of I/O devices • Device access and interface • Device control • I/O performance 8. Multiprocessor • Interconnection networks • Programming issues Course Topics 5 The Course Project • Groups of 4 students – Sign up in September • Work can be done anywhere • Project consists of two parts • ARM-based Instructions Set Simulator (in C) • Implementation of processor onto an FPGA (in Verilog) 6 Pick a number 1,2,3 If the random number is the picture of a processor, then we have a quiz. 7 Quizzes/Homework Quizzes • Chance quiz at the beginning of one class each week • Not intended as a scare tactic – liberally graded • Helps assess progress of class • Just one question usually Homework • 4 homework sets • Questions resemble exam questions 8 Exams • Exams cover concepts presented in the lecture material, homework assignments, and/or required readings • Sheet of paper allowed Midterm Exam • Wednesday before Fall Break • In class Final Exam • The final exam will be cumulative, three hours in length • Time/Place determined by the Registrar 19 Why Computer Architecture? 20 It’s a Wednesday: Pick a number 1,2,3 21 Quiz 0: Background (use index cards) Front: 1. Full name and Email Address above the red line 2. Major/UG or G/Year (immediately below the red line) 3. Area (G: Research Area/UG: Interests) 4. Briefly describe any C/C++ experience. 5. In which programming languages are you fluent? 6. What is a bit? Back: 1. What is an instruction cache? 2. What is the difference between a sequential and a combinational circuit? 3. What is a MUX? 4. Using AND, OR, and NOT gates design an XOR gate. 22 23 What is a Computer? Computers havent changed in over 50 years! • Universal Turing Machine Equivalence • Given enough time/memory, nothing new Computers have undergone enormous changes! • New applications enabled • New form factors Computers process information • Input/Output • State • Computation Dude, your get’n a… EDSAC Universal Turing Machine “Thin. Light. Epic.” 24 Modern Computer Organization • Where does the hard disk go? • Computer system design • Enable applications (speed, reliability, efficiency) • Reduce cost (die size, technology, time-to-market) • The Key: Manage Complexity! Processor Computer Control Datapath Memory Devices Input Output keyboard, mouse printer, speakers, monitor Connections for Information flow Coordination for proper operation 25 Abstraction • Separate implementation from specification • INTERFACE: specify the provided services. • IMPLEMENTATION: provide code or HW for operations. • CLIENT: code or HW that uses services. • Examples: ADTs • Principle of least privilege The Living Daylights: Bond and Saunders are in a house waiting for General Koskov to defect. Bond is preparing to shoot a sniper. Bond: What's your escape route? Saunders: Sorry old man. Section 26 paragraph 5, that information is on a need-to- know basis only. I'm sure you'll understand. 26 Intuition Client Interface - universal remote - volume - change channel - adjust picture - decode NTSC, PAL signals Implementation - cathode ray tube - electron gun - Sony Wega 36XBR250 - 241 pounds, $2,699 27 Intuition Client Interface - universal remote - volume - change channel - adjust picture - decode NTSC, PAL signals Implementation - gas plasma monitor - Pioneer PDP-502MX - wall mountable - 4 inches deep - $19,995 Can substitute better implementation without changing client! Interfaces in Computer Systems Instruction Set Architecture Applications Operating System FirmwareCompiler Instruction Set Processor I/O System Datapath & Control Digital Design Circuit Design Layout Software Hardware Hello World The Hello World Algorithm: 1. Emit Hello World 2. Terminate Java Program Hello World The Hello World Algorithm: 1. Emit Hello World 2. Terminate C Program Interfaces in Computer Systems Instruction Set Architecture Applications Operating System FirmwareCompiler Instruction Set Processor I/O System Datapath & Control Digital Design Circuit Design Layout Software Hardware 40 Physical Principles of Information • Fredkin-Toffoli axioms. E. F. Fredkin and T. Toffoli. Conservative logic. International Journal of Theoretical Physics, 21(3/4):219--253, 1982. • The speed of propagation of information is bounded. • Speed of light • No action at a distance – causal effects propagate thru local interactions • The amount of information which can be encoded in the state of a finite system is bounded. • Bounded by thermodynamical/quantum-mechanical considerations • It is possible to construct macroscopic, dissipative physical devices which perform in a recognizable and reliable way the logical functions AND, OR, and FAN-OUT. Physical Devices Control In Out As we will see later, choice of device is critical!! Layout/Circuit Design 4-bit Adder 43 Digital Design 4-bit Adder 44 Digital Design 4-bit Adder Digital Design 4-bit Adder x3 x2 x1 x0 y3 y2 y1 y0 z3 z2 z1 z0 + Datapath 1 PC + Memory W Data R Data Addr W IR t s d op Adder Datapath is a conduit for information flow through the processor Complete Datapath > 0 = 0 1 Memory W Data R Data Addr W 2 Registers W Data W Addr A Addr B Addr A Data B Data W 80 PC + Cond Eval IR t s d op pc for jal store data addr pc + 1 pc for branch, jump result of arithmetic, logic, or addr for load addr addr for loads, stores 3 A L U load 8 0 16 8 16 8 Adder 48 Control (from the back of a napkin) The Hardware/Software Interface Instruction Set Architecture Applications Operating System FirmwareCompiler Instruction Set Processor I/O System Datapath & Control Digital Design Circuit Design Layout Software Hardware The Instruction Set Architecture The vocabulary of commands • Defined by the Architecture (x86) • Implemented by the Machine (Pentium 4, 3.06 GHz) • An Abstraction Layer: The Hardware/Software Interface • Architecture has longevity over implementation • Example: add r1 = r2 + r3 (assembly) 001 001 010 011 (binary) Opcode (verb) Operands (nouns) 59 Slice of History – Intel Processors Pentium III • 9,5000,000 transistors • 125 mm2 • 450 MHz • Introduced in 1999 60 Slice of History – Intel Processors Core 2 Duo (Merom) • 293,000,000 transistors • 143 mm2 • 1.6 GHz - 3.16 GHz • Introduced in 2006 61 Slice of History – Intel Processors "Grove giveth and Gates taketh away." - Bob Metcalfe (inventor of Ethernet) Other Technology Trends • Processor • Logic Capacity: ~30% increase per year • Clock Rate: ~20% increase per year • Memory • DRAM Capacity: ~60% increase per year • Memory Speed: ~10% increase per year • Cost per Bit: ~25% decrease per year • Disk • Capacity: ~60% increase per year Trends… 64 Trends? Is computer architecture dead? One More Trend… • Intel 4004 (Thousands of transistors) • Number of Designers: 2 • Intel Core i7 (Billions of transistors) • Number of Designers: ~1500 • How does Intel manage so many designers on one project? • Architects • Microarchitects • Circuit designers • Validation • Software • This trend is exponential. What does this mean? Summary • Read Chapter 1 in H&P • Abstraction in HW and SW to manage complexity • ISA defines the Hardware Software Interface • Technology influences implementations… Poor choice of device technology:
The Vacuum Tube Supercomputer Centre
— -
Access from freeway
Private rail yard
CPU cooling towers
Bios Building
Central Processing Unit
Control Building
Bus Building
Power supply - 6 steam turbines
@ 18 GVA each
Cooling pond/ coal delivery
Network 1/0 Oil storage farm
Interface Building Control
Building #2 Buildings
http:/Avww.ominous-valve.com/vtsc.html