coe 308 – computer architecture prof. muhamed mudawar computer engineering department king fahd...
TRANSCRIPT
![Page 1: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/1.jpg)
COE 308 – Computer Architecture
Prof. Muhamed Mudawar
Computer Engineering Department
King Fahd University of Petroleum and Minerals
Introduction to
Computer Architecture
![Page 2: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/2.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 2
What is “Computer Architecture” ? Computer Architecture =
Instruction Set Architecture +
Computer Organization
Instruction Set Architecture (ISA)
WHAT the computer does (logical view)
Computer Organization
HOW the ISA is implemented (physical view)
We will study both in this course
![Page 3: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/3.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 3
Why Study Computer Architecture? You want to be called “Computer Engineer or Scientist”
You want to become an “expert” on computer hardware
You want to become a “computer system designer”
You want to become a “software designer” and need to understand how to improve code performance
Technology is improving rapidly new opportunities
Has never been more exciting!
Impacts Electrical Engineering and Computer Science
![Page 4: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/4.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 4
Which Books will be Used? Computer Organization & Design
The Hardware/Software Interface
David Patterson and John Hennessy
Morgan Kaufmann Publishers
Third Edition (2005) is available in bookstore
Read the textbook in addition to the course slides
References: MIPS32 Architecture
Volumes I, II, and III are available online
Course webpage
http://www.ccse.kfupm.edu.sa/~mudawar/coe308/
![Page 5: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/5.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 5
Course Objectives Understand modern computers, their evolution, and
trade-offs at the HW/SW interface
Instruction Set Architecture
Computer Arithmetic
Performance and Metrics
Pipelining
Understand the design of a modern computer system
Datapath design
Control design
Memory System Design
I/O System Design
![Page 6: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/6.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 6
Since the 1940’s, computers have 5 classic components Input devices
Keyboard, mouse, …
Output devices Display, printer, …
Storage devices Volatile memory devices: DRAM, SRAM, … Permanent storage devices: Magnetic, Optical, and Flash disks, …
Datapath Control Newly added 6th component: Network
Essential component for communication in any computer system
Five Classic Components
Together, they are called the Processor
ProcessorComputer
Control
Datapath
Memory
Devices
Input
Output
![Page 7: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/7.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 7
Obtain instruction from program storage
Determine required actions and instruction size
Locate and obtain operand data
Compute result value and status
Deposit results in storage for later use
Determine successor instruction
Fetch - Execute Cycle
InstructionDecode
InstructionFetch
OperandFetch
Execute
WritebackResult
NextInstructionIn
fin
ite
Cyc
le i
mp
lem
ente
d i
n H
ard
war
e
![Page 8: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/8.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 8
Is a subset of Computer Architecture
Definition by Amdahl, Blaaw, and Brooks – 1964
“… the attributes of a [computing] system as seen by the programmer, i.e. the conceptual structure and functional behavior, as distinct from the organization of the data flows and controls the logic design, and the physical implementation.”
An ISA encompasses … Instructions and Instruction Formats
Data Types, Encodings, and Representations
Programmable Storage: Registers and Memory
Addressing Modes: Accessing Instructions and Data
Handling Exceptional Conditions
Instruction Set Architecture (ISA)
![Page 9: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/9.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 9
Critical interface between hardware and software Standardizes instructions, machine language bit patterns, etc.
Advantage: different implementations of the same architecture
Disadvantage: sometimes prevents using new innovations
Examples (versions) Introduced in
Intel (8086, 80386, Pentium, ...) 1978 IBM Power (Power 2, 3, 4, 5) 1985 HP PA-RISC (v1.1, v2.0) 1986 MIPS (MIPS I, II, III, IV, V) 1986 Sun Sparc (v8, v9) 1987 Digital Alpha (v1, v3) 1992 PowerPC (601, 604, …) 1993
Instruction Set Architecture – cont’d
![Page 10: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/10.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 10
RegistersOverview of the MIPS ISA
All instructions are 32-bit wide Instruction Categories
Load/Store
Integer Arithmetic
Jump and Branch
Floating Point
Memory Management
Three Instruction Formats
R0 - R31
PC
HI
LO
Registers
Op6 Rs5 Rt5 Rd5 funct6sa5
Op6 Rs5 Rt5 immediate16
Op6 immediate26
R-type
I-type
J-type
![Page 11: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/11.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 11
Computer Organization Realization of the Instruction Set Architecture
Characteristics of principal components
Registers, ALUs, FPUs, Caches, ...
Ways in which these components are interconnected
Information flow between components
Means by which such information flow is controlled
Register Transfer Level (RTL) description
![Page 12: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/12.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 12
Desktop Computer Organization
Monitor
GraphicsController
Processor
Memory
IDE Disk Controller
External Cache
Bridge/MemoryController
PCI Bus
Expansion Bus Interface
Disk
DVD
Disk
Disk
Keyboard
Expansion Bus
SerialPort
ParallelPort
![Page 13: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/13.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 13
Microprocessor Organization
Intel NetBusrt Micro-Architecture
Fetch &Decode
Trace CacheMicrocode ROM
ExecutionOut-of-Order Core
Retirement
BTBs / Branch PredictionBranch History Update
D-Cache4-way
2nd Level Cache8-way
Front End
Bus Unit Frequently used paths
Less frequently used paths
Front Side Bus
![Page 14: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/14.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 14
Abstraction hides implementation details between levels
Helps us cope with enormous complexity
ISA is at the interface between software and hardware
Abstraction Layers
Sof
twar
e Application
Operating SystemCompiler
Assembler
Linker Loader
Processor Memory I/O System
Datapath & Control Design
Digital Logic Design
Circuit Design
Physical (IC Layout) Design
Scheduler Device Drivers
Instruction Set Architecture (Interface SW/HW)
Har
dwar
e
![Page 15: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/15.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 15
Technology Improvements Vacuum tube → transistor → IC → VLSI Processor
Transistor count: about 30% to 40% per year Clock rate: about 20% to 30% per year
Memory DRAM capacity: about 60% per year (4x every 3 yrs) Memory speed: about 10% per year Cost per bit: decreases about 25% per year
Disk Capacity: about 60% per year
Opportunities for new applications Better organizations and designs
![Page 16: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/16.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 16
Growth of Capacity per DRAM Chip DRAM capacity quadrupled almost every 3 years
60% increase per year, for 20 years
![Page 17: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/17.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 17
Clock Rate and Transistor Count
20% to 30% per year
0.1
1
10
100
1,000
19701975
19801985
19901995
20002005
Clo
ck r
ate
(MH
z)
i4004i8008
i8080
i8086 i80286i80386
Pentium100
R10000
30% to 40% per year
Tra
nsi
sto
r C
ou
nt
1,000
10,000
100,000
1,000,000
10,000,000
100,000,000
19701975
19801985
19901995
20002005
i4004i8008
i8080
i8086
i80286i80386
R2000
Pentium R10000
R3000
![Page 18: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/18.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 18
Workstation Performance
Measured as number of times faster than VAX 11/780
More than 1000 times improvement between 1987 and 2003
Improvement is between 50% and 60% per year
![Page 19: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/19.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 19
Microprocessor Sales (1998 – 2002)
ARM processor sales exceeded Intel IA-32 processors, which came second
ARM processors are used mostly in cellular phones
Most processors today are embedded in cell phones, video games, digital TVs, PDAs, and a variety of consumer devices
![Page 20: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/20.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 20
Microprocessor Sales – cont'd
![Page 21: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/21.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 21
Chip Manufacturing Process
Silicon ingot
Slicer
Blank wafers
20 to 30 processing steps
8-12 in diameter12-24 in long
< 0.1 in thick
Patterned wafer
Dicer
Individual dies
DieTester
Tested dies
Bond die topackage
Packaged dies
PartTester
Tested Packaged dies
Ship toCustomers
![Page 22: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/22.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 22
Wafer of Pentium 4 Processors 8 inches (20 cm) in diameter
Die area is 250 mm2
About 16 mm per side
55 million transistors per die 0.18 μm technology
Size of smallest transistor
Improved technology uses 0.13 μm and 0.09 μm
Dies per wafer = 169 When yield = 100%
Number is reduced after testing
Rounded dies at boundary are useless
![Page 23: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/23.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 23
Dramatic decrease in yield with larger dies
Yield = (Number of Good Dies) / (Total Number of Dies)
Effect of Die Size on Yield
Defective Die
Good Die
120 dies, 109 good 26 dies, 15 good
(1 + (Defect per area Die area / 2))2
1Yield =
Die Cost = (Wafer Cost) / (Dies per Wafer Yield)
![Page 24: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/24.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 24
Inside the Pentium 4 Processor Chip
![Page 25: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/25.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 25
Intel x86 Processor Evolution
Processor Year Clock Transistors Registers Data Bus Max Memory Caches
8086 1978 8 MHz 29 K GP: 16 bits 16 bits 1 MB None
80286 1982 12 MHz 134 K GP: 16 bits 16 bits 16 MB None
80386 1985 20 MHz 275 K GP: 32 bits 32 bits 4 GB None
80486 1989 25 MHz 1.2 MGP: 32 bits FP: 80 bits
32 bits 4 GB L1: 8KB
Pentium 1993 60 MHz 3.1 MGP: 32 bits FP: 80 bits
64 bits 4 GB L1:16K
Pentium Pro 1995 200 MHz 5.5 MGP: 32 bits FP: 80 bits
64 bits 64 GBL1:16K
L2:256K
Pentium II 1997 266 MHz 7 MGP: 32 bits FP: 80 bits MMX: 64b
64 bits 64 GBL1:32K
L2:256K
Pentium III 1999 500 MHz 8.2 M
GP: 32 bits FP: 80 bits MMX: 64b
XMM: 128b
64 bits 64 GBL1:32K
L2:512K
![Page 26: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/26.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 26
Intel x86 Processor Evolution – cont’d
Processor Year Clock Transistors Registers MicroArch Bandwidth Caches
Pentium 4 2000 1.5 GHz 42 M
GP: 32 bits FP: 80 bits MMX: 64b
XMM: 128b
NetBurst 3.2 GB/sTrace:12Kop
L1:8KL2:256K
Pentium 4with Hyper-Threading
2002 2.2 GHz 55 M
GP: 32 bits FP: 80 bits MMX: 64b
XMM: 128b
NetBurstHyper-
Threading3.2 GB/s
Trace:12KopL1:8K
L2:512K
![Page 27: COE 308 – Computer Architecture Prof. Muhamed Mudawar Computer Engineering Department King Fahd University of Petroleum and Minerals Introduction to Computer](https://reader035.vdocuments.us/reader035/viewer/2022081507/5517aa2b5503460e6e8b6056/html5/thumbnails/27.jpg)
Introduction to Computer Architecture © Muhamed Mudawar, CSE 308 – KFUPMSlide 27
Course Roadmap Instruction set architecture (Chapter 2)
Computer arithmetic (Chapter 3)
Performance issues (Chapter 4)
Constructing a processor (Chapter 5)
Pipelining to improve performance (Chapter 6)
Memory: caches and virtual memory (Chapter 7)
Disk Storage and Input/Output (Chapter 8)
Key to obtain a good grade: read the textbook!