This is an archive of a course I taught Summer 2024, preserved here as a resource for future students.

ECE/COMPSCI 250D: Computer Architecture

Section 001, Summer 2024


Fig. 1: This computer costs more than your car.
Quick links: Overview · Schedule · Syllabus · Resources

Overview

Lecture location: Wilkinson 126 (except 5/29, 5/30, and 6/13, see calendar below for details)
Lecture time: Mon/Tue/Wed/Thu, 10:30AM - 12:00PM

Instructor: Dr. Tyler Bletsch
Email: Tyler.Bletsch AT duke.edu
Office Hours: After class and lab til nobody's left or I get hungry/sleepy; also by appointment

Recitation location: Wilkinson 126 (except 5/29, 5/30, and 6/13, see calendar below for details)
Recitation time: Tue/Wed/Thu, 1:00PM - 2:15PM

Undergraduate Teaching Assistants:

UTA Office Hours: See Ed post

Course Textbook: David A. Patterson and John L. Hennessy. Computer Organization and Design: The Hardware/Software Interface, 5th edition, Morgan-Kaufmann.
Available free online from Duke Library here! (Physical copy from Amazon, AddAll) — Not the "ARM" edition or the "Revised Printing"

Links:

Schedule

#DateLectureReadingRecitationHomework due
(11:55:00pm)
1 Wed 5/15 Intro/Overview Chapter 1 R01. Unix, text editing, and basic C, part 1
2 Thu 5/16 C programming Resources linked below R01. Unix, text editing, and basic C, part 2 (Due Fri 5/17)
Homework 0
3 Mon 5/20 C programming Resources linked below,
LinkedList.c,
LinkedList.java,
4 Tue 5/21 From C to binary Sec 2.1-2.4, 3.2, 3.5 R02. Pointers and memory management, part 1
- Q1-2 with Aaric Han
- Q1-2 with Connor Murphy
5 Wed 5/22 Assembly
- addone.s
Sec 2.5-end R02. Pointers and memory management, continued
6 Thu 5/23 Assembly Sec 2.5-end R02. Pointers and memory management, part 2
- leaky.c
- Q3-7 with Aaric Han
  ^ Minor variation from your version: Missing Q6.
- Sorting+Tips with Conner Murphy
Mon 5/27 Memorial day
7 Tue 5/28 Assembly R03. Assembly programming with SPIM, part 1
(Q1-4: SPIM intro)
- SPIM intro
   - Code: simple.s
   - Solution: printint.s
- C to MIPS 1: basic manual compiling
   - Code: squares.c
   - Solution: squares.s
- Assembly: strlen function by Yi Chen
- Starter code: my_strlen_template.s
(Due Tue 5/28)
Homework 1
- prog.c
- C debug guide
- Tool intro
8 Wed 5/29
Room change: Teer 203
Combinational logic
Sec 4.1-4.2, B.1-B.3, B.5.
basic_logic_ev.circ
Room change: Teer 203
R03. Assembly programming with SPIM, continued
9 Thu 5/30
Room change: Teer 203
Sequential logic,
Finite state machines
Sec B.7-B.11,
combo_lock_ev.circ
Room change: Teer 203
R03. Assembly programming with SPIM, part 2
- Assembly: sum function by Maverick Chung
   - Solution: foo_function.s
- C to MIPS 2: caller saved registers
   - Code: squares-with-call.c
   - Solution: squares-callersaved.s
- C to MIPS 3: callee-saved registers
   - Solution: squares-calleesaved.s
- Updated recusion example from Jerry Wang
10 Mon 6/3 Datapath design Sec 4.3-4.4, 4.9
11 Tue 6/4 Datapath design Sec 4.3-4.4, 4.9 R04. Digital design with Logisim
(Due Tue 6/4)
Homework 2
- prog_part.c
- MIPS debug guide
- Structs
- Data structures
- Calling conventions
- strlen
- Loop/sort tips
- Data+breakpoints
12 Wed 6/5 Memory hierarchy and caches

(After class)
Midterm review session
  Bring questions!
Sec 5.1-5.5 R05. Using Logisim for larger projects, part 1

(After recitation)
Midterm review session
  Bring questions!
13 Thu 6/6 MIDTERM EXAM
- Practice midterm
  (blank version)
- Live solutions
- Provided reference sheet
- Study guide
R05. Using Logisim for larger projects, part 2
- FSM walkthrough with Andy He
14 Mon 6/10 Caches

Sec 5.1-5.5
(Due Mon 6/10)
Homework 3
- Logisim debug guide
- Logisim tips
  ^ Video shows older Logisim,
      but it's still valid

15 Tue 6/11 Caches

Sec 5.1-5.5
R06. Register file and ALU, part 1
16 Wed 6/12 Virtual Memory Sec 5.6-5.9 R06. Register file and ALU, continued
17 Thu 6/13
Room change: Hudson 125
I/O
Sec A.8
Room change: Hudson 125
R06. Register file and ALU, part 2
- input_output.circ
18 Mon 6/17 Pipelined cores Sec 4.5-end
19 Tue 6/18 Multicore Chapter 6 R07. Caching and virtual memory, part 1
(Due Tue 6/18)
Homework 4
- TA Guide to HW4
- Processor tips guide
- Logisim Evolution
- HW4 tool intro
- Logisim tips
- ALU/Control tips
- Tracing/debugging
- TTY/Keyboard tips
- Dramatic intro (alt)

Wed 6/19 Juneteenth holiday (no class)
20 Thu 6/20 Intel x86 Example code
Intel developer manual
(pages 1..3908)
R07. Caching and virtual memory, part 2
R08. Pipeline exercises
R09. Free exploration (time allowing)
- memdance.c
21 Mon 6/24 Final exam review session
  Bring questions!
(Due Mon 6/24)
Homework 5
- Virt2phys intro
- Cachesim intro
- Cachesim example
- Cachesim Guide
Wed 6/26 FINAL EXAM, 2pm-5pm Study guide
Practice final
Reference sheet
Live solutions
(Due Thu 6/27 at 11am, *optional*)
  No late deadline
Extra credit
- Executable files

Syllabus & policies

Course synopsis

Computer structure, machine language, instruction execution, addressing techniques, and digital representation of data. Computer systems organization, logic design, microprogramming, and interpreters. Symbolic coding and assembly systems.

Prerequisite: Computer Science 201 or consent of instructor.

Grading breakdown

This course will require readings from the textbook, problem sets, programming assignments, and digital logic design. Grading breakdown:

Category%
Homework55%
Midterm exam15%
Final exam25%
Recitation5%

Homework grading

You are expected to complete the homework individually unless otherwise stated. However, you may discuss topics covered in the class.

Late homework submissions incur penalties as follows:

For assignments that split writing and coding answers, this above applies to the entire assignment (i.e., code and written together). The later of the two submit times is used for this.

NOTE: If you feel in advance that you may need an extension, contact the instructor. We can work with you if you see a scheduling problem coming, but extensions cannot be granted at or near the due date!

Your homework grade will be based on what you submit to Sakai and when you submit it. The common excuses listed below will be rejected for the reasons shown:

ExcuseThing you could have done which invalidates excuse
My internet was slow or flaky so my submission was late.Submit with plenty of margin. There's no reason the assignment can't be submitted HOURS OR DAYS in advance.
I meant to submit, but I forgot to click the submit button.After submission, leave and re-visit the submission page to make double-sure your file is uploaded properly.
My computer broke and I lost my work!It's the modern era. Use one of the dozens of data mirroring or backup services: Dropbox, Google Drive, Box (free at Duke!), Crashplan, or just good old fashioned local backups. You should be able to set your laptop on fire and lose zero bytes of work.
I submitted the wrong file, let me send you the right file!After submission, re-download your files from Sakai to verify it's correct. Test it from scratch to ensure it's what you expect.
One tiny thing was wrong, and I can fix it! Let me get a regrade!The time to find those bugs is before submission. When you've built your program/circuit, you're not done...that's when testing begins! Test your solution under a variety of conditions. See here for a primer on software testing.
I didn't understand the requirements, let me fix my program and get a regrade!If you're the slightest bit unsure if your program meets the requirements, ask for clarification in lecture, recitation, or the Ed forum. If you're worried your submission won't pass our testing, run through it with a TA or the instructor.

I'm not trying to be a jerk, but this is the part of your academic career where we build individual competence, and as in the real world, oversights can be costly.

Recitation grading

Recitation is where you'll learn concrete skills to complement the lecture's theoretical material, and is essential. Recitation grading works as follows:

Grade appeals

All regrade requests must be in writing. Email the TAs with your questions. After speaking with the TAs, if you still have concerns, contact the instructor

All regrade requests must be submitted to the instructor no later than 1 week after the assignment was returned to you.

Academic integrity

I take academic integrity extremely seriously. Academic misconduct will not be tolerated, and all suspected violations of the Duke Undergraduate Honor Code will be referred to the Office of Student Conduct. A student found responsible for academic dishonesty faces formal disciplinary action, which may include suspension. A student twice suspended automatically faces a minimum 5-year separation from Duke University.

In addition to the measures taken by the Office of Student Conduct, the affected assignment(s) will receive zero credit, or possibly -100% in egregious cases.

If you are considering this course of action, please see me instead, and we can work something out! I want every student in my course to be successful.

Resources