Upload
hadat
View
235
Download
0
Embed Size (px)
Citation preview
Lund University / EITF20/ Liang Liu
EITF20: Computer ArchitecturePart1.1.1: Introduction
Liang Liu
1
Lund University / EITF20/ Liang Liu
Course Factor
Computer Architecture (7.5HP)
http://www.eit.lth.se/kurs/eitf20
2
Lund University / EITF20/ Liang Liu
Q1: How to upgrade with limited budget
3
Lund University / EITF20/ Liang Liu
Q2: More cores or higher frequency
4
Lund University / EITF20/ Liang Liu
Q3: Why not Intel for iphone?
5
Lund University / EITF20/ Liang Liu
Outline
Computers
Computer Architecture
This Course
Trends
Performance
Quantitative Principles
6
Lund University / EITF20/ Liang Liu
Computer is everywhere
7
Lund University / EITF20/ Liang Liu
Build a Computer…
8
Power Consumption: 65 to 250 watts
Lund University / EITF20/ Liang Liu
Build a Computer…
9
Power: 230 mA (1.2W)
Lund University / EITF20/ Liang Liu
Build a Computer…
10
$ 2.98Power: 65 uA/MHz (32kHz-30MHz)
Lund University / EITF20/ Liang Liu
Build a Computer…
11
Power: 80 Megawatts
Lund University / EITF20/ Liang Liu
Class of Computers
12
Lund University / EITF20/ Liang Liu
Intel v.s. ARM
13
Lund University / EITF20/ Liang Liu
Outline
Computers
Computer Architecture
This Course
Trends
Performance
Quantitative Principles
20
Lund University / EITF20/ Liang Liu21
The ART of designing computers is
based on engineering principles
and
quantitative performance evaluation
Lund University / EITF20/ Liang Liu
Computer abstraction levels
22
Lund University / EITF20/ Liang Liu
ISA: Instruction-set architecture
Computer orginization: micro architecture
Specific implementation
Computer architecture
23
Computer architecture is a set of disciplines that
describe the functionality, organization and
implementation of computer systems.
Lund University / EITF20/ Liang Liu
Computer architecture
24
Design and analysis
• ISA
• Orgnization (microarchitecture)
• Implementation
To meet requirements of
• Functionality (application, standards…)
• Price
• Performance
• Power
• Reliability
• Dependability
• Compatability
• ..
Lund University / EITF20/ Liang Liu
ISA
25
An instruction set architecture (ISA) is the interface between the
computer's software and hardware and also can be viewed as the
programmer's view of the machine (functionality).
Lund University / EITF20/ Liang Liu
Microarchitecture
26
Microarchitecture is the way a given instruction set
architecture (ISA) is implemented on a processor.
von Neumann architecture
Lund University / EITF20/ Liang Liu
Microarchitecture
27
Lund University / EITF20/ Liang Liu
Microarchitecture
28
Lund University / EITF20/ Liang Liu
Implementation
29
Lund University / EITF20/ Liang Liu
The role of computer architecture?
30
Lund University / EITF20/ Liang Liu
Why computer architecture?
31
Understand how to evaluate and choose
• What do we mean ”one computer is faster than another”?
• How can Gene Amdahl help you decide which enhancement
is the best?
• Is a larger cache better than higher clock frequency?
• Why is pipelining “faster” than combinational circuits?
• Different levels of caches - why?
• ...
Design your own specialized architecture
• Embedded special purpose processors
Axis Communications/Ericsson/Nokia/ARM/SAAB
...
Write better program
Lund University / EITF20/ Liang Liu
What affects computer architecture?
32
Applications
Lund University / EITF20/ Liang Liu
X86 Architecture
33
Lund University / EITF20/ Liang Liu
Architecture change due to new applications
34
?
Lund University / EITF20/ Liang Liu
Architecture change due to new applications
35
Lund University / EITF20/ Liang Liu
Programmable devices
•Microprocessors, digital signal processors, FPGA and memories
Application-specific integrated circuits (ASIC)
•Designed for a narrow range of applications
Devices
36
ASIC FPGA
Processor
Power
FlexibilityASIC
DSP
Std. Proc.
FPGA
Reconfiguring
of hardware
Specialization
of processor
Lund University / EITF20/ Liang Liu
Devices (Hybrid Computing)
All Programmable
SoC
Lund University / EITF20/ Liang Liu
Devices (Hybrid Computing)
38
Lund University / EITF20/ Liang Liu
Outline
Computers
Computer Architecture
This Course
Trends
Performance
Quantitative Principles
40
Lund University / EITF20/ Liang Liu
After this course, you will...
Have a thorough knowledge about the design principles for
modern computer systems
Have an understanding of the relations between
• The design of the instruction set of a processor
• The microarchitecture of a processor
Be able to evaluate design alternatives towards design goals
using quantitative evaluation methods
”Side” effects...
• Better digital IC designer
• Better understanding of compiler, operating system, high-
performance programming
Course Objectives
41
Lund University / EITF20/ Liang Liu
Book Recommendation
Computer Architecture – A Quantitative Approach
• HP: Hennessy, Patterson
• 5th Edition
Lund University / EITF20/ Liang Liu
Course Content & Schedule
43
Overview
Instruction set
architecture
Pipeline
Memory System
Storage System
I/Os
Multiprocessor
Concept &Theory
Assignment & Project
Exams
Lund University / EITF20/ Liang Liu
Lecture
• Liang Liu, Associate Professor
• Email: [email protected]
• Room: E2342
• Homepage: http://www.eit.lth.se/staff/Liang.Liu
Course secretary
• Anne Andersson, Room 3152B
• e-mail: [email protected]
Teaching Assistants
• Mojtaba Mahdavi
• Steffen Malkowsky
Teachers
44
Mojtaba
Mahdavi
Steffen
Malkowsky
Lund University / EITF20/ Liang Liu
Lecture
• Liang Liu, Associate Professor
• Email: [email protected]
• Room: E2342
• Homepage: http://www.eit.lth.se/staff/Liang.Liu
Course secretary
• Anne Andersson, Room 3152B
• e-mail: [email protected]
Teaching Assistants
• Mojtaba Mahdavi
• Steffen Malkowsky
Invited Lecture
• Fuad Tabba, ARM, Lund
• Nov. 28th, Cache coherence, Multi-core
Teachers
45
Lund University / EITF20/ Liang Liu
Lectures and Labs
Lectures (10 or more)
• Tuesday : 13:15-15:00 E:B/Thursday: 08:15-10:00 E:B
• Covers design principles and analysis methodology
• Read the literature before each lecture
• Does NOT cover all of the literature
Seminar/Exercise (1-2)
• Problems in previous exams
Labs (4)
• Tuesday: 08:15-12:00 E:4118-E:4119
• Friday: 13:15-17:00 E:4118-E:4119
• 2 students/group
• Read manual and literature before the lab
• Do Home Assignments before lab
• Experiment and discuss with assistants
• Understand what you have done (or FAIL the exam)
• Finish Lab before DEADLINE
http://www.eit.lth.se/index.php?ciuid=&coursecode=eitf20&L=1
Lund University / EITF20/ Liang Liu
Examination (Written)
Anonymous exam
Pass all labs to be able to attend written exam
Five problems• Highly lab related
• Problem solving
• Descriptive nature
Oral exam before Christmas (only) for exchange students
47
Lund University / EITF20/ Liang Liu
Questions?
48
Lund University / EITF20/ Liang Liu
Outline
Computers
Computer Architecture
This Course
Trends
Performance
Quantitative Principles
49
Lund University / EITF20/ Liang Liu
The first electronic computer
50
ENIAC-1946
18 000 vacuum tubes, 30 ton, 150m2 ,140kW
Lund University / EITF20/ Liang Liu
The first electronic computer
51
ENIAC-1946
18 000 tubes, 30 ton, 150m2 ,140kW
How many transistors
of today’s most
advanced CPU?
Lund University / EITF20/ Liang Liu
The first electronic computer
52
ENIAC-1946
18 000 tubes, 30 ton, 150m2 ,140kW
If we just scale up from
18000 to 2 billion:
4 Mton = 1.7 million Volvo V70
19 Mm2 = 2700 football filed
18 GW = 28 Barsebäcksreaktorer
Lund University / EITF20/ Liang Liu
Development of Microprocessor
53
Lund University / EITF20/ Liang Liu54
Moore’s Law
Electronics, Apr. 19, 1965
Gordon Moore (co-founder of Intel)
described a doubling every year in
the number of components per
integrated circuit
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
LOG
2 OF
THE
NU
MB
ER O
F
CO
MPO
NEN
TS P
ER IN
TEG
RA
TED
FU
NC
TIO
N
Lund University / EITF20/ Liang Liu55
Moore’s Law
Moore reformulates to a doubling every 2 years. (1975)
Interview 2000:
”...change the doubling time again... to maybe four or five
years.”
Gordon Moore
Co-founder of Intel ca. 1 billion transistors in 2007
Lund University / EITF20/ Liang Liu
Performance of Microprocessor
56
Lund University / EITF20/ Liang Liu60
Does not Apply to All
Processing power doubles every 18 months
Memory size doubles every 18 months
Disk capacity doubles every 18 months
Disk positioning rate (seek & rotate) doubles every ten years!
Speed of DRAM and disk improves a few % per year
Lund University / EITF20/ Liang Liu
Moore’s Law: power density
61
www.xbitlabs.com
Pentium IV chip area
(in 130 nm technology)1.3 cm2
This gives about 100 W/cm2 that
needs to be transported away (cooling)
Comparison: This little thing
operates at about 10 W/cm2.
Lund University / EITF20/ Liang Liu
Moore’s Law: power density
1
10
100
1000
10000
Po
wer D
en
sit
y [
W/
cm
²]
4004
8008
8080
8085
8086
286386
486
P6
Pentium® proc
Source: Borkar, De Intel
Rocket Nozzle
Nuclear Reactor
Hot Plate
62
Sun’s
Surface
i5, i7
Lund University / EITF20/ Liang Liu
Heating (power) is a issue
63
Lund University / EITF20/ Liang Liu
Heating (power) is a issue
64
Lund University / EITF20/ Liang Liu
Architecture change?
65
Lund University / EITF20/ Liang Liu
Trend: Applications
66
Computation
£17,000
(1832)
Communication
Consumer Control
Lund University / EITF20/ Liang Liu
Trend: Applications
67
Communication
(5G & Beyond)Computation (Cloud,
Mobile, Fog)
Consumer
(IoT, IoE)
Control
(AI, ML, DL)
Lund University / EITF20/ Liang Liu
Outline
Computers
Computer Architecture
This Course
Trends
Performance
Quantitative Principles
68
Lund University / EITF20/ Liang Liu
What is Performance?
69
Time to complete a task (Texe)
• Execution time, response time, latency
Task per day, hour…
• Total amount of tasks for given time
• Thoughput, bandwidth
Speed of Concorde vs Boeing 747
Throughput of Boeing 747 vs Concorde
Lund University / EITF20/ Liang Liu
Performance
70
How to define execution time?
Lund University / EITF20/ Liang Liu
Performance
71
Lund University / EITF20/ Liang Liu
Program to evaluate performance
72
Real programs: e.g. TeX, spice, SPEC benchmarks, ...
Kernels - small, key pieces of real applications
Toy programs - sort, prime number generation
• Something 100-line programs
Synthetic benchmarks - “The average program”
• Fake programs to mathc the behaviour of real applications
• Real programs are the only true measurement objects
SPEC benchmarks will be used here (plus some toy programs )
• Real programs modified to be portable and to minimize the effect of IO
Lund University / EITF20/ Liang Liu
Which Computer is Faster?
74
A is 10 times faster than B for P1
B is 10 times faster than A for P2
A and B are faster than C for P1
C is faster than A and B if both P1 and P2 are run
Lund University / EITF20/ Liang Liu
Which Computer is Faster?
75
Lund University / EITF20/ Liang Liu
Aspect of CPU performance
76
Lund University / EITF20/ Liang Liu
Instructions are not created equally
77
Lund University / EITF20/ Liang Liu
Average CPI: example
78
Invest resources where time is spent!
Lund University / EITF20/ Liang Liu
Outline
Computers
Computer Architecture
This Course
Trends
Performance
Quantitative Principles
79
Lund University / EITF20/ Liang Liu
Quantitative Principles
80
This is intro to design and analysis
• Take advantage of parallelism
ILP, DLP, TLP, ...
• Principle of locality
90% of execution time in only 10% of the code
• Focus on the common case
In making a design trade-off, favor the frequent case ove the
infrequent case
• Amdahl’s Law
The performance improvement gained from uisng faster mode is
limited by the fraction of the time the faster mode can be used
• The Processor Performance Equation
Lund University / EITF20/ Liang Liu
Amdahl’s Law
81
Best you could ever hope to do:
enhancedmaximum Fraction - 1
1 Speedup
Lund University / EITF20/ Liang Liu
Amdahl’s Law: example
82
New CPU is 10 times faster!
60% for I/O which remains almost the same…
56.1
64.0
1
10
0.4 0.4 1
1
Speedup
Fraction Fraction 1
1 Speedup
enhanced
enhancedenhanced
overall
Apparently, its human nature to be attracted by 10X
faster, vs. keeping in perspective its just 1.6X faster
Lund University / EITF20/ Liang Liu
Amdahl’s Law: example
83
http://www-inst.eecs.berkeley.edu/~n252/paper/Amdahl.pdf