-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.rtf
211 lines (211 loc) · 10.6 KB
/
README.rtf
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
204
205
206
207
208
209
210
211
{\rtf1\ansi\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0 Courier New;}}
{\colortbl ;\red0\green0\blue255;}
{\*\generator Riched20 6.2.9200}\viewkind4\uc1
\pard\f0\fs22\lang1033 README FILE FOR SPIM, XSPIM, PCSPIM, and QTSPIM \par
===============================================\par
\par
This directory contains SPIM--an assembly language MIPS32 simulator.\par
\par
SPIM is Copyright (c) 1990-2010, by James R. Larus.\par
All rights reserved.\par
\par
SPIM is distributed under a BSD license:\par
\par
Redistribution and use in source and binary forms, with or without modification, are\par
permitted provided that the following conditions are met:\par
\par
Redistributions of source code must retain the above copyright notice, this list of\par
conditions and the following disclaimer.\par
\par
Redistributions in binary form must reproduce the above copyright notice, this list of\par
conditions and the following disclaimer in the documentation and/or other materials\par
provided with the distribution.\par
\par
Neither the name of the James R. Larus nor the names of its contributors may be used to\par
endorse or promote products derived from this software without specific prior written\par
permission.\par
\par
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS\par
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\par
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\par
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\par
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\par
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\par
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\par
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\par
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\par
\par
\par
GETTING SPIM SOURCE\par
===================\par
\par
Spim is hosted on SourceForge and its source code is available through SVN:\par
{{\field{\*\fldinst{HYPERLINK https://sourceforge.net/projects/spimsimulator/ }}{\fldrslt{https://sourceforge.net/projects/spimsimulator/\ul0\cf0}}}}\f0\fs22\par
\par
\par
DIRECTORIES\par
===========\par
\par
The subdirectories can be divided into two categories.\par
\par
1. Common to all versions of Spim:\par
\par
CPU -- Contains the MIPS simulator and some utility functions common to all version of the\par
simulator.\par
\par
Documentation -- Contains the man pages, web page, and other documentation.\par
\par
bin -- Utilities.\par
\par
Setup -- Contain tools used to build deployable versions of the simulators.\par
\par
Tests -- Contains regression test for the simulator.\par
\par
Boneyard -- Copies of the recent releases of Spim.\par
\par
\par
2. Front-ends for different versions of Spim:\par
\par
PCSpim -- Microsoft Windows front end for Spim.\par
\par
QtSpim -- Front end for Spim that works on Microsoft Windows, Linux, and Mac OS X.\par
\par
spim -- Text-only (terminal or console) front end for Spim. Works on all platforms.\par
\par
xspim -- X-Windows front end for Spim. Works on Linux and Mac OS X. (Built on a very old\par
X Windows library that is no longer supported by the Mac.)\par
\par
\par
BUILDING QTSPIM\par
===============\par
\par
It is generally not necessary to build QtSpim as the Spim website contains an installable\par
version for most systems.\par
\par
Install the bison parser generator and flex lexer generator, either using Cygwin on Windows or\par
native on Linux.\par
\par
1. Download the free (open source) version of Qt Creator from\par
{{\field{\*\fldinst{HYPERLINK http://qt.nokia.com/downloads/ }}{\fldrslt{http://qt.nokia.com/downloads/\ul0\cf0}}}}\f0\fs22 . This is a large download that might take a while.\par
\par
The open source version of Qt Creator for Windows, which uses mingw, works fine, as does\par
the version (which you need to build yourself) that uses Microsoft Visual Studio's C++\par
compiler.\par
\par
The Qt Creator package for Ubuntu is an old version, which has some problems with\par
QtSPIM. Download a recent version from {{\field{\*\fldinst{HYPERLINK http://qt.nokia.com/downloads/ }}{\fldrslt{http://qt.nokia.com/downloads/\ul0\cf0}}}}\f0\fs22 .\par
\par
The Mac Qt SDK is located at {{\field{\*\fldinst{HYPERLINK http://qt.nokia.com/downloads/sdk-mac-os-cpp }}{\fldrslt{http://qt.nokia.com/downloads/sdk-mac-os-cpp\ul0\cf0}}}}\f0\fs22 .\par
\par
2. Start QtCreator and open the file QtSpim/QtSpim.pro.\par
\par
3. Compile QtSpim.\par
\par
If you are porting to a new system and see a large number of compiler errors in\par
QtCreator, changes are good that you need to change QtSpim.pro to define the compiler\par
flag that says "treat all files, including .c files, as C++ code. This flag is "-X C++"\par
for gcc and "-TP" for the Microsoft compiler.\par
\par
\par
BUILDING SPIM and XSPIM\par
=======================\par
\par
It is necessary to build spim and xspim, as they are only distributed as source.\par
\par
1. Download the source for spimsimulator from sourceforge\par
({{\field{\*\fldinst{HYPERLINK https://sourceforge.net/projects/spimsimulator/ }}{\fldrslt{https://sourceforge.net/projects/spimsimulator/\ul0\cf0}}}}\f0\fs22 ), either through Subversion from the\par
spimsimulator repository ({{\field{\*\fldinst{HYPERLINK http://spimsimulator.svn.sourceforge.net/viewvc/spimsimulator/ }}{\fldrslt{http://spimsimulator.svn.sourceforge.net/viewvc/spimsimulator/\ul0\cf0}}}}\f0\fs22 ) or\par
by downloading a tarball\par
({{\field{\*\fldinst{HYPERLINK http://spimsimulator.svn.sourceforge.net/viewvc/spimsimulator/?view=tar }}{\fldrslt{http://spimsimulator.svn.sourceforge.net/viewvc/spimsimulator/?view=tar\ul0\cf0}}}}\f0\fs22 ).\par
\par
2. Decompress the file, using either the program uncompress for the first file or gzip for\par
the second file:\par
\par
% uncompress spim.tar.Z\par
\par
or\par
\par
% gzip -d spim.tar.gz\par
\par
3. Move the file spim.tar to the directory in which you want to build spim and untar it:\par
\par
% tar xf spim.tar\par
\par
It will create a directory named spim-8.0 (or the most recent version number).\par
\par
4. The simple terminal interface is contained in the spim-8.0/spim directory and the\par
X-windows interfaces is in the spim-8.0/xspim directory. The other directories are described\par
in the README file.\par
\par
5. Next, you must set the directories in which spim will be installed by editing the Makefile\par
(the file that contains instructions on building spim). In general, if you are installing\par
spim and want the windowing version (xspim), edit the file xspim/Imakefile. If you don't want\par
xspim or are running on a system without X-windows installed, you use the file spim/Makefile.\par
\par
The programs are installed in standard locations, but you can change the pathnames to other locations:\par
\par
EXCEPTION_DIR -- The full pathname of the directory in which to install the spim exception handler (exceptions.s).\par
\par
BIN_DIR -- The full pathname of the directory in which spim and xspim should be installed.\par
\par
MAN_DIR -- The full pathname of the directory in which the manual pages for spim and xspim should be installed.\par
\par
In general, the remaining parameters in a Makefile need not be changed.\par
\par
6. Then, if you are building xspim, change to the spim-8.0/xspim directory and type:\par
\par
% xmkmf\par
% make\par
\par
If you do not have a copy of xmkmf, you can use the Makefile in the xspim directory, but\par
beware that it may not work on your system because the paths to the X windows libraries\par
could be different.\par
\par
7. If you do not have X-windows, change to thespim-8.0/spim directory, edit Makefile, and type:\par
\par
% make\par
\par
8. To run spim or xspim, the exception handler must be installed in the directory specified\par
by the variable EXCEPTION_DIR in the Makefile. If the file exception.s is not installed, spim\par
and xspim fail before they start running. You can either install this file by hand or by\par
typing:\par
\par
% make install\par
\par
which also installs spim or xspim, and the manual pages in the directories that you set\par
(above). You may need root permission to install these files, in which case type:\par
\par
% sudo make install\par
\par
9. To test that spim is correctly built, change to the spim-8.0/spim directory and type:\par
\par
% make test\par
\par
and examine the output of the test. (Note: the exception handler must be installed before\par
running the test.)\par
\par
\par
BUILDING PCSPIM\par
===============\par
\par
It is not necessary to compile PCSpim (the Microsoft Windows version), as the Spim web site\par
contains a precompiled version.\par
\par
The Microsoft Windows version of Spim is called PCSpim and is built using Microsoft Visual\par
Studio.\par
\par
spim (the terminal version) works well on Microsoft Windows. You can easily build it using the\par
Cygwin port of the GNU tools (see {{\field{\*\fldinst{HYPERLINK www.cygwin.com }}{\fldrslt{www.cygwin.com\ul0\cf0}}}}\f0\fs22 ).\par
\par
\par
\par
NEW VERSIONS OF SPIM\par
===================\par
\par
I generally release new version of SPIM once a year, before a semester boundary (late August or\par
early January). The new version are available on:\par
\par
\tab\tab {{\field{\*\fldinst{HYPERLINK https://sourceforge.net/projects/spimsimulator/ }}{\fldrslt{https://sourceforge.net/projects/spimsimulator/\ul0\cf0}}}}\f0\fs22\par
\par
}