Fall 2019: Computer Architecture
ECE/CS 250, TuTh 3:05 -- 4:20PM
Bryan Center Griffith Theater
[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 1:30-3:00PM
Office: Hudson 210
Graduate Teaching Assistants
Shujun Qi (shujun.qi@duke.edu)
Vinith Sharma (vinith.sharma@duke.edu)
Dan Sun (dan.sun@duke.edu)
Head Undergraduate Teaching Assistant
Joseph DeChicchis (joseph.dechicchis@duke.edu)
Office Hours
See Piazza post.
Register and/or Login Here
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.
If students have concerns about homework or exam
grades, they have 5 days to raise their concerns
to graders. No concerns or regrade requests,
regardless of merit, will be considered after
five days. For homeworks, contact your
recitation TA, a graduate TA, and the professor
in that order. For exams, contact a graduate TA
and the professor in that order. For homeworks,
the 5 days begins when grades are released on
Sakai. For exams, the 5 days begins from when
exams are returned in lecture; not attending
lecture does not postpone this 5-day
window. Once the 5-day window begins, say on Day
X, it ends at 11:59pm on Day X+5.
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.
Approximate Schedule
8/27 | Introduction and Overview |
8/29 | C Programming |
9/3 | C to Binary |
9/10 | Assembly Programming |
9/17 | Basics of Logic Design: Logic Gates |
9/17 | Basics of Logic Design: Sequential Logic |
9/19 | Basics of Logic Design: Finite State Machines |
9/24 | Processor Design: Datapath and Control |
10/8 | Caches and Memory Hierarchies |
10/22 | Main Memory and Virtual Memory |
10/29 | I/O |
11/12 | Pipelining |
11/19 | Multicore |
11/26 | Modern Processors |
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