~ubuntu-branches/ubuntu/jaunty/spim/jaunty

« back to all changes in this revision

Viewing changes to spim.man

  • Committer: Bazaar Package Importer
  • Author(s): Fernando Sanchez
  • Date: 2001-01-24 14:05:34 UTC
  • Revision ID: james.westby@ubuntu.com-20010124140534-3le9wmofforjjcd8
Tags: upstream-6.3
ImportĀ upstreamĀ versionĀ 6.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" $Header: /Software/SPIM/src/spim.man 4     12/24/00 1:37p Larus $
 
2
 
 
3
.TH spim 1
 
4
.SH NAME
 
5
spim \- A MIPS R2000/R3000 Simulator
 
6
 
 
7
.SH SYNTAX
 
8
.B spim
 
9
[\|\fI-asm/-bare\fP
 
10
        \fI-trap/-notrap\fP
 
11
        \fI-quiet/-noquiet\fP
 
12
        \fI-mapped_io/-nomapped_io\fP
 
13
.br
 
14
\fI-delayed_branches\fP
 
15
        \fI-delayed_loads\fP
 
16
.br
 
17
\fI-stext size\fP
 
18
        \fI-sdata size\fP
 
19
        \fI-sstack size\fP
 
20
        \fI-sktext size\fP
 
21
        \fI-skdata size\fP
 
22
        \fI-ldata size\fP
 
23
        \fI-lstack size\fP
 
24
        \fI-lkdata size\fP
 
25
.br
 
26
\fI-file file <args>\fP \fI-execute file <args>\fP \|]
 
27
 
 
28
.SH DESCRIPTION
 
29
SPIM S20 is a simulator that runs programs for the MIPS R2000/R3000
 
30
RISC computers. (For a description of the real machines, see Gerry
 
31
Kane and Joe Heinrich, \fIMIPS RISC Architecture,\fP Prentice Hall,
 
32
1992.) SPIM can read and immediately execute files containing assembly
 
33
language or MIPS executable files.  SPIM is a self-contained system
 
34
for running these programs and contains a debugger and interface to a
 
35
few operating system services.
 
36
.PP
 
37
SPIM comes in two versions.  The plain version is called \fIspim\fP.
 
38
It runs on any type of terminal.  It operates like most programs of
 
39
this type: you type a line of text, hit the \fIreturn\fP key, and
 
40
\fIspim\fP executes your command.  The fancier version of SPIM is
 
41
called \fIxspim\fP.  It uses the X-window system, so you must have a
 
42
bit-mapped display to run it.  \fIxspim\fP, however, is a much easier
 
43
program to learn and use because its commands are always visible on
 
44
the screen and because it continually displays the machine's
 
45
registers.
 
46
 
 
47
.SH OPTIONS
 
48
\fIspim\fP has many options:
 
49
 
 
50
.IP \fB-asm\fP 10
 
51
Simulate the virtual MIPS machine provided by the assembler.  This is
 
52
the default.
 
53
 
 
54
.IP \fB-bare\fP 10
 
55
Simulate a bare MIPS machine without pseudo-instructions or the
 
56
additional addressing modes provided by the assembler.  Implies
 
57
\fI-quiet\fP.
 
58
 
 
59
.IP \fB-trap\fP 10
 
60
Load the standard exception handler and startup code.  This is the default.
 
61
 
 
62
.IP \fB-notrap\fP 10
 
63
Do not load the standard exception handler and startup code.  This
 
64
exception handler handles exceptions.  When an exception occurs, SPIM
 
65
jumps to location 0x80000080, which must contain code to service the
 
66
exception.  In addition, this file contains startup code that invokes
 
67
the routine \fImain\fP.  Without the startup routine, SPIM begins
 
68
execution at the instruction labeled \fI__start\fP.
 
69
 
 
70
.IP \fB-quiet\fP 10
 
71
Print a message when an exception occurs.  This is the default.
 
72
 
 
73
.IP \fB-noquiet\fP 10
 
74
Do not print a message at exceptions.
 
75
 
 
76
.IP \fB-mapped_io\fP 10
 
77
Enable the memory-mapped IO facility.  Programs that use SPIM syscalls
 
78
to read from the terminal \fBcannot\fP also use memory-mapped IO.
 
79
 
 
80
.IP \fB-nomapped_io\fP 10
 
81
Disable the memory-mapped IO facility.
 
82
 
 
83
.IP \fB-delayed_branches\fP 10
 
84
Simulate MIPS's delayed control transfers by executing the instruction after
 
85
a branch, jump, or call before transferring control.  SPIM's default is to
 
86
simulate non-delayed transfers, unless the -bare flag is set.
 
87
 
 
88
.IP \fB-delayed_loads\fP 10
 
89
Simulate MIPS's original, non-interlocked load instructions.  SPIM's default
 
90
is to simulate non-delayed loads, unless the -bare flag is set.
 
91
 
 
92
.IP "\fB-stext size\fP \fB-sdata size\fP \fB-sstack size\fP \fB-sktext size\fP \fB-skdata size\fP" 10
 
93
Sets the initial size of memory segment \fPseg\fP to be \fIsize\fP
 
94
bytes.  The memory segments are named: \fItext\fP, \fIdata\fP,
 
95
\fIstack\fP, \fIktext\fP, and \fIkdata\fP.  The \fItext\fP segment
 
96
contains instructions from a program.  The \fIdata\fP segment holds
 
97
the program's data.  The \fIstack\fP segment holds its runtime stack.
 
98
In addition to running a program, SPIM also executes system code that
 
99
handles interrupts and exceptions.  This code resides in a separate
 
100
part of the address space called the \fIkernel\fP.  The \fIktext\fP
 
101
segment holds this code's instructions and \fIkdata\fP holds its data.
 
102
There is no \fIkstack\fP segment since the system code uses the same
 
103
stack as the program.  For example, the pair of arguments \fI-sdata
 
104
2000000\fP starts the user data segment at 2,000,000 bytes.
 
105
 
 
106
.IP "\fB-ldata size\fP \fB-lstack size\fP \fB-lkdata size\fP" 10
 
107
Sets the limit on how large memory segment \fIseg\fP can grow to be
 
108
\fIsize\fP bytes.  The memory segments that can grow are \fIdata\fP,
 
109
\fIstack\fP, and \fIkdata\fP.
 
110
 
 
111
.IP "\fB-file file <args>\fP" 10
 
112
Load and execute the assembly code in the file with arguments \fB<args>\fP.
 
113
 
 
114
.IP "\fB-execute file <args>\fP" 10
 
115
Load and execute the MIPS \fIexecutable\fP (a.out) file with arguments
 
116
\fB<args>\fP. Only works on systems using a MIPS processors.
 
117
 
 
118
.SH "BUGS"
 
119
Instruction opcodes cannot be used as labels.
 
120
 
 
121
.SH "SEE ALSO"
 
122
xspim(1)
 
123
.br
 
124
James R. Larus, ``SPIM S20: A MIPS R2000 Simulator,''
 
125
included with SPIM distribution.
 
126
 
 
127
.SH AUTHOR
 
128
James R. Larus (larus@cs.wisc.edu), Computer Sciences Department,
 
129
University of Wisconsin\-Madison.
 
130
Current address: James R Larus (larus@microsoft.com), Microsoft Research.
 
131