SPIM is a
MIPS processor simulator, designed to run
assembly language
In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
code for this architecture. The program simulates
R2000 and
R3000
The R3000 is a 32-bit RISC microprocessor chipset developed by MIPS Computer Systems that implemented the MIPS I instruction set architecture (ISA). Introduced in June 1988, it was the second MIPS implementation, succeeding the R2000 microprocesso ...
processors, and was written by
James R. Larus while a professor at the
University of Wisconsin–Madison
The University of Wisconsin–Madison (University of Wisconsin, Wisconsin, UW, UW–Madison, or simply Madison) is a public land-grant research university in Madison, Wisconsin, United States. It was founded in 1848 when Wisconsin achieved st ...
. The MIPS machine language is often taught in college-level assembly courses, especially those using the textbook ''Computer Organization and Design: The Hardware/Software Interface'' by
David A. Patterson and
John L. Hennessy ().
The name of the simulator is a reversal of the letters "MIPS".
SPIM simulators are available for Windows (PCSpim), Mac OS X and Unix/
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
-based (xspim) operating systems. As of release 8.0 in January 2010, the simulator is licensed under the standard
BSD license
BSD licenses are a family of permissive free software licenses, imposing minimal restrictions on the use and distribution of covered software. This is in contrast to copyleft licenses, which have share-alike requirements. The original BSD lic ...
.
In January, 2011, a major release version 9.0 features QtSpim that has a new user interface built on the
cross-platform
Within computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several Computing platform, computing platforms. Some ...
Qt UI framework and runs on
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
,
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
, and
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
. From this version, the project has also been moved to
SourceForge
SourceForge is a web service founded by Geoffrey B. Jeffery, Tim Perdue, and Drew Streib in November 1999. SourceForge provides a centralized software discovery platform, including an online platform for managing and hosting open-source soft ...
for better maintenance. Precompiled versions of QtSpim for Linux (32-bit), Windows, and Mac OS X, as well as PCSpim for Windows are provided.
The SPIM operating system
The SPIM simulator comes with a rudimentary operating system, which allows the programmer usage of common used functions in a comfortable way. Such functions are invoked by the -instruction. Then the OS acts depending on the values of specific registers.
The SPIM OS expects a label named as a handover point from the OS-preamble.
SPIM Alternatives/Competitors
MARS (MIPS Assembler and Runtime Simulator) is a Java-based IDE for the MIPS Assembly Programming Language and an alternative to SPIM.
Its initial release was in 2005. However, as both of its maintainers have since retired, the project is no longer under active development.
Imperas is a suite of embedded software development tools for MIPS architecture which uses
Just-in-time compilation
In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is compilation (of computer code) during execution of a program (at run time) rather than before execution. This may consist of source code transl ...
emulation and simulation technology.
The simulator was initially released in 2008 and is under active development.
There are over 30 open source models of the MIPS 32 bit and 64 bit cores.
Other alternative to SPIM for educational purposes is The CREATOR simulator.
[CREATOR source code on GitHub: https://github.com/creatorsim/creator ] CREATOR is portable (can be executed in current web browsers) and allow students to learn several assembly languages of different processors at the same time (CREATOR includes examples of MIPS32 and RISC-V instructions).
See also
*
GXemul
Gavare's eXperimental Emulator (formerly known as mips64emul) is a computer architecture
emulator being developed by Anders Gavare. It is
available as free software under a revised BSD-style license.
In 2005, Gavare changed the name of the softwa ...
(formerly known as mips64emul), another MIPS emulator. Unlike SPIM, which focuses on emulating a bare MIPS implementation, GXemul is written to emulate full computer systems based on MIPS microprocessors—for example, GXemul can emulate a
DECstation 5000 Model 200 workstation
*
OVPsim also emulates MIPS, and where all the MIPS models are verified by
MIPS Technologies
MIPS Tech LLC, formerly MIPS Computer Systems, Inc. and MIPS Technologies, Inc., is an American Fabless semiconductor company, fabless semiconductor design company that is most widely known for developing the MIPS architecture and a series of Re ...
*
QEMU
The Quick Emulator (QEMU) is a free and open-source emulator that uses dynamic binary translation to emulate a computer's processor; that is, it translates the emulated binary codes to an equivalent binary format which is executed by the mach ...
also emulates MIPS
*
MIPS architecture
MIPS (Microprocessor without Interlocked Pipelined Stages) is a family of reduced instruction set computer (RISC) instruction set architectures (ISA)Price, Charles (September 1995). ''MIPS IV Instruction Set'' (Revision 3.2), MIPS Technologies ...
References
External links
Project site at SourceForgeWeb version of SPIMIntroductory slides on MIPS programming using SPIMAn introduction to SPIM simulator
{{DEFAULTSORT:Spim
Emulation software
MIPS architecture
Software using the BSD license