CSE/EEE 230 Project 4 (updated)

Due April 14th 17th 2011.   11:59 pm

This Project is the second one of three continued projects to write an emulator for the MIPS machine.

 [The project can be written in C or C++ or Java, see notes at end.]

 

To the emulator you wrote in project 3, now add the following features:

1.      Instructions:  ORI, JAL, SLTI, MUL, JR, LW and SW  (MUL is no longer part of this assignment) and LUI.

2.      The data section  (explanation below)

3.      Correct initialization of registers such as $gp, $sp

Data Section:

For this project, there will be 2 input files. The input file names are [name].t and [name].d for the text and data sections. Hence to run the program, you provide it with the argument “name” and it reads name.t and name.d

The data section file format is the same as the text section file format (hex numbers). The data section file gets loaded into a data array whose base address is at 0x10010000 (that is the data is loaded at memory address starting 0x10010000.

Use a separate array to store the data section. Size of this array should be 2048 integers. The content of the data file are the values that get initialized in the data section. Be careful about word and byte addresses.

Extensions:

In addition to the FFFFFFFF and FFFFFFF0 instructions, please add the following instructions:

FFFFFFF1 – print the integer in register $v0

FFFFFFF2 – print the string “ =

FFFFFFF3 – print a newline (\n)

Stack:

Do not implement the stack. That will be project 5, and you will use your recursive Fibonacci program to test the stack (project 5).

Programming Notes:

It is important that the grader can run your program on your test cases as well as other test cases. Please provide a readme file that has instructions on how to run your program.

Also, there are a lot of C/C++ implementations and configurations. It is advised that you develop the program using Visual Studio (as is used in CSE100 classes) or using gcc/g++ on a linux system. That way compatibility will not create grading problems.

TEST all the new instructions and the data section. The data section input file can be created via MARS File->Dump Memory. Choose .data and Hexadecimal Text and then click “Dump to File” (Warning, this creates a huge file, you can shorten the file if desired or keep it as it is.)

Submission instruction

Place your emulator files into a folder. Comment your code well and include your name and email in each source file. Also place the binary program files of any programs you have tested the emulator on, into files name test1.t, test1.d test2.t, test2.d and so on. ZIP all files into one file and send it to teaching assistant’s email. Please keep the following file naming rules.

Zip file: LastName_FirstName_ASUID.zip

 

Attention:

Only last submission will be graded if multiple submissions are found.

Late submission is rarely accepted, and may carry penalties.

 

Grading Criteria:

Your emulator works on your test cases: 60%
Your emulator works on other test cases, we create: 40%