u64ide.1
11.4 KB
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
.TH IDE 1
.SH NAME
u64ide \-
Ultra64 Integrated Diagnostic Environment
.SH SYNOPSIS
/usr/diags/bin/u64ide
.SH DESCRIPTION
The Integrated Diagnostic Environment provides a programmable front-end
for unix-based diagnostics. The command line oriented user interface is
intended to resemble the shell (/bin/sh) and 'C' in its syntax. Simple
commands may be combined with variables, expressions and looping constructs
in order to create more complex commands.
.SS
.SS Commands and Statements
IDE commands have the same form as shell commands. Multiple commands may
be specified on a single line if the commands are separated by semi-colons.
Arguments to commands may be integers, strings, IDE variables, or IDE
expressions. Integers may be specified as decimal, octal, hex, or
binary constants using `C' conventions.
Integer arguments are converted to a decimal string
representation as the standard format when passed to a command.
A statement consists of either a simple statement or a compound statement.
Statements may be separated by either a newline or a semi-colon. A
compound statement is a semi-colon separated list of simple statements
surrounded by curly brackets. The following are examples of statements:
.nf
ide>> echo "Hello, world"
ide>> { echo "Hello"; echo "world"; }
ide>> {
more>> echo "Hello"
more>> echo "world"
more>> }
.fi
.SS
.SS Variables
Two types of variables may be defined and used in u64ide: integer and string.
Variable names begin with a `$' and consist of at least one alphabetic
character followed by up to 31 alphanumerics.
A variable is defined
by its first appearance and its type is inferred by the context in which
it is used. IDE variables are distinct from shell environment variables,
which are inherited by the IDE command line interpreter. You may also use
setenv to add more environment variables, and use these variables wherever
you would use a symbol when giving the interpreter IDE commands.
.SS
.SS Expressions
Expression syntax is a subset of that provided by
.B C.
The following operators are supported:
.nf
=, ==, !=, <, >, >=, <=, !, ~, ^, +, -, *, /,
%, <<, >>, +=, -=, *=, %=, /=, <<=, >>=, ^=
.fi
All commands are considered integer functions which may return a value
and be used within an expression. To use an expression as an argument
to a command, surround the expression in single back-quotes (`). For
example:
.nf
ide>> repeat 10 rdram `$i++ * 100`
.fi
Operations on strings are limited
to the comparison operators and concatenation with the `+' operator.
Variables will be converted from one type to another as the context
requires.
.SS Control Flow
An if-then-else statement with
.B C
syntax is provided. An optional "fi" should follow an if-then statement to
avoid ambiguity. For example, if the following input is given to IDE,
.nf
:
ide>> if ($printmask == 0x4) echo "Warning: only severe errors reported."
.fi
IDE will prompt for more input because it is not clear whether or not there
is going to be an "else" statement. If the above statement were entered as
shown below, then there is no ambiguity and the statement would be evaluated
immediately.
.nf
:
ide>> if ($printmask == 0x4) echo "Warning: only severe errors reported."; fi
.fi
.SS
.SS Looping
Three different types of looping constructs are supported: for, while, and do.
All have syntax compatible with the equivalent
.B C
statements. For example:
.nf
ide>> for ($i=0; $i < 10; $i++) {
more>> $sum = $j = 0
more>> do {
more>> echo "hello"
more>> $sum = $sum + $j
more>> printf "0x%x\n" $sum
more>> $j++
more>> } while ($sum < 40)
more>> }
.fi
.P
In addition, a "repeat" statement is available for looping on simple commands.
The repeat statement takes a single argument which is an integer repeat count.
For example:
.nf
ide>> repeat 5 echo "hi."
or
ide>> repeat 5 {
more>> echo "Hello"
more>> echo "world"
more>> }
.fi
Note, the opening bracket of a compound statement appears on the same line
as the repeat keyword. This style is required by repeat, for, and while
loops as well.
.SS
.SS Logic Control Legal Specifiers
.nf
Positive logic is specified by any one of the following: TRUE, true, ON, on, or 1.
Negative logic is specified by any one of the following: FALSE, false, OFF, off, or 0.
.fi
.SS
.SS
.SS
.SS "IDE Reserved Variables"
.IP "initflg" 1i
Initialization Flag. Select positive or negative logic specifier from above.
Positive logic (default) calls diagnostic module's initialization functions
required to run tests. Negative logic selects execution of diagnostic module
without initialization.
.nf
Example: ide>> $initflg = false
.fi
.IP "scopeflg" 1i
Scope Loop Flag. Select positive or negative logic specifier from above.
The default is negative logic. When set to positive logic within a diagnostic
module, the entry test number enters a scope loop. The requested test will
send a target system peek/poke request which will loop infinitely, while
reading or writing the hardware under test.
.nf
Example: ide>> $scopeflg = TRUE
.fi
.IP "traceflg" 1i
Peek/Poke Trace Flag. Select positive or negative logic specifier from above.
The default is negative logic. When set to positive logic, the target
system peek/poke functions will print the address and data that they are
writing to or reading from. This variable allows tracking of all I/O
activities if the system hangs while running a diagnostic module.
.nf
Example: ide>> $traceflg = 1
.fi
.IP "entrytst" 1i
Entry Test Number. An integer value that allows the IDE diagnostic server to
request that a diagnostic module begin testing at a specific entry test number
within the sequence.
.nf
0(zero) Sequence through all of the diagnostic module's tests beginning
with the first entry test number.
n(positive) Sequence through all the diagnostic module's tests beginning
with entry test number n. Skips all lower entry test numbers.
-n(negative) Execute only the requested test number n.
Example: ide>> $entrytst = -4
.fi
.IP "printmask" 1i
Error Reporting Verbosity Level. Error reporting levels are defined as follows:
.nf
0x1 INFO Informative messages that are printed out as each test executes.
0x2 ERR_SIMPLE Used to print individual error messages
0x4 ERR_SEVERE Used to print messages indicating a functional block has failed.
0x8 DEBUG Used to print messages for SW debug.
0x7 DEFAULT_MSGS Prints all of the INFO and ERROR messages by default.
Any combination of levels may run simultaneously with mixed numeric and sym-
formats.
Example: ide>> $printmask = 0x4 | INFO
.fi
.IP "exitmask" 1i
Error Trap Level. Any time an error is reported with the errlog reporting
function, the error reporting level (one of INFO, ERR_SIMPLE, ERR_SEVERE, or
DEBUG) is checked against the builtin ide variable "exitmask" to decide whether
or not to abort the test. The default value is "6", exit on real errors.
.nf
Example: ide>> $exitmask = 0x0 /* never exits */
ide>> $exitmask = 0x6 /* only exits on real errors */
.fi
.IP "skiptst" 1i
Skip Test Numbers. A null terminated array of positive test numbers which are
to be skipped by the diagnostic module. The default condition is a null array.
.nf
Example: ide>> $skiptst = "2 5 9 11"
.fi
.SS
.IP "commtype" 1i
The library upon which the Ultra64 diags are based (libdg.a) uses this builtin
variable to decide how to initialization the communication with the debugging
agent on the target system. 7 different types of host to host communication
protocols are possible, depending on the value of the "commtype" builtin
variable:
.nf
value communication protocol
1 Verilog: we use dbgif to talk to an rmon agent
"vermon", which talks to a verilog simulation.
2 Tinymon running out of the PIF (Peripheral I/F)
3 Tinymon running out of IMEM (rsp instruction memory)
4 Tinymon running out of DMEM (rsp data memory)
5 Tinymon running out of RDRAM (Rambus dram)
6 The diags talk to the hw with dbgif, which talks to
an rmon thread running on the development system.
7 The diags talk to the hw with dbgif, which talks to
an rmon thread running on the development system; a
program capable of firing off a suitable rmon thread is
explicitly downloaded. This option is currently
unavailable, and may be removed.
.fi
.SS
.SS "IDE Built-in Functions"
.IP "echo [-l]" 1i
Similar to the shell's echo command, except that no shell flags or special
escapes are supported.
.IP
The \fI-l\fP option is an optional flag to echo to the u64ide log file in
addition to the screen. For example:
.nf
ide>> echo -l "Hello world"
.fi
.IP
In the above example, the string "Hello world" will be printed to the
screen, and the string "INFO: Hello world" will be printed to
the u64ide log file.
.IP "exit" 1i
Quit IDE and return to the monitor. An argument may be given which becomes
IDE's return value.
.IP "help" 1i
Displays summary help on all commands and statements.
.IP "?" 1i
Like "help", except that only information about commands is printed.
.IP "printenv" 1i
Print the environment variables (including those inherited from your parent shell).
.IP "setenv" 1i
Set an environment variable.
.IP "printf" 1i
Print arguments with a format, similar to printf(3C).
.IP "status" 1i
Print the IDE reserved variables
.IP "reset" 1i
Reset the IDE reserved variables to their default values.
.SS
.SS "IDE User Defined Functions"
The list of diagnostic functions to be called is located in awk configuration
files (e.g. "prcmd.awk"). This list may be modified by editing the function
descriptors. New diagnostic functions may be appended by providing 1) the IDE
user defined function name, 2) the specifier "DCMD", 3) the name of the
diagnostic function to be called with a communication structure pointer,
and 4) the diagnostic description (to be used when printing formatted help
information). These four descriptors must be in fields separated by a
single tab.
.P
For example, the following table outlines some of the diagnostic commands
available for use by the Ultra64 diagnostic executable "u64ide":
.nf
ai DCMD aiEntry Audio subsystem test.
e DCMD dgExamineMemEntry Examine memory command (peek/poke mem).
io DCMD io IO test
ndev_memtest DCMD ndev_memtestEntry GIO memory test (16MB of ramrom)
pi DCMD piTestEntry DMA controller for Peripheral Interface tests
reg DCMD dgReg Register read/write command
rdram DCMD rdram RDRAM test
rsp DCMD rsp All RSP Bring-up Tests
si CMD siTestEntry Serial Interface subsystem test.
vi DCMD vi vi test
.fi
.SS
.SS "IDE standard command line flags"
Most of the Project Reality tests listed above support the following two
standard command line flags, intended to help you determine the number of
subtests available from each top-level u64ide entry point, and to provide a
way to run these subtests singularly, to help isolate faults.
.P
.IP "-h" 1i
prints out a summary of the subtests available for the given u64ide top level
command.
.IP "-t < test number >" 1i
Causes IDE to only invoke the specified subtest, ignoring all others within
that top level command.
.SS
.SS "IDE Input"
IDE supports three different types of input. Commands may be entered from the
keyboard (or redirected from stdin), from a startup script linked in at compile
time, or from a script file via the "source" command.
.SS
.SS "FILES"
By default IDE writes its diagnostic output to the file /usr/tmp/ide.log; this
name can be overridden by setting the environment variable IDE_LOG to the
desired file name.