Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
SPIM
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Other uses|Spim (disambiguation)}} {{Infobox software | name = SPIM | logo = <!-- Image name is enough --> | logo alt = | screenshot = <!-- Image name is enough --> | caption = | screenshot alt = | collapsible = | author = | developer = [[James Larus]] | released = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --> | discontinued = | latest release version = 9.1 | latest release date = {{Start date and age|2011|07}}<ref name="spimsimulator-changes">{{cite web |url=http://spimsimulator.sourceforge.net/changes.html |title=Changes to Spim |author= |publisher= |language=English |format=HTML |date= |accessdate=2017-05-15 |archiveurl=https://web.archive.org/web/20110127072610/http://spimsimulator.sourceforge.net/changes.html |archivedate=2011-01-27}}</ref> | latest preview version = | latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --> | status = | programming language = | operating system = [[Linux]], [[Mac OS X]], [[Unix]] and [[Microsoft Windows|Windows]] | platform = | size = | language = | language count = <!-- Number only --> | language footnote = | genre = | license = [[BSD license]] | alexa = | website = {{URL|http://spimsimulator.sourceforge.net/}} | standard = | AsOf = }} '''SPIM''' is a [[MIPS architecture|MIPS]] processor simulator, designed to run [[assembly language]] code for this architecture. The program simulates [[R2000 (microprocessor)|R2000]] and [[R3000]] processors, and was written by [[James Larus|James R. Larus]] while a professor at the [[University of Wisconsin–Madison]].<ref>{{cite web|url=http://pages.cs.wisc.edu/~larus/spim.html|title=SPIM MIPS Simulator|publisher=|accessdate=1 October 2016}}</ref> 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 (scientist)|David A. Patterson]] and [[John L. Hennessy]] ({{ISBN|1-55860-428-6}}). 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]]-based (xspim) operating systems. As of release 8.0 in January 2010, the simulator is licensed under the standard [[BSD license]]. In January, 2011, a major release version 9.0 features QtSpim that has a new user interface built on the [[cross-platform]] [[Qt (toolkit)|Qt UI framework]] and runs on [[Windows]], [[Linux]], and [[macOS]]. From this version, the project has also been moved to [[SourceForge]] 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 {{mono|syscall}}-instruction. Then the OS acts depending on the values of specific registers. {| class=wikitable |+ '''Examples of system calls (used by SPIM)''' |- ! service || Trap code || Input || Output || Notes |- ! print_int | $v0 = 1 || $a0 = integer to print || prints $a0 to standard output || base = 10 |- ! print_string | $v0 = 4 || $a0 = address of first character || || prints a character string to standard output |- ! read_int | $v0 = 5 || || integer read from standard input placed in $v0 || base = 10 |- ! sbrk | $v0 = 9 || $a0 = number of bytes required || $v0= address of allocated memory || Allocates memory from the heap |- ! exit | $v0 = 10 || || || |- ! file_open | $v0 = 13 || $a0 = full path, $a1 = flags, $a2 = UNIX octal file mode || $v0 = file descriptor || example; there are read/write/close functions, too |} The SPIM OS expects a label named {{mono|main}} as a handover point from the OS-preamble. == SPIM Alternatives/Competitors == MARS (MIPS Assembler and Runtime Simulator)<ref>{{cite web|url=http://courses.missouristate.edu/KenVollmar/MARS/|title=MARS MIPS simulator - Missouri State University|publisher=|accessdate=1 October 2016}}</ref> is a Java-based IDE for the MIPS Assembly Programming Language and an alternative to SPIM. Its initial release was in 2005.{{Citation needed|date=October 2019}} However, as both of its maintainers have since retired,<ref>{{cite web |title=Otterbein University Computer Science: Peter Sanderson |url=http://faculty.otterbein.edu/PSanderson/ |access-date=14 April 2024}}</ref><ref>{{cite web |title=Ken R. Vollmar - Computer Science Department - Missouri State University |url=https://computerscience.missouristate.edu/profile-display.aspx?p=KenVollmar |access-date=14 April 2024}}</ref> 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]] 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 <ref>{{cite web|url=http://www.ovpworld.org/library/wikka.php?wakka=Mips32Processors|title=Open Virtual Platforms|publisher=|accessdate=1 October 2016}}</ref> and 64 bit <ref>{{cite web|url=http://www.ovpworld.org/library/wikka.php?wakka=Mips64Processors|title=Open Virtual Platforms|publisher=|accessdate=1 October 2016}}</ref> cores. Other alternative to SPIM for educational purposes is The CREATOR simulator.<ref>{{Cite web|url=https://zenodo.org/record/5130302|title = CREATOR: Simulador didáctico y genérico para la programación en ensamblador|date = 23 July 2021}}</ref><ref>CREATOR Web with MIPS32 example: https://creatorsim.github.io/creator/?example_set=default&example=e12 </ref><ref>CREATOR source code on GitHub: https://github.com/creatorsim/creator </ref> 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]] (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#DECstation 5000 Model 200 Series|DECstation 5000 Model 200]] workstation * [[OVPsim]] also emulates MIPS, and where all the MIPS models are verified by [[MIPS Technologies]] * [[QEMU]] also emulates MIPS * [[MIPS architecture]] == References == {{Reflist}} == External links == * [http://sourceforge.net/projects/spimsimulator/ Project site at SourceForge] * [http://www.cs.wisc.edu/~larus/spim.html Former official site at Larus's website] * [https://web.archive.org/web/20071011192838/http://cgi.aggregate.org/cgi-bin/cgispim.cgi Web version of SPIM] * [http://www.slideshare.net/mchinosi/spim-mips-simulator-08-02-presentation Introductory slides on MIPS programming using SPIM] * [http://www.slideshare.net/mchinosi/spim-mips-simulator-presentation An introduction to SPIM simulator] {{DEFAULTSORT:Spim}} [[Category:Emulation software]] [[Category:MIPS architecture]] [[Category:Software using the BSD license]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation needed
(
edit
)
Template:Cite web
(
edit
)
Template:ISBN
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Main other
(
edit
)
Template:Mono
(
edit
)
Template:Other uses
(
edit
)
Template:Reflist
(
edit
)
Template:Template other
(
edit
)