duke compsci 220 / ece 252 advanced computer architecture i prof. alvin r. lebeck unit 0:...
TRANSCRIPT
Duke Compsci 220 / ECE 252Advanced Computer
Architecture I
Prof. Alvin R. Lebeck
Unit 0: Introduction
Compsci 220 / ECE 252 (Lebeck): Introduction 1
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
2
Instructors
• Prof: Alvin LebeckOffice: D308 LSRCHours: Tues 1:30 – 2:30, Wed 2:00-3:00 or by appointment (email)email: [email protected]
• Teaching Assistant (s)Vali PistolOffice: D339Hours: TBD or by appointmentemail: [email protected] IngallsHours: TBD or by appointmentEmail: [email protected]
Compsci 220 / ECE 252 (Lebeck): Introduction
3
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
4
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
5
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
6
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
7
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
8
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
9
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
10
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
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?
Compsci 220 / ECE 252 (Lebeck): Introduction 12
Plans
The role of a building architect:
MaterialsSteel
ConcreteBrickWoodGlass Goals
FunctionCost
SafetyEase of Construction
Energy EfficiencyFast Build Time
Aesthetics
BuildingsHousesOffices
ApartmentsStadiumsMuseums
Design
Construction
What is Computer Architecture?
Compsci 220 / ECE 252 (Lebeck): Introduction 13
Plans
The role of a computer architect:
“Technology”Logic Gates
SRAMDRAM
Circuit TechniquesPackaging
Magnetic StorageFlash Memory
GoalsFunction
PerformanceReliability
Cost/ManufacturabilityEnergy EfficiencyTime to Market
ComputerPCs
ServersPDAs
Mobile PhonesSupercomputersGame Consoles
Embedded
Design
Manufacturing
Three important differences: age (~60 years vs thousands), rate of change, automated mass production (magnifies design)
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
• Absolute improvement, different rates of change, cyclic• Better computers help design the next generation (CAD)
Compsci 220 / ECE 252 (Lebeck): Introduction 16
“Technology”Logic Gates
SRAMDRAM
Circuit TechniquesPackaging
Magnetic StorageFlash Memory
Applications/DomainsPCs
ServersPDAs
Mobile PhonesSupercomputersGame Consoles
EmbeddedGoals
FunctionPerformance
ReliabilityCost/Manufacturability
Energy EfficiencyTime to Market
Rapid Change
• Exciting: perhaps the fastest moving field … ever Processors vs. cars
o 1985: processors = 1 MIPS, cars = 60 MPHo 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
1971–1980
1981–1990
1991–2000
2008 2015
Transistors (M)
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?
First Microprocessor
• Connect a few transistors together to make…
Compsci 220 / ECE 252 (Lebeck): Introduction 18
• Intel 4004• 1971 (first
microprocessor)
• 4-bit data• 2300 transistors• 10 mm PMOS• 108 KHz• 12 V• 13 mm2
More Recent Microprocessor
• Or a few more to form…
Compsci 220 / ECE 252 (Lebeck): Introduction 19
• Intel Pentium4 + HT• 2003
• 32/64-bit data• 55M transistors• 0.90 mm CMOS• 3.4 GHz• 1.2 V• 101 mm2
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 hierarchyo 64KB 2-way insn trace cache, 16KB D$, 512KB–2MB L2o MESI-protocol coherence controller, processor consistency
Pipelineo 22-stages, dynamic scheduling/load speculation, MIPS
renamingo 1K-entry BTB, 8Kb hybrid direction predictor, 16-entry RASo 2-way hyper-threading
Compsci 220 / ECE 252 (Lebeck): Introduction 20
A recently announced processor
• Sun Rock 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
Compsci 220 / ECE 252 (Lebeck): Introduction 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 impacto support OS functions
• restartable instructions• memory relocation and
protectiono a good compiler target
• simple• orthogonal
o Dense• Improve memory performance
Hardware impacto admits efficient implementation
• across generationso admits parallel implementation
• no ‘serial’ bottlenecksAbstraction without interpretation
Compsci 220 / ECE 252 (Lebeck): Introduction 23
OP R1 R2 R3 imm
OP R1M1 imm2R2M2
R3M3 imm2
Microarchitecture• Implement instruction set • Register-transfer-level (RTL)
design • Exploit capabilities of
technology locality and concurrency
• Iterative process generate proposed architecture estimate cost measure performance
• Still emphasis is on overcoming sequential nature of programs deep pipelining multiple issue dynamic scheduling branch prediction/speculation
Compsci 220 / ECE 252 (Lebeck): Introduction 24
Regs
Instr.Cache
IR
PC
BA
C
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
• Driven by performance/cost goals available components
(cost/perf) technology constraints
Compsci 220 / ECE 252 (Lebeck): Introduction 25
P
SW
400MHzDual Issue
16Bytes x 200MHz
I/O
M M M M
Disk
Net
Display
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 requirementso 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