Introduction

While this assignment is intended to help people who had trouble on the midterm exam, it is open to all. If you choose to do it, it will count 15% of your course grade unless your score on this assignment would lower your course average, in which case I will disregard it. Please do not waste your time or mine by submitting something unless you think it is good enough to raise your grade.

You have two options for extra credit projects: write a paper on computer architecture, or write a program that simulates some part of a computer system. Neither assignment is cast in stone: if you have an idea that is related to either one, but not exactly the same as the description below, consult with me to see if we can agree on whether you have an acceptable alternative.

Note: If you elect to submit an extra credit assignment, it must be totally your own work. If you submit work that is not your own, you will receive an automatic failure in the course.

Term Paper

Write a 5-10 page paper on processor microarchitectures. Start by reading the Intel white paper, Inside Intel Core Microarchitecture [2] Using this paper as a starting point, read papers, articles, and books that help you understand what the current state of microarchitecture design. The Intel web site where the article cited comes from has several other white papers and web pages you can consult, as well as reprints of journal articles and conference proceedings. IBM and AMD are other companies that publish white papers and articles that should prove useful You may also draw on material from our textbook, and I suggest Shen and Liplasti’s Modern Processor Design [1] as book with excellent coverage of the topic. Finally, you might also want to look at web sites that have tutorial articles on various aspects of processor design, such as Ars Technica (look under Articles on CPU Theory and Praxis) and Tom’s Hardware (if you can get past the ads and into the forums).

Make your paper instructive: provide defititions of terms, and explain how things work. Write your paper as if it was going to be a reading assignment for students taking CS-343. That is, your audience knows as much about computer architecture as you did before you started working on the paper.

Your paper will be graded both on style and content. That is, it must be well organized and well written. You must write the paper totally in your own words, but you must cite the sources of all specific ideas in your paper. You may include brief quotations from your sources (generally less than a sentence), and each such quotation must cite where it came from. Examples of Citations are the numbers in square brackets in the previous paragraph of this web page. Those numbers are to refer to full citations like those listed below:

References [1] Shen, J. P. and Lipasti, M. Modern Processor Design. McGraw-Hill, 2005. [2] Wechsler, O. Inside Intel Core Microarchitecture. Intel Corporation, 2006. http://download.intel.com/technology/architecture/new_architecture_06.pdf

Simulation Project

First, a few ground rules about this assignment:

  1. You may either work alone or with one other person registered for the course on this project. All code must be written by you alone or by you and your partner.
  2. You may submit either Java or C/C++ source code. In addition to the source code itself, you may optionally submit an Eclipse or Visual Studio workspace so that I can build the executable program myself. Alternatively (for C/C++) you may provide either a Makefile or written instructions telling how to build the application using the GNU toolchain.
  3. The program must be platform-independent. If you prepare a GUI for your application, this means you will have to use Java. If your program runs from the command line, just be sure it doesn’t require any Windows-specific libraries or header files.

Description

Your program is to implement a cycle-level simulation of the multi-cycle MIPS CPU developed in Chapter 5 of the text book. The structure of your program is to mimic the structure of the textbook CPU, and the output of your program is to be a line of text for each state the CPU enters. For each state, list: the current clock number, the name of the state, and the new values of all registers that are changed by that state. For State 0, show the new value of the IR in both hexadecimal and as an assembly language statement.

The main memory for the simulation is to be implemented as a text file, which is the output of the SPIM simulator’s “Save Log File” (Ctrl-S) command. That is, you will test your simulator by writing a program that uses only the instructions implemented in chapter 5 (lw, sw, beq, j, add, and, or, slt, add, sub), loading the program into the SPIM simulator, and saving the resulting log file. When your program initializes, it is to extract the contents of all the initialized words of memory from this log file (they start with two hexadecimal constants inside square brackets) and put them into an array. When the simulator performs MemRead and MemWrite operations, it accesses or updates this array.