ECE 250 / CS 250

Computer Architecture

Spring 2017

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 1:40pm – 2:30pm at Griffith Film Theater (in Bryan Center)

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

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

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

Graduate Teaching Assistants:  

Ramin Bashizade

Michael Baldwin

Undergraduate Teaching Assistants:

TBD

 

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

Professor Daniel J. Sorin

Office: 209C Hudson Hall

Office Hours: TBD  --- email me if you have class at both of these times and wish to meet with me

Email: sorin AT ee DOT duke DOT edu 

Required 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 the "Revised Printing" -- for some reason, the publisher has created several flavors of this book.

 

 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)

    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.

Start assignments and projects 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.

Do not think that you can 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

 

 

 Resources

 

Remote access to Linux machines.
We will use the Duke OIT Linux machines for portions of this course. Please read this document on how to remotely access these machines.

Unix Tutorial
You should also go through this short tutorial on Linux

File Access
You can use CIFS to access the files in your home directory. Please see the OIT documentation on CIFS.

Tools -- Text Editors
-- nedit is a fairly simple GUI-based editor on the linux machines.
-- If you want to become a more sophisticated user of Linux editors you can explore gvim, vim, or emacs on your own. (I prefer emacs.)

Tools -- Compilers (gcc)
-- compilation: gcc -o newApp test.c
-- generate compile time warnings: gcc -Wall test.c
-- include debug symbols into the application: gcc -g -o newApp test.c
-- Introduction to gcc

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

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 .

MIPS Instructions
-- Assemblers, Linkers, and the SPIM Simulator (PDF).
-- A two page MIPS quick reference guide from MIPS is here.
-- A three page document from me with MIPS instructions is here.

SPIM: A MIPS32 Simulator
Download the appropriate binary for your platform from the SPIM web site.

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

Logic Design Online Book
Pragmatic Logic by William J. Eccles

Logic Design Tool
Logisim is a convenient tool that runs on any platform (Mac, Windows, Linux). You will use Logisim to design and test circuits. Click through the download links until you arrive at the sourceforge.net site and then look for the green download button. Click download and it should autodetect your system so you get the right version.

 

 Schedule

This is a VERY tentative schedule which may change depending on time constraints and which days the instructor will be out of town.

Week

Monday 

Wednesday

Thursday Recitation 

Friday

Jan 9

Intro/Overview

Unix, text editing

C programming

Jan 16

MLK DAY

C programming

Intro to writing C programs

C programming

Jan 23

From C to binary

From C to binary

C programming: Pointers and memory management

From C to binary

Jan 30

Assembly

Assembly

HW#1 due

Assembly programming examples & using SPIM

Assembly

Feb 6

Combinational logic

Combinational logic

Assembly programming examples:  focus on calling conventions

Sequential logic

Feb 13

Sequential logic

HW#2 due

Sequential logic

Digital design examples & using Logisim

 

Midterm #1 (C and assembly)

Feb 20

Datapath design

Datapath design

Using Logisim for larger projects

Exceptions/interrupts/syscalls

Feb 27

Memory hierarchies

Caches

HW#3 due

Cache operation examples

Caches

Mar 6

Caches

Caches

Virtual memory examples

Virtual Memory

Mar 13

SPRING BREAK

Mar 20

Virtual Memory

Virtual Memory

review for midterm #2

Midterm #2 (does not include memory systems)

Mar 27

I/O

I/O

HW#4 due

Cache+virtual memory examples

I/O

Apr 3

Pipelined cores

Pipelined cores

Pipelined operation examples

Pipelined cores

Apr 10

Pipelined cores

Pipelined cores

TBD

Multicore

HW#5 due

Apr 17

Multicore

Multicore

review for final exam

Multicore

Apr 24

Sun's Niagara multicore processor

review for final exam

READING PERIOD

May 2

EXAM WEEK