need information about spim

vinodvvk

Junior Member
Feb 11, 2011
1
0
0
Hi,
I am gonna work with MIPS in near future. I am assigned with the work of exploring simulator for MIPS. I tried SPIM but not sure how to work with that. I am desperately in need of your help.

1. I found SPIM supports only assembly language. I need to use C code as well. Is there any cross compiler which can be used along with SPIM to convert my C code to assembly language.
2. Is it possible to execute more than one file(.s files) in SPIM??
3. Is it possible to create new work space instead of directly opening a file
4. Is SPIM obsolete or it can be used for MIPS??

thanks in advance.

Regards,
vinod
 

Harvey

Administrator<br>Elite Member
Oct 9, 1999
35,059
73
91
This may help you.

SPIM A MIPS32 Simulator

James Larus
spim@larusstone.org

Microsoft Research
Formerly: Professor, Computer Sciences Department, University of Wisconsin-Madison​

spim has moved to SourceForge.org. New versions of spim are at that site. This site only contains old versions of the simulator.

Why move? SourceForge offers a number of services, such as a source code repository and collaborative tools, that make it easier to share code with other developers. Now that spim has an open source license, the time has come to move off a 20-year old web site and join the 21st century.

spim is a self-contained simulator that runs MIPS32 programs. It reads and executes assembly language programs written for this processor. spim also provides a simple debugger and minimal set of operating system services. spim does not execute binary (compiled) programs.

spim implements almost the entire MIPS32 assembler-extended instruction set. (It omits most floating point comparisons and rounding modes and the memory system page tables.) The MIPS architecture has several variants that differ in various ways (e.g., the MIPS64 architecture supports 64-bit integers and addresses), which means that spim will not run programs compiled for all MIPS processors. MIPS compilers also generate a number of assembler directives that spim cannot process. These directives usually can be safely ignored.

Earlier versions of spim (before 7.0) implemented the MIPS-I instruction set used on the MIPS R2000/R3000 computers. This architecture is obsolete (though, never surpassed for its simplicity and elegance). spim now supports the more modern MIPS32 architecture, which is the MIPS-I instruction set augmented with a large number of occasionally useful instructions. MIPS code from earlier versions of spim should run without changes, except code that handles exceptions and interrupts. This part of the architecture changed over time (and was poorly implemented in earlier versions of spim). This type of code will need to be updated. Examples of new exception handling are in the files: exceptions.s and Tests/tt.io.s.

spim comes with complete source code and documentation. It also include a torture test to verify a port to a new machine.

spim implements both a terminal and a window interface. On Microsoft Windows, Linux, and Mac OS X, the spim program provides the simple terminal interface and the Qtspim program provides the windowing interface.