Professional Documents
Culture Documents
Lect#1 - Introduction
Lect#1 - Introduction
Lect#1 - Introduction
Introduction
Reviewing Some Basic Concepts
• Central Processing Unit
• Memory Hierarchy
• Bus / Interconnect
• Moore’s Law
• Instruction Set Architecture
• Amdahl’s Law
• Pipelining
Resources
• Computer Architecture: A Quantitative
Approach, (4th ) by John L. Hennessy and David
A. Patterson
Other references
• Computer Organization and Design, (3rd
Edition) by David A. Patterson and John L.
Hennessy (4th if available)
Course Contents
• Fundamentals of Computer Architecture
• Instruction-Level Parallelism and Its
Exploitation
• Limits on Instruction-Level Parallelism
• Multiprocessors and Thread-Level Parallelism
• Memory Hierarchy Design
• Storage Systems
• Others
Assessment
• Final – 50
• Midterm – 30
• Assignments and quizzes – 20
• All material from the slides/book including
assignments and anything that is suggested
for further reading.
Computer Architecture
A Quantitative Approach, Fifth Edition
Chapter 1
RISC
Current Trends in Architecture
• Cannot continue to leverage Instruction-Level
parallelism (ILP)
– Single processor performance improvement ended in 2003
software
instruction set
hardware
Register to register
Transfer, branches
Jumps
Reviewing some basic concepts
Two categories of ISAs: RISC vs. CISC
add a, b, c
add a, a, d
add a, a, e
C code f = (g + h) – (i + j);
translates into the following assembly code:
add f, g, h
sub f, f, i
sub f, f, j
25
Operands
27
MIPS Add Using Registers
• C code: a=b+c;
29
Memory Address
int a, b, c, d[10]
…
Memory
Base address
30
Immediate Operands
destination register
source address
lw $t0, 8($t3)
any register
a constant that is added to the register in brackets
32
Example
Convert to assembly:
33
Example
Convert to assembly:
34
Recap – Numeric Representations
• Decimal 3510
• Binary 001000112
35
Control Instructions
Convert to assembly:
if (i == j)
f = g+h;
else
f = g-h;
36
Control Instructions
• Unconditional branch:
j L1
jr $s0
Convert to assembly:
if (i == j) bne $s3, $s4, Else
f = g+h; add $s0, $s1, $s2
else j Exit
f = g-h; Else: sub $s0, $s1, $s2
Exit: 37
Implementation Overview
Basic MIPS Architecture
39
Implementation Overview
• We need memory
to store instructions
to store data
for now, let’s make them separate units
40
Executing a MIPS Instruction
41
MIPS Pipeline
42
MIPS Pipeline
43
Pipelining Hazards
• Structural hazards: different instructions in different stages
(or the same stage) conflicting for the same resource
44
Data Hazards
45
Forwarding
47