|
Department of Computer Science |
University of San Francisco |
Computer Science 315-01
Computer Architecture
Spring 2013
MWF 3:30-4:35, HR 235
Professor: Peter Pacheco
Office: Harney 540
Phone: 422-6630
Email: domain: cs.usfca.edu, user: peter
Office Hours: MF 1-2, W 12-1, and by appointment
TA: Justin Battles
Email: domain: gmail.com, user: jaybatt88
Office Hours: Thursday 1:30-2:30 in one of the fifth floor labs
Class mailing list:
You will be automatically subscribed
to the class mailing list. Please note that this list uses
your USF email address. If you ordinarily read your
email using another account, be sure to forward your USF email
to the other account.
Course Syllabus (Here's a
PDF Version.)
Homework Assignments
Code Examples
- A MIPS assembly language program that reads
in two ints, finds their sum, and prints it.
- A C program that reads an int
prints out whether or not it's negative.
- A MIPS assembler program that reads an int
prints out whether or not it's negative.
- A C program that reads a sequence of positive
ints and prints their sum. Input is terminated by a value
that's not positive.
- A MIPS assembler program that implements
the preceding C program.
- A C program that uses a function to
read an int.
- A MIPS assembler program that implements
the preceding C program.
- A C program that uses one function to
read an int and another to print it.
- A MIPS assembler program that implements
the preceding C program.
- A C program that implements
selection sort.
- A MIPS assembler program that implements
the I/O functions in the preceding C program.
- A MIPS assembler program that implements
selection sort.
- A C selection sort program that uses
a dynamically allocated list.
- A MIPS assembler program that implements
the preceding C program
- A MIPS assembler program that uses "dynamic"
allocation on the stack
- A C program for converting between decimal,
binary, and hexadecimal
- A program that adds 100,000 to a user-input
value. Illustrates how to handle immediates that require more than
16 bits.
- Pseudo-code that shows how to implement a lock
with atomic exchange.
- Code that shows how to implement an
atomic exchange with ll and sc.
- Prof Cruse's implementation of
hello, world in x86 assembler.
- Linux Assembly Howto implementation of
hello, world in Intel x86 assembler.
- Linux Assembly Howto implementation of
hello, world in AT&T x86 assembler.
- A 32-bit x86 assembly function
that adds two ints. A C
main function.
- A 64-bit x86 assembly function
that adds two longs. A C
main function.
- A 64-bit x86 assembly function
that adds two ints. A C
main function.
- An x86 assembly function
that implements a two-way branch.
A C
main function.
- An x86 assembly function
that computes n-factorial.
A C
main function.
- An x86 assembly function
that computes the nth Fibonacci number.
A C
main function.
- x86 assembly code
that implements insertion sort.
A C
main function.
- MIPS assembly programs that use the multiplication operators:
Other Information
- Brief Introduction to Subversion
- David Patterson's article, ``The Trouble with Multicore''
- Moore's Law Plot
- MARS MIPS simulator home page.
- Sourceforge download page for QtSpim and PCSpim.
- MIPS Reference Data (the ``Green
Sheet'') (Copyright 2009 by Elsevier, Inc.)
- Summary of some MIPS instructions
(Copyright 2009 by Elsevier, Inc.)
- SPIM system services
(Copyright 2009 by Elsevier, Inc.)
- 0 - 15 in different bases
- 4-bit two's complement integers
- n-bit two's complement integers
- A list of possible topics for the first
midterm
- A key to the first
midterm
- Two calling conventions for x86 assembly.
- x86-64 Instructions and ABI (from the University of
Chicago)
- Debugging Assembly Code with gdb (from Roskilde University)
- Algorithm for decimal addition
- Algorithm for decimal subtraction
- Algorithm for decimal multiplication
- Algorithm for binary multiplication
- Examples of binary multiplication using the two different
hardware configurations:
- Algorithm for decimal division
- First algorithm for binary division
- Textbook's algorithm for binary
division
- Example showing textbook's algorithm
for binary division
- Algorithm for binary
division using textbook's improved hardware
- Example showing algorithm
for binary division using improved hardware
- Example showing two different
conventions for signed integer division
- Example showing pipeline
forwarding
- Topics for the second
midterm
- A key to the second
midterm
- Loop unrolling example
- Topics since the second
midterm
Peter Pacheco
2013-05-06