Duke Compsci 220 / ECE 252 Advanced Computer Architecture I Prof. Alvin R. Lebeck Unit 0: Introduction Slides developed by Amir Roth of University of Pennsylvania with sources that included University of Wisconsin slides by Mark Hill, Guri Sohi, Jim Smith, and David Wood. Slides enhanced by Milo Martin, Mark Hill, Alvin Lebeck, Dan Sorin, and David Wood with sources that included Profs. Asanovic, Falsafi, Hoe, Lipasti, Shen, Smith, Sohi, Vijaykumar, and Wood Compsci 220 / ECE 252 (Lebeck): Introduction 1 Instructors • Prof: Alvin Lebeck Office: D308 LSRC Hours: Tues 1:30 – 2:30, Wed 2:00-3:00 or by appointment (email) email: alvy@cs.duke.edu • Teaching Assistant (s) Vali Pistol Office: D339 Hours: TBD or by appointment email: pistol@cs.duke.edu John Ingalls Hours: TBD or by appointment Email: john.ingalls@duke.edu Compsci 220 / ECE 252 (Lebeck): Introduction 2 Course Components • Reading Materials Computer Architecture: A Quantitative Approach by Hennessy and Patterson, 4th Edition Recent research papers (on course website) • Homework 5 or 6 homework assignments, performed in groups of 2 • Term Project Groups of 2 or 3 • Exams Midterm and final exam Compsci 220 / ECE 252 (Lebeck): Introduction 3 Administrative (Grading) • 25% Homeworks (must be done in pairs w/ statement) 4 to 6 Homeworks Late < 1 day = 50% Late > 1 day = zero • 50% Examinations (Midterm 20% + Final 30%) • 25% Research Project (work in groups of 3) No late term projects • Academic Misconduct University policy will be followed strictly Zero tolerance for cheating and/or plagiarism • This course requires hard work. Compsci 220 / ECE 252 (Lebeck): Introduction 4 Administrative (Continued) • Midterm Exam: In class (75 min) closed book • Final Exam: (3 hours) closed book • Big class, if you are going to drop, please do so early. Compsci 220 / ECE 252 (Lebeck): Introduction 5 Administrative (Continued) • Course Web Page • http://www.cs.duke.edu/courses/cps220/fall10 Lectures posted there shortly before class (pdf) Homework posted there General information about course Blackboard Posting Grades only • Course Forum Google groups – you will receive invite later this week Use it to 1. read announcements/comments on class or homework, 2. ask questions (help), 3. communicate with each other. Compsci 220 / ECE 252 (Lebeck): Introduction 6 Reading • H&P Chapter 1 • Papers Power a First-Class Architectural Design Constraint A Case for Energy-Proportional Computing • After those: • Start: Appendix A (pipelining) Compsci 220 / ECE 252 (Lebeck): Introduction 7 What you should Expect from Course • Things NOT to expect in this course: 100% of class = me lecturing to you Homework sets and exams where every question is either quantitative or has a single correct answer • Things to expect in this course: Active discussions/arguments about architecture ideas Essay questions Being asked to explain, discuss, defend, and argue Questions with multiple possible answers Compsci 220 / ECE 252 (Lebeck): Introduction 8 Expected Background • Who’s in this class? PhD, MS, undergrad from Comp Sci, ECE, & other From all over the world… • Courses you should have taken already Basic architecture (Compsci 104 / ECE 152 or equivalent) Programming (our simulator is in C) Basic OS (Compsci 110 / ECE 153) — not critical, but helpful • Topics you should remember fondly - I will not cover these in detail in this course Instruction sets, computer arithmetic, assembly programming, I/O Compsci 220 / ECE 252 (Lebeck): Introduction 9 Term Project • This is a semester-long research project Do not expect to do whole thing in last week… I will likely define a default project, but many students choose to pursue their own ideas Project proposals due Thursday, October 14 • You may “combine” this project with a project from another class, but you MUST consult with me first • You must absolutely, positively reference prior work Do not copy text from any source (paper, book, internet, etc.) Please ask me if you have ANY questions Not knowing != valid excuse Now on to computer architecture … Compsci 220 / ECE 252 (Lebeck): Introduction 10 What is Computer Architecture? • “Computer Architecture is the science and art of selecting and interconnecting hardware components to create computers that meet functional, performance and cost goals.” - WWW Computer Architecture Page • An analogy to architecture of buildings… Compsci 220 / ECE 252 (Lebeck): Introduction 11 What is Computer Architecture? The role of a building architect: Construction Materials Steel Concrete Brick Wood Glass Plans Design Goals Function Cost Safety Ease of Construction Energy Efficiency Fast Build Time Aesthetics Compsci 220 / ECE 252 (Lebeck): Introduction Buildings Houses Offices Apartments Stadiums Museums 12 What is Computer Architecture? The role of a computer architect: “Technology” Logic Gates SRAM DRAM Circuit Techniques Packaging Magnetic Storage Flash Memory Manufacturing Plans Design Goals Function Performance Reliability Cost/Manufacturability Energy Efficiency Time to Market Computer PCs Servers PDAs Mobile Phones Supercomputers Game Consoles Embedded Three important differences: age (~60 years vs thousands), rate of change, automated mass production (magnifies design) Compsci 220 / ECE 252 (Lebeck): Introduction 13 Design Goals • Functional Needs to be correct What functions should it support (Turing completeness aside) • Reliable Does it continue to perform correctly? Hard fault vs transient fault Google story - memory errors and sun spots Space probe vs PC reliability • High performance “Fast” is only meaningful in the context of a set of important tasks Not just “Gigahertz” Impossible goal: fastest possible design for all programs Compsci 220 / ECE 252 (Lebeck): Introduction 14 Design Goals • Low cost Per unit manufacturing cost (wafer cost) Cost of making first chip after design (mask cost) Design cost (huge design teams, why? Two reasons…) • Low power Energy in (battery life, cost of electricity) Energy out (cooling and related costs) Static vs dynamic power, sleep modes, peak vs average Cyclic problem, very much a problem today • Challenge: balancing the relative importance of these goals And the balance is constantly changing Compsci 220 / ECE 252 (Lebeck): Introduction 15 Constant Change “Technology” Logic Gates SRAM DRAM Circuit Techniques Packaging Magnetic Storage Flash Memory Goals Function Performance Reliability Cost/Manufacturability Energy Efficiency Time to Market Applications/Domains PCs Servers PDAs Mobile Phones Supercomputers Game Consoles Embedded • Absolute improvement, different rates of change, cyclic • Better computers help design the next generation (CAD) Compsci 220 / ECE 252 (Lebeck): Introduction 16 Rapid Change 1971–1980 1981–1990 1991–2000 Transistors (M) 2008 2015 0.01–0.1 0.1–1 1–100 300-1000 10000? Clock (MHz) 0.2–2 2–20 20–1000 3500 10000? MIPS <0.2 0.2–20 20–2000 16000 100000? • Exciting: perhaps the fastest moving field … ever Processors vs. cars o 1985: processors = 1 MIPS, cars = 60 MPH o 2000: processors = 500 MIPS, cars = 30,000 MPH? What if cars crashed as often as computers? • Computation is driving most, if not all, fields Natural and physical sciences, social sciences, journalism, etc. Compsci 220 / ECE 252 (Lebeck): Introduction 17 First Microprocessor • Connect a few transistors together to make… • Intel 4004 • 1971 (first microprocessor) • • • • • • Compsci 220 / ECE 252 (Lebeck): Introduction 4-bit data 2300 transistors 10 mm PMOS 108 KHz 12 V 13 mm2 18 More Recent Microprocessor • Or a few more to form… • Intel Pentium4 + HT • 2003 • • • • • • Compsci 220 / ECE 252 (Lebeck): Introduction 32/64-bit data 55M transistors 0.90 mm CMOS 3.4 GHz 1.2 V 101 mm2 19 By end of course, this will make sense! • Pentium 4 specifications: what do each of these mean? Technology o 55M transistors, 0.90 mm CMOS, 101 mm2, 3.4 GHz, 1.2 V Performance o 1705 SPECint, 2200 SPECfp ISA o X86+MMX/SSE/SSE2/SSE3 (X86 translated to RISC uops inside) Memory hierarchy o 64KB 2-way insn trace cache, 16KB D$, 512KB–2MB L2 o MESI-protocol coherence controller, processor consistency Pipeline o 22-stages, dynamic scheduling/load speculation, MIPS renaming o 1K-entry BTB, 8Kb hybrid direction predictor, 16-entry RAS o 2-way hyper-threading Compsci 220 / ECE 252 (Lebeck): Introduction 20 A recently announced processor • Sun Rock Compsci 220 / ECE 252 (Lebeck): Introduction 16 Microcores 1-2 threads per core 8 x 32KB L1D$ 4 x 32KB L1I$ 2MB L2$ 16MB L3$ 48 GB/s memory B/W 2.1 GHz 296 mm^2 321 million transistors 250W power Available 2H2009 21 Layers of abstraction • Architects need to understand computers at many levels Instruction Set Architecture Microarchitecture Systems Architecture Technology Applications • Good architects are “Jacks of most trades” Compsci 220 / ECE 252 (Lebeck): Introduction 22 Instruction Set Architecture • Hardware/Software interface Software impact o support OS functions OP • restartable instructions • memory relocation and protection o R2 R3 imm a good compiler target • simple • orthogonal o R1 OP M1 R1 M2 R2 imm2 Dense • Improve memory performance M3 R3 imm2 Hardware impact o admits efficient implementation • across generations o admits parallel implementation • no ‘serial’ bottlenecks Abstraction without interpretation Compsci 220 / ECE 252 (Lebeck): Introduction 23 Microarchitecture • Implement instruction set • Register-transfer-level (RTL) design • Exploit capabilities of technology Instr. Cache PC locality and concurrency • Iterative process generate proposed architecture estimate cost measure performance IR Compsci 220 / ECE 252 (Lebeck): Introduction C deep pipelining multiple issue dynamic scheduling branch prediction/speculation Regs A B • Still emphasis is on overcoming sequential nature of programs 24 System-Level Design • • • Design at the level of processors, memories, and interconnect. More important to application performance, cost and power than CPU (core) design Feeds and speeds constrained by IC pin count, module pin count, and signaling rates • System balance for a particular application • P 400MHz Dual Issue 16Bytes x 200MHz SW Display Net I/O Disk Driven by performance/cost goals available components (cost/perf) technology constraints M Compsci 220 / ECE 252 (Lebeck): Introduction M M M 25 Large-system example • • • • • Google Project 02: Oregon/Washington border Cheap electricity: Columbia river Cheap cooling: Columbia river Cheap b/w: surplus optic network from tech-boom era Google, Yahoo, and Microsoft Compsci 220 / ECE 252 (Lebeck): Introduction 26 Technology Trends • Processor (SRAM) Density: ~30%, Speed: ~20% • Memory (DRAM) Density: ~60%, Speed: ~4% • Disk Density: ~60%, Speed: ~10% • Changing quickly and with respect to each other!! Fundamentally changes design Different tradeoffs • Exciting: constant re-evaluation and re-design Compsci 220 / ECE 252 (Lebeck): Introduction 27 Shaping Force: Applications/Domains • Another shaping force: applications Applications and application domains have different requirements o Domain: group with similar character Lead to different designs • Scientific: weather prediction, genome sequencing First computing application domain: naval ballistics firing tables Need: large memory, heavy-duty floating point Examples: CRAY T3E, IBM BlueGene • Commercial: database/web serving, e-commerce Need: data movement, high memory + I/O bandwidth Examples: Sun Enterprise Server, AMD Opteron, Intel Xeon, IBM Power 6 Compsci 220 / ECE 252 (Lebeck): Introduction 28 More Recent Applications/Domains • Desktop: home office, multimedia, games Need: integer, memory bandwidth, integrated graphics/network? Examples: Intel Core 2, AMD Athlon • Mobile: laptops Need: low power, integer performance, integrated wireless? Examples: Intel PentiumM • Embedded: PDAs, cell phones, automobiles, door knobs Need: low power, low cost, integrated DSP? Examples: Intel StrongARM, X-Scale, Transmeta TM3200 • Sensors: disposable “smart dust” Need: extremely low power, extremely low cost Compsci 220 / ECE 252 (Lebeck): Introduction 29 Application Specific Designs • This course is mostly about general-purpose CPUs CPU that can do anything, specifically run a full OS E.g., Intel Core i3, i5, IBM Power6, AMD Opteron, Intel Itanium • Large, profitable segment of application-specific CPUs Implement some critical domain-specific functionality in hardware o Graphics engines, physics engines + Much more effective (performance, power, cost) than software + General rule: hardware is better than software Examples: may or may not get to o Emotion engine (PS2/PSX), Samsung phone, HDTV, iPod… Compsci 220 / ECE 252 (Lebeck): Introduction 30 Why Study Computer Architecture? • Understand where computers are going Future capabilities drive the computing world Forced to think 5+ years in the future • Exposure to high-level design Less about “design” than “what to design” Engineering, science, art Architects paint with broad strokes The best architects understand all the levels o Devices, circuits, architecture, compilers, applications • Understand hardware for software tuning • Real-world impact no computer architecture no computers! • Get a job (design or research) Compsci 220 / ECE 252 (Lebeck): Introduction 31 Some Course Goals • Exposure to the “big ideas” in computer architecture • Exposure to examples of good (and some bad) engineering • Understanding computer performance and metrics Empirical evaluation Understanding quantitative data and experiments • “Research” exposure Read research literature (i.e., papers) Course project Cutting edge proposals • Non-goals: “how computers work”, detailed design • Let’s look at course home page… Compsci 220 / ECE 252 (Lebeck): Introduction 32