CS61C Great Ideas in Computer Architecture (Machine Structures). Summer 2013, UC Berkeley
P&HK&RWSC  
CS61C Summer 2013
MTuWTh 9:30-11am 10 Evans





Calendar

Lecture, Reading, and Assignment Calendar

READ THE COURSE SYLLABUS. It is linked below in the "Reading" column. It has a lot of the details about the course logistics and policies you will want to know. But for emphasis, the cheating policy is reiterated below:

Policy on Assignments and Independent Work. Unless explicitly stated otherwise, all homeworks and projects are to be YOUR work and your work ALONE. You are encouraged to discuss your assignments with other students, but we expect that what you hand in is yours. It is NOT acceptable to copy solutions from other students or to copy (or start your) solutions from the Web. We have tools and methods, developed over many years, for detecting this. You WILL be caught, and the penalties WILL be severe. These include, at minimum:

  • NEGATIVE 100% for BOTH the cheater and the enabler on the assignment.
  • A letter to your university record documenting the incidence of cheating.
  • Consideration for an automatic F in the course at the discretion of the course staff.


Wk Date Lecture Topic Reading Notes Lab Assignment Due
1 06/24 M Course Introduction,
Number Representation
(pdf) (pptx)
Course Syllabus
P&H: 1.1-1.3, 1.6, 1.8, 2.4
Disc 1 (Solns)

J: Number Rep
Lab 1: C Intro
and Number Rep
06/25 Tu
Introduction to C,
Pointers
(pdf) (pptx)
K&R: Ch 1-4
Brian Harvey Notes on C (pdf)
HW0: Introduce Yourself
Due 6/25 @ 23:59:59
06/26 W
C Arrays, Strings,
More Pointers
(pdf) (pptx)
K&R: Ch 5-6
Binky Pointer Fun Video
Disc 2 (Solns)

J: Basic C
J: Arrays, Pointers
Lab 2: Pointers
and Debugging

06/27 Th
C Memory Management and Usage
(pdf) (pptx)
K&R: 7.8.5, 8.7
HW1: Number Rep, Basic C (Rubric)
Due 6/30 @ 23:59:59
2
07/01 M
Intro to Machine Language
(pdf) (pptx)
P&H: 2.1-2.3, 2.6, 2.9, 3.2 Disc 3v2 (Solns)

J: Memory
J: Basic MIPS
Lab 3: Malloc and
Assembly

07/02 Tu
More MIPS,
MIPS Functions
(pdf) (pptx)
P&H: 2.7-2.8, B.6
07/03 W
MIPS Instruction Formats
(pdf) (pptx)
P&H: 2.5, 2.10 Disc 4 (Solns) [No Labs] HW2: C Programming (Rubric)
Due 07/05 @ 23:59:59
07/04 Th
Holiday HW3: MIPS (Rubric)
Due 07/07 @ 23:59:59
3
07/08 M
Running a Program
(pdf) (pptx)
P&H: 2.12, B.1-B.4 Disc 5 (Solns) Lab 4: Functions
and Pointers
in Assembly
07/09 Tu
Floating Point,
Performance
(pdf) (pptx)
P&H: 1.3-1.4
07/10 W
The Memory Hierarchy,
Fully Associative Caches
(pdf) (pptx)
P&H: 5.1, 5.2 (just to p.470) Disc 6 (Solns)

J: Floating Point
Lab 5: Linking,
Floating Point,
and Caches
07/11 Th
Direct-Mapped Caches,
Set Associative Caches,
Cache Performance
(pdf) (pptx)
P&H: 5.3 (just to p. 487) Project 1: MIPS Instruction Set Emulator
Due 07/14 @ 23:59:59
4
07/15 M
Multilevel Caches,
Cache Questions
(pdf) (pptx)
P&H: 5.3, 5.5 Disc 7 (Solns)

J: Perf and Caches
Lab 6: Cache
Blocking
07/16 Tu
Review Lecture;
Old Midterm Problems
(pdf) (pptx) (problems)
07/17 W
Performance Programming,
Technology Trends
(pdf) (pptx)
P&H: 1.5, 1.6 Disc 8 (Solns) Lab 7: Data Level
Parallelism
Midterm Review -- 7-10pm, 120 Latimer
(Problems, Solutions)
07/18 Th
The Flynn Taxonomy,
Data Level Parallelism
(pdf) (pptx)
P&H: 7.1, 7.6
07/19 F
MIDTERM -- 9am-12pm, 1 Pimentel
(Midterm) (Rubric)
HW4: FP and Caches (Rubric)
Due 07/21 @ 23:59:59
5
07/22 M
Amdahl's Law,
Thread Level Parallelism
(pdf) (pptx)
P&H: 7.2, 7.3, 5.8, 2.11 Disc 9 (Solns)

J: TLP
Lab 8: Thread Level
Parallelism
07/23 Tu
OpenMP,
Transistors
(pdf) (pptx)
OpenMP Summary Card (pdf)
07/24 W
Synchronous Digital Systems,
Boolean Algebra
(pdf) (pptx)
More details on lecture material:
SDS Handout, Logic Handout
Disc 10 (Solns) Lab 9: Logisim
Intro
Project 2: Part 0 (Partner Selection)
Due 07/24 @ 23:59:59
07/25 Th
Functional Units,
Finite State Machines
(pdf) (pptx)
More details on lecture material:
State Handout, Blocks Handout
Project 2: Matrix Multiply Part 1
Due 07/28 @ 23:59:59
6
07/29 M
MIPS CPU Datapath,
Control Intro
(pdf) (pptx)
P&H: 4.1-4.3 Disc 11 (Solns) Lab 10: Logisim
and Pipelining
07/30 Tu
MIPS CPU Control,
Pipelining Intro
(pdf) (pptx)
P&H: 4.4, 4.5 (p.330-335), 4.6
07/31 W
Pipelining Hazards
(pdf) (pptx)
P&H: 4.5 (p.335-343), 4.7, 4.8 (p.375-379) Disc 12 (Solns) Make-up Labs;
Work on Project 2
HW5: Digital Logic (Rubric)
Due 08/01 @ 23:59:59
08/01 Th
Multiple Instruction Issue,
Virtual Memory Intro
(pdf) (pptx)
P&H: 4.8 (p.380-383), 4.10, 4.11 Project 2: Matrix Multiply Part 2
Due 08/04 @ 23:59:59
7
08/05 M
Virtual Memory
(pdf) (pptx)
P&H: 5.4, 5.11 Disc 13 (Solns) Lab 11: Virtual Memory
08/06 Tu
More Virtual Memory,
Warehouse-Scale Computers
(pdf) (pptx)
WSC: Ch 1, 2.4, 5.1-5.3
08/07 W
MapReduce
(pdf) (pptx)
[Optional] MapReduce paper (pdf) Disc 14 (Solns) Lab 12: MapReduce I
08/08 Th
Dependability: Parity, ECC, RAID
(pdf) (pptx)
P&H (4th): 6.2, 6.9
[Optional] Berkeley RAID Paper (pdf)
Project 3: CPU Design (notes, logisim)
Due 08/11 @ 23:59:59
8
08/12 M
I/O: Disks, Polling,
Exceptions & Interrupts
(pdf) (pptx)
P&H: 6.1, 6.3, 6.4, 6.6, 4.9 Disc 15 (Solns) Lab 13: MapReduce II
08/13 Tu
Course Summary and Review
(pdf) (pptx)
Final Review -- 7-10pm, 10 Evans
(Problems, Solutions)
08/14 W
Special Topics: Memory Security
(pdf)
 
08/15 Th
[Extra Office Hours]  
08/16 F
FINAL -- 9am-12pm, 155 Dwinelle
(Final) (Rubric)



Weekly Schedule

Monday Tuesday Wednesday Thursday Friday
9:30-10:00 LECTURE
10 Evans
LECTURE
10 Evans
LECTURE
10 Evans
LECTURE
10 Evans
 
10:00-11:00 OH - Justin
330 Soda
11:00-12:00 101 DIS -- Albert
320 Soda
101 LAB -- Albert
330 Soda
OH -- Shaun
200 SDH
101 DIS -- Albert
320 Soda
101 LAB -- Albert
330 Soda
OH -- Shaun
200 SDH
12:00-1:00 OH -- Albert
330 Soda
  OH -- Albert
330 Soda
OH -- Jeffrey
200 SDH
OH -- Jeffrey
330 Soda
1:00-2:00 105 DIS -- Jeffrey
405 Soda
102 LAB -- Kevin
330 Soda
105 LAB -- Jeffrey
200 SDH
105 DIS -- Jeffrey
405 Soda
102 LAB -- Kevin
330 Soda
105 LAB -- Jeffrey
200 SDH
OH -- Sagar
330 Soda
2:00-3:00 102 DIS -- Kevin
320 Soda
102 DIS -- Kevin
320 Soda
3:00-4:00 OH -- Justin F.
330 Soda
103 LAB -- Justin F.
330 Soda
106 LAB -- Sagar
200 SDH
OH -- Justin F.
330 Soda
103 LAB -- Justin F.
330 Soda
106 LAB -- Sagar
200 SDH
 
4:00-5:00 103 DIS -- Justin F.
320 Soda
103 DIS -- Justin F.
320 Soda
 
5:00-6:00 106 DIS -- Sagar
405 Soda
104 LAB -- Shaun
330 Soda
  106 DIS -- Sagar
405 Soda
104 LAB -- Shaun
330 Soda
   
6:00-7:00 104 DIS -- Shaun
320 Soda
  104 DIS -- Shaun
320 Soda
   
7:00-7:30          
7:30-8:30 OH -- Kevin
330 Soda
  OH -- Kevin
330 Soda
   



Staff

Justin Hsia
Instructor: Justin Hsia
jhsia@eecs
OH:  F 10-12, 330 Soda

TA: Albert Magyar
albert.magyar@berkeley
Sections: 101 LAB, 101 DIS
OH: MW 12-1, 330 Soda

TA: Kevin Yeun
yeun.kevin@gmail
Sections: 102 LAB, 102 DIS
OH: MW 7:30-8:30, 330 Soda

TA: Justin Fu
justinfu@berkeley
Sections: 103 LAB, 103 DIS
OH: MW 3-4, 330 Soda

TA: Shaun Benjamin
shauncbenjamin@gmail
Sections: 104 LAB, 104 DIS
OH: TuTh 11-12, 200 SDH

TA: Jeffrey Dong
jefdongus@berkeley
Sections: 105 LAB, 105 DIS
OH: Th 12-1, 200 SDH
F 12-1, 330 Soda

Head TA: Sagar Karandikar
skarandikar@berkeley
Sections: 106 LAB, 106 DIS
OH: F 1-3, 330 Soda

If you have a question, here are the ways to get an answer, rated from best to worst:

  1. Search for the answer yourself.  Far too often students ask a question whose answer is available on this very page or on the top of assignment handouts.
  2. Ask a fellow classmate.
  3. Look for your question on Piazza, then ask a new one if necessary.
  4. Ask your TA during discussion section, lab, or office hours.
  5. Ask Justin in office hours.
  6. Ask Justin in lecture.
  7. Send your TA e-mail.
  8. Send Justin e-mail. Note that this is by far the worst way to ask a question. E-mail as a communications medium simply does not scale to 180+ students.

Readers

Name Grading Accounts E-mail
Albert Lu cs61c-ac --> cs61c-bg albert.lu.2014@gmail
Alvin Wong cs61c-bh --> cs61c-cc alvwong8@gmail
Jay Patel cs61c-cd --> cs61c-ed patel.jay@berkeley
Jhoong Roh cs61c-ee --> cs61c-fq jhoong.roh@berkeley
Kelvin Chou cs61c-fr --> cs61c-gu kchou@berkeley
Peter Chen cs61c-gv --> cs61c-hz adslcx@gmail



Resources and Handouts

Reference card for GDB version 5:  (pdf | ps | dvi)
Harvey notes on C:  (pdf)
Hilfinger notes on Memory Management:  (pdf)
MIPS Green Sheet:  (pdf)
Floating Point Java Demos:  (html)

P&H We will be using the revised fourth edition of Patterson and Hennessy's Computer Organization and Design book ("P&H"), ISBN 0123747503. This book can also be purchased in digital form via the bookstore or the CafeScribe website, ISBN 9780080886138.
Beware buying from a site that imports books from Asia, since the content of that book is different (i.e. ARM instruction set instead of MIPS). These companies often lie about what version they are selling, sometimes taking the image of the US edition and claiming that it is the same.
K&R We are also requiring The C Programming Language, Second Edition by Kernighan and Ritchie ("K&R"), and will reference its sections in the reading assignments. Other books are also suitable if you are already comfortable with them, but our lectures will be based on K&R.
WSC Finally, we will be using The Datacenter as a Computer: An Introduction to the Design of Warehouse-Scale Machines ("WSC"), which is freely available online here.

The subjects covered in this course include: C and assembly language programming, how higher level programs are translated into machine language, computer organization, caches, performance measurement, parallelism, CPU design, warehouse-scale computing, and related topics. The only prerequisite is that you have taken CS61B, or at least have solid experience with a C-based programming language.


PiazzaThe course discussion forum is hosted by Piazza. We will use this for asking and answering questions and making announcements.




CS Illustrated

Illustrations by Ketrina Yim (csillustrated.berkeley.edu)
Number
Representations:
Integer Representations Comparing Integer Representations Comparing Integer Representations 2 Comparing Integer Representations 3
Floating Point
Numbers:
Floating Point Floating Point Interpretations Floating Point Number Line
Caches: Caching Overview Cache Misses Cache Associativity
Pointers and
Arrays:
Pointers and Arrays

CS61C, http://inst.eecs.berkeley.edu/~cs61c/ (Last Updated: 2013-07-10 @ 17:15)