CS 61C Great Ideas in Computer Architecture (Machine Structures). Spring 2013, UC Berkeley CS61C Spring 2013MWF 10-11am 2050 VLSB

## Timely Announcements

2013-01-15 Welcome to CS61C Spring 2013!

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

## 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. 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 the cheater AND the enabler/giver 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 Section Lab Assignment Due
1
01/23 W Course Intro: Great Ideas in Comp Arch   [No discussions] Lab 0: Number Representation HW0: Introduce Yourself
Due in lab next week
01/25 F Number Representation P&H: 2.4
Binary slides
2
01/28 M C Intro: Basics B. Harvey's Intro to C
K&R Ch. 1-4
Section 1: Number Rep. Lab 1: C HW1: C and Number Representation
Solutions
Due 02/03 @ 23:59:59
01/30 W C Intro: Pointers, Arrays, Strings K&R Ch. 5-6
C Reference Slides
02/01 F MIPS Intro P&H: 2.1-2.3
3
02/04 M MIPS lw, sw, Decisions I P&H: 2.9, 2.10 (only p.128-129) Section 2: MIPS Lab 2:
C Pointers and GDB
HW2: rgrep
Due 02/10 @ 23:59:59
02/06 W MIPS Decisions II P&H: 2.6, 2.7, 3.2
02/08 F MIPS Instruction Format I (ZB) P&H: 2.5, 2.10
4
02/11 M MIPS Instruction Format II (JH)   Section 3: MIPS Control Flow and Instruction Formats Lab 3:
Assembly Practice
Project 1: MIPS Instruction Set Emulator (ZB)
Part 1 - Due 02/17 @ 23:59:59
Part 2 - Due 02/24 @ 23:59:59
02/13 W MIPS Procedures I P&H: 2.8 (p. 112-118)
02/15 F MIPS Procedures II & Logic Ops P&H: 2.8, B.6
5
02/18 M Administrative Holiday (Presidents Day) Section 4: MIPS Procedures
(Videos)
Lab 4:
Function Calls and Pointers in MIPS
02/20 W Caches I P&H: 5.1
02/22 F Caches II P&H: 5.2 (p. 457-470)
6
02/25 M Caches III P&H: 1.4, 5.3, 5.5 Section 5: Direct Mapped Caches

Section 6: Floating Point, C.A.L.L. (Videos)
Lab 5:
Cache Blocking
[Midterm Studying]
02/27 W Floating Point P&H: 3.5, 3.8
IEEE 754 Simulator
03/01 F Compilation, Assembly, Linking, Loading (JH) P&H: 2.12, B.1-B.4
03/01 F TA Midterm Review: 6-9pm, 2050 VLSB (problems)
03/02 S HKN Midterm Review: 4-7pm, 10 Evans
7
03/04 M Datacenters and Cloud Computing Warehouse-Scale Computers: Ch 1, Ch 3, 5.1-5.3 [No discussions] Lab 6:
Hadoop and MapReduce
HW3: MIPS, Floating Point, and Caches
Solutions
Due 03/10 @ 23:59:59
03/04 M Midterm: Time 7-9pm, location by last name:
(Midterm) (Answers) (Rubric)
03/06 W MapReduce (JH) Warehouse-Scale Computers: Ch 2.4
03/08 F Flynn Taxonomy
Intel SIMD Instructions
(JH)
P&H: 1.5, 1.6, 7.1, 7.2, 7.4, 7.6
8
03/11 M Intel SIMD Continued,
Thread Level Parallelism
P&H: 7.3, 5.8 Section 7: MapReduce and WSC Lab 7:
Intel SIMD
Project 2: MapReduce (SK)
Part 1 - Due 03/17 @ 23:59:59
Part 2 - Due 03/24 @ 23:59:59
03/13 W Thread Level Parallelism P&H: 2.11
03/15 F Thread Level Parallelism
OpenMP
(JH)
OpenMP summary card
9
03/18 M Intro to Synch. Digital Systems SDS Handout Section 8: Cache Coherence and Synchronization Lab 8:
Thread Parallelism
03/20 W State and State Machines P&H: 4.2, C.3-C.6 (on CD)
State Handout
03/22 F Combinational Logic P&H: C.2-C.3 (on CD)
Logic Handout
-- 03/25 - 03/29 Spring Break
10 04/01 M Combinational Logic Blocks Blocks Handout Section 9: Logic and SDS Lab 9:
Logisim
HW4: Digital Design and FSMs
Solutions
Due 04/07 @ 23:59:59
04/03 W Single Cycle CPU Datapath P&H: 4.1, 4.3
04/05 F Single Cycle CPU Control P&H: 4.4
11 04/08 M Single Cycle CPU Control   Section 10: Single Cycle Datapath Lab 10:
More Logisim
Project 3: Performance Optimization (SRY)
Part 1 - Due 04/14 @ 23:59:59
Part 2 - Due 04/22 @ 23:59:59
04/10 W ILP: Pipelining P&H: 4.5, 4.6
04/12 F ILP: Pipelining Hazards (JH) P&H: 4.7, 4.8
12 04/15 M ILP: Multiple Instruction Issue P&H: 4.10, 4.11 Section 11: Pipelining Lab 11:
Logisim ALU
04/17 W Virtual Memory I P&H: 5.4
04/19 F Virtual Memory II (JH) P&H: 5.10-5.12
13 04/22 M Virtual Memory III   Section 12: Virtual Memory Lab 12:
Virtual Memory
Project 4: Processor Design (AC)
Due 05/05 @ 23:59:59
04/24 W I/O Basics P&H: 6.1, 6.5
04/26 F I/O: Interrupts and Networks (SRY) P&H: 6.6, 4.9
14 04/29 M I/O Disk P&H: 6.2-6.4, 6.9
Berkeley RAID Paper
Section 13: VM (cont), I/O Open lab sections
Work on proj4
05/01 W GPU Programming (AC) (optional) AMD tutorial
AMD introductory videos
05/03 F Summary and Goodbye
Reading Week
05/10 F Final Exam Review: 3-6pm, 10 Evans
Finals
05/14 Tu Final Exam: 3-6 PM, 2050 VLSB
(Final) (Answers) (Rubric)

## Weekly Schedule

 Monday Tuesday Wednesday Thursday Friday 8:00-9:00 OH - Paul611 Soda 016 LAB -- Paul330 Soda 9:00-10:00 116 DIS -- Paul85 Evans 10:00-11:00 LECTURE2050 VLSB 117 DIS -- Sung Roa85 Evans LECTURE2050 VLSB 017 LAB -- Sung Roa330 Soda LECTURE2050 VLSB 11:00-12:00 OH - Sagar611 Soda OH - Dan777 Soda 12:00-1:00 011 LAB -- Paul330 Soda 018 LAB -- Sagar330 Soda 1:00-2:00 111 DIS -- Paul85 Evans 118 DIS -- Sagar85 Evans 2:00-3:00 112 DIS -- Sagar4 Evans 012 LAB -- Sagar330 Soda 019 LAB -- Justin330 Soda OH - Alan651 Soda 3:00-4:00 119 DIS -- JustinB51 Hildebrand 4:00-5:00 113 DIS -- Zach85 Evans OH - Justin411 Soda 013 LAB -- Zach330 Soda 020 LAB -- Alan330 Soda OH - Sung Roa411 Soda 5:00-6:00 OH - Zach411 Soda 120 DIS -- Alan320 Soda 6:00-7:00 114 DIS -- Zach85 Evans 121 DIS -- Alan320 Soda 014 LAB -- Zach330 Soda 021 LAB -- Alan330 Soda 7:00-8:00 OH - Zach411 Soda 8:00-9:00 115 DIS -- Sung RoaB56 Hildebrand 015 LAB -- Sung Roa330 Soda 9:00-10:00

## Staff

 Instructor: Dan Garcia ddgarcia@cs OH:  F 11-12, 777 Soda

Head TA: Justin Hsia
jhsia@eecs
Sections: 019 LAB, 119 DIS
OH: Tu 4-5pm, 411 Soda
TA: Alan Christopher
alanchristopher@berkeley
Sections: 020 021 LAB, 120 121 DIS
OH: F 2-4pm, 651 Soda
TA: Paul Ruan
paul.ruan@gmail
Sections: 011 016 LAB, 111 116 DIS
OH: W 8-10am, 611 Soda

TA: Sagar Karandikar
skarandikar@berkeley
Sections: 012 018 LAB, 112 118 DIS
OH: Tu 11am-1pm, 611 Soda
TA: Sung Roa Yoon
sungroa@berkeley
Sections: 015 017 LAB, 115 117 DIS
OH: F 4-6pm, 411 Soda
TA: Zachary Bush
ta@zmbush.com
Sections: 013 014 LAB, 113 114 DIS
OH: M 5-6pm, 7-8pm, 411 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 Dan in office hours.
6. Ask Dan in lecture.
7. Send your TA email.
8. Send Dan 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 350+ students.

Readers

Name Grading Accounts E-mail
Anirudh Garg cs61c-aa -> cs61c-dw anirudh.garg0817@gmail
Joyjit Daw cs61c-dx -> cs61c-hv jdaw@ocf.berkeley.edu
Kevin Lee cs61c-hw -> cs61c-mv kevinsuklee@gmail
Stephen Chen cs61c-mw -> cs61c-pn stephenjchen@gmail.com

## 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)

 We will be using the revised fourth edition of Patterson and Hennessy's Computer Organization and Design book ("P&H"), ISBN 0123747503. 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. 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. 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.

The 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)
 NumberRepresentations: Floating PointNumbers: Caches: Pointers andArrays:

CS61C, http://inst.eecs.berkeley.edu/~cs61c/ (Last Updated: 2013-01-09 @ 12:51)