CS 61C Great Ideas in Computer Architecture (Machine Structures). Spring 2015, UC Berkeley
CS61C Spring 2015
Tu/Th 3:30-5pm 1 Pimentel


2015-05-06 Project 3 Competition Winners!

Congratulations to our Project 3 Competition Winners!

  • First Place, 16,515 Cat/s: Harry He and Jason Su. Award Photo
  • Second Place, 7,316 Cat/s: Shuheng Dai and Xuhao Luo. Award Photo
  • Third Place, 5,939 Cat/s: Edward Look and Maximilian Lam.
  • Honorable Mention, 5,123 Cat/s: Xin Yu Tan and Zhongxia Yan. Award Photo

2015-03-05 Grading Breakdown

For future reference, the grade breakdown for the course is summarized in the first set of lecture slides. The grading scale is available here.

2015-01-22 Webcast Link

The lecture webcasts for this semester are available here.

2015-01-13 Welcome to CS61C Spring 2015!

Some important announcements will be placed here and many will be made on Piazza. Please check both often, as content will be updated frequently.

Lecture, Reading, and Assignment Calendar

Policy on Assignments and Independent Work. Unless explicitly stated otherwise, all homeworks and projects are to be YOUR work and your work ALONE. Collaboration in CS61C is limited to debugging. You should not discuss ideas/approaches or pseudocode with other students. What you hand in must be entirely your own work. 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:

  • A letter to your university record documenting the incidence of cheating.
  • An automatic F in the course for both you and the enabler/giver of the assignment.
Both the giver and receiver are equally culpable and suffer equal penalties.

Wk Date Lecture Topic Reading Section Lab Assignment Due
01/20 Tu Intro, Number Representation (4th) P&H: 2.4
(5th) P&H: 2.4
Binary slides
Section 0: Number Representation Lab 0: Intro, git, Number Rep
HW0: Intro and Number Representation
Due 02/01 @ 23:59:59
01/22 Th C Intro, Pointers B. Harvey's Intro to C
K&R Ch. 1-5
01/27 Tu C Arrays, Strings, Pointers K&R Ch. 5-6
C Reference Slides
Section 1: C Basics Lab 1: C and GDB
01/29 Th C Memory Mangement, Usage K&R: 7.8.5, 8.7
02/03 Tu Intro to Assembly Language, MIPS Intro (4th) P&H: 2.1-2.3
(5th) P&H: 2.1-2.3
Section 2: C Memory Management and MIPS Intro Lab 2: Advanced C, Memory Management
HW1: C (Build git Part I)
Due 02/08 @ 23:59:59
02/05 Th MIPS, MIPS Functions (4th) P&H: 2.6 - 2.9, 2.10 (only p.128-129), B.6
(5th) P&H: 2.6 - 2.9, 2.10 (only p.111-113), A.6
02/10 Tu MIPS Instruction Formats (4th) P&H: 2.5, 2.10
(5th) P&H: 2.5, 2.10
Section 3: MIPS II / Instruction Formats Lab 3: MIPS Assembly
HW2: Advanced C (Build git Part II)
Due 02/15 @ 23:59:59
02/12 Th Compiler, Assembler, Linker, Loader (CALL) (4th) P&H: 2.12, B.1-B.4
(5th) P&H: 2.12, A.1-A.4
02/17 Tu Intro to Synchronous Digital Systems (SDS), Logic SDS Handout
Logic Handout
(4th) P&H: C.2-C.3 (on CD)
(5th) P&H: B.2-B.3
Section 4: MIPS Procedures / CALL Lab 4: MIPS Functions, Pointers
Project 1, Part 1: C and MIPS
Due 03/01 @ 23:59:59
HW3: C to MIPS Practice Problems
Ungraded (Solution)
02/19 Th Functional Units, FSMs Blocks Handout
(4th) P&H: 4.2, C.3-C.6 (on CD)
(5th) P&H: 4.2, B.3-B.6
State Handout
02/24 Tu MIPS Datapath, Single-Cycle Control Intro (4th) P&H: 4.1, 4.3, 4.4
(5th) P&H: 4.1, 4.3, 4.4
Section 5: Logic and SDS Lab 5: Logisim
Project 1, Part 2: MIPS
Due 03/07 @ 23:59:59 (a Saturday!)
02/26 Th Midterm I (Covers up to and including week 4 lectures, in-class)
03/03 Tu MIPS Single-Cycle Control, Pipelining Intro (4th) P&H: 4.5-4.8
(5th) P&H: 4.5-4.8
Section 6: Single-Cycle Datapath Lab 6: More Logisim, ALU Design
HW4: Logic, FSMs
Due 03/10 @ 23:59:59 (a Tuesday!)
03/05 Th MIPS Pipelining Hazards (4th) P&H: 4.10, 4.11
(5th) P&H: 4.10, 4.11
03/10 Tu Memory Hierarchy, Fully Associative Caches (4th) P&H: 5.1, 5.2 (p. 457-470), 5.3, 5.5, 1.4
(5th) P&H: 5.1, 5.2, 5.3, 5.4, 5.8, 1.6
Cache Flowchart
Section 7: Pipelining Lab 7: CPU Project Prep
Project 2, Part 1: ALU and Regfile
Due 03/15 @ 23:59:59
03/12 Th Caches: Direct-mapped, Set-associative, Performance See 3/10 lec
03/14 Sat Guerrilla Section #1 (Worksheet, Solutions)
03/17 Tu Multilevel Caches, Cache Questions See 3/10 lec Section 8: Caches Lab 8: Caches
Project 2, Part 2: CPU
Due 03/24 @ 23:59:59
03/19 Th Performance, Floating Point, Tech Trends (4th) P&H: 3.5, 3.8
(5th) P&H: 3.5. 3.9
IEEE 754 Simulator
03/24 Tu Administrative Holiday (Spring Break)
03/26 Th Administrative Holiday (Spring Break)
03/31 Tu Flynn Taxonomy, Data-Level Parallelism (4th) P&H: 1.5, 1.6, 7.1, 7.2, 7.4, 7.6
(5th) P&H: 1.7, 1.8, 6.1, 6.2, 6.3, 6.7
Section 9: Floating Point, AMAT, Flynn Taxonomy Lab 9: SIMD Instructions
HW5: Caches/Floating-Point
Due 04/05 @ 23:59:59
04/02 Th Amdahl's Law, Thread-Level Parallelism, OpenMP Intro (4th) P&H: 7.3, 5.8, 2.11
(5th) P&H: 6.5, 5.10, 2.11
OpenMP Summary Card
04/04 Sat Midterm II Review Session (Problems, Solutions)
04/05 Sun Guerrilla Section #2 (Worksheet, Solutions) Section 10: Cache Coherence, Synchronization Lab 10: Thread-Level Parallelism, OpenMP
04/07 Tu Cache Coherence, OpenMP Sharing Issues, Performance (4th) P&H: 5.8
(5th) P&H: 5.10
04/09 Th Midterm II (Covers up to and including 3/31 lecture, in-class)
04/14 Tu Warehouse Scale Computing, MapReduce (Spark) The Datacenter as a Computer: Ch 1, Ch 2.4, Ch 3, 5.1-5.3 Section 11: Spark and Warehouse Scale Computing Lab 11: MapReduce and Spark
Project 3: Performance Programming
Due 04/19 @ 23:59:59
04/16 Th OS Support, Base and Bounds, Interrupts, Virtual Memory Intro (4th) P&H: 5.10-5.12
(5th) P&H: 5.13, 5.15, 5.16
04/21 Tu More Virtual Memory, Intro to I/O (4th) P&H: 6.6, 4.9
(5th) P&H: 6.9 (only p.4-10), 4.9
Section 12: Virtual Memory and I/O Lab 12: Virtual Memory
Project 4: Intro
Project 4, Part 1: Spark
Due 04/29 @ 23:59:59
04/23 Th I/O: DMA, Disks, Networking (4th) P&H: 6.2-6.4, 6.9
(5th) 5.2, 5.5, 5.11
04/28 Tu Dependability: Parity, ECC, RAID (4th) P&H: 6.2, C-65 to C-67
(5th) P&H: 5.5, B-65 to B-67
Berkeley RAID Paper
Section 13: Parity, ECC, RAID None Project 4, Part 2: Spark on EC2
Due 05/03 @ 23:59:59

HW6: Virtual Memory
Due 05/03 @ 23:59:59
04/30 Th Summary, What's Next? None
05/06 W Final Exam Review: 2-5pm, 105 Stanley
05/07 Th Guerrilla Section #3 (Worksheet, Solutions)
05/15 F Final Exam: 7:00pm-10:00pm, Location TBD

Office Hours Schedule

Demo 4 - jQuery Week Calendar

Weekly Schedule


Krste Asanovic

Vladimir Stojanovic

Head TA: Sagar Karandikar
TA: Jeffrey Dong
TA: Martin Maas
TA: Donggyu Kim
TA: Nolan Lum
TA: Shreyas Chand
TA: David Adams
TA: Fred Hong
TA: William Huang

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 Krste or Vladimir in office hours.
  6. Ask Krste or Vladimir in lecture.
  7. Send your TA email.
  8. Send Krste or Vladimir an 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 ~400 students.


Name Grading Accounts E-mail
Dasheng Chen cs61c-ab to cs61c-fw dasheng@berkeley.edu
Jonathan Eng cs61c-fx to cs61c-kg jonathan.eng@berkeley.edu
Daylen Yang cs61c-kh to cs61c-of daylen@berkeley.edu
Manu Goyal cs61c-og to cs61c-uv mgoyal@berkeley.edu

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)
MIPS Helper Sheet:  (html)
Floating Point Java Demos:  (html)

P&H We will be using the fifth edition of Patterson and Hennessy's Computer Organization and Design book ("P&H"), ISBN 0124077269.
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)
Integer Representations Comparing Integer Representations Comparing Integer Representations 2 Comparing Integer Representations 3
Floating Point
Floating Point Floating Point Interpretations Floating Point Number Line
Caches: Caching Overview Cache Misses Cache Associativity
Pointers and
Pointers and Arrays

CS61C, http://inst.eecs.berkeley.edu/~cs61c/ (Last Updated: 2015-01-27 @ 17:39)