CS 315 Computer Architecture

Fall 2017

Course Website:

Lecture: LS 307 TR 9:55am-11:40am
Lab: LS 307 W 4:00pm-5:25pm

Final: Thursday, December 14, 2017 10:00am to 12:00pm in LS 307


Instructor: Greg Benson
Phone: 415.422.5066
Office: Harney 412A
Office Hours: TR 1:10pm-2:00pm, W 3:00pm-3:50pm and by appointment

Teaching Assistant: Rohith Madhavan
Office: Harney 411
Office Hours: TBD

Teaching Assistant: Casey Haber
Office: Harney 411
Office Hours: TBD

Course Objectives and Topics

Computer architecture refers to the organization of the hardware that executes computer programs. The processor (or CPU) is perhaps the most complicated and most important part of a computer system. As such, its design has a significant impact on the proper execution and performance of computer programs. This course examines the design and implementation of computer processors at the digital logic level.

We will look at both the interface to the hardware (the machine language of a processor) and different ways this interface is implemented. An important aspect of processor design is number and data representation. Almost all modern processors are built using digital logic. Using just a few fundamental building blocks (logic gates) we can construct complex processors. In this course you will gain experience with building parts of a processor using digital logic.

The design of a processor and related subsystems such as main memory and cache memory can greatly affect the performance and power utilization of computer systems. In addition to implementing a basic processor we will investigate strategies for improving performance using pipelining, multiple issue, multi-threading, and multiple cores.

Our focus will be on the ARM architecture (specifically ARMv4 and ARMv7), which is the most widely used architecture in mobile devices today. We will learn ARM assembly language and the ARM instruction set format. To better understand the ARM instruction set you will write C programs that can analyze and interpret ARM machine code. We will interact directly with the ARM processor found on a Raspberry Pi single board computer. Ultimately, you will build processors that can run ARM machine code. We will be learning how to design digital circuits using schematic entry as well as using a hardware description language (HDL). We will use Logisim for designing and simulating digital circuits.

Learning Outcomes

On completion of this course the student should be able to accomplish the following:
  • Understand and manipulate different machine representations of numbers and data.
  • Write ARM assembly language programs.
  • Write C programs that can analyze and interpret machine code.
  • Quantitatively evaluate and compare the performance of different computer processors.
  • Understand and design computer instruction sets suitable for machine interpretation.
  • Construct arbitrary digital circuits for performing computation.
  • Design and implement a working computer processor using schematic entry.
  • Understand the issues and trade-offs in different performance enhancements for computer processors such as cache memory.


  • CS 220 C and Parallel Programming with a grade of C or better, or
  • CS 221 C and Systems Programming with a grade of C or better.
  • Good C programming skills.

Course Materials

Required Book

Digital Design and Computer Architecture: ARM Edition
Sarah L. Harris and David Money Harris
Morgan Kaufman Publishers, Inc., 1 edition (May 6, 2015)
ISBN-10: 0128000562
ISBN-13: 978-0128000564

Optional Books

Computer Organization and Design: The Hardware/Software Interface: ARM Edition
David A. Patterson and John L. Hennessy
Morgan Kaufmann Publishers, Inc., 1 edition (March 16, 2016)
ISBN-10: 0128017333

The C Programming Language, 2nd Edition
Brian W. Kernighan and Dennis M. Ritchie
ISBN-10: 0131103628
ISBN-13: 978-0131103627

I will provide notes and other online resources. Lecture notes will put available on the class website and code examples developed in class will be made available in GitHub. It is your responsibility to regularly check the class website and online discussion group for updates to this material. Note, that not everything I do in class will be available online. If you miss class you should consult a classmate for notes.


A Raspberry Pi 2 or 3 running Raspbian.
You will need a micro sd card, serial cable, power cable, and optional ethernet connection and case.


Linux/GNU compilers, linkers, assemblers, editors, and utilities

Quizzes, Assignments, and Exams

In this class you will have quizzes, homework assignments, projects, and exams. Quizzes will be given at the beginning of some classes to determine if you have read the required reading. Homework assignments will be problems from the book. Projects will be either programming or digital design work.

Quizzes will be taken online via Canvas in class (you will need to be in class to get the Quiz passcode). Homework will be submitted via Github or Canvas. Projects will be submitted via Github.

There will be one midterm and a final.  The purpose of the exams will be to assess your understanding of the topics covered in class and in the assignments.  The material covered on the exams will be based on the assigned reading, information presented in lecture, and what you learn by doing the assignments.  The exams will be closed book and closed notes. However you will be allowed one page of your own notes (front and back). Be sure to come prepared to the exams with your notes.



 Quizes 10%
 Homework 10%
 Projects 40%
 Midterm 10%
 Final 30%


All assignments will be worth 100 points.  Grading will be done on an absolute scale:

 Min A-
 Min B-
 Min C-
 Min D-

If you score 90% or higher will be guaranteed an A-. For some assignments and exams I may adjust your raw score depending on the level of difficulty. Such adjustments will only raise your score, not lower it. 

Conciseness and neatness of your solutions are considered in the grading of assignments and exams. While being neat won't necessarily improve your score, being messy will certainly lower your score.

Only turn in what you intend to have graded.

Exam grade policy: If you score less than Min C- value on your aggregate exam scores (midterm + final) you will receive no higher than a C- in the course. That is, even if your accumulative score is a C or higher, you could end up with a C- or lower depending on your total exam scores.

Due Dates and Attendance

Assignments must be turned in on time to receive credit. Except in the most extreme situations, late assignments will not be accepted. If you cannot complete an assignment by the due date, hand in whatever you have done in order to receive partial credit.

Class attendance is not required, but it is highly recommended. Please show up on time to class.


In general, assignments to be considered for regrades must be turned in no later than one week after the graded papers were made available. However, at the end of the semester, assignments to be considered for regrades must be turned in earlier, as will be announced. Similarly, any mis-recorded grades must be reported within a week of their posting, except as will be announced at the end of the semester. 

Missed Exams

Make-up or early exams will not be given except in the most extreme situations. If you must miss an exam due to extreme illness, etc. contact the instructor (email is fine) or leave a message with the Department of Computer Science office (415.422.6530) before the exam.

Laptop Usage in Class

You may use your laptop during class as long as you are using it in order to take notes or to look up information regarding the lecture content.  Please do not user your laptop for any other activity such as to read or compose email, to use instant messaging software, or to play games.  This is very disruptive to me and the other students in the class, not to mention that it will distract you from learning the material. If I have reason to believe you are not using your laptop in a productive way I will ask you not to use it in class.

Cheating and Plagiarism

Each student is to do his or her own work on the assignments and exams.  It is fine to talk with others about general approaches used to solve the assignments or simply to understand the problem statement, but each student is to develop his or her own solution; collaborative efforts are not allowed.

In addition, using solutions from any other source is forbidden.  In particular, using solutions (either instructors' or other students') from previous offerings of this course is not allowed.  To summarize: all assignments are to be individual and original efforts. You must never represent another person’s work as your own.

If you are caught cheating or plagiarizing (e.g., collaboration, copying on exams, cutting and pasting text) you will be given an F for the course and you will be reported to the Dean.

All students are expected to know and adhere to the University of San Francisco's Academic Honor Code. Go to for details.

Copying answers or code from other students or sources during a quiz, exam, or for a project or homework assignment is a violation of the university’s honor code. This includes copying code or other material from the web, and having anyone other than yourself complete your assignments. It also includes working too closely with another student. Collaboration or discussion that results in the same or very similar code indicates that you have not placed enough independent work into your solution and is a violation of the honor code.

Examples of honor code violations include but are not limited to:
  • Giving your code to another student.
  • Submitting code written by anyone other than yourself as your own.
  • Copying text from the web.
  • Discussing implementation details of a solution with another student.
  • Discussing code-specific details of a solution with another student.


In general, you should post all questions to the Piazza group for this class. You can also use Piazza to send private message to the instructor and TA. If you do need to email the instructor or TA, be sure to email from an account to which we can directly reply. We expect that you read your USF dons email.

Class Website

Clarifications, changes, etc. regarding the class and assignments will be posted to the class website and/or Piazza.  Also check your email and the class website frequently.