tests
9.03 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
326
327
328
329
330
# Boot code tests are defined here.
#
# To run all tests:
#
# run_tests.pl -t tests -d <test_out_dir>
#
# where:
# test_out_dir is the output directory for the test
# data that is generated, and the simulator logs, for
# each test.
#
# Format:
#
# Lines beginning with '#' are comments, and blank lines are ignored.
# Also, lines not matching the a correct test parameter string
# (defined below) are ignored.
#
# The tests are described by parameters entered on successive lines.
# Each new set of test parameters that define a test begins with a
# line containing the test name parameter, in the format:
#
# test name: <test name>
#
# The set of test parameters for a particular test is ended by a
# paramater with format:
#
# expected result: <result>
#
# where the valid values for <result> are: success, fatal, exception.
#
# Between these lines, a number of lines may be present which describe
# the test. The valid lines are described below.
#
# To indicate ecc errors (single and double bit), block errors and
# hash errors:
#
# psk params: <params to psk_tool program>
#
# where the usage of psk_tool is described by the command
# .../bbboot/psk/psk_tool -h
#
# To control the simulator clock speed and div mode settings:
#
# simulator start params: <params to sim.cpu>
#
# To control module insertion and removal:
#
# module state file: <file in mdio.dat format to use>
#
# To provide an external command to process the log and insure
# specified patterns are as expected:
#
# external check: <external command with options>
#
# where <external command with options is the command to run,
# with any options it requires. Note that the run_tests.pl script
# will add the last two arguments to the command: (i) name of log
# file to parse; (ii) address used for TRACE output.
#
# default boardid is 0x000: 62.5MHz, div mode x1
# perfect conditions
test name: Perfect Conditions
psk params:
simulator start params: +boardid=0x000
module state file: mdio_in.dat
expected result: success
# block zero bad
# trace check should show 0x009a at least twice
test name: Bad Block zero
psk params: -b 0
simulator start params: +boardid=0x000
module state file: mdio_in.dat
external check: logcheck.pl -p 0x009a0000,2+
expected result: success
# block 1 bad
# trace check should show 0x009a at least twice
test name: Bad Block one
psk params: -b 1
simulator start params: +boardid=0x000
module state file: mdio_in.dat
external check: logcheck.pl -p 0x009a0000,2+
expected result: success
# half-page 0 double-bit ecc error
# trace check should show 0x0042
test name: Double bit error, half page 0
psk params: -d 0
simulator start params: +boardid=0x000
module state file: mdio_in.dat
external check: logcheck.pl -p 0x00420000
expected result: fatal
# half-page 17 double-bit ecc error
# trace check should show 0x0046
test name: Double bit error, half page 17
psk params: -d 17
simulator start params: +boardid=0x000
module state file: mdio_in.dat
external check: logcheck.pl -p 0x00460000
expected result: fatal
# half-page 32 double-bit ecc error
# trace check should show 0x0046
test name: Double bit error, half page 32
psk params: -d 32
simulator start params: +boardid=0x000
module state file: mdio_in.dat
external check: logcheck.pl -p 0x00460000
expected result: fatal
# half-page 34 double-bit ecc error
# trace check should show 0x0046
test name: Double bit error, half page 34
psk params: -d 34
simulator start params: +boardid=0x000
module state file: mdio_in.dat
external check: logcheck.pl -p 0x00460000
expected result: fatal
# half-page 127 double-bit ecc error
# THIS INSURES WE ARE LOADING THE FULL NUMBER OF PAGES
# trace check should show 0x0046
test name: Double bit error, half page 127 (last)
psk params: -d 127
simulator start params: +boardid=0x000
module state file: mdio_in.dat
external check: logcheck.pl -p 0x00460000
expected result: fatal
# half-page 1 single-bit ecc error
test name: Single bit error, half page 1
psk params: -s 1
simulator start params: +boardid=0x000
module state file: mdio_in.dat
expected result: success
# half-page 4 single-bit ecc error
test name: Single bit error, half page 4
psk params: -s 4
simulator start params: +boardid=0x000
module state file: mdio_in.dat
expected result: success
# code hash error
# trace check should see 0x0060 and NOT 0x0064
test name: Code hash error
psk params: -c
simulator start params: +boardid=0x000
module state file: mdio_in.dat
external check: logcheck.pl -p 0x00600000 -n 0x00640000
expected result: fatal
# module not present at first check, inserted later
# trace check should see 0x0034
test name: Module out/in 1
psk params:
simulator start params: +boardid=0x000
module state file: mdio_1.dat
external check: logcheck.pl -p 0x00340000
expected result: fatal
# module present during first check, removed
# while searching for good block, inserted 0x800
# sysclks later.
# trace check should see 0x0043
test name: Module out/in 4
psk params:
simulator start params: +boardid=0x000
module state file: mdio_4.dat
external check: logcheck.pl -p 0x00430000
expected result: fatal
# Module comes out during read which is NOT while
# searching for good block.
# trace check should see 0x0047
test name: Module out during regular page read
psk params:
simulator start params: +boardid=0x000
module state file: mdio_5.dat
external check: logcheck.pl -p 0x00470000
expected result: fatal
# checksum error
test name: Checksum error, byte 22
psk params: -k 22
simulator start params: +boardid=0x000
module state file: mdio_in.dat
expected result: fatal
# checksum error
test name: Checksum error, byte 29
psk params: -k 29
simulator start params: +boardid=0x000
module state file: mdio_in.dat
expected result: fatal
# checksum error
test name: Checksum error, byte 100
psk params: -k 100
simulator start params: +boardid=0x000
module state file: mdio_in.dat
expected result: fatal
# checksum error
test name: Checksum error, byte 200
psk params: -k 200
simulator start params: +boardid=0x000
module state file: mdio_in.dat
expected result: fatal
# checksum error
test name: Checksum error, byte 252
psk params: -k 252
simulator start params: +boardid=0x000
module state file: mdio_in.dat
expected result: fatal
# checksum error
test name: Checksum error, byte 253
psk params: -k 253
simulator start params: +boardid=0x000
module state file: mdio_in.dat
expected result: fatal
# checksum error
test name: Checksum error, byte 254
psk params: -k 254
simulator start params: +boardid=0x000
module state file: mdio_in.dat
expected result: fatal
# checksum error
test name: Checksum error, byte 255
psk params: -k 255
simulator start params: +boardid=0x0000
module state file: mdio_in.dat
expected result: fatal
#
# NOTE: (mult * sysclk) must be < 150 MHz for tests to follow
#
# Div mode does not cause reset at 62.5MHz.
# trace should not see 0x0020
test name: sysclk 62.5MHz, mult 1
psk params:
simulator start params: +boardid=0x000
module state file: mdio_in.dat
external check: logcheck.pl -n 0x00200000
expected result: success
# Div mode does cause reset at 62.5MHz.
# trace should see 0x0020
test name: sysclk 62.5MHz, mult 1.5
psk params:
simulator start params: +boardid=0x001
module state file: mdio_in.dat
external check: logcheck.pl -p 0x00200000
expected result: success
# Div mode does cause reset at 62.5MHz.
# trace should see 0x0020
test name: sysclk 62.5MHz, mult 2
psk params:
simulator start params: +boardid=0x002
module state file: mdio_in.dat
external check: logcheck.pl -p 0x00200000
expected result: success
# Div mode does not cause reset at 80.0MHz.
# trace should not see 0x0020
test name: sysclk 80.0MHz, mult 1
psk params:
simulator start params: +boardid=0x008
module state file: mdio_in.dat
external check: logcheck.pl -n 0x00200000
expected result: success
# Div mode does cause reset at 80.0MHz.
# trace should see 0x0020
test name: sysclk 80.0MHz, mult 1.5
psk params:
simulator start params: +boardid=0x009
module state file: mdio_in.dat
external check: logcheck.pl -p 0x00200000
expected result: success
# Div mode does not cause reset at 96MHz.
# trace should not see 0x0020
test name: sysclk 96MHz, mult 1
psk params:
simulator start params: +boardid=0x010
module state file: mdio_in.dat
external check: logcheck.pl -n 0x00200000
expected result: success
# Div mode does cause reset at 96MHz.
# trace should see 0x0020
test name: sysclk 96MHz, mult 1.5
psk params:
simulator start params: +boardid=0x011
module state file: mdio_in.dat
external check: logcheck.pl -p 0x00200000
expected result: success
# Div mode does not cause reset at extUSB 96MHz.
# trace should not see 0x0020
test name: sysclk 96MHz, mult 1
psk params:
simulator start params: +boardid=0x018
module state file: mdio_in.dat
external check: logcheck.pl -n 0x00200000
expected result: success
# Div mode does cause reset at extUSB 96MHz.
# trace should see 0x0020
test name: sysclk 96MHz, mult 1.5
psk params:
simulator start params: +boardid=0x019
module state file: mdio_in.dat
external check: logcheck.pl -p 0x00200000
expected result: success