Yu Chen
Indigo Digital Press Division R&D
Hewlett Packard
Boise, ID

Hessam Sarjoughian
Arizona Center for Integrative Modeling & Simulation
Computer Science & Engineering Dept. 
Arizona State University, Tempe, AZ

DEVSJAVA MIPS Processor Simulator

DEVSJAVA MIPS Processor Simulator was initially developed to support computer architecture education.  It models single-cycle, multi-cycle, and pipeline processor described in [1], provides visualization that reveals component interactions inside a processor, collects metrics data (including instruction count, cycle count, and cycles per instruction) that can be used for performance comparison, and can run on any machine with J2SE5.0 or later.  It is implemented in Java using DEVSJAVA (a Java realization of the Discrete Event System Specification ) simulation environment.

To have a taste of the simulator, you can first try Java Web Start version of the simulator, which has most of the functionalities except I/O operations due to security restrictions.  That means, this version runs with the predefined assembly and property file and does not produce output files.  Before running the simulator, you need to have J2SE5.0 or later installed on your machine.  Then, you can follow these steps to run the simulator:

  1. Click this link, Java Web Start version of the simulator.  If a window named DEVSJAVA Simulator Viewer is displayed, go to step 2.  Otherwise, you will be prompted to save the file, MIPSProcSim.jnlp, to your computer.  Save the file to a directory, open a command console, go to the directory where the file was saved, and type javaws MIPSProcSim.jnlp. The window named DEVSJAVA Simulator Viewer shall then be displayed.
  2. Select a package from the top left combo box.  To view a particular processor executing instructions in the assembly file, select mips.model.experiment.  Otherwise, select mips.model.
  3. Select a model from the top right combo box.
  4. To run a model inside mips.model, you need to click on the input ports and set values (only a limited number of test values are provided) to input ports.   After required inputs have been entered, click step button to view the simulation step by step, or click run button to run the simulation continuously.  Use restart button to restart the simulation.  To view the current inputs and outputs of an atomic model, rest the mouse on the model, then the tooltip will display the current states of the model.  To run a model inside mips.model.experiment, you do not need to set inputs, as the assembly and property file provide all the needed information.  Use step to step through the simulation, run to run the simulation till the assembly program ends (except when an exception occurs), and restart to restart the simulation.  At the end of the simulation, you can view the performance data by resting mouse on the atomic model, Transducer

Figure 1 shows a screen shot of Memory inside mips.model package.  Memory has five input ports (Address, C, MemRead, MemWrite, and WriteData) and one output port (Data).  The tooltip shows the current port values along with other state information.  The current simulation time is 400 ps.

Figure 1  Memory

Figure 2 shows a screen shot of SCPEF (Single Cycle Processor Experimental Frame) inside mips.model.experiment.  The grey lines are couplings between the components.  You can think them as wires, along which signals can be sent or received.  The boxes with texts inside are messages.  After running the simulation, you can view the performance data by resting the mouse on Transducer.

Figure 2 SCPEF

After running the Java Web Start version of DEVSJAVA MIPS Processor Simulator, if you wan to explore the simulator more, you can download the source code (will be available soon), compile, and run the simulator on your machine.  This version allows you configure component timing parameters, set initial register values, and choose which assembly file to run.  At the end of a simulation, performance data will be written to an output file specified in the property file.

We hope you find DEVSJAVA MIPS Processor Simulator useful.  If you have any comments, please let us know.

References

[1] D. A. Patterson and J. L. Hennessy. Computer Organization and Design: The Hardware/Software Interface. Morgan Kaufmann, San
Francisco, CA, USA, 3rd edition, August 2004.


Last modified: Dec 30, 2007