Lecturer: Watis Leelapatra Office: 4301D Email: [email protected]/courses/188322/lecture1-0.pdf ·...

34
188 322 Computer Architecture Lecturer: Watis Leelapatra Office: 4301D Email: [email protected] Course Webpage http://gear.kku.ac.th/~watis/courses/188322/188322.html

Transcript of Lecturer: Watis Leelapatra Office: 4301D Email: [email protected]/courses/188322/lecture1-0.pdf ·...

Page 1: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

188 322 Computer Architecture

Lecturer: Watis LeelapatraOffice: 4301DEmail: [email protected]

Course Webpage

http://gear.kku.ac.th/~watis/courses/188322/188322.html

Page 2: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

188 322 Computer Architecture

Grading Policy

Midterm Exam 40%Final Exam 40%Quiz (End of each Chapter) 20%

Page 3: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Text Books

References:

1. Patterson, D. A. and Hennessy, J. L, , Computer Organization and Design 2nd Ed., Morgan Kaufmann, 1998.

2. Etc., (Any text books related to discussed topics in class)

Page 4: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

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. Computer architecture is not about using computers to design buildings.

Page 5: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

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• The best architects understand all the levels• Devices, circuits, architecture, compilers, applications

• Understand hardware for software tuning• Real-world impact

• no computer architecture, no computers !• Get a job / higher study

Page 6: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

What will we learn in this course?

• Review of essential background in digital logic & uP• Learning from A GOOD Design (MIPS CPU)• Work with MIPS CPU Simulator

Page 7: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Historical Perspective

° Decade of 70’s (Microprocessors)

Programmable Controllers

Single Chip Microprocessors

Personal Computers

° Decade of 80’s (RISC Architecture) Instruction Pipelining

Fast Cache Memories

Compiler Optimizations

° Decade of 90’s (Instruction Level Parallelism) Superscalar Processors

Aggressive Code Scheduling

Low Cost Supercomputing

Out of Order Execution

Page 8: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Technology => dramatic change

° Processor• logic capacity: about 30% per year

• clock rate: about 20% per year

° Memory• DRAM capacity: about 60% per year (4x every 3 years)

• Memory speed: about 10% per year

• Cost per bit: improves about 25% per year

° Disk• capacity: about 60% per year

Page 9: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Technology => Dramatic Change

° Processor• 2X in performance every 1.5 years; 1000X performance in last

decade

° Main Memory• DRAM capacity: 2x / 2 years; 1000X size in last decade

• Cost/bit: improves about 25% per year

° Disk• capacity: > 2X in size every 1.5 years

• Cost/bit: improves about 60% per year

• 120X size in last decade

Page 10: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Technology => Dramatic Change

° Moore’s LawGordon Earle Moore: Co-founder & former Chairman of Intel Corp.

describes an important trend in the history of computer hardware

that the number of transistors that can be placed on an integrated circuit is doubling approximately every two years.

Page 11: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Year

1000

10,000

100,000

1,000,000

10,000,000

100,000,000

1970 1975 1980 1985 1990 1995 2000

i80386

i4004

i8080

Pentium

i80486

i80286

i8086

Trends: Microprocessor Capacity

2X transistors/ChipEvery 1.5 years

Called “Moore’s Law”:

Alpha 21264: 15 millionPentium Pro: 5.5 millionPowerPC 620: 6.9 millionAlpha 21164: 9.3 millionSparc Ultra: 5.2 million

Moore’s Lawtransistors

Page 12: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last
Page 13: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Trends: Memory Capacity (1 Chip DRAM)

YearB

its

1,000

10,000

100,000

1,000,000

10,000,000

100,000,000

1,000,000,000

1970 1975 1980 1985 1990 1995 2000

year size(Megabit)

1980 0.0625

1983 0.25

1986 1

1989 4

1992 16

1996 64

2000 256

Now 1.4X/yr, or doubling every 2 years

° DRAM: Dynamic Random Access Memory• where programs live while running; volatile (contrast with disk memory)

Page 14: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Trends: Processor Performance

0100200300400500600700800900

87 88 89 90 91 92 93 94 95 96 97

DEC Alpha 21264/600Intel VC820 (Pentium III, 1.0 GHz)

DEC Alpha 5/500

DEC Alpha 5/300

DEC Alpha 4/266

IBM POWER 100

DEC AXP/500

HP 9000/750

Sun-4/

260

IBMRS/

6000

MIPS M/

120

MIPS M

2000

1.54x/year

10001100

Page 15: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Why Study Computer Architecture

° Aren’t they fast enough already?• Are they?

• Fast enough to do everything we will EVER want?

- AI, protein sequencing, graphics

• Is speed the only goal?

- Power: heat dissipation + battery life

- Cost

- Reliability

- Etc.

Answer #1: requirements are always changingAnswer #2: technology playing field is always changing

Page 16: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Classes of Computers

° High performance (supercomputers)• Supercomputers – Cray T-90

• Massively parallel computers – Cray T3E

° Balanced cost/performance• Workstations – SPARCstations

• Servers – SGI Origin, UltraSPARC

• High-end PCs – Pentium quads

° Low cost/power• Low-end PCs, laptops, PDAs – mobile Pentiums, ARM

Page 17: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

What is *Computer Architecture*

Computer Architecture = Instruction Set Architecture +

Organization + Hardware

Page 18: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

What is “Computer Architecture”?

I/O systemProcessor

CompilerOperating System

(Unix; Windows)

Applications

Digital DesignCircuit Design

Instruction Set Architecture

° Key Idea: levels of abstraction• hide unnecessary implementation details

• helps us cope with enormous complexity of real systems

Datapath & Control

transistors, IC layout

MemoryHardware

Software Assembler

Page 19: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

What is “Computer Architecture”?

° Computer Architecture =Instruction Set Architecture

(ISA)- the one “true” language of a machine

- boundary between hardware and software

- the hardware’s specification; defines “what” a machine does;

+Machine Organization

- the “guts” of the machine; “how” the hardware works; the implementation; must obey the ISA abstraction

Page 20: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Forces on Computer Architecture

ComputerArchitecture

Technology ProgrammingLanguages

OperatingSystems

Compiler

Applications

Page 21: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Forces Acting on Computer Architecture

° R-a-p-i-d Improvement in Implementation Technology:

• IC: integrated circuit; invented 1959

• SSI → MSI → LSI → VLSI: dramatic growth in number transistors/chip ⇒ ability to create more (and bigger) FUs per processor; bigger memory ⇒ more sophisticated applications, larger databases

° Tomorrow’s Science Fiction: ubiquitous computing: computers embedded everywhere

° New Languages: Java, C++ ...

Page 22: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Machine Organization: 5 classic components of any computer

Personal Computer

Processor (CPU)

(active)

Computer

Control(“brain”)

Datapath(“brawn”)

Memory(passive)

(where programs, & data live whenrunning)

Devices

Input

Output

Keyboard, Mouse

Display, Printer

Disk (where programs, & data live whennot running)

The components of every computer, past and present, belong to one of these five categories

Page 23: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Machine Organization Perspective

° Capabilities & performance characteristics of principal Functional Units (FUs) of the CPU

° Ways in which these components are interconnected to realize the ISA

° Information flows between components

° How such information flow is controlled

° Levels of Machine Description• Register Transfer Level (RTL)

• Gate Level (Digital Design)

Page 24: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

von Neumann Computer° 1944: The First Electronic Computer ENIAC at IAS, Princeton

University. (18,000 vacuum tubes)

° Stored-Program Concept – Storing programs as numbers – by John von Neumann

° Idea: A program is written as a sequence of instructions, represented by binary numbers. The instructions are stored in the memory just as data. They are read one by one, decoded and then executed by the CPU.

Page 25: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Execution Cycle

Instruction

Fetch

Instruction

Decode

Operand

Fetch

Execute

Result

Store

Next

Instruction

Obtain instruction from program storage

Determine required actions and instruction size

Locate and obtain operand data

Compute result value or status

Deposit results in storage for later use

Determine successor instruction

Page 26: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Instruction-Set Processor Design

° Architecture (ISA) programmer/compiler view

• “functional appearance to its immediate user/system programmer”

• Opcodes, addressing modes, architected registers, IEEE floating point

° Implementation (µ Architecture) processor designer/view

• “logical structure or organization that performs the architecture”

• Pipelining, functional units, caches, physical registers

° Hardware (chip/system) designer view• “physical structure that embodies the implementation”

• Gates, cells, transistors, wires

Page 27: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Relationship Between the Three Aspects

° Processors having identical ISA may be very different in organization.

• e.g. NEC VR 5432 and NEC VR 4122

° Processors with identical ISA and nearly identical organization are still not nearly identical.

• e.g. Pentium II and Celeron are nearly identical but differ at clock rates and memory systems

Page 28: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Why Study Computer Architecture?

It impacts every other aspect of engineering and science° Case Study: Earth Simulator

° The Earth Simulator (ES) was the fastest supercomputer in the world from 2002 to 2004.

° The system was developed in 1997 for running global climate models to evaluate the effects of global warming and problems in solid earth geophysics.

° Total of 5120 processors and 10 TB of memory.

Page 29: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Why Study Computer Architecture?

Atmospheric science uses computational fluid heavily

Page 30: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Why Study Computer Architecture?

° Case Study: Earth Simulator

Page 31: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Example of different processor architectures

Cell Broadband Engine Architecture (by Sony, Toshiba & IBM)

Page 32: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Example of different processor architectures

• Cluster of Sony PlayStation3’s used for large-scale modelling of the human brain• 300 PS3s ordered for the U.S. Air Force• Axion Racing’s entry into the DARPA Urban Challenge• PlayStation3 Gravity Grid• Folding@Home

Page 33: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

Folding@Home Project

• Study of proteins which are necklaces of amino acids.• Proteins are the basis of how biology gets things done. • They are the driving force behind all of the biochemical reactions which make biology work. • Proteins self-assemble fold amazingly quickly• Some as fast as a millionth of a second. • It's remarkably long for computers to simulate. • It takes about a day to simulate a nanosecond

Page 34: Lecturer: Watis Leelapatra Office: 4301D Email: watis@kku.acwatis/courses/188322/lecture1-0.pdf · 2010. 11. 1. · • 2X in performance every 1.5 years; 1000X performance in last

SETI@Home Project

• Search for Extra-Terestrial Intelligence Project• Key idea is to analyse pickuped signal from space