Computer Systems from the Ground Up

Welcome to the Winter 2015 offering of CS107e.

Announcements

All class announcements will be posted to Piazza.

Course Information

Lectures: Mon & Fri 12:50-2:05 pm, Rm 107, Littlefield Center

Lab: Tue 7:00-9:00 pm, Gates 415, if you have trouble getting in call Phil's office at 650-725-9046 (across the hall)

Lecturers: Dawson Engler, Pat Hanrahan, Phil Levis

CA: Isabel Bush

Office Hours:

  • Hanrahan, Mon 2:15 to 3:30 pm, Gates 370
  • Levis, Fri 11AM-Noon, Gates 412
  • Engler, Fri 2:15 to 3:30 Gates 314 or appt
  • Isabel, Wed noon-2pm, Gates B28; Thurs 4-6pm, Huang Basement

Schedule

In the readings, K&R is The C Programming Language (Kernighan and Ritchie), and EssentialC is a PDF available at http://cslibrary.stanford.edu/101. A digital copy of K&R is available to Stanford students via [Safari Books Online] (http://proquest.safaribooksonline.com.ezproxy.stanford.edu/book/programming/c/9780133086249). Please read the assigned readings before attending lecture and lab.

You should also read the Guides for each week.

Note that the schedule includes a guest lecturer Quinn Dunki on Mon Feb 2nd, and a tour of the Computer History Musuem on President's Day Feb 16th.

Topics Readings
Week 1 Jan 5
Lecture 1 (Mon): Introduction (slides) Review electricity, binary and hexadecimal numbers and bitwire operations, and the unix command line.
No Lab
Lecture 2 (Fri): Introduction to ARM (slides) : Blinking an LED (code) Start with Baking Pi (intro, ok01, ok02) and then read about ARM ASM.
Week 2 Jan 12
Lecture 3 (Mon): ARM Assembly and Machine Code (slides) Read sections 4.1-4.5 from the ARM ISA
Lab 1 : Setup the Raspberry Pi
Assignment 1 : Larson scanner
Lecture 4 (Fri): Introduction to C (slides), (code) Brush up on C syntax, data types, operators, control structure, function calls. EssentialC chapters 1, 2, and 4; or K&R 1, 2, 3, 4 and 5.1-5.4. Skip sections involving characters, strings, io, and standard libraries. Read the about the history of C
Week 3 Jan 19
Martin Luther King Holiday - No Class
Lab 2 : Below C Level
Assignment 2 : Clock
Lecture 6 (Fri): Functions (slides, code) Read (or read again) about functions in C (Chapter 4 in K&R, Section 4 in Essential C), Read this nice explanation of local data and frame pointers
Week 4 Jan 26
Lecture 7 (Mon): Serial communication, ASCII and strings (slides, code) Read about characters and strings, basic IO (getc, putc, puts, printf), and structures (Section 1.5, 1.6, 1.9, 5.5, 6, 7 in K&R; Section 3 in EssentialC). Read about Serial Communication.
Lab 3 : Programming a UART
Assignment 3 : String formatting and printing
Lecture 6 (Fri): Linking, loading and starting (slides, code) Read David Welch's articles on baremetal programming and bss data.
Week 5 Feb 2
Guest Lecture (Mon): Quinn Dunki, Building Veronica
Lab 4 : Understanding linking and loading
Assignment 4 : Debugger
Lecture 7 (Fri): Graphics and the framebuffer
Week 6 Feb 9
Lecture 8 (Mon): Keyboards
Lab 5: Setting up the framebuffer and keyboad
Assignment 5: Terminal program
Lecture 9 (Fri): Interrupts
Week 7 Feb 16
President's Day - Computer History Musueum Tour
Lab 6: Working with interrupts
Assignment 6: Interrupt-driven terminal program
Lecture 10 (Fri): Audio
Week 8 Feb 22
Lecture 11 (Mon): MIDI Input and Peripherals
Lab 7: PWM and sound
Assignment 7: Sound
Lecture 12 (Fri): Networking I
Week 9 Mar 2
Lecture 13 (Mon): Networking II
Lecture 14 (Fri): Memory management: sbrk/malloc
Week 10 Mar 9
Lecture 15 (Mon): Caches
Lecture 16 (Fri): To Linux and Beyond

Information

Course description

Labs

Assignments and grading

Late days

Collaboration policy

Resources

Readings