Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / cpus / vonk / ss / api / sam / src / simulate.1
CommitLineData
920dae64
AT
1.TH simulate 1 "Sept 18, 2007" "" "SAM system simulator"
2.SH NAME
3simulate - run SAM with a particular system configuration
4.SH SYNOPSIS
5simulate [-p
6.I processor]
7-c
8.I config
9[-w
10.I workers]
11[-sav]
12[-f
13.I cmd_file]
14[-l
15.I log_file]
16[-I
17.I system]
18[-C
19.I system]
20[-L
21.I image]
22[-D
23.I define]
24[-V
25.I veracity-script -b]
26
27simulate [-p
28.I processor]
29-c
30.I config
31[-w
32.I workers]
33[-ra]
34[-f
35.I cmd_file]
36[-l
37.I log_file]
38[-I
39.I system]
40[-C
41.I system]
42[-L
43.I image]
44[-D
45.I define]
46[-V
47.I veracity-script -b]
48
49simulate [-p
50.I processor]
51-c
52.I config
53-d
54[-w
55.I workers]
56[-f
57.I cmd_file]
58[-l
59.I log_file]
60[-I
61.I system]
62[-C
63.I system]
64[-L
65.I image]
66[-D
67.I define]
68
69simulate -p
70.I processor
71-R
72.I chkpnt
73[-f
74.I cmd_file]
75[-I
76.I system]
77[-D
78.I define]
79[-l
80.I log_file]
81
82
83.SH DESCRIPTION
84.PP
85Simulate is a wizard script that is used to run SAM
86with a SAM configuration (rc-file) that was generated
87on the fly. The script generates the file sam.rc.
88After generating the file it invokes sam -c sam.rc
89
90The simulate wizard expects that the collection of binaries
91needed to run RUST or Solaris is present in the current
92working directory. Simulate expects a known collection
93of filenames to be present there. Use the getrust(1) and
94getsolaris(1) wizards to get a working starting set of files.
95
96Simulate is best used in conjunction with the getrust(1)
97and getsolaris(1) wizards. The get wizards getrust(1)
98and getsolaris(1) create a directory outside the current
99working directory. Change directory into that created
100directory and invoke the simulate wizard there.
101
102The simulate wizard is not a one for all solution. The
103sam.rc file that it generates can always be taken and
104modified for a special need. After the modification,
105invoke SAM directly: sam -c modifiedsam.rc, see sam(1).
106
107.SH OPTIONS
108.TP
109.B -h
110Help
111.TP
112.BI -p " processor"
113Be a wizard for
114.I processor
115and create a sam.rc file that resembles a system for this
116processor.
117The
118.I processor
119can be one of: n2, depending on the SAM release
120that is being used.
121.TP
122.BI -c " config"
123.I config
124= 1c1t 1up 1c2t 1g2p 1g4p 1g16p 1g32p 8c8t ...
125.br
126The configuration is a machine description. Usually for
127Solaris and RUST you will find
128.I config-md.bin
129and
130.I config-hv.bin
131files. simulate will err and exit if it can't find the
132specified configuration.
133.TP
134.BI -w " workers"
135.I workers
136= 1 2 3 4 ...
137.br
138The number of workers (worker-threads) to create. A number >1 causes
139the simulator to run MP on MP if a configuration with more
140then one strand is used.
141.TP
142.B -s
143Boot Solaris. See getsolaris(1) on how to get Solaris binaries.
144The -s option cannot be used in conjunction with the
145-r, -d, or -R options.
146.TP
147.B -r
148Run RUST. See getrust(1) on how to get RUST binaries.
149The -r option cannot be used in conjunction with the
150-s, -d, or -R options.
151.TP
152.B -d
153Run a diag. The -d option cannot be used in conjunction
154with the -s, -r, or -R options.
155.TP
156.B -a
157Auto boot OBP followed by Solaris or RUST. This option
158causes the file nvram1-auto to be loaded instead of the
159file nvram1. In non autoboot mode, the user is expected to know
160what to type at the OBP ok prompt. For solaris this
161usually is
162.I boot disk
163, for RUST this usually is
164.I go.
165The -a option is only compatible with -r or -s.
166.TP
167.B -v
168Verbose boot Solaris. This option uses a Solaris
169disk image (disk1.verbose) that has a modified
170/etc/system file. The line
171.I set moddebug=0x80000000
172was added. The -v option is only compatible with -s.
173.TP
174.BI -I " system"
175This option is for including extra rc files in the generated
176sam.rc file. This is useful for example to extend say a bare bone
177N2 system (Huron) with devices connected to the pcie bus.
178.TP
179.BI -C " system"
180This option is for advanced users that want to modify the
181system setup. The default system setup
182.IR processor .rc
183(here
184.I processor
185is the same as provided with the -p option)
186is in the etc directory of the release.
187.TP
188.BI -R " chkpnt"
189Start SAM from a dump that is in
190.I chkpnt.
191A dump is generated at the SAM prompt with the
192.BI dump " chkpnt"
193command.
194The -R option cannot be used in conjunction with the
195-s, -r, or -d options.
196.TP
197.BI -L " image"
198The
199.I image
200argument can be of the form
201.I filename,address
202which means load binary file
203.I filename
204into memory at
205.I address.
206If there is no comma character in the
207.I image
208argument, or image has a trailing comma, then
209.I image
210is a file that is expected to be in the cpu and system
211verilog memory image format. This file-format is usually
212produced by the Midas tool. For the -s and -r option the
213.I image
214files are loaded after the standard set of files that are loaded
215in these run modes.
216The -L can be used to override memory with user specific
217values.
218The simulate wizard accepts multiple -L options. The
219.I image
220files are loaded into memory in the order they appear on
221the command line.
222.TP
223.BI -D " define"
224This option is for advanced users that want to tightly control
225the system setup. The -D option passes
226.I define
227on to the m4 tool that preprocesses the system rc file before it
228is added to sam.rc. A common
229.I define
230is
231.I -Dpop=
232which disables popping the xterm when used in conjunction with
233the -r or -s option.
234.TP
235.BI -V " veracity-script"
236Runs veracity with
237.I veracity-script
238as an argument. simulate will create a veracity script to start up
239RUST or Solaris, depending on whether
240.B -r
241or
242.B -s
243is present. The start-up script will be called
244.B start_rust.ver
245or
246.B start_solaris.ver
247respectively which can be included by
248.I veracity-script
249to perform standard initialization.
250.TP
251.B -b
252Used with the
253.B -V
254flag, this runs veracity in batch mode, directing all serial console
255output to
256.B stdout.
257.TP
258.BI -f " cmd_file"
259Run SAM UI commands from file <cmd_file> before returning to UI prompt.
260.TP
261.BI -l " log_file"
262Turn on output logging to file <log_file>.
263.SH EXAMPLES
264.LP
265The example processor here is n2. The available processor depend
266on the SAM release.
267.LP
268Run Solaris on one strand, autoboot, and in verbose mode.
269.IP
270.B "simulate -p n2 -c 1c1t -s -a -v"
271.LP
272Run Solaris on two strands, autoboot and use two workers.
273.IP
274.B "simulate -p n2 -c 1c2t -w2 -s -a"
275.LP
276Run RUST on one strand, autoboot.
277.IP
278.B "simulate -p n2 -c 1c1t -r -a"
279.LP
280Run RUST on two strands, autoboot and use two workers.
281.IP
282.B "simulate -p n2 -c 1c2t -w 2 -r -a"
283.LP
284Run Solaris on one strand, loading one extra binary file into memory.
285.IP
286.B "simulate -pn2 -c1c1t -sa -Lmyreset.bin,0xff0000000"
287.LP
288Run a diag on one strand, loading one verilog memory image file into memory.
289.IP
290.B "simulate -pn2 -c1c1t -d -Lmem.image"
291.LP
292Run Solaris and do not pop up the console xterms
293.IP
294.B "simulate -pn2 -c1c2t -w2 -sa -Dpop="
295.SH BUGS
296.PP
297The config -c option in combination with -s or -r option is at the
298mercy of the available machine description files.
299.SH SEE ALSO
300.BR getsolaris (1),
301.BR sam (1),
302.BR m4 (1)
303.SH AUTHORS
304.nf
305Wizard and manual page by SUN
306.f