SPIM S20 MIPS Simulator

larus@primost.cs.wisc.edu (James Larus)
11 May 90 20:57:10 GMT

          From comp.compilers

Related articles
SPIM S20 MIPS Simulator larus@primost.cs.wisc.edu (1990-05-11)
Re: SPIM S20 MIPS Simulator max@Neon.Stanford.EDU (1990-05-12)
| List of all articles for this month |

From: larus@primost.cs.wisc.edu (James Larus)
Newsgroups: comp.compilers,comp.lang.misc,comp.sys.mips
Date: 11 May 90 20:57:10 GMT
Keywords: code
Organization: U of Wisconsin CS Dept

The SPIM S20 is a software simulator that runs assembly language
programs for the MIPS R2000/R3000 RISC computers. SPIM can read and
immediately execute files containing assembly language statements (not
a.out files). 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 (it has been tested on DECStations, Sun
3s, Sun 4s, PC/RTs), so the students could generate code for a simple,
clean, orthogonal computer; no matter which god-awful machine they
used. It was a very successful in this role. I have also compiled
several C program with the MIPS C compiler and run them on SPIM.


SPIM is fairly slow. It runs about 1000 dhrystones/second, which is
roughly 1/25th the speed of a DECStation 3100, or about the speed of a
68010-based system.


SPIM implements almost the entire MIPS assembler-extended instruction
set (I've omitted some the complex floating point comparisons and
details of the memory system page tables). SPIM comes with complete
source code and documentation of all instructions (including several
that aren't in Kane's book, but are produced by MIPS compilers). It
also include a large torture test to verify a port to a new machine.


SPIM currently has a simple terminal-style interface. A student is
writing a flashy X-windows interface, which should be distributed this
summer.


SPIM is copyrighted by me and distributed under the terms of the GNU
General Public License. You can copy a compressed tar file from
primost.cs.wisc.edu (128.105.8.17) in the file: ~ftp/pub/spim.tar.Z.
If you want to be informed of future updates, send me your electronic
address.


/Jim
larus@cs.wisc.edu


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





Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.