MIPS Assembly Simulator in Python

MIPS Assembly Simulator in Python

Description:

The following project consisted of a functional assembly simulator following MIPS machine code (hex) as input.

Program Includes:
  • 32 registers including pc, hi, and lo
  • Data memory ranging from memory address 0x2000 - 0x3000 (data memory scaling is available but limited range for demonstration purposes)
  • Special instruction (find width: gets the width of a 32-bit binary string. [e.g. 1000010 = 6])
  • Instruction statistics representing alu, jump, branch, memory, and other instructions
  • Displayed outputs: step-by-step detailed executions, registers (32 unique), data memory (0x2000 - 0x3000)
  • Displayed data memory contains customization options: Decimal/Hexadecimal Address and Decimal/Hexadecimal Values (4 interchangeable modes)
Leveraged Knowledge
  • Extensive Python practices: list data structures (list-list embedded) and methods, console output text alignment methods, os.path import
  • Thinking process of executing assembly code given MIPS machine code (in hex) as input
  • Application and use of ECE concepts such as twos complement and multiple conversions between hex, decimal, and binary

Download Code Here