OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [testsuite/] [libsim.tests/] [jtag-read-command.exp] - Blame information for rev 98

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 98 jeremybenn
# jtag-read-command.exp. Tests of the library JTAG READ_COMMAND functions.
2
 
3
# Copyright (C) 2010 Embecosm Limited
4
 
5
# Contributor Jeremy Bennett 
6
 
7
# This file is part of OpenRISC 1000 Architectural Simulator.
8
 
9
# This program is free software; you can redistribute it and/or modify it
10
# under the terms of the GNU General Public License as published by the Free
11
# Software Foundation; either version 3 of the License, or (at your option)
12
# any later version.
13
 
14
# This program is distributed in the hope that it will be useful, but WITHOUT
15
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
17
# more details.
18
 
19
# You should have received a copy of the GNU General Public License along
20
# with this program.  If not, see .  */
21
 
22
# -----------------------------------------------------------------------------
23
# This code is commented throughout for use with Doxygen.
24
# -----------------------------------------------------------------------------
25
 
26
 
27
# These are the tests of the high level JTAG interface.
28
 
29
# NOTE. All these tests return timing information, but we ignore it, since in
30
#       general it will not be repeatable.
31
 
32
# Tests of READ_COMMAND returning the correct data back. Use Wishbone as
33
# module, since it has the widest range of fields for WRITE_COMMAND. We don't
34
# do any actual reading or writing, so the simple loop program is
35
# sufficient.
36
 
37
# Test of READ_COMMAND when no WRITE_COMMAND has been issued.
38
run_libsim "JTAG READ_COMMAND no prior write"         \
39
    [list "Initalization succeeded."                           \
40
          "Execution step completed OK."                       \
41
          "Resetting JTAG."                                    \
42
          "Execution step completed OK."                       \
43
          "Shifting instruction."                              \
44
          "  shifting in:  0x01"                               \
45
          "  shifted out:  0x01"                               \
46
          "  time taken:"                                      \
47
          "Execution step completed OK."                       \
48
          "Selecting module."                                  \
49
          "  shifting in:  0x0000000000174841bc61"             \
50
          "  shifted out:  0x0164841bc60000000000"             \
51
          "  status:       0x0"                                \
52
          "  time taken:"                                      \
53
          "Execution step completed OK."                       \
54
          "Processing READ_COMMAND."                           \
55
          "  shifting in:  0x00000000000000000000000b2420de30" \
56
          "ERROR: JTAG READ_COMMAND finds no data"             \
57
          "  shifted out:  0x0c526410200000000000000000000000" \
58
          "  access_type:  0x0"                                \
59
          "  address:      0x0"                                \
60
          "  length:       0x1"                                \
61
          "  status:       0x0"                                \
62
          "  time taken:"                                      \
63
          "Execution step completed OK."                       \
64
          "Test completed successfully."]                      \
65
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
66
         "8" "SELECT_MODULE" "0" "READ_COMMAND"
67
 
68
# READ_COMMAND when invalid WRITE_COMMAND has been issued.
69
run_libsim "JTAG READ_COMMAND no valid prior write"            \
70
    [list "Initalization succeeded."                           \
71
          "Execution step completed OK."                       \
72
          "Resetting JTAG."                                    \
73
          "Execution step completed OK."                       \
74
          "Shifting instruction."                              \
75
          "  shifting in:  0x01"                               \
76
          "  shifted out:  0x01"                               \
77
          "  time taken:"                                      \
78
          "Execution step completed OK."                       \
79
          "Selecting module."                                  \
80
          "  shifting in:  0x0000000000174841bc61"             \
81
          "  shifted out:  0x0164841bc60000000000"             \
82
          "  status:       0x0"                                \
83
          "  time taken:"                                      \
84
          "Execution step completed OK."                       \
85
          "Processing WRITE_COMMAND."                          \
86
          "  shifting in:  0x00000000009f6e431380000000100188" \
87
          "ERROR: JTAG WRITE_COMMAND unknown access type 3."   \
88
          "  shifted out:  0x164841bc600000000000000000000000" \
89
          "  status:       0x0"                                \
90
          "  time taken:"                                      \
91
          "Execution step completed OK."                       \
92
          "Processing READ_COMMAND."                           \
93
          "  shifting in:  0x00000000000000000000000b2420de30" \
94
          "ERROR: JTAG READ_COMMAND finds no data."            \
95
          "  shifted out:  0x0c526410200000000000000000000000" \
96
          "  access_type:  0x0"                                \
97
          "  address:      0x0"                                \
98
          "  length:       0x1"                                \
99
          "  status:       0x0"                                \
100
          "  time taken:"                                      \
101
          "Execution step completed OK."                       \
102
          "Test completed successfully."]                      \
103
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
104
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "3" "100000" "4" \
105
         "READ_COMMAND"
106
 
107
# READ_COMMAND when invalid WRITE_COMMAND has been issued after a previously
108
# valid WRITE_COMMAND.
109
run_libsim "JTAG READ_COMMAND invalid after valid prior write" \
110
    [list "Initalization succeeded."                           \
111
          "Execution step completed OK."                       \
112
          "Resetting JTAG."                                    \
113
          "Execution step completed OK."                       \
114
          "Shifting instruction."                              \
115
          "  shifting in:  0x01"                               \
116
          "  shifted out:  0x01"                               \
117
          "  time taken:"                                      \
118
          "Execution step completed OK."                       \
119
          "Selecting module."                                  \
120
          "  shifting in:  0x0000000000174841bc61"             \
121
          "  shifted out:  0x0164841bc60000000000"             \
122
          "  status:       0x0"                                \
123
          "  time taken:"                                      \
124
          "Execution step completed OK."                       \
125
          "Processing WRITE_COMMAND."                          \
126
          "  shifting in:  0x00000000018f4396f780000000100088" \
127
          "  shifted out:  0x164841bc600000000000000000000000" \
128
          "  status:       0x0"                                \
129
          "  time taken:"                                      \
130
          "Execution step completed OK."                       \
131
          "Processing WRITE_COMMAND."                          \
132
          "  shifting in:  0x00000000009f6e431380000000100188" \
133
          "ERROR: JTAG WRITE_COMMAND unknown access type 3."   \
134
          "  shifted out:  0x164841bc600000000000000000000000" \
135
          "  status:       0x0"                                \
136
          "  time taken:"                                      \
137
          "Execution step completed OK."                       \
138
          "Processing READ_COMMAND."                           \
139
          "  shifting in:  0x00000000000000000000000b2420de30" \
140
          "ERROR: JTAG READ_COMMAND finds no data."            \
141
          "  shifted out:  0x0c526410200000000000000000000000" \
142
          "  access_type:  0x0"                                \
143
          "  address:      0x0"                                \
144
          "  length:       0x1"                                \
145
          "  status:       0x0"                                \
146
          "  time taken:"                                      \
147
          "Execution step completed OK."                       \
148
          "Test completed successfully."]                      \
149
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
150
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "100000" "4" \
151
         "WRITE_COMMAND" "3" "100000" "4" "READ_COMMAND"
152
 
153
# READ_COMMAND when valid WRITE_COMMAND has been issued after a previously
154
# invalid WRITE_COMMAND.
155
run_libsim "JTAG READ_COMMAND valid after invalid prior write" \
156
    [list "Initalization succeeded."                           \
157
          "Execution step completed OK."                       \
158
          "Resetting JTAG."                                    \
159
          "Execution step completed OK."                       \
160
          "Shifting instruction."                              \
161
          "  shifting in:  0x01"                               \
162
          "  shifted out:  0x01"                               \
163
          "  time taken:"                                      \
164
          "Execution step completed OK."                       \
165
          "Selecting module."                                  \
166
          "  shifting in:  0x0000000000174841bc61"             \
167
          "  shifted out:  0x0164841bc60000000000"             \
168
          "  status:       0x0"                                \
169
          "  time taken:"                                      \
170
          "Execution step completed OK."                       \
171
          "Processing WRITE_COMMAND."                          \
172
          "  shifting in:  0x00000000009f6e431380000000100188" \
173
          "ERROR: JTAG WRITE_COMMAND unknown access type 3."   \
174
          "  shifted out:  0x164841bc600000000000000000000000" \
175
          "  status:       0x0"                                \
176
          "  time taken:"                                      \
177
          "Execution step completed OK."                       \
178
          "Processing WRITE_COMMAND."                          \
179
          "  shifting in:  0x00000000018f4396f780000000100088" \
180
          "  shifted out:  0x164841bc600000000000000000000000" \
181
          "  status:       0x0"                                \
182
          "  time taken:"                                      \
183
          "Execution step completed OK."                       \
184
          "Processing READ_COMMAND."                           \
185
          "  shifting in:  0x00000000000000000000000b2420de30" \
186
          "  shifted out:  0x103b4b8c218000000010008000000000" \
187
          "  access_type:  0x2"                                \
188
          "  address:      0x100000"                           \
189
          "  length:       0x4"                                \
190
          "  status:       0x0"                                \
191
          "  time taken:"                                      \
192
          "Execution step completed OK."                       \
193
          "Test completed successfully."]                      \
194
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
195
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "3" "100000" "4" \
196
         "WRITE_COMMAND" "2" "100000" "4" "READ_COMMAND"
197
 
198
# Tests of READ_COMMAND with WRITE_COMMANDS to different modules. Should work
199
# for WB and CPU0. Rejection of other modules should happen earlier, so not
200
# tested here.
201
 
202
# READ_COMMAND for Wishbone
203
run_libsim "JTAG SELECT_MODULE READ_COMMAND WB"                     \
204
    [list "Initalization succeeded."                           \
205
          "Execution step completed OK."                       \
206
          "Resetting JTAG."                                    \
207
          "Execution step completed OK."                       \
208
          "Shifting instruction."                              \
209
          "  shifting in:  0x01"                               \
210
          "  shifted out:  0x01"                               \
211
          "  time taken: "                                     \
212
          "Execution step completed OK."                       \
213
          "Selecting module."                                  \
214
          "  shifting in:  0x0000000000174841bc61"             \
215
          "  shifted out:  0x0164841bc60000000000"             \
216
          "  status:       0x0"                                \
217
          "  time taken:"                                      \
218
          "Execution step completed OK."                       \
219
          "Processing WRITE_COMMAND."                          \
220
          "  shifting in:  0x00000000018f4396f780000000100088" \
221
          "  shifted out:  0x164841bc600000000000000000000000" \
222
          "  status:       0x0"                                \
223
          "  time taken:"                                      \
224
          "Execution step completed OK."                       \
225
          "Processing READ_COMMAND."                           \
226
          "  shifting in:  0x00000000000000000000000b2420de30" \
227
          "  shifted out:  0x103b4b8c218000000010008000000000" \
228
          "  access_type:  0x2"                                \
229
          "  address:      0x100000"                           \
230
          "  length:       0x4"                                \
231
          "  status:       0x0"                                \
232
          "  time taken:"                                      \
233
          "Execution step completed OK."                       \
234
          "Test completed successfully."]                      \
235
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" "8" \
236
         "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "100000" "4" "READ_COMMAND"
237
 
238
# READ_COMMAND for CPU0
239
run_libsim "JTAG SELECT_MODULE READ_COMMAND CPU0"                   \
240
    [list "Initalization succeeded."                           \
241
          "Execution step completed OK."                       \
242
          "Resetting JTAG."                                    \
243
          "Execution step completed OK."                       \
244
          "Shifting instruction."                              \
245
          "  shifting in:  0x01"                               \
246
          "  shifted out:  0x01"                               \
247
          "  time taken: "                                     \
248
          "Execution step completed OK."                       \
249
          "Selecting module."                                  \
250
          "  shifting in:  0x00000000000aff51d871"             \
251
          "  shifted out:  0x0164841bc60000000000"             \
252
          "  status:       0x0"                                \
253
          "  time taken:"                                      \
254
          "Execution step completed OK."                       \
255
          "Processing WRITE_COMMAND."                          \
256
          "  shifting in:  0x0000000001933eb7e580010028000088" \
257
          "  shifted out:  0x164841bc600000000000000000000000" \
258
          "  status:       0x0"                                \
259
          "  time taken:"                                      \
260
          "Execution step completed OK."                       \
261
          "Processing READ_COMMAND."                           \
262
          "  shifting in:  0x00000000000000000000000b2420de30" \
263
          "  shifted out:  0x0e26c4c5a18001002800008000000000" \
264
          "  access_type:  0x2"                                \
265
          "  address:      0x2801"                             \
266
          "  length:       0x4"                                \
267
          "  status:       0x0"                                \
268
          "  time taken:"                                      \
269
          "Execution step completed OK."                       \
270
          "Test completed successfully."]                      \
271
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" "8" \
272
         "SELECT_MODULE" "1" "WRITE_COMMAND" "2" "2801" "4" "READ_COMMAND"
273
 
274
# Tests of READ_COMMAND access types correctly being returned. Errors should
275
# be prevented earlier in the WRITE_COMMAND, so we only check behavior that
276
# would follow a valid WRITE_COMMAND.
277
 
278
# READ_COMMAND to write bytes for WishBone (access type 0)
279
run_libsim "JTAG READ_COMMAND WB write bytes"         \
280
    [list "Initalization succeeded."                           \
281
          "Execution step completed OK."                       \
282
          "Resetting JTAG."                                    \
283
          "Execution step completed OK."                       \
284
          "Shifting instruction."                              \
285
          "  shifting in:  0x01"                               \
286
          "  shifted out:  0x01"                               \
287
          "  time taken:"                                      \
288
          "Execution step completed OK."                       \
289
          "Selecting module."                                  \
290
          "  shifting in:  0x0000000000174841bc61"             \
291
          "  shifted out:  0x0164841bc60000000000"             \
292
          "  status:       0x0"                                \
293
          "  time taken:"                                      \
294
          "Execution step completed OK."                       \
295
          "Processing WRITE_COMMAND."                          \
296
          "  shifting in:  0x000000000107557c0580000000100008" \
297
          "  shifted out:  0x164841bc600000000000000000000000" \
298
          "  status:       0x0"                                \
299
          "  time taken:"                                      \
300
          "Execution step completed OK."                       \
301
          "Processing READ_COMMAND."                           \
302
          "  shifting in:  0x00000000000000000000000b2420de30" \
303
          "  shifted out:  0x0eb2af0e418000000010000000000000" \
304
          "  access_type:  0x0"                                \
305
          "  address:      0x100000"                           \
306
          "  length:       0x4"                                \
307
          "  status:       0x0"                                \
308
          "  time taken:"                                      \
309
          "Execution step completed OK."                       \
310
          "Test completed successfully."]                      \
311
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
312
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "0" "100000" "4" \
313
         "READ_COMMAND"
314
 
315
# READ_COMMAND to write half words for WishBone (access type 1)
316
run_libsim "JTAG READ_COMMAND WB write half words"    \
317
    [list "Initalization succeeded."                           \
318
          "Execution step completed OK."                       \
319
          "Resetting JTAG."                                    \
320
          "Execution step completed OK."                       \
321
          "Shifting instruction."                              \
322
          "  shifting in:  0x01"                               \
323
          "  shifted out:  0x01"                               \
324
          "  time taken:"                                      \
325
          "Execution step completed OK."                       \
326
          "Selecting module."                                  \
327
          "  shifting in:  0x0000000000174841bc61"             \
328
          "  shifted out:  0x0164841bc60000000000"             \
329
          "  status:       0x0"                                \
330
          "  time taken:"                                      \
331
          "Execution step completed OK."                       \
332
          "Processing WRITE_COMMAND."                          \
333
          "  shifting in:  0x00000000001778a9e180000000100108" \
334
          "  shifted out:  0x164841bc600000000000000000000000" \
335
          "  status:       0x0"                                \
336
          "  time taken:"                                      \
337
          "Execution step completed OK."                       \
338
          "Processing READ_COMMAND."                           \
339
          "  shifting in:  0x00000000000000000000000b2420de30" \
340
          "  shifted out:  0x08cf46c2a18000000010010000000000" \
341
          "  access_type:  0x1"                                \
342
          "  address:      0x100000"                           \
343
          "  length:       0x4"                                \
344
          "  status:       0x0"                                \
345
          "  time taken:"                                      \
346
          "Execution step completed OK."                       \
347
          "Test completed successfully."]                      \
348
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
349
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "1" "100000" "4" \
350
         "READ_COMMAND"
351
 
352
# READ_COMMAND to write words for WishBone (access type 2)
353
run_libsim "JTAG READ_COMMAND WB write words"         \
354
    [list "Initalization succeeded."                           \
355
          "Execution step completed OK."                       \
356
          "Resetting JTAG."                                    \
357
          "Execution step completed OK."                       \
358
          "Shifting instruction."                              \
359
          "  shifting in:  0x01"                               \
360
          "  shifted out:  0x01"                               \
361
          "  time taken:"                                      \
362
          "Execution step completed OK."                       \
363
          "Selecting module."                                  \
364
          "  shifting in:  0x0000000000174841bc61"             \
365
          "  shifted out:  0x0164841bc60000000000"             \
366
          "  status:       0x0"                                \
367
          "  time taken:"                                      \
368
          "Execution step completed OK."                       \
369
          "Processing WRITE_COMMAND."                          \
370
          "  shifting in:  0x00000000018f4396f780000000100088" \
371
          "  shifted out:  0x164841bc600000000000000000000000" \
372
          "  status:       0x0"                                \
373
          "  time taken:"                                      \
374
          "Execution step completed OK."                       \
375
          "Processing READ_COMMAND."                           \
376
          "  shifting in:  0x00000000000000000000000b2420de30" \
377
          "  shifted out:  0x103b4b8c218000000010008000000000" \
378
          "  access_type:  0x2"                                \
379
          "  address:      0x100000"                           \
380
          "  length:       0x4"                                \
381
          "  status:       0x0"                                \
382
          "  time taken:"                                      \
383
          "Execution step completed OK."                       \
384
          "Test completed successfully."]                      \
385
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
386
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "100000" "4" \
387
         "READ_COMMAND"
388
 
389
# READ_COMMAND to read bytes for WishBone (access type 4)
390
run_libsim "JTAG READ_COMMAND WB read bytes"          \
391
    [list "Initalization succeeded."                           \
392
          "Execution step completed OK."                       \
393
          "Resetting JTAG."                                    \
394
          "Execution step completed OK."                       \
395
          "Shifting instruction."                              \
396
          "  shifting in:  0x01"                               \
397
          "  shifted out:  0x01"                               \
398
          "  time taken:"                                      \
399
          "Execution step completed OK."                       \
400
          "Selecting module."                                  \
401
          "  shifting in:  0x0000000000174841bc61"             \
402
          "  shifted out:  0x0164841bc60000000000"             \
403
          "  status:       0x0"                                \
404
          "  time taken:"                                      \
405
          "Execution step completed OK."                       \
406
          "Processing WRITE_COMMAND."                          \
407
          "  shifting in:  0x0000000000982f0f3d80000000100048" \
408
          "  shifted out:  0x164841bc600000000000000000000000" \
409
          "  status:       0x0"                                \
410
          "  time taken:"                                      \
411
          "Execution step completed OK."                       \
412
          "Processing READ_COMMAND."                           \
413
          "  shifting in:  0x00000000000000000000000b2420de30" \
414
          "  shifted out:  0x1c414d2b618000000010004000000000" \
415
          "  access_type:  0x4"                                \
416
          "  address:      0x100000"                           \
417
          "  length:       0x4"                                \
418
          "  status:       0x0"                                \
419
          "  time taken:"                                      \
420
          "Execution step completed OK."                       \
421
          "Test completed successfully."]                      \
422
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
423
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "4" "100000" "4" \
424
         "READ_COMMAND"
425
 
426
# READ_COMMAND to read half words for WishBone (access type 5)
427
run_libsim "JTAG READ_COMMAND WB read half words"     \
428
    [list "Initalization succeeded."                           \
429
          "Execution step completed OK."                       \
430
          "Resetting JTAG."                                    \
431
          "Execution step completed OK."                       \
432
          "Shifting instruction."                              \
433
          "  shifting in:  0x01"                               \
434
          "  shifted out:  0x01"                               \
435
          "  time taken:"                                      \
436
          "Execution step completed OK."                       \
437
          "Selecting module."                                  \
438
          "  shifting in:  0x0000000000174841bc61"             \
439
          "  shifted out:  0x0164841bc60000000000"             \
440
          "  status:       0x0"                                \
441
          "  time taken:"                                      \
442
          "Execution step completed OK."                       \
443
          "Processing WRITE_COMMAND."                          \
444
          "  shifting in:  0x00000000018802dad980000000100148" \
445
          "  shifted out:  0x164841bc600000000000000000000000" \
446
          "  status:       0x0"                                \
447
          "  time taken:"                                      \
448
          "Execution step completed OK."                       \
449
          "Processing READ_COMMAND."                           \
450
          "  shifting in:  0x00000000000000000000000b2420de30" \
451
          "  shifted out:  0x1a3ca4e7818000000010014000000000" \
452
          "  access_type:  0x5"                                \
453
          "  address:      0x100000"                           \
454
          "  length:       0x4"                                \
455
          "  status:       0x0"                                \
456
          "  time taken:"                                      \
457
          "Execution step completed OK."                       \
458
          "Test completed successfully."]                      \
459
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
460
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "5" "100000" "4" \
461
         "READ_COMMAND"
462
 
463
# READ_COMMAND to read words for WishBone (access type 6)
464
run_libsim "JTAG READ_COMMAND WB read words"          \
465
    [list "Initalization succeeded."                           \
466
          "Execution step completed OK."                       \
467
          "Resetting JTAG."                                    \
468
          "Execution step completed OK."                       \
469
          "Shifting instruction."                              \
470
          "  shifting in:  0x01"                               \
471
          "  shifted out:  0x01"                               \
472
          "  time taken:"                                      \
473
          "Execution step completed OK."                       \
474
          "Selecting module."                                  \
475
          "  shifting in:  0x0000000000174841bc61"             \
476
          "  shifted out:  0x0164841bc60000000000"             \
477
          "  status:       0x0"                                \
478
          "  time taken:"                                      \
479
          "Execution step completed OK."                       \
480
          "Processing WRITE_COMMAND."                          \
481
          "  shifting in:  0x00000000001039e5cf800000001000c8" \
482
          "  shifted out:  0x164841bc600000000000000000000000" \
483
          "  status:       0x0"                                \
484
          "  time taken:"                                      \
485
          "Execution step completed OK."                       \
486
          "Processing READ_COMMAND."                           \
487
          "  shifting in:  0x00000000000000000000000b2420de30" \
488
          "  shifted out:  0x02c8a9a901800000001000c000000000" \
489
          "  access_type:  0x6"                                \
490
          "  address:      0x100000"                           \
491
          "  length:       0x4"                                \
492
          "  status:       0x0"                                \
493
          "  time taken:"                                      \
494
          "Execution step completed OK."                       \
495
          "Test completed successfully."]                      \
496
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
497
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "6" "100000" "4" \
498
         "READ_COMMAND"
499
 
500
# Check address ranges. For Wishbone check 0x0 and 0xffffffff. For CPU0 check
501
# 0x12801 also still works, even though it is an invalid address for a SPR (it
502
# should be truncated with a warning).
503
 
504
# READ_COMMAND to write to address 0 for WishBone
505
run_libsim "JTAG READ_COMMAND WB write address 0"     \
506
    [list "Initalization succeeded."                           \
507
          "Execution step completed OK."                       \
508
          "Resetting JTAG."                                    \
509
          "Execution step completed OK."                       \
510
          "Shifting instruction."                              \
511
          "  shifting in:  0x01"                               \
512
          "  shifted out:  0x01"                               \
513
          "  time taken:"                                      \
514
          "Execution step completed OK."                       \
515
          "Selecting module."                                  \
516
          "  shifting in:  0x0000000000174841bc61"             \
517
          "  shifted out:  0x0164841bc60000000000"             \
518
          "  status:       0x0"                                \
519
          "  time taken:"                                      \
520
          "Execution step completed OK."                       \
521
          "Processing WRITE_COMMAND."                          \
522
          "  shifting in:  0x0000000001efa3017580000000000088" \
523
          "  shifted out:  0x164841bc600000000000000000000000" \
524
          "  status:       0x0"                                \
525
          "  time taken:"                                      \
526
          "Execution step completed OK."                       \
527
          "Processing READ_COMMAND."                           \
528
          "  shifting in:  0x00000000000000000000000b2420de30" \
529
          "  shifted out:  0x13ed4917218000000000008000000000" \
530
          "  access_type:  0x2"                                \
531
          "  address:      0x0"                                \
532
          "  length:       0x4"                                \
533
          "  status:       0x0"                                \
534
          "  time taken:"                                      \
535
          "Execution step completed OK."                       \
536
          "Test completed successfully."]                      \
537
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
538
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "0" "4"      \
539
         "READ_COMMAND"
540
 
541
# READ_COMMAND to write to address 0xffffffff for WishBone
542
run_libsim "JTAG READ_COMMAND WB write address 0xffffffff" \
543
    [list "Initalization succeeded."                           \
544
          "Execution step completed OK."                       \
545
          "Resetting JTAG."                                    \
546
          "Execution step completed OK."                       \
547
          "Shifting instruction."                              \
548
          "  shifting in:  0x01"                               \
549
          "  shifted out:  0x01"                               \
550
          "  time taken:"                                      \
551
          "Execution step completed OK."                       \
552
          "Selecting module."                                  \
553
          "  shifting in:  0x0000000000174841bc61"             \
554
          "  shifted out:  0x0164841bc60000000000"             \
555
          "  status:       0x0"                                \
556
          "  time taken:"                                      \
557
          "Execution step completed OK."                       \
558
          "Processing WRITE_COMMAND."                          \
559
          "  shifting in:  0x0000000000cd06d25e0001fffffffe08" \
560
          "  shifted out:  0x164841bc600000000000000000000000" \
561
          "  status:       0x0"                                \
562
          "  time taken:"                                      \
563
          "Execution step completed OK."                       \
564
          "Processing READ_COMMAND."                           \
565
          "  shifting in:  0x00000000000000000000000b2420de30" \
566
          "  shifted out:  0x1fa286fa800001fffffffe0000000000" \
567
          "  access_type:  0x0"                                \
568
          "  address:      0xffffffff"                         \
569
          "  length:       0x1"                                \
570
          "  status:       0x0"                                \
571
          "  time taken:"                                      \
572
          "Execution step completed OK."                       \
573
          "Test completed successfully."]                      \
574
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION"   \
575
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "0" "ffffffff" "1" \
576
         "READ_COMMAND"
577
 
578
# READ_COMMAND to write to address 0 for CPU0.
579
run_libsim "JTAG READ_COMMAND CPU0 write address 0"            \
580
    [list "Initalization succeeded."                           \
581
          "Execution step completed OK."                       \
582
          "Resetting JTAG."                                    \
583
          "Execution step completed OK."                       \
584
          "Shifting instruction."                              \
585
          "  shifting in:  0x01"                               \
586
          "  shifted out:  0x01"                               \
587
          "  time taken:"                                      \
588
          "Execution step completed OK."                       \
589
          "Selecting module."                                  \
590
          "  shifting in:  0x00000000000aff51d871"             \
591
          "  shifted out:  0x0164841bc60000000000"             \
592
          "  status:       0x0"                                \
593
          "  time taken:"                                      \
594
          "Execution step completed OK."                       \
595
          "Processing WRITE_COMMAND."                          \
596
          "  shifting in:  0x0000000001efa3017580000000000088" \
597
          "  shifted out:  0x164841bc600000000000000000000000" \
598
          "  status:       0x0"                                \
599
          "  time taken:"                                      \
600
          "Execution step completed OK."                       \
601
          "Processing READ_COMMAND."                           \
602
          "  shifting in:  0x00000000000000000000000b2420de30" \
603
          "  shifted out:  0x13ed4917218000000000008000000000" \
604
          "  access_type:  0x2"                                \
605
          "  address:      0x0"                                \
606
          "  length:       0x4"                                \
607
          "  status:       0x0"                                \
608
          "  time taken:"                                      \
609
          "Execution step completed OK."                       \
610
          "Test completed successfully."]                      \
611
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
612
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "2" "0" "4"  \
613
         "READ_COMMAND"
614
 
615
# READ_COMMAND to write to address 0xffff for CPU0.
616
run_libsim "JTAG READ_COMMAND CPU0 write address 0xffff"       \
617
    [list "Initalization succeeded."                           \
618
          "Execution step completed OK."                       \
619
          "Resetting JTAG."                                    \
620
          "Execution step completed OK."                       \
621
          "Shifting instruction."                              \
622
          "  shifting in:  0x01"                               \
623
          "  shifted out:  0x01"                               \
624
          "  time taken:"                                      \
625
          "Execution step completed OK."                       \
626
          "Selecting module."                                  \
627
          "  shifting in:  0x00000000000aff51d871"             \
628
          "  shifted out:  0x0164841bc60000000000"             \
629
          "  status:       0x0"                                \
630
          "  time taken:"                                      \
631
          "Execution step completed OK."                       \
632
          "Processing WRITE_COMMAND."                          \
633
          "  shifting in:  0x00000000012e99654d8001fffe000088" \
634
          "  shifted out:  0x164841bc600000000000000000000000" \
635
          "  status:       0x0"                                \
636
          "  time taken:"                                      \
637
          "Execution step completed OK."                       \
638
          "Processing READ_COMMAND."                           \
639
          "  shifting in:  0x00000000000000000000000b2420de30" \
640
          "  shifted out:  0x0040eb25018001fffe00008000000000" \
641
          "  access_type:  0x2"                                \
642
          "  address:      0xffff"                             \
643
          "  length:       0x4"                                \
644
          "  status:       0x0"                                \
645
          "  time taken:"                                      \
646
          "Execution step completed OK."                       \
647
          "Test completed successfully."]                      \
648
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
649
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "2" "ffff" "4"  \
650
         "READ_COMMAND"
651
 
652
# READ_COMMAND to write to address 0x12801 for CPU0. Even though out of range,
653
# this should work, since it will be truncated.
654
run_libsim "JTAG READ_COMMAND CPU0 write address 0x12801" \
655
    [list "Initalization succeeded."                           \
656
          "Execution step completed OK."                       \
657
          "Resetting JTAG."                                    \
658
          "Execution step completed OK."                       \
659
          "Shifting instruction."                              \
660
          "  shifting in:  0x01"                               \
661
          "  shifted out:  0x01"                               \
662
          "  time taken:"                                      \
663
          "Execution step completed OK."                       \
664
          "Selecting module."                                  \
665
          "  shifting in:  0x00000000000aff51d871"             \
666
          "  shifted out:  0x0164841bc60000000000"             \
667
          "  status:       0x0"                                \
668
          "  time taken:"                                      \
669
          "Execution step completed OK."                       \
670
          "Processing WRITE_COMMAND."                          \
671
          "  shifting in:  0x0000000000f0f3d6c180010029000088" \
672
          "Warning: truncated JTAG SPR address 0x00012801."    \
673
          "  shifted out:  0x164841bc600000000000000000000000" \
674
          "  status:       0x0"                                \
675
          "  time taken:"                                      \
676
          "Execution step completed OK."                       \
677
          "Processing READ_COMMAND."                           \
678
          "  shifting in:  0x00000000000000000000000b2420de30" \
679
          "  shifted out:  0x0e26c4c5a18001002800008000000000" \
680
          "  access_type:  0x2"                                \
681
          "  address:      0x2801"                             \
682
          "  length:       0x4"                                \
683
          "  status:       0x0"                                \
684
          "  time taken:"                                      \
685
          "Execution step completed OK."                       \
686
          "Test completed successfully."]                      \
687
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
688
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "2" "12801" "4"  \
689
         "READ_COMMAND"
690
 
691
# Check lengths. For Wishbone check 0x1 and 0x10000. For CPU0 check 0x4, which
692
# is the only valid length (tests of failure will have been done as part of
693
# the WRITE_COMMAND tests elsewhere).
694
 
695
# READ_COMMAND to write byte length 1 byte for WishBone
696
run_libsim "JTAG READ_COMMAND WB write length 1 byte"          \
697
    [list "Initalization succeeded."                           \
698
          "Execution step completed OK."                       \
699
          "Resetting JTAG."                                    \
700
          "Execution step completed OK."                       \
701
          "Shifting instruction."                              \
702
          "  shifting in:  0x01"                               \
703
          "  shifted out:  0x01"                               \
704
          "  time taken:"                                      \
705
          "Execution step completed OK."                       \
706
          "Selecting module."                                  \
707
          "  shifting in:  0x0000000000174841bc61"             \
708
          "  shifted out:  0x0164841bc60000000000"             \
709
          "  status:       0x0"                                \
710
          "  time taken:"                                      \
711
          "Execution step completed OK."                       \
712
          "Processing WRITE_COMMAND."                          \
713
          "  shifting in:  0x0000000000319cf96400000000100008" \
714
          "  shifted out:  0x164841bc600000000000000000000000" \
715
          "  status:       0x0"                                \
716
          "  time taken:"                                      \
717
          "Execution step completed OK."                       \
718
          "Processing READ_COMMAND."                           \
719
          "  shifting in:  0x00000000000000000000000b2420de30" \
720
          "  shifted out:  0x0f84668b200000000010000000000000" \
721
          "  access_type:  0x0"                                \
722
          "  address:      0x100000"                           \
723
          "  length:       0x1"                                \
724
          "  status:       0x0"                                \
725
          "  time taken:"                                      \
726
          "Execution step completed OK."                       \
727
          "Test completed successfully."]                      \
728
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
729
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "0" "100000" "1" \
730
         "READ_COMMAND"
731
 
732
# READ_COMMAND to write words length 0x10000 bytes for WishBone
733
run_libsim "JTAG READ_COMMAND WB write length 0x10000 bytes"   \
734
    [list "Initalization succeeded."                           \
735
          "Execution step completed OK."                       \
736
          "Resetting JTAG."                                    \
737
          "Execution step completed OK."                       \
738
          "Shifting instruction."                              \
739
          "  shifting in:  0x01"                               \
740
          "  shifted out:  0x01"                               \
741
          "  time taken:"                                      \
742
          "Execution step completed OK."                       \
743
          "Selecting module."                                  \
744
          "  shifting in:  0x0000000000174841bc61"             \
745
          "  shifted out:  0x0164841bc60000000000"             \
746
          "  status:       0x0"                                \
747
          "  time taken:"                                      \
748
          "Execution step completed OK."                       \
749
          "Processing WRITE_COMMAND."                          \
750
          "  shifting in:  0x0000000001c5c63669fffe0000100088" \
751
          "  shifted out:  0x164841bc600000000000000000000000" \
752
          "  status:       0x0"                                \
753
          "  time taken:"                                      \
754
          "Execution step completed OK."                       \
755
          "Processing READ_COMMAND."                           \
756
          "  shifting in:  0x00000000000000000000000b2420de30" \
757
          "  shifted out:  0x07c6706f21fffe000010008000000000" \
758
          "  access_type:  0x2"                                \
759
          "  address:      0x100000"                           \
760
          "  length:       0x10000"                            \
761
          "  status:       0x0"                                \
762
          "  time taken:"                                      \
763
          "Execution step completed OK."                       \
764
          "Test completed successfully."]                      \
765
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION"     \
766
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "100000" "10000" \
767
         "READ_COMMAND"
768
 
769
# READ_COMMAND to write words length 4 bytes for CPU0
770
run_libsim "JTAG READ_COMMAND CPU0 write length 4 bytes"       \
771
    [list "Initalization succeeded."                           \
772
          "Execution step completed OK."                       \
773
          "Resetting JTAG."                                    \
774
          "Execution step completed OK."                       \
775
          "Shifting instruction."                              \
776
          "  shifting in:  0x01"                               \
777
          "  shifted out:  0x01"                               \
778
          "  time taken:"                                      \
779
          "Execution step completed OK."                       \
780
          "Selecting module."                                  \
781
          "  shifting in:  0x00000000000aff51d871"             \
782
          "  shifted out:  0x0164841bc60000000000"             \
783
          "  status:       0x0"                                \
784
          "  time taken:"                                      \
785
          "Execution step completed OK."                       \
786
          "Processing WRITE_COMMAND."                          \
787
          "  shifting in:  0x0000000001933eb7e580010028000088" \
788
          "  shifted out:  0x164841bc600000000000000000000000" \
789
          "  status:       0x0"                                \
790
          "  time taken:"                                      \
791
          "Execution step completed OK."                       \
792
          "Processing READ_COMMAND."                           \
793
          "  shifting in:  0x00000000000000000000000b2420de30" \
794
          "  shifted out:  0x0e26c4c5a18001002800008000000000" \
795
          "  access_type:  0x2"                                \
796
          "  address:      0x2801"                             \
797
          "  length:       0x4"                                \
798
          "  status:       0x0"                                \
799
          "  time taken:"                                      \
800
          "Execution step completed OK."                       \
801
          "Test completed successfully."]                      \
802
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
803
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "2" "2801" "4"   \
804
         "READ_COMMAND"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.