			    SPIM MIPS Simulator

		  http://www.cs.wisc.edu/~larus/spim.html

				James Larus
			Computer Sciences Department
			  University of Wisconsin

	   New Address: Microsoft Research (larus@microsoft.com)


SPIM S20 is a software simulator that runs assembly language programs for
the MIPS R2000/R3000 RISC computers.  SPIM can read and immediately run
files containing assembly language statements.  SPIM is a self-contained
system for running these programs and contains a debugger and interface to
the operating system.

I wrote SPIM as the target machine for an undergraduate compiler
course. SPIM is very portable, which allows students to generate code for a
simple, clean, orthogonal computer; no matter which god-awful machine they
used.  SPIM currently runs on a wide variety of Unix systems, and, thanks to
David A. Carley and Morgan Kaufmann Publishers, on DOS and Windows.

SPIM implements almost the entire MIPS assembler-extended instruction set
for the R2000/R3000 (I've omitted some the complex floating point comparisons
and details of the memory system page tables).  The MIPS architecture has
evolved considerably since then (in particular the 64 bit extensions), which
means that SPIM will not run programs compiled for recent MIPS or SGI
processors.

SPIM comes with complete source code and documentation of all instructions.
It also include a large torture test to verify a port to a new machine.

SPIM implements both a simple, terminal-style interface and a visual
windowing interface.  On Unix, the spim program provides the terminal
interface and the xspim program provides the X window interface.  On PCs,
the spim program provides a DOS interface and PCSpim provides a Windows
interface.

SPIM is copyrighted by me and is covered by a BSD license.
You can get source and compiled files from:

	http://www.cs.wisc.edu/~larus/spim.html

SPIM comes with documentation, however Appendix A of Hennessy & Patterson,
"Computer Organization and Design: The Hardware/Software Interface," Morgan
Kaufman, 1993 is a far better introduction to the software.

/Jim

James Larus
Computer Sciences Department
1210 West Dayton Street
University of Wisconsin
Madison, WI 53706

Current Address: Microsoft Research, larus@microsoft.com


Older versions of SPIM (available from ftp.cs.wisc.edu:pub/spim/Old_Versions) also
had the following features:

  Can also read and run MIPS a.out files (when compiled on a MIPS system)

  Includes an optional extension by Anne Rogers and Scott Rosenberg of
Princeton that performs a cycle-by-cycle MIPS simulation that exposes the
hardware pipeline.
