CS61C – Machine Structures
Lecture 1 – Introduction
1/18/2006
John Wawrzynek
(Warznek)
(www.cs.berkeley.edu/~johnw)
www-inst.eecs.berkeley.edu/~cs61c/
CS 61C L01 Introduction (1) Wawrzynek Spring 2006 © UCB
What are “Machine Structures”?
Application (ex: browser)
Compiler
Operating
System
61C
Software Assembler (Windows 2K)
Instruction Set
Hardware Processor Memory I/O system Architecture
Datapath & Control
Digital Design
Circuit Design
transistors
* Coordination of many
levels (layers) of abstraction
CS 61C L01 Introduction (2) Wawrzynek Spring 2006 © UCB
61C Levels of Representation (abstractions)
temp = v[k];
High Level Language v[k] = v[k+1];
Program (e.g., C) v[k+1] = temp;
Compiler lw $t0, 0($2)
Assembly Language lw $t1, 4($2)
Program (e.g.,MIPS) sw $t1, 0($2)
Assembler sw $t0, 4($2)
Machine Language 0000 1001 1100 0110 1010 1111 0101 1000
Program (MIPS) 1010 1111 0101 1000 0000 1001 1100 0110
1100 0110 1010 1111 0101 1000 0000 1001
0101 1000 0000 1001 1100 0110 1010 1111
Machine
Interpretation
Register File
Hardware Architecture Description
(e.g., block diagrams)
ALU
Architecture
Implementation
Logic Circuit Description
(Circuit Schematic Diagrams)
CS 61C L01 Introduction (3) Wawrzynek Spring 2006 © UCB
Anatomy: 5 components of any Computer
Personal Computer
Computer Keyboard,
Processor
Mouse
Memory Devices
Disk
Control Input (where
(“brain”) (where
programs, programs,
data data
Datapath live when live when
(“brawn”) Output not running)
running)
Display,
Printer
CS 61C L01 Introduction (4) Wawrzynek Spring 2006 © UCB
Overview of Physical Implementations
The hardware out of which we make systems.
Integrated Circuits (ICs)
Combinational logic circuits, memory elements,
analog interfaces.
Printed Circuits (PC) boards
substrate for ICs and interconnection, distribution of
CLK, Vdd, and GND signals, heat dissipation.
Power Supplies
Converts line AC voltage to regulated DC low voltage
levels.
Chassis (rack, card case, ...)
holds boards, power supply, provides physical
interface to user or other systems.
Connectors and Cables.
CS 61C L01 Introduction (5) Wawrzynek Spring 2006 © UCB
Integrated Circuits (2005 state-of-the-art)
Primarily Crystalline Silicon
Bare Die
1mm - 25mm on a side
2005 - feature size ~ 90nm = 90 x 10-9 m
100 - 1000M transistors
(25 - 100M “logic gates")
3 - 10 conductive layers
“CMOS” (complementary metal oxide
Chip in Package semiconductor) - most common.
Package provides:
spreading of chip-level signal paths to
board-level
heat dissipation.
Ceramic or plastic with gold wires.
CS 61C L01 Introduction (6) Wawrzynek Spring 2006 © UCB
Printed Circuit Boards
fiberglass or ceramic
1-20 conductive
layers
1-20in on a side
IC packages are
soldered down.
Provides:
Mechanical support
Distribution of power
and heat.
CS 61C L01 Introduction (7) Wawrzynek Spring 2006 © UCB
Technology Trends: Memory Capacity
(Single-Chip DRAM) size
1000000000
year size (Mbit)
100000000 1980 0.0625
10000000 1983 0.25
1986 1
Bits
1000000
1989 4
100000
1992 16
10000
1996 64
1000
1998 128
1970 1975 1980 1985 1990 1995 2000
Year 2000 256
• Now 1.4X/yr, or 2X every 2 years. 2002 512
• 8000X since 1980! 2004 1024
CS 61C L01 Introduction (8) Wawrzynek Spring 2006 © UCB
Technology Trends: Microprocessor Complexity
2X transistors/Chip
Every 2 years
Called
“Moore’s Law”
CS 61C L01 Introduction (9) Wawrzynek Spring 2006 © UCB
Processor Performance (SPECint)
10000
20%/year
1000
Performance (vs. VAX-11/780)
52%/year
100
10
25%/year
1
1978 1980 1982 1984 1986 1988 1990 1992 1994 1996 1998 2000 2002 2004 2006
• VAX : 25%/year 1978 to 1986
• RISC + x86: 52%/year 1986 to 2002
• RISC + x86: 20%/year 2002 to present
CS 61C L01 Introduction (10) Wawrzynek Spring 2006 © UCB
Computer Technology - Dramatic Change!
Processor
2X in speed every 1.5 years (since ‘85);
100X performance in last decade.
Memory
DRAM capacity: 2x / 2 years (since ‘96);
64x size improvement in last decade.
Disk
Capacity: 2X / 1 year (since ‘97)
250X size in last decade.
Will these trends continue?
CS 61C L01 Introduction (11) Wawrzynek Spring 2006 © UCB
Technology Trends - what’s next?
CS 61C L01 Introduction (12) Wawrzynek Spring 2006 © UCB
CS61C: So what's in it for me?
Learn some of the big ideas in CS & engineering:
Principle of abstraction, used to build systems as
layers
5 Classic components of a Computer
Data can be anything (integers, floating point,
characters): a program determines what it is
Stored program concept: instructions just data
Principle of Locality, exploited via a memory hierarchy
(cache)
Greater performance by exploiting parallelism
Principles/Pitfalls of Performance Measurement
CS 61C L01 Introduction (13) Wawrzynek Spring 2006 © UCB
Others Skills learned in 61C
Learning C
If you know one, you should be able to learn another
programming language largely on your own.
Given that you know C++ or Java, should be easy to
pick up their ancestor, C.
Assembly Language Programming
This is a skill you will pick up, as a side effect of
understanding the Big Ideas.
Hardware design
We learn just the basics hardware design.
CS 150, 152 teach this in more detail.
CS 61C L01 Introduction (14) Wawrzynek Spring 2006 © UCB
Course Topic Outline
Number representations
C-Language (basics + pointers)
Storage management
Assembly Programming
Floating Point
Compilation, Assembly
Logic Circuit Design
CPU organization
Pipelining
Caches
Virtual Memory
Performance
I/O Interrupts
Disks, Networks
Advanced Topics
CS 61C L01 Introduction (15) Wawrzynek Spring 2006 © UCB
Texts
Required: Computer Organization
and Design: The Hardware/Software
Interface, Third Edition, Patterson
and Hennessy (COD). The second
edition is not suggested.
Required: The C Programming
Language, Kernighan and Ritchie
(K&R), 2nd edition
Reading assignments on web page
Read P&H Chapter 1 and sections 3.1 & 3.2 as soon as
possible this week, and K&R Chapters 1-4 before Monday.
CS 61C L01 Introduction (16) Wawrzynek Spring 2006 © UCB
Class Meetings
Monday Lecture
Discussion Session (1 hour), Mon.,
Tue., or Wed.
Wednesday Lecture
Lab Session (2 hours), Wed., Thur., or
Fri.
Friday Lecture
There IS lab this week…
CS 61C L01 Introduction (17) Wawrzynek Spring 2006 © UCB
Homework, Labs and Projects
Lab exercises (every week)
Homework exercises (every week)
Due Wednesday at 11:59pm.
Homeworks due Mon. on Exam weeks.
Projects (every 2 to 3 weeks)
All exercises, reading, homeworks,
projects in course reader and on course
web page.
www-inst.eecs.berkeley.edu/~cs61c
CS 61C L01 Introduction (18) Wawrzynek Spring 2006 © UCB
3 Course Exams
Midterm 1: Wed 7pm Feb 22nd, room TBA
Give 2 hours for 1 hour exam
Open Book / Notes
Review sessions TBA
Midterm 2: Wed 7pm Apr 19th, room TBA
Final: Tu May 9th, 6-9pm
Day after final class.
You’ll be done with 61C early.
Tentative Dates, Pending Room Availability
CS 61C L01 Introduction (19) Wawrzynek Spring 2006 © UCB
Your final grade
Grading
15 Homeworks 15 x 2 30pts.
15 Labs 15 x 1 15
5 Projects 5 x 10 50
2 Midterms 2 x 30 60
Final exam 45
TOTAL 200
Grade distributions. Absolute scale – no curve.
> 180 A+
175 A
170 A-
165 B+
.
.
.
125 D-
CS 61C L01 Introduction (20) Wawrzynek Spring 2006 © UCB
Course Problems…Cheating
What is cheating?
Studying together in groups is encouraged.
Turned in work must be your own.
Common examples of cheating: running out of time on
a assignment and then pick up output, take homework
from box and copy, person asks to borrow solution
“just to take a look”, copying an exam question, …
Cheating on homeworks; -4 points for that
assignment
Cheating on projects / exams; At least, 0 points
for that project / exam. In most cases, F in the
course.
For serious and repeated instances will refer you
to Office of Student Judicial Affairs.
CS 61C L01 Introduction (21) Wawrzynek Spring 2006 © UCB
Enrollment
Our goal is to accommodate everyone on
the wait list.
Three new sections have been added:
016 LAB W 3-5P 017 LAB F 9-11A 018 LAB F 11-1P
116 DIS M 4-5P 117 DIS W 9-10P 118 DIS W 12-1P
If you want to be in the class, you must
register for sections. Do it ASAP!
It may be possible to switch to different
sections later. However, if you are going to
switch you must switch both your lab and
discussion section. (At least you need to
end up with the same TA for both.)
CS 61C L01 Introduction (22) Wawrzynek Spring 2006 © UCB
Teaching Assistants
Dis Lab
Hayden So (Head TA) M 4-5 W 3-5
Adam Megacz Tu 5-6 Th 4-6
Tu 6-7 Th 6-8
Michael Le W 9-10 F 9-11
Udam Saini Tu 10-11 Th 10-12
W 12-1 F 11-1
David Marquardt Tu 1-2 Th 12-2
Tu 2-3 Th 2-4
CS 61C L01 Introduction (23) Wawrzynek Spring 2006 © UCB
Summary
Continued rapid improvement in
Computing
2X every 1.5 years in processor speed;
every 2.0 years in memory size;
every 1.0 year in disk capacity;
Moore’s Law enables processor
(2X transistors/chip 2 yrs)
5 classic components of all computers
Control Datapath Memory Input Output
Processor
CS 61C L01 Introduction (24) Wawrzynek Spring 2006 © UCB