An open API service indexing awesome lists of open source software.

https://github.com/mshockwave/mips-r3000-cpu-simulator


https://github.com/mshockwave/mips-r3000-cpu-simulator

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

MIPS R3000 CPU Simulator
=====================
This is a series of homework in one of the Computer Architecture courses(10420CS 410001) in [CS department of National Tsing Hua University](http://web.cs.nthu.edu.tw/).

The first homework would implement a single cycle MIPS CPU simulator.
We use [reduced set of MIPS R3000 ISA](doc/MIPS_R3000_ISA.pdf).

The tests/test_dataset folder contains subdirectories of test binary files.

Build
-------------
This project use **CMake**, the minimum version required is 2.8.
The main programming language is C++11.
* Initialize cmake files:

`mkdir build`

`cd build`

`cmake -DCMAKE_BUILD_TYPE= ..`

`Release` build type use `-Os` compiler optimization flag since `-O3` is proved to break the programs execution logic.

* Build main program:

`make pipeline`

* Build unit tests main program:

`make pipelineTests`

* Or just build all stuff:

`make`

Usage
-----
* `./pipeline `

E.g. `./pipeline test_dataset/func` Where test_dataset/func contains the desired binary files: `iimage.bin` and `dimage.bin`

* `./ArchiHW1` would find those two binary files in current path.

The result output files, `snapshot.rpt` and `error_dump.rpt`, would put in current path.