File: spim.html

package info (click to toggle)
spim 6.3-1
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 1,744 kB
  • ctags: 2,669
  • sloc: ansic: 9,710; asm: 6,906; yacc: 1,959; makefile: 828; lex: 627; sh: 95
file content (203 lines) | stat: -rw-r--r-- 9,720 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0039)http://www.cs.wisc.edu/~larus/spim.html -->
<HTML><HEAD><TITLE>SPIM</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY>
<H1 align=center>SPIM</H1>
<h2 align=center>A MIPS R2000/R3000 Simulator</h2>
<CENTER>
<P><A href="http://www.cs.wisc.edu/~larus/larus.html">James 
Larus</A></P>
<div align="center">
  <table border="0" width="386">
    <tr>
      <td width="198" align="center"><b>Old Address</b></td>
      <td width="172" align="center"><b>Current Address</b></td>
    </tr>
    <tr>
      <td width="198">Computer Sciences Department<BR>1210 West Dayton Street<BR>University
        of Wisconsin<BR>Madison, WI 53706<BR>larus@cs.wisc.edu</td>
      <td width="172">Microsoft Research<br>
        One Microsoft Way<br>
        Redmond, WA 98052<br>
        larus@microsoft.com</td>
    </tr>
  </table>
</div>
<P>&nbsp;</P></CENTER>
<P><B>spim</B>  is a self-contained simulator for running MIPS R2000/R3000 
assembly language programs. It reads and immediately executes assembly language
code for this processor. <B>spim</B>  provides a simple debugger and 
simple set of operating system services.</P>
<P><B>spim</B> implements almost the entire MIPS assembler-extended instruction set
for the R2000/R3000 (It omits some of the complex floating point comparisons and details of the memory
system page tables.)  The MIPS architecture has evolved considerably since then (in particular,
from 32 to 64 bits), which means that <B>spim</B> will not run programs compiled for recent MIPS
or SGI processors.</P>
<P><B>spim</B> comes with complete source code and documentation. It also include a torture test to verify a port to a new machine.</P>
<P><B>spim</B> implements both a simple, terminal-style interface and a visual windowing interface.  On Unix, the
spim program provides a terminal interface and the xspim program provides an X window interface.  On PCs,
the spim program provides a DOS interface or console interface and PCSpim provides a Windows
interface..</P>
<HR width="100%">

<h2 align="center"><B><FONT size=+2>Downloading SPIM</FONT></B></h2>
<div align="center">
  <center>
  <table border="1" width="663">
    <tr>
      <td width="279" align="center"><b>Platform</b></td>
      <td width="128" align="center">&nbsp;</td>
      <td width="128" align="center"><b>Form</b></td>
      <td width="382" align="center"><b>File</b></td>
    </tr>
    <tr>
      <td width="279"> Unix or Linux system</td>
      <td width="128">spim<br>
        xspim</td>
      <td width="128">Source code</td>
      <td width="382"><A 
href="http://www.cs.wisc.edu/~larus/SPIM/spim.tar.Z">http://www.cs.wisc.edu/~larus/SPIM/spim.tar.Z</A>
        or<A 
href="http://www.cs.wisc.edu/~larus/SPIM/spim.tar.Z"><br>
        </A><A 
href="http://www.cs.wisc.edu/~larus/SPIM/spim.tar.gz">http://www.cs.wisc.edu/~larus/SPIM/spim.tar.gz</A></td>
    </tr>
    <tr>
      <td width="279" rowspan="2">Microsoft Windows<br>
        (Windows 95, 98, NT, 2000)</td>
      <td width="128" rowspan="2">spim<br>
        PCSpim</td>
      <td width="128">Executable</td>
      <td width="382"><A 
href="http://www.cs.wisc.edu/~larus/SPIM/pcspim.exe">http://www.cs.wisc.edu/~larus/SPIM/pcspim.exe</A> 
      </td>
    </tr>
    <tr>
      <td width="128">Source code</td>
      <td width="382"><A 
href="http://www.cs.wisc.edu/~larus/SPIM/pcspim.exe">http://www.cs.wisc.edu/~larus/SPIM</A><a href="http://www.cs.wisc.edu/~larus/SPIM/pcspim_src.zip">/pcspim_src.zip</a></td>
    </tr>
    <tr>
      <td width="279">Microsoft DOS</td>
      <td width="128">spim</td>
      <td width="128">Executable</td>
      <td width="382"><A 
href="http://www.cs.wisc.edu/~larus/SPIM/spimdos.exe">http://www.cs.wisc.edu/~larus/SPIM/spimdos.exe</A>
      </td>
    </tr>
  </table>
  </center>
</div>
<P>To run spim or xspim on a Unix or Linux system, copy either the compressed tar file (<A 
href="http://www.cs.wisc.edu/~larus/SPIM/spim.tar.Z">http://www.cs.wisc.edu/~larus/SPIM/spim.tar.Z</A>) 
or the gzip'ed tar file (<A 
href="http://www.cs.wisc.edu/~larus/SPIM/spim.tar.gz">http://www.cs.wisc.edu/~larus/SPIM/spim.tar.gz</A>).&nbsp;
Both files contains source and must be compiled for a particular platform.</P>
<P>To run PCspim on a PC under Microsoft Windows, copy the file <A 
href="http://www.cs.wisc.edu/~larus/SPIM/pcspim.exe">http://www.cs.wisc.edu/~larus/SPIM/pcspim.exe</A> 
(Instructions: <A 
href="http://www.cs.wisc.edu/~larus/SPIM/spimwin.ps">postscript</A>.) </P>
<P>Source for the PC version (both PCspim and spim) is available separately in the file <A 
href="ftp://ftp.cs.wisc.edu/pub/spim/pcspim_src.zip">ftp://ftp.cs.wisc.edu/pub/spim/pcspim_src.zip</A> 
</P>
To 
run spim on a PC under MS/DOS, copy the file <A 
href="http://www.cs.wisc.edu/~larus/SPIM/spimdos.exe">http://www.cs.wisc.edu/~larus/SPIM/spimdos.exe</A>
<p>There is no Macintosh version of <b>spim</b> (Yes, there should be).</p>
<HR width="100%">

<h2 align="center"><B><FONT size=+2>Documentation</FONT></B></h2>
<P>Morgan Kaufmann has 
generously provided an on-line version of Appendix A from Hennessy &amp; 
Patterson, <A 
href="http://www.mkp.com/books_catalog/1-55860-428-6.asp"><I>Computer 
Organization and Design: The Hardware/Software Interface</I></A> (as a <A 
href="http://www.cs.wisc.edu/~larus/SPIM/cod-appa.pdf">Adobe PDF file</A>). This 
is a more complete and up-to-date version of <B>spim</B> documentation included with <B>spim</B>. 
<P>The documentation included with <B>spim</B> is also online (as a <A 
href="http://www.cs.wisc.edu/~larus/SPIM/spim_documentation.ps">postscript</A> 
or <A href="http://www.cs.wisc.edu/~larus/SPIM/spim_documentation.pdf">Adobe PDF 
file</A>). However Appendix A of Hennessy &amp; Patterson, <A 
href="http://www.mkp.com/books_catalog/1-55860-428-6.asp"><I>Computer 
Organization and Design: The Hardware/Software Interface</I></A>, is a more complete
and accurate description of the MIPS architecture and 
<B>spim</B> software.</P>
<P>There is some documentation for the Windows interface to <B>spim</B>: <A 
href="http://www.cs.wisc.edu/~larus/SPIM/spimwin.ps">postscript</A> or <A 
href="http://www.cs.wisc.edu/~larus/SPIM/spimwin.pdf">Adobe PDF file</A>. 
<P>The reference manual for the MIPS architecture (including processors later than the R2000/R3000) is: Gerry Kane and Joe Heinrich, 
<I>MIPS&nbsp;RISC Architecture</I>, Prentice Hall, Englewood Cliffs, N.J. 07632 
ISBN 0-13-1059254. 
<P>Another good book MIPS R2000 and R3000 programmers is: Erin 
Farquhar and Philip Bunce, <A 
href="http://www.mkp.com/books_catalog/areas/computer_architecture.asp#MIPS programming"><I>The 
MIPS Programmer's Handbook,</I></A>  Morgan Kaufmann, San Francisco, CA, 1994, 
ISBN 1-55860-297-6.</P>
<P>However, the best book for MIPS programmers is: Dominic Sweetman, <A 
href="http://www.mkp.com/books_catalog/areas/computer_architecture.asp#MIPS programming"><I>See 
MIPS Run,</I></A>  Morgan Kaufmann, San Francisco, CA, 1999, ISBN 
1-55860-410-3.</P>
<HR width="100%">

<h2 align="center">Latest Version</h2>
<P align="left">The current version of <b>spim</b> is 6.3, which contains the
following changes from version 6.2:</P>
<ul>
  <li>
    <p align="left">PCSpim interface simplified to 4 fixed panes, similar to
    xspim, which permit cut and paste.</li>
  <li>
    <p align="left">PCSpim console stays on the screen after assembly
    program&nbsp; terminates.</li>
  <li>
    <p align="left">Comments in assembly source displayed in text segment.</li>
  <li>
    <p align="left">NOP is standardized to sll $0 $0 0 (= 0x00000000)</li>
  <li>
    <p align="left">Fixed several bugs and missed optimization in computing
    immediate values in lw/sw instruction sequences.</li>
  <li>
    <p align="left">High 2 bits in negative branch offsets were incorrect.</li>
  <li>
    <p align="left">Display floating point registers with up to 18 digits of
    precision.</li>
  <li>
    <p align="left">New spim command (print_all_regs) prints all registers.</li>
  <li>
    <p align="left">Minor changes to compile spim under cygwin for Windows.</li>
  <li>
    <p align="left">Validate the range of immediate values in MIPS (but not
    pseudo) instructions.</li>
  <li>
    <p align="left">Fixed display of stack with non-word aligned $sp.</li>
  <li>
    <p align="left">New flags:
    <ul>
      <li>
        <p align="left">-delayed-branches&nbsp; Simulate MIPS delayed control
        transfers for branches, jumps, and calls</li>
      <li>
        <p align="left">-delayed-loads Simulate MIPS non-interlocked loads.</li>
    </ul>
  </li>
</ul>
<HR width="100%">

<h2 align="center"><B><FONT size=+2>Copyright</FONT></B></h2>
<P><B>spim</B> is copyrighted by James Larus. The DOS and Windows ports were 
done by David A. Carley and are copyrighted by Morgan Kaufmann Publishers. <B>spim</B> can 
be freely used and distributed for non-commercial purposes (see the README file 
for details).</P>
<HR width="100%">

<h2 align="center"><B><FONT size=+2>SPIMSAL Note</FONT></B></h2>
<P><B>spimsal</B> is an old version of <B>spim</B> that ran on <A 
href="ftp://ftp.cs.wisc.edu/pub/spimsal/spimsal.zip">PCs running Windows 3.1</A> 
and <A 
href="ftp://ftp.cs.wisc.edu/pub/spimsal/SPIMSAL.macintosh.bin">Macintoshes</A>. 
<B>spimsal</B> implements an extended version of the MIPS instruction set and is 
based on an old version of <B>spim</B>. It also does NOT run under Windows '95 
or Windows NT. If you used this program on PCs and do not need the SAL 
instructions, you should get the new version.</P></BODY></HTML>