CSE/EEE 230 Project 4 (updated)
14th 17th 2011.
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:
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
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.
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)
Do not implement the stack. That will be project 5, and you will use your recursive Fibonacci program to test the stack (project 5).
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.)
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
Only last submission will be graded if multiple submissions are found.
Late submission is rarely accepted, and may carry penalties.
works on your test cases: 60%
Your emulator works on other test cases, we create: 40%