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

« back to all changes in this revision

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