COL216 : Assignment 3 solution

$29.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (4 votes)

Problem Statement:
Develop an interpreter for a subset of MIPS assembly language instructions.
Input: MIPS assembly language program (text file, NOT machine instructions).
Write a C++ program that reads a MIPS assembly language program as input and interprets
(“executes”) it by maintaining internal data structures representing processor components such
as Register File and Memory, and executing the operations indicated by the instructions. Your
interpreter should handle the following instructions: add, sub, mul, beq, bne, slt, j, lw, sw,
addi.
Output:
1. Print the Register File contents (32 register values in Hexadecimal format) after
executing each instruction.
2. After execution completes, print the relevant statistics such as the number of clock cycles
and the number of times each instruction was executed.
Assume the following:
1. Each instruction occupies 4 bytes and is executed in one clock cycle.
2. Instruction format follows the MIPS convention.
3. Register file has 32 registers
4. Memory has 220 Bytes. Instructions start at address 0. The space after the instructions can
be occupied by data.
Breakup of marks:
Input reading and correct output display : 1M
Approach & Code : 3M
Testcases : 3M
Viva : 2M
Document : 1M
Late Penalty: Penalty will be deducted from your original score.
 Up to 30 mins after deadline: No penalty (for network issues)
 30 mins to 12 hours after deadline: 10% = -1M
 12 hours to 1 day after deadline: 30% = -3M
 1-2 days after deadline: 50% = -5M
 2-3 days after deadline: 70% = -7M
 >3 days after deadline: 100% = -10M