MIPT-MIPS is a pre-silicon simulator of MIPS CPU. It measures performance of program running on CPU, thus taking best features of RTL and common functional simulation:
- Precision. We provide cycle-accurate models of branch prediction unit and pipeline behavior.
- Customization. Cache size, branch prediction algorithms, and other parameters can be easily changed.
- Simplicity. Our source files are much more readable than RTL.
- Speed. Simulation frequency gets up to 0.9 MHz on i5-7300U.
MIPT-MIPS can be used for different purposes:
- Performance control of software optimizations: you may check IPC boosts of your programs
- Pathfinding of hardware optimizations: you may easily integrate some nice feature to CPU model
- Education: simulator is a nice experimental frog to study CPU internals
- Clone repository with submodules:
git clone --recursive https://github.com/MIPT-ILab/mipt-mips.git - Install LibELF and Boost (instruction)
- Build MIPS binutils if you need to build MIPS ELF binaries.
- In POSIX environment (Linux, OSX, Windows-Ubuntu, and Msys) you can build MIPT-MIPS just by
make mipt-mipscommand. - WIP on MS Visual Studio support. Currently you can build MIPT-MIPS in command line using
build.cmdbatch file.
-b <filename>— provide path to ELF binary file to execute-n <number>— number of instructions to run-f— enables functional simulation only-d— enables detailed output of each cycle
MIPT-MIPS uses C++17 and Boost 1.55. Thus, you have to use compilers of these versions or newer:
- GCC 7
- Clang 5.0
- Apple LLVM 7.3.0 (uses -std=c++1z flag)
- MS Visual Studio 2017 (Boost 1.65.1 is required)
- Get sure GoogleTest is fetched with other submodules.
- To run all unit tests in POSIX environment, use
make testcommand. - To run all unit tests in MS Visual Studio command line, run
build.cmdbatch file.
- Reduced subset of MIPS instructions is supported at the moment. Check this page for the detailed status.
- Self-modifying code is not supported at the moment in performance mode.
More details about internals are available on Wiki
This project is a part of ILab activity at Moscow Institute of Physics and Technology (MIPT).
The main goal of the project is to teach the students the computer architecture through development of a microprocessor implementing the MIPS instruction set in both functional and performance simulators.
Yes, if you attend MIPT-MIPS lectures. See our CONTRIBUTING.md file for details.