Department of Computer Science

Principles of Computer Design
Spring Semester 2012
Dr. Maury Eggen

Final Project Description

The final project for the semester is to implement in software the single cycle machine discussed in class. The simulation should have all of the datapath and control features discussed. Once the simulation is loaded and running, it should be able to fetch instructions from instruction memory, decode them, and execute them through the datapath. The simulation must include memory, registers, program counter, etc. The simulation must also be constructed from first principles. Your code should contain and gates, or gates, etc. and the ALU should be constructed from these primitives.

Operation: You will prepare a "program" to be executed by your virtual machine. The program will exist on auxiliary memory (disk). This program will be loaded into instruction memory, and then the "fetch-execute" cycle will begin. You will fetch an instruction, decode it, and execute it through your datapath, setting appropriate controls to control the execution. When that is complete, you will fetch the next instruction in your program, updating the program counter as you go along. You will continue until your program terminates.

A minimal sequence of instructions to be implemented are add, sub, and, or, lw, sw, beq, j, and most likely addi. Implementing additional instructions may provide extra credit.

Since this is an educational effort, we want to see lots of stuff, so your simulation will effectively "step" through the execution of your instructions, displaying appropriate information everytime something happens. We wish to see the contents of the registers, the instruction memory, data memory, program counter, etc. at each stage of the execution. Displays should be neat and readable. It is your goal to prove that the simulation works as it should.

If you have any questions concerning what is and is not contained in the simulation, please contact your instructor.

Finally, to get credit for this project, it must be demonstrated in person to your instructor. Be prepared to answer questions about its implementation and defend the way your simulation works.

Final Drop Dead due date: Last day of class. 100 points.