Understanding encoding of MIPS instructions - IT/Computer Science Assignment Help

Download Solution Order New Solution
Assignment Task

Aims
Understanding encoding of MIPS instructions
Understanding semantics of MIPS instructions
Generally building a concrete understanding of an example CPU
Practising C, including bit operations
The Assignment
Your task in this assignment is to write mips_sim a simulator for a small simple subset of the MIPS .
The input to mips_sim will be the 32-bit instruction codes for MIPS instructions as hexadecimal numbers.
The command 1521 spim2hex will give you the hex codes for MIPS instructions

image1.JPG

image2.JPG

Reference implementation

A reference implementation is available as 1521 mips_sim which can use to find the correctoutput for any input, like this:

image3.JPG

Registers
All 32 registers are set to be zero when execution begins.
The value of register 0 is always 0. Instructions which attempt to change it have no effect.
The other 31 registers have no special meaning and can be used for any purpose.
Halting
Execution halts if an exit syscall is executed.
Execution halts if it reaches the location after the last instruction.
Execution halts if there is a branch to the location immediately after the last instruction.
Execution halts with an error message if there is a branch to any other location beyond the range of specified instructions:
Illegal branch to address before instructions: PC = ??
Illegal branch to address after instructions: PC = ??
Examples
Some example MIPS programs are available as a zip file
You will also need to do your own testing and construct your own examples using 1521 spim2hex.
Note the assembler for the example programs contains pseudo-instructions such as li.
To make it easy to use existing code as examples for this assignment 1521 spim2hex translates some pseudo-instructions and a few
instructions outside the subset of this assignment to instructions in the subset for this assignment. This is just for convenience. You do
not have to implement pseudo-instructions or instructions outside the specified subset. Also for convenience 1521 spim2hex deletes the
last instruction if it is jr because jr is not in the subet for this assignment.

 

This IT/Computer Science Assignment has been solved by our IT/Computer Science Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.