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

ECE/COMPSCI 250D: Computer Architecture

Section 001, Summer 2020


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

Overview

Lecture location: Online via Zoom due to COVID-19 situation - see calendar invite for link
Lecture time: MTuWTh, 10:30AM - 12:00PM

Instructor: Dr. Tyler Bletsch
Email: Tyler.Bletsch AT duke.edu
Office Hours: TBD

Recitation location: Online via Zoom due to COVID-19 situation - see calendar invite for link
Recitation time: MW, 1:00PM - 2:15PM

Undergraduate Teaching Assistants:

UTA Office Hours: See post here

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:

Adaptation to online format

Due to the COVID-19 situation, this offering will be taught online. The plan is for a one-to-one translation from in-person to online as follows:
  • Students hardware requirements:
    • a reliable computer
    • decent internet access (sufficient for video streaming and screen sharing in both directions)
    • a microphone
    • a webcam is strongly encouraged, but not strictly required
  • Student responsibilities:
    • To attend lectures and recitations fully (with focus and free of external distraction)
      • TIMEZONE NOTE: If class/recitation is within 8am-7pm local time for you, attendance is expected, else strongly recommended. Students significantly outside of the U.S. Eastern timezone are encouraged to take the course in a later semester when on-campus attendence is possible. Such students are permitted to take this online offering, but asynchronous help will be best-effort, so the instructor therefore disclaims responsibility for difficulties arising from being unable to meet for usual class, recitation, and office hours.
      • Asynchronous mode: If you have a timezone or life issue preventing you from making lectures/recitations, please fill out this form to formally request to take the course in asynchronous mode. See the form for details on that this means.
    • To keep up with electronic communications and the course calendar
    • To work on assignments consistently over time and submit them on time
    • (MOST IMPORTANT) To proactively ask questions in lecture, recitation, and office hours!
  • Class format: Lectures and recitations will be given synchronously at the currently scheduled times via Zoom meeting. Students are strongly encouraged to interrupt (either vocally and/or via the 'raise hand' facility in Zoom) to ask questions. Lectures and recitations will be recorded and made available shortly after for students to review later. Nevertheless, attendence is expected for all students not approved for asynchronous mode (see above).
  • Office hours: Instructor and TA office hours will also be held via Zoom. During recitations and office hours, the Zoom "breakout room" facility will be used to allow for 1:1 questions and help. Students can use screen sharing to show their problem, and even enable remote control to allow TAs or the instructor to indicate or demonstrate corrections.
  • Exams: While the exact mechanism and format are TBD, exams will be held as per usual in an online format.
  • Resources: In addition to the usual resources listed on this page, alternate lecture videos from a past offering of the course will also be made available as a secondary source (see resources below).
  • Grading: Grading will be traditional letter grades. Assignment quantity and content will be largely unchanged from the usual offering.
This course is dense in a normal semester and very dense in the 6-week session, so I am a bit nervous about offering it online. As such, I need to ask you folks to really be on top of things, especially asking questions as we go and getting help from myself and the TAs as soon as you run into issues. Basically, the way this is going to be successful is if we all treat it with the same dedication and focus as an in-person class.

Schedule

#DateLectureRecitationReadingHomework due
(11:55:00pm)
1 Wed 5/13 Intro/Overview R01. Unix, text editing, and basic C Chapter 1
2 Thu 5/14 C programming (See Resources below) (Due Fri 5/15)
Homework 0
(hw0part2 binary)
3 Mon 5/18 C programming R02. Pointers and memory management (See Resources below)
4 Tue 5/19 From C to binary Sec 2.1-2.4, 3.2, 3.5
5 Wed 5/20 Assembly R02½. Pointers and memory management, continued Sec 2.5-end
6 Thu 5/21 Assembly (Optional but recommended)
R03. Assembly programming with SPIM, continued
(Q1-4: SPIM intro)
- SPIM intro (💾)
   - Code: simple.s
- C to MIPS 1: basic manual compiling (💾)
   - Code: squares.c
   - Solution: squares.s
Sec 2.5-end (Due Sat 5/23)
Homework 1
prog.c
C debug guide
Mon 5/25 Memorial day (Optional but recommended)
R03. Assembly programming with SPIM, encore
(Q1-4: SPIM intro)
7 Tue 5/26 Assembly Sec 4.1-4.2, B.1-B.3, B.5. basic_logic.circ
8 Wed 5/27 Combinational logic R03½. Assembly programming with SPIM, continued
(Q5+: Calling conventions)
- 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
- FSM walkthrough with Andy He
Sec B.7-B.11
9 Thu 5/28 Sequential logic,
Finite state machines
Sec B.10, 4.3-4.4,
combo_lock.circ
10 Mon 6/1 Datapath design R04. Digital design with Logisim
R05. Using Logisim for larger projects
Sec 4.9 (Due Mon 6/1)
Homework 2 prog_part.c
MIPS debug guide
strlen (💾)
Tue 6/2 Continued lecture
11 Wed 6/3 Memory hierarchy and caches
R06. Register file and ALU Sec 5.1-5.5
12 Thu 6/4 Caches,
Midterm review session
Sec 5.1-5.5 (Due Fri 6/5)
Homework 3
Logisim debug guide
Logisim tips
13 Mon 6/8 Caches

Asynchronous MIDTERM:
   (open 12:01am ET on 6/8)
R06. Register file and ALU, continued Sec 5.1-5.5

Midterm stuff:
Study guide,
Practice midterm
(blank version)
Video: Live solutions
14 Tue 6/9 Virtual Memory

Asynchronous MIDTERM:
   (closes 11:59pm ET on 6/9)
Sec 5.6-5.9
15 Wed 6/10 Virtual Memory R07. Caching and memory (memdance.c),
R08. Cache+virtual memory examples
Sec 5.6-5.9
16 Thu 6/11 I/O Sec A.8 (Due Sat 6/13)
Homework 4
TA Guide to HW4
Processor tips guide
HW4 tool intro
Logisim tips
ALU and control tips
Tracing/debugging
TTY/Keyboard tips

17 Mon 6/15 Pipelined cores R08. Cache+virtual memory examples continued,
R09. HW5 prep
Sec 4.5-end
18 Tue 6/16 Pipelined cores Sec 4.5-end
19 Wed 6/17 Multicore R09. HW5 prep, continued
R10. Pipeline exercises
Chapter 6
20 Thu 6/18 Intel x86 Example code
Intel developer manual
(pages 1..3908)
21 Mon 6/22 Recitation 10 during class,
Computer rambling
(No lecture quiz)
R11. Review for final - ↓ Updated 6/17!!
(Due Mon 6/22)
Homework 5
Wed 6/24-
Fri 6/26
Asynchronous FINAL EXAM:
   (open 9am ET on 6/24)
   (close 9am ET on 6/26)
↑ Extended due to failure to launch on time
Study guide
Practice final
Reference sheet
↓ Posted 6/18
(Due Thu 6/25, *optional*)
Extra credit
Tar 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:

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 Piazza. 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