Professional Documents
Culture Documents
Instructors:
Professor John Wawrzynek (call me John)
Professor Vladimir Stojanovic (call me Vladimir)
(lots of help from TAs, esp. Head TAs Fred and William)
http://inst.eecs.berkeley.edu/~cs61c/
1
V. Stojanovic: Recent
chip
Agenda
Thinking about Machine Structures
Great Ideas in Computer Architecture
What you need to know about this
class
Everything is a Number
Agenda
Thinking about Machine Structures
Great Ideas in Computer Architecture
What you need to know about this
class
Everything is a Number
Persona
l Mobile
Devices
8
10
Softwar
e
Hardwar
e
Application (ex:
browser)
Operatin
g
Compile
System
r
(Mac
Assembler
OSX)
Processo Memor I/O
r
y
system
Datapath &
Control
Digital
Design
Circuit
CS61C
Instruction
Set
Architecture
Design
transistor
s
11
Software
Parallel Requests
Hardware
Warehou
se-Scale
Compute
Harness
r
Smart
Phone
Assigned to computer
e.g., Search cats
Parallel Threads
Parallelism &
Parallel
Instructions
>1 instruction @ one
time
e.g., 5 pipelined
instructions
Parallel Data
>1 data item @ one
time
e.g., Add of 4 pairs of
Project 1
Computer
Core
Memory
(Cache)
Input/Output
Core
Project 3
Cor
e
Functional
Unit(s)
Instruction
Unit(s)
A0+BA1+BA2+BA3+B
0
Main Memory
Logic Gates
Project
12
Agenda
Thinking about Machine Structures
Great Ideas in Computer Architecture
What you need to know about this
class
Everything is a Number
13
(Levels of Representation/Interpretation)
High Level
Language
Program (e.g., C)
Compiler
Assembly Language
Program (e.g.,
MIPS)
Assemble
r
Machine
Language Program
(MIPS)
Machine
Interpretati
on
Hardware Architecture
Description
(e.g., block diagrams)
Architecture
Implementati
on
Logic Circuit Description
(Circuit Schematic
Diagrams)
temp = v[k];
v[k] = v[k+1];
v[k+1] = temp;
lw
lw
sw
sw
0000
1010
1100
0101
$t0,
$t1,
$t1,
$t0,
0($2)
4($2)
0($2)
4($2)
1001
1111
0110
1000
1100
0101
1010
0000
1010
0000
0101
1100
1111
1001
1000
0110
0101
1100
0000
1010
1000
0110
1001
1111
15
Gordon Moore
Intel Cofounder
B.S. Cal 1950!
Year
16
Interesting Times
Moores Law relied on the
cost of transistors scaling
down as technology scaled to
smaller and smaller feature
sizes.
BUT newest, smallest
fabrication processes <14nm,
might have greater
cost/transistor !!!!
So, why shrink????
17
10
10
100
Tape /Optical
Robot
6 Dis
k
Main Memory
10 On Board
2 Cache
On Chip Cache
1 Register
(ns) s
2,000 Years
Plut
o
Sacrament
o
This
Campus
This
Room
Jim Gray
Turing Award
B.S. Cal 1966
2 YearsPh.D. Cal 1969
1.5 hr
10
min
My Head
1
min
9/1/16
19
20
Gene Amdahl
Computer Pionee
9/1/16
21
1
1
1
1
/
/
/
/
month
week
day
hour
22
23
24
1+1
=2
1+1
=2
2 of 3 agree
1+1
=1
FAIL!
26
Agenda
Thinking about Machine Structures
Great Ideas in Computer Architecture
What you need to know about this
class
Everything is a Number
27
Yoda says
Weekly Schedule
Tuesday
lecture starts
new weekly
29
Course Information
Course Web: http://inst.eecs.Berkeley.edu/~cs61c/
Instructors:
John Wawrzynek & Vladimir Stojanovic
Piazza:
Every announcement, discussion, clarification happens
there
30
Course Grading
EPA!
Effort
Participation
Altruism
Architecture of a typical
Lecture
Full
Clickers ClickersAnd in
Attention
conclusion
AdministriviaFun/News
10
35
60
78 90
Time (minutes)
38
Agenda
Thinking about Machine Structures
Great Ideas in Computer Architecture
What you need to know about this
class
Everything is a Number
39
Key Concepts
Inside computers, everything is a number
But numbers usually stored with a fixed
size
8-bit bytes, 16-bit half words, 32-bit words,
64-bit double words,
Number Representation
Value of i-th digit is d Basei where i starts at
0 and increases from right to left:
12310 = 110 x 10102 + 210 x 10101 + 310 x 10100
= 1x10010 + 2x1010 + 3x110
= 10010 + 2010 + 310
= 12310
Binary (Base 2), Hexadecimal (Base 16),
Decimal (Base 10) different ways to represent
an integer
We use 1two, 5ten, 10hex to be clearer
(vs. 12, 48, 510, 1016 )
41
Number Representation
Hexadecimal digits:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
FFFhex= 15tenx 16ten2 + 15tenx 16ten1 + 15tenx
16ten0
= 3840ten + 240ten + 15ten
= 4095ten
1111 1111 1111two = FFFhex = 4095ten
May put blanks every group of binary, octal,
or hexadecimal digits to make it easier to
parse, like commas in decimal
42
Unsigned Integers
0000
0000
0000
...
0111
0111
0111
1000
1000
1000
...
1111
1111
1111
0000
0000
0000
...
1111
1111
1111
0000
0000
0000
...
1111
1111
1111
1111
1111
1111
0000
0000
0000
1111
1111
1111
0000
0000
0000
1111
1111
1111
0000
0000
0000
1111
1111
1111
0000
0000
0000
1101two
1110two
1111two
0000two
0001two
0010two
=
=
=
=
=
=
2,147,483,645ten
2,147,483,646ten
2,147,483,647ten
2,147,483,648ten
2,147,483,649ten
2,147,483,650ten
Twos-Complement Integers
Sign Bit
0000
0000
0000
...
0111
0111
0111
1000
1000
1000
...
1111
1111
1111
9/1/16
0000
0000
0000
...
1111
1111
1111
0000
0000
0000
...
1111
1111
1111
1111
1111
1111
0000
0000
0000
1111
1111
1111
0000
0000
0000
1111
1111
1111
0000
0000
0000
1111
1111
1111
0000
0000
0000
1101two
1110two
1111two
0000two
0001two
0010two
=
=
=
=
=
=
2,147,483,645ten
2,147,483,646ten
2,147,483,647ten
2,147,483,648ten
2,147,483,647ten
2,147,483,646ten
3ten 0011two
Bitwise complement
1100two
+
1two
Computers actually do it like this,-3
too
ten 1101two
47
Twos-Complement Examples
Assume for simplicity 4 bit width, -8
to +7 represented
3 0011
+2 0010
5 0101
Overflow when
magnitude of
7
result too big
to fit into result+1
representation -8
3 0011
+ (-2)1110
11 0001
0111
0001
1000
Overflow!
-3 1101
+ (-2)1110
-51 1011
-8 1000
+ (-1) 1111
+71 0111
Overflow!
-32 to +31
0 to +31
-16 to +15
-15 to +16
49
-32 to +31
0 to +31
-16 to +15
-15 to +16
50
Summary
CS61C: Learn 6 great ideas in computer
architecture to enable high performance
programming via parallelism, not just
learn C
1. Abstraction
(Layers of Representation/Interpretation)
2. Moores Law
3. Principle of Locality/Memory Hierarchy
4. Parallelism
5. Performance Measurement and Improvement
6. Dependability via Redundancy
Everything is a Number!
51