EE 361 Homework 9

Updated:  11/27/02

New Due Dates:

Assignment: (20 pts)

You are to design a single-cycle MIPS processor using Verilog HDL, and the Veriwell simulator. Turn in your code on a diskette. Your code should include a test sequence, which will be given to you in class. The processor is the same MIPS processor we have discussed in class and is presented in the textbook. A block diagram of the processor is shown in Figure 5.29 of the textbook on page 372.

To simplify the design, your MIPS processor only has to execute the following instructions:

If you complete the assignment perfectly you can receive up to 15 BONUS points to be added to your Exam 2 score.  If you complete the assignment imperfectly, you can receive some of the BONUS points as follows:

Instructions to Turn In

Create three projects. Each project has the testbench If you examine the testbench, it instantiates an instruction memory (containing a program) and your MIPS processor. You can download the instruction memories for each project. These files are hw9Test1.V, hw9Test2.V, and hw9Test3.V. You can download these below.

Your MIPS module must have the following format.

module Mips(pcout,aluresult,clk,reset,pminstr);

output [31:0] pcout; // Program counter value output [31:0] aluresult; // Output of the alu. used for debugging input clk; // Clock signal. input reset; // Reset to clear the program counter (PC). // if reset = 1 then PC = 0 at the next positive clock edge // if reset = 0 then PC works as normal, i.e., it // parallel loads at the next positive clock edge. input [31:0] instr; // Instruction from instruction memory.

The projects are as follows:

The programs assume that the register file is initialize so that

You can initialize the registers by adding the following into your register file module

initial
  begin
  RegCell[3]=23;
  RegCell[4]=24;
  RegCell[5]=25;
  RegCell[6]=26;
  RegCell[12]=1;
  RegCell[13]=3;
  RegCell[14]=8;
  end

For example, you can download my register file by clicking here. The initial procedure is at the bottom of the register file module.

The programs also assume that your RAM has at least 16 memory words at memory locations 0, 4, 8, .....

Thus, each project is worth 5 points towards your exam score, but you must complete them in sequence.

Turn in your projects on a diskette on December 9 (monday) at the beginning of class. Your diskette should work on a PC. Provide a README file which gives your name, "Homework 9", the date, and the list of projects that work and where you can find them (if they're in folders).