Question: Project 2 : MIPS simulator in Python Intro: For this project, you will build a MIPS simulator in Python, which: reads in a text file

Project 2: MIPS simulator in Python Intro: For this project, you will build a MIPS simulator in Python, which: reads in a text file containing a valid MIPS program in machine code (hex) and simulates its running; should be able to run your project 1s machine code, part A and B. supports one special instruction (that is not included in MIPS) to reduce significantly the Dynamic Instruction Count of your project 1s code (part A and B). Simulator I/O: Input: a text file containing a valid MIPS programs machine code (in hex). You can get such a file from MARS -> File -> memory dump. Output: on screen, nicely formatted: mode 1: if the user types 1 after executing an instruction, the simulator will step through the next instruction, showing detailed information including: the instructions machine code, the break down of all the components (rs, rt, imm, etc), the assembly instruction, which registers are read, written, with what values, or which memory location is read / written with what value, how PC is updated. Mode 2: if the user types 2 after executing an instruction, the simulator will finish running all the remaining part of the program. Here, you can skip the detailed output, and show only the final results of: a) The final content of all the registers ever used b) The content of PC c) Data memory content d) Instruction Count and Statistics (similar to MARS Tool -> Instruction Statistics)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!