Fall 2015: Computer Architecture
ECE/CPS 250, TuTh 11:45PM - 1:00PM
CIEMAS Schiciano Auditorium

[Syllabus]
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.


Faculty

Professor Benjamin Lee
benjamin.c.lee@duke.edu
Office Hours: TuTh 4:00-5:00PM
Office: Hudson 210


Teaching Assistants

Alfredo Velasco
alfredo.velasco@duke.edu
Office Hours: 10-12PM (Hudson 213)

Pengfei Zheng
pengfei.zheng@duke.edu
Office Hours: TBD
Office: TBD


TA Recitation Leaders

Jesse Ling
jl454@duke.edu
Section: W 3:05 - 4:20PM (01D)

Qian Wang
qw34@duke.edu
Section: W 3:05 - 4:20PM (01D)

Gregory McKeon
grm19@duke.edu
Section: W 3:05 - 4:20PM (02D)

Jiawei Zhang
jz134@duke.edu
Section: W 3:05 - 4:20PM (02D)

Janan Zhu
jz113@duke.edu
Section: W 4:40 - 5:55PM (03D)

Tze Kang Ng
tn52@duke.edu
Section: W 4:40 - 5:55PM (03D)

Zhihao Zhu
zz48@duke.edu
Section: W 4:40 - 5:55PM (04D)
Jessica Yan
jby5@duke.edu
Section: W 4:40 - 5:55PM (04D)

John Kumpf
jdk36@duke.edu
Section: W 6:15 - 7:30PM (05D)

Helen Murphy
ham22@duke.edu
Section: W 6:15 - 7:30PM (05D)

Hayden Bader
hpb3@duke.edu
Section: W 6:15 - 7:30PM (06D)

Elsie Ling
ejl29@duke.edu
Section: W 6:15 - 7:30PM (06D)


TA Office Hours

Calais Nelson
can18@duke.edu
Office Hours: M 1-3PM (Link Basement)

Rahul Harikrishanan
rh151@duke.edu
Office Hours: M 4-6PM (Link)

Elsie Ling
ejl29@duke.edu
Office Hours: Tu 12-2PM (Link)

Matthew Olson
meo8@duke.edu
Office Hours: Tu 6-8PM (Link)

Richy Yun
rjy5@duke.edu
Office Hours: W 11:20-1:20PM (Link)

Tze Kang Ng
tn52@duke.edu
Office Hours: Th 9-11AM (Link)

Benjamin Zhang
bwz2@duke.edu
Office Hours: Th 8-10PM (Link Basement)

Bao Doan
btd12@duke.edu
Office Hours: F 6-8PM (Link Basement)

Jiawei Zhang
jgz134@duke.edu
Office Hours: F 3-5PM (Link Basement)

John Kumpf
jdk36@duke.edu
Office Hours: F 4-6PM (Link Basement)






Discussion Forum

We will use Piazza for class discussion. This system is designed to get you help, fast and efficiently, from your classmates, the TAs, and myself. Rather than emailing questions to teaching staff, you should post your questions on Piazza.

Register and/or Login Here






Syllabus

Textbooks
D.A. Patterson and J.L. Hennessy. Computer Organization and Design: The Hardware/Software Interface, 5th Edition, Morgan-Kaufmann.

Kernighan and Ritchie. The C Programming Language, 2nd Edition (optional)


Grading
This course will require readings from the textbook, problem sets, programming assignments, and digital logic design. Grades are assigned based on homework (50%), midterm-1 (12.5%), midterm-2 (12.5%), and final (25%). You are expected to complete the homework individually unless otherwise stated. However, you may discuss topics covered in the class. Late homework submissions incur a 10% penalty when <24 hours late, incur a 20% penalty when 24-48 hours late, and receive no credit when >48 hours late.


Academic Policy
The discussion of ideas and design strategies is an integral part of the learning experience. However, cheating and plagiarism is not. Practically, you violate academic integrity when (1) you obtain solutions and code from others, or (2) you provide solutions and code to others. The Duke Undergraduate Honor Code, will be strictly enforced with zero tolerance for cheating and/or plagiarism. If a student is suspected of academic dishonesty (e.g., cheating on an exam, copying code, collaborating inappropriately on an assignment), the instructor will report the matter 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.






Schedule

8/25

Introduction and Overview (slides)

8/27

C Programming (slides)

9/1

C to Binary (slides)

9/8

Assembly Programming (slides)

9/22

Basics of Logic Design: Logic Gates (slides)

9/24

Basics of Logic Design: Sequential Logic (slides)

10/6

Basics of Logic Design: Finite State Machines (slides)

10/8

Processor Design: Datapath and Control (slides)

10/15

Caches and Memory Hierarchies (slides)

10/27

Main Memory and Virtual Memory (slides)

11/5

I/O (slides)

11/17

Pipelining (slides)






Homework

Visit the Duke Sakai webpage for homework assignments.






Docs/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.

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 very nice tool that runs on any platform (MAC, Windows, Linux). You can use this 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 that it should autodetect your system so you get the right version.

Logisim
-- 8-bit Register File: compsci250.jar
-- Instruction memory initialization file: d_mem.hex
-- 8-bit ALU: ALU.circ