Documente Academic
Documente Profesional
Documente Cultură
Todays topic:
1
Factors Influencing Performance
2
Example
4
SPEC CPU
The SPEC rating specifies how much faster a system is, compared to
a baseline machine a system with SPEC rating 600 is 1.5 times
faster than a system with SPEC rating 400
Note that this rating incorporates the behavior of all 29 programs this
may not necessarily predict performance for your favorite program!
5
Deriving a Single Performance Number
6
Amdahls Law
Amdahls Law
9
Example Problem
Note:
Frequency only impacts dynamic power, not leakage power.
We assume that the programs CPI is unchanged when
frequency is changed, i.e., exec time varies linearly
with cycle time. 10
Recap
11
Instruction Set
12
Instruction Set
13
A Basic MIPS Instruction
C code: a=b+c;
C code a = b + c + d + e;
translates into the following assembly code:
add a, b, c add a, b, c
add a, a, d or add f, d, e
add a, a, e add a, a, f
C code f = (g + h) (i + j);
16
Subtract Example
C code f = (g + h) (i + j);
translates into the following assembly code:
17
Operands
19
Memory Operands
int a, b, c, d[10]
Memory
Base address
21
Immediate Operands
23
Memory Instruction Format
destination register
source address
lw $t0, 8($t3)
any register
a constant that is added to the register in brackets
24
Memory Instruction Format
source register
source address
sw $t0, 8($t3)
any register
a constant that is added to the register in brackets
25
Example
Convert to assembly:
26
Example
Convert to assembly:
Bullet
28