Top

Next

jMIPS

An Open-Source MIPS Simulator in Java


MIPS CPU


This is the jMIPS easy-to-use open-source MIPS simulator in Java. You should already have downloaded the source code archive (up to date copies are on the freshmeat jMIPS project pages) within which this documentation is to be found as the contents of the doc/html subdirectory.

Getting to know it helps with learning about the MIPS architecture and also creates familiarity with more general concepts of computer systems and architectures.

There are five versions of the simulator code to look at and play with in the archive, identified here as 1 to 5. The numbers increase with increasing sophistication in the code and the simulator model, thus:

  1. Basic unpipelined simulator (these pages)

  2. Unoptimized pipelined simulator

  3. Optimized pipelined simulator

  4. Optimized pipelined simulator with memory cache

  5. Optimized pipelined simulator with memory cache and interrupt handling

The following pages will take you through the process of building and using the basic simulator in detail, and then go on to consider the other simulators. The simulators do not differ in how they are built or used - it's only the innards that are different and that result in one being faster than another in the same context.

You will want to get to work with each simulator in turn, perhaps with the aim in mind of improving the simulator to get it to run faster still.

How long it takes to run overall and per instruction is one of the default printed outputs from the simulator. If you want to get out statistics such as how long each class of instruction takes to execute in particular circumstances, you will have to add in the code for that yourself. It's open source! You can do that. The code is clearly written and explained in the pages here.



Top

Next