SCHEDULE


IMPORTANT NOTE: The following schedule represents a current best guess concerning actual due dates (and everything else), to give you a general idea of the pace and timing of the class. This schedule is likely to change as the quarter progresses.
This document

Reading assignments are from Patterson and Hennesey (P&H) unless specified otherwise. K&R refers to The C Programming Language by Kernighan and Ritchie.

Skip directly to Week 1 | Week 2 | Week 3 | Week 4 | Week 5 | Week 6 | Week 7 | Week 8 | Week 9 | Week 10

DAY PREPARATION IN-CLASS TOPIC/ACTIVITY FOLLOW-UP
M1
Reading:
P&H: Ch. 1 - 1.4
P&H: Appendix A.3, A.4

Video:
Architecture Basics (COMP 105 view)
(including Compilation/Assembly Example)
Syllabus

Course Overview and Big Ideas
(including Von Neumann architecture, Fetch/Execute Cycle, Stored Program Concept)

First Introduction to C (video for review)
Example C code
HW #1
Beginner C Programming Practice 1a: HelloWorld (See Gradescope for the link to the GitHub assignment)
You may find this document on using GitHub for assignments useful.
You may find this video on YouTube helpful (note that their example is a mini-Python program rather than a mini-C program). They assume you download and use GitHub Desktop, which you may choose to do.
W1
Reading:
K&R: 1.7 - end
K&R: 6.1 - 6.2, 6.7
Optional: Make Manual 2-2.4
Homework Due in Gradescope:
HW #1
Programming Project Due in GitHub and Gradescope:
Beginner C Programming Practice 1a: HelloWorld
More C:
Arrays and Strings (video - 16 min),
Structures (video - 4 min, slides),
C pointers (video - 30 min, slides),
Parameter Passing, I/O using printf/scanf (video - 7.5 min, slides)
Pointer Exercise (questions #1-4)
Beginner C Programming Practice 1b: ParseInput (See Gradescope for the link to the GitHub assignment)
F1
Reading:
K&R: Ch. 1 - 1.6 and/or
Essential C and/or
The GNU C Programming Tutorial
K&R: 5.1 - 5.5
Optional: Tutorial on Pointers and Arrays in C by Ted Jensen.
Review/Discussion Questions: DQ #1
Programming Project Due in GitHub and Gradescope:
Beginner C Programming Practice 1b: ParseInput
Common Pass-by-Reference Error (video - 2:46) (slide)
Strings, Arrays, and Pointers (video - 23:19) (slides)
typedef (video - 4:23) (slide)
C compilation (video - 3:38) ( steps, data flow )
Segments of a Process
Makefiles: (video - 4:49) (slide) (Example)
Pointer Exercise (questions #5-7)
Disassembler Utilities PP (See Gradescope for the link to the GitHub assignment)
DAY PREPARATION IN-CLASS TOPIC/ACTIVITY FOLLOW-UP
M2 (2018: M2 and W2)
Pre-Class Videos:
Static vs. Dynamic Memory Allocation (video - 12:13) (slides)
Decimal, Octal, Binary Representations (video - 9:55) (slides)
Representing Positive and Negative Integers (video - 21:39) (slides)
Reading:
P&H: 2.4 (should be review), 3.1 - 3.3
Review/Discussion Questions: DQ #2
Review Pointer Exercises from last week
Addition & Subtraction, including Overflow
(part of the More Details on Two's Complement slide)
Exercises related to Number Representation
Sign Extension for Integers (video - 3 min)
(part of the More Details on Two's Complement slide)

HW: Interpreting Binary Data, Part A
W2F2
Pre-Class Videos:
Representing Floating Point Numbers (video - 17:10) (slides)
Reading:
P&H: 3.5 (skim pgs. 203-221)
P&H: 3.9,3.10
Programming Project Due in GitHub and Gradescope:
Disassembler Utilities PP
Exercises related to Number Representation HW: Interpreting Binary Data, Part B
F2On your own
Reading:
Reference: A.1, A.2, A.5
Integer Multiplication (video - 23 min) (slide)
ASCII, Unicode (see the chart on the Wikipedia page on UTF-8) (video - 18:18)
DAY PREPARATION IN-CLASS TOPIC/ACTIVITY FOLLOW-UP
M3
Pre-Class Videos:
Review: Assembly & Machine Code and the CPU (video - 3min)
Introduction to Assembly Language and MIPS (video - 10min) (slides)
Reading:
P&H: The BIG Picture, p. A-12 (in Appendix A, section 2)
P&H: Ch. 2.1 - 2.3
Textbook graphic
Structured Design:
Aquarium Structure Chart
Example Structure Chart
Getting Values Into Registers (Constants, Values from Memory),
Summary & Two Examples
Review Compilation, Assembly
In Class Exercises (.doc)
Videos that Review Class:
Structured Design - 9 min
Initializing Registers With Constants, Load and Store, Multiplication via Shift, Registers: Initial Look, Move pseudo-instruction, Two Examples

Mars (MIPS Simulator) (optional)
W3
Pre-Class Videos:
MIPS: Conditions & Loops (video - 30min) (slides)
Blocks & FORTRAN (a readable language without blocks): 0:00
Equality testing in MIPS: 15:38
Less Than: 20:30
Loops in FORTRAN and MIPS: 24:25
Reading:
Ch. 2.6 - 2.7
Homework Due:
HW: Interpreting Binary Data, Parts A & B (Alyce: in future, this could be due earlier, now that it's just Parts A & B)
Instruction Summary After Loops (.html)
decisions.txt worksheet

Review: Arrays and lw/sw offsets (slide )
Videos that Review Class:
MIPS: Conditions & Loops (video - 30min) (slides)
The Meaning of Blocks: 0:00
FORTRAN (a readable language without blocks): 4:08
Exercise 1 and discussion: 11:10
Equality testing in MIPS: 15:38
Less Than: 20:30
Importance of Comments: 22:20
Exercise 2 and discussion: 23:35
Loops in FORTRAN: 24:25
Loops in MIPS (Array context): 26:04

solution (.txt) to worksheet from class

HW: MIPS (A)
F3
Pre-Class Videos:
Arrays and Pointers Example (video - 20.5min)
Reading:
Ch. 2.14
Arrays vs. Pointers: worksheet (.txt)
Arrays vs. Pointers: (solution (.txt))
(in-class version of solution (.txt))
DAY PREPARATION IN-CLASS TOPIC/ACTIVITY FOLLOW-UP
M4
Reading:
Ch. 2.8, 2.13, 2.12
Skim A.6
Homework Due:
HW: MIPS (A)
Review: Fetch-Execute Cycle and the Program Counter (PC)
Memory Diagram (.gif)
MIPS: Procedures (video - 22min -- discussion of Stack begins at 15:50, slides)
MIPS: Procedures More about using the Stack (this may not be a great example)
Examples and Exercises:
MIPS: Procedures Variation on Previous Arrays and Pointers Example using Procedures (no stack)
MIPS: Procedures Procedure Example (leaf procedure, simple stack example)
MIPS: Procedures fact.s (txt)
MIPS: Procedures In Class Exercise
HW: MIPS (B)
W4
Reading:
Ch. 2.5, 2.10 (end of 2.10 is particularly relevant for Disassembler project)
Ch. 2.9, 2.11, 2.19, 2.20
Homework Due:
HW: MIPS (B)
MIPS: Procedures (continued)
Translating MIPS Assembly to Machine Code, including all 3 Formats and special processing for branch and jump instructions (slides)
Final Summary of Instruction Formats
MIPS Assembly ←→ Machine Mappings (slides, video - 4 min)
Work on Disassembler PP
Videos that Review Class:
MIPS/RISC Design Principles (6 min) (RISC = Reduced Instruction Set Computer)
Machine Code Layout for R- and I-format Instructions (8:20 min)
Layout for slt, etc (8.5min)
Review: beq offsets (translating beq instructions to machine code) (slide, video - 6 min)
Review: lw/sw offsets (slide )

HW: Interpreting Binary Data, Part C
HW: MIPS (C)
Disassembler PP
F4
Reading:
B.1-B.3, B.5
Homework Due:
HW: Interpreting Binary Data, Part C
HW: MIPS (C)
Gates and Adders
(video from class - 33 min)
Gates slides
Going from Truth Tables to Gates slide
Binary Addition slides
ALU slides
Constructing an ALU (slides from textbook)
Very Important sample diagram
Review:
00000000 00010000 01000000 00100000 What does this mean? Depends on how a program interprets it. (no video/audio)
MIPS add and srl using same binary, i.e.,
000000 00000 10000 01000 00000 100000 (audio - 4.5min)
MIPS slt and beq (slide, audio/video - 20min (video becomes relevant from 9:40 to 14:45))
MIPS j (slide, whiteboard pic, audio - 5min )
Gates and Adders (video from 2017 - 33 min)
DAY PREPARATION IN-CLASS TOPIC/ACTIVITY FOLLOW-UP
M5
Reading:
Ch. 1.4-1.5
B.7-B.8 (through the "Register Files" subsection, which ends on p. B-56)
optional: A.9-A.10
Pre-Class Video:
MUX circuit (video) (5:14, with quick review of one-bit ALU in first 2 min)
PLA\'s and Memory Latches
(extra example: see slide 18)
State Elements
state_elements.circ
Videos that Review Class:
PLA\'s and Memory Latches (video from 2017 - 33 min)
W5
Practice Midterm (skip page dealing with performance, which we will address later)
Final Summary of MIPS Assembly Instructions and Registers
Final Summary of Machine Code Instruction Formats
F5
Programming Project Due in GitHub and Gradescope:
Disassembler PP
Review material through M5
Midterm Review (Practice Midterm)
DAY PREPARATION IN-CLASS TOPIC/ACTIVITY FOLLOW-UP
M6 MIDTERM
Label Table Project
Assembler Project
W6
Reading:
Ch. 4.1-4.3

Review Memory Latches and MUX circuit from previous classes

Pre-Class Video:
Quick Review to Provide Context -- 2:50
Single-Cycle Datapath (slides 1-13)
Videos that Review Class:
Building up the Single-Cycle Datapath -- 19:41 (up to, but not including, Control Lines)

HW: Single-Cycle Datapath

Optional: (used by a colleague in 2008)
PathSim (.html)
PathSim Lab (.html)
F6
Reading:
Ch. 4.4-4.6
Programming Project Due in GitHub and Gradescope:
Label Table Project
Review Single-Cycle Datapath from Wednesday
Single-Cycle Datapath Control Lines (slides 14-15)
Circuits for Control Lines (slides 3 - 4)
Datapath Stages (slides 16-27)
(Multicycle logic -- slides 9 - 14)
Presentation Topics
Videos that Review Class:
Quick Recap of R-format, lw Before Adding Control Lines -- 2:22
Single Cycle Datapath Control Lines -- 6:27
Full lw Datapath with Control Lines -- 5:20
Single-Cycle Datapath Stages (and times): add, lw, and beq -- 8:14

Choose a presentation topic

EVERYTHING BELOW THIS POINT IS SUBJECT TO CHANGE DUE TO DOGL !!!

DAY PREPARATION IN-CLASS TOPIC/ACTIVITY FOLLOW-UP
M7
Reading:
Ch. 4.7-4.8
Homework Due:
HW: Single-Cycle Datapath
Review Datapath Stages
Pipelining (textbook slides, Alyce's slides)
Videos that Review Class (from 2017):
Pipelining -- 34:27
W7
Reading:
Ch. 1.6-1.8, 1.10-1.11
Moore's Law; Graph showing performance trends (dated, but still relevant)
Machine Performance (slides)
Videos that Review Class (from 2017):
Machine Performance 50:42 (first 3 min. are review of the textbook's version of the "big picture"; overview of Moore's Law is 3:00 - 6:30; Measuring Performance starts at 6:30)
F7
Reading:
Ch. 4.10,4.14,4.15
optional: Ch. 4.11,4.12
Presentation Proposal
Assembly Language Exercises
HW: Single-Cycle, Multi-Cycle, Pipelined Datapaths
DAY PREPARATION IN-CLASS TOPIC/ACTIVITY FOLLOW-UP
M8
Pre-Class Video: Memory Hierarchy & Caches (47:12) (slides)
Intro to Memory Hierarchy -- 0:00
Temporal & Spatial Locality -- 3:18
Caches: Creating the Large Amount / Low Cost Illusion -- 7:35
Cache Basics: Hits & Misses -- 9:50
Direct-Mapped Caches -- 13:50
Example -- 18:00
Write Policies -- 20:10 (with Example at 22:30)
"Animation" -- 23:25
Making Things Faster (including Multi-Word Lines) -- 25:55
Example -- 29:30
Instruction Hits/Misses -- 32:00
Multiple Caches -- 34:12
Associative Caches -- 35:56
Set-Associative Example -- 38:00
Replacement Policies -- 39:15
Revisiting Multi-Level Caches (typo: want to keep hit rate high, or miss rate low) -- 41:30
Summary -- 42:25
Reading:
Ch. 5.1-5.4
Programming Project Due in GitHub and Gradescope:
Assembler Project
Continue with Assembly Language Exercises from Friday
Work on Caches Homework (due W9)
Homework: Caches
W8
Reading:
Ch. 5.5
Homework Due:
HW: Single-Cycle, Multi-Cycle, Pipelined Datapaths
this summary of single-cycle, multi-cycle, and pipelined datapaths might be helpful
Assembly Language Programming Review
Simple Function Call Practice (no stack), Solution
Called Function (with array indexing) Practice (no stack), Solution
Called Function (with pointer array traversal) Practice (no stack), Solution
Experiment from F7: Stack Practice (with deliberately poor use of s and t registers), Solution
Follow-Up Experiment from F7 (salmon & yellow sheets): Recursive, Tail-Recursive, and Iterative Factorial Functions
Presentations:
Physical Computer -- Dylan, Gus

In-class experimental quiz on assembly language programming, including the use of the stack (could replace assembly programming question on final exam if people do well).
Homework: Caches
F8
Reading:
Ch. 5.7, 5.8, 5.15, 5.16
Reflections on W8 Presentations Due
Presentations: DOGL
Multiplication (and Division?)
Moore's Law: Transistors to Multicores
Actual Final Exam Take-home Question (This is a real exam question, so do not talk about it with anyone else.)
DAY PREPARATION IN-CLASS TOPIC/ACTIVITY FOLLOW-UP
M9 MEMORIAL DAY
Video of Function Calls & the Stack
The video is in 2 parts: an overview of the Fibonacci algorithm & code (10:46), and an animation of the register and stack manipulations as the program executes (15:40). The structured C code in the overview is much easier to understand than the stack machinations that make it possible, so I strongly recommend you become comfortable with the overall structured algorithm before you try to follow the register and stack manipulations. You can also see the slides: overview slides and slides for animation (it takes 28 slides).
W9
Reading:
6.1-6.5
Homework Due:
Homework: Caches
Presentations:
Mice, Trackpads, Peripherals
Virtual Memory
Disks and RAID
Multiplication (and Division?)
Moore's Law: Transistors to Multicores
Reflections on W9 Presentations
F9
Reading:
Ch. 6.6
Reflections on W9 Presentations Due
Presentations:
GPUs
Parallel Programming
Mice, Trackpads, Peripherals
Virtual Memory
Disks and RAID
Reflections on F9 Presentations
Don't forget the practice final exam
DAY PREPARATION IN-CLASS TOPIC/ACTIVITY FOLLOW-UP
M10
Reading:
Ch. 6.7-6.9
Reflections on F9 Presentations Due
Presentations:
Server Farms and Cloud Computing
E-Waste, Recycling
GPUs
Parallel Programming
Review practice final exam
Reflections on M10 Presentations
W10
Reflections on M10 Presentations Due
Presentations:
Quantum Computing
Pushing the Envelope: Processors of the Future
Server Farms and Cloud Computing
E-Waste, Recycling
Review practice final exam
Reflections on W10 Presentations
F10
Reflections on W10 Presentations Due
Presentations:
Quantum Computing
Pushing the Envelope: Processors of the Future
Reflection on F10 Presentation due on Monday
Solutions for Practice Final Exam
Exam Week Time and place for Final Exam will be announced on the Registrar's web site.