A minimal implementation of a Multi-cycle MIPS Simulator. It is not intended to be used for production use.
It accepts a pseudo-object file, which is a file consisting of multiple 32-bit words, separated by a newline.
The program assumes the file is valid. Any line starting with #
are treated as comments, and are ignored.
Run make clean; make all
Important
It has been tested only on Linux.
Run ./mips_simulator pseudo-object-file stats-file
.
For example: ./mips_simulator tests/1_math_test.o ./math_test.stats
More like keypoints for the university assignment
- The
clock
of the CPU is stored atsrc/units/control/control.c
- The
μPC
of the CPU is stored atsrc/units/control/control.c
- The microcode for the instructions is stored at
src/units/control/microcode.c
- Registers, memory and Special Function Registers are stored at:
- For registers,
src/units/register_file.c
- For memory,
src/units/memory.c
- For SFRs,
src/special_function_registers.c
- For registers,
- The ALSU is stored at
src/units/arithmetic_and_logic_shift_unit.c