ECE 250 / CS 250

Computer Architecture

Spring 2022

Professor Daniel J. Sorin

                  

 Objectives

 

The objective of this course is to learn how computers work, focusing on how the computer hardware executes the software. 


The course focuses on: instruction sets, assembly language programming, basic digital logic design, processor design, memory system design, and input/output.  


Prerequisites: CompSci 201 

 

Class Location and Hours

 

Class meets Monday/Wednesday/Friday from 10:15-11:05am in Schichiano Auditorium (FCIEMAS).

Recitations are on Thursday.

 Instructor, Teaching Assistants, and Answering Questions

 

This is a very large class, which means that students should contact other sources of information before, if necessary, contacting the professor.

* The first option for finding help is this website.

* Then check the course's Sakai and Ed Discussion sites.

* The third option for finding help is the outstanding group of teaching assistants for this course.  Either email them or go to their office hours. Questions on the Ed Discussion forum may get answered by a TA, a fellow classmate, or the professor.

* The fourth option is Ms. Yesenia Velasco (yvelasco@cs.duke.edu), a Teaching Associate in the CS Department.

* Please contact the professor only for those issues that cannot be handled by anyone else.

Graduate Teaching Assistants: 

Sangwook (Joe) Bok

Charlotte Roh

Yujie Zhang

 

* If you need to contact the professor, please email him or come to his online office hours:

Professor Daniel J. Sorin

Office: Zoom

Office Hours: TBD

Email: sorin AT ee DOT duke DOT edu 

Very Highly Recommended Textbook

 

David A. Patterson and John L. Hennessy. Computer Organization and Design: The Hardware/Software Interface, 5th edition, Morgan-Kaufmann.

Please do not get the "ARM" edition or "RISC-V" edition or the "Revised Printing" -- for some reason, the publisher has created several flavors of this book.

 

The nice people at Duke Libraries have copies of this book available.

 

 Assignments and Grading

 

This course will require readings from the textbook, pencil and paper problems, programming assignments, and digital logic designs.

Students are responsible for:

Late homework policy -- NO exceptions, NO extensions (except in case of dean's excuse or sickness with STINF)

    0-24 hours late: Take earned score and multiply by 0.9
    24-48 hours late: Take earned score and multiply by 0.8
    >48 hours late: NO CREDIT

Late penalty will be applied to the entire assignment.  That is, if you turn in half of the assignment on time and half late, we assign the late penalty to all.

You must attend all exams (except in case of dean's excuse or sickness with STINF).  There are no makeup exams except in these situations.

Start assignments EARLY so that you don't get stuck at the end!


Academic Misconduct: I will not tolerate academically dishonest work.  This includes cheating on the homework and exams.  

I will refer all suspected cases of cheating to Duke's Office of Student Conduct.

Refer to the Duke Community Standard or to the instructor if you have any questions about misconduct.


 

 Topics, Lecture Notes, and Reading Assignments

 

I will post lecture notes (in PDF format on Sakai) shortly before I cover them in class.  Please bring them to class. 

If you read the notes instead of attending class, you will miss a LOT of course material if you miss class.

Topic

Reading Assignments

Course Introduction and Overview
 

Chapter 1

Instruction Sets and Assembly Programming
 

Chapter 2

Digital Logic Design
 

Appendix B

Processor Core Design: Datapath and Control
   

Chapter 4: 4.1-4.4

Memory and Caches
  

Chapter 5

I/O
  

somewhat covered in Appendix A.8 

Pipelined Processor Cores
   

Chapter 4: 4.5-end

Parallel Processors (time permitting)
   

Chapter 6

 


 

 A Few Additional Resources

 


Debugger (gdb)
-- Documentation -- GDB essentials

C Programming Language
-- Video snippets by Prof Drew Hilton (Duke ECE)
-- This is an MIT OpenCourseWare set of lectures that does a good job of covering the basics for C programming.

A Few C Programming Examples
-- C Memory Layout Example array as list
-- C Bit Manipulation bit manipulation of Hex to extract float fields or for a float input with casting via pointers extract float fields from float input .

A Few Assembly Programming Examples
-- sum = sum + i*i is here.
-- sum array is here.
-- recursive sum array is here.
-- recursive sum i*i is here.

 

 Schedule

This is a VERY tentative schedule which may change.

Week

Monday

Wednesday

Thursday Recitation

Friday

Jan 3


Intro/Overview

Unix, text editing

C programming


Jan 10

C programming

C programming


Intro to writing C programs

C programming

Jan 17

MLK DAY

From C to binary

C programming: Pointers and memory management

From C to binary

Jan 24

From C to binary

Assembly


Assembly programming examples & using SPIM

Assembly

Jan 31

Assembly

Assembly

Assembly programming examples:  focus on calling conventions

Combinational logic

Feb 7

Combinational logic

Sequential logic

Digital design examples & using Logisim

 

Sequential logic

Midterm #1 (C and assembly)

Feb 14

Sequential logic

Datapath design

Using Logisim for larger projects

Datapath design

Feb 21

Exceptions/interrupts/syscalls

Memory hierarchies


TBD

Caches

Feb 28

Caches

Caches

Cache operation examples

Caches

Mar 7

SPRING BREAK

Mar 14

Virtual Memory

Virtual Memory

review for midterm #2

Virtual memory
Midterm #2 (does not include memory systems)

Mar 21

I/O

I/O


Cache+virtual memory examples

I/O

Mar 28

Pipelined cores

Pipelined cores

Pipelined operation examples

Pipelined cores

Apr 4

Pipelined cores

Pipelined cores


TBD

Multicore

Apr 11

Multicore

Multicore

TBD

built-in schedule slack

Apr 18

Sun's Niagara multicore processor

Preview of advanced architecture (optional)

review for final exam

READING PERIOD

Apr 25

 

FINAL EXAM WEEK