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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 98 jeremybenn
# jtag-command.exp. Tests of the library JTAG WRITE_COMMAND
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 WRITE_COMMAND 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
# Test of WRITE_COMMAND for each module (including none). This should raise an
33
# error for any module other than WB and CPU0. There are different errors for
34
# CPU1 (which can be selected, but for which WRITE_COMMAND is invalid) and all
35
# other modules.
36
 
37
# WRITE_COMMAND with no module selection
38
run_libsim "JTAG WRITE_COMMAND no module"                      \
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
          "Processing WRITE_COMMAND."                          \
49
          "  shifting in:  0x00000000018f4396f780000000100088" \
50
          "  shifted out:  0x164841bc600000000000000000000000" \
51
          "  status:       0x0"                                \
52
          "  time taken: "                                     \
53
          "Execution step completed OK."                       \
54
          "Test completed successfully."]                      \
55
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" "8" \
56
         "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "100000" "4"
57
 
58
# WRITE_COMMAND for Wishbone
59
run_libsim "JTAG WRITE_COMMAND module WB"                      \
60
    [list "Initalization succeeded."                           \
61
          "Execution step completed OK."                       \
62
          "Resetting JTAG."                                    \
63
          "Execution step completed OK."                       \
64
          "Shifting instruction."                              \
65
          "  shifting in:  0x01"                               \
66
          "  shifted out:  0x01"                               \
67
          "  time taken: "                                     \
68
          "Execution step completed OK."                       \
69
          "Selecting module."                                  \
70
          "  shifting in:  0x0000000000174841bc61"             \
71
          "  shifted out:  0x0164841bc60000000000"             \
72
          "  status:       0x0"                                \
73
          "  time taken:"                                      \
74
          "Execution step completed OK."                       \
75
          "Processing WRITE_COMMAND."                          \
76
          "  shifting in:  0x00000000018f4396f780000000100088" \
77
          "  shifted out:  0x164841bc600000000000000000000000" \
78
          "  status:       0x0"                                \
79
          "  time taken:"                                      \
80
          "Execution step completed OK."                       \
81
          "Test completed successfully."]                      \
82
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" "8" \
83
         "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "100000" "4"
84
 
85
# WRITE_COMMAND for CPU0
86
run_libsim "JTAG WRITE_COMMAND module CPU0"                    \
87
    [list "Initalization succeeded."                           \
88
          "Execution step completed OK."                       \
89
          "Resetting JTAG."                                    \
90
          "Execution step completed OK."                       \
91
          "Shifting instruction."                              \
92
          "  shifting in:  0x01"                               \
93
          "  shifted out:  0x01"                               \
94
          "  time taken: "                                     \
95
          "Execution step completed OK."                       \
96
          "Selecting module."                                  \
97
          "  shifting in:  0x00000000000aff51d871"             \
98
          "  shifted out:  0x0164841bc60000000000"             \
99
          "  status:       0x0"                                \
100
          "  time taken:"                                      \
101
          "Execution step completed OK."                       \
102
          "Processing WRITE_COMMAND."                          \
103 99 jeremybenn
          "  shifting in:  0x0000000001933eb7e580010028000088" \
104 98 jeremybenn
          "  shifted out:  0x164841bc600000000000000000000000" \
105
          "  status:       0x0"                                \
106
          "  time taken:"                                      \
107
          "Execution step completed OK."                       \
108
          "Test completed successfully."]                      \
109
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" "8" \
110 99 jeremybenn
         "SELECT_MODULE" "1" "WRITE_COMMAND" "2" "2801" "4"
111 98 jeremybenn
 
112
# WRITE_COMMAND for CPU1
113
run_libsim "JTAG WRITE_COMMAND module CPU1"                    \
114
    [list "Initalization succeeded."                           \
115
          "Execution step completed OK."                       \
116
          "Resetting JTAG."                                    \
117
          "Execution step completed OK."                       \
118
          "Shifting instruction."                              \
119
          "  shifting in:  0x01"                               \
120
          "  shifted out:  0x01"                               \
121
          "  time taken: "                                     \
122
          "Execution step completed OK."                       \
123
          "Selecting module."                                  \
124
          "  shifting in:  0x00000000001993c98e69"             \
125
          "  shifted out:  0x0164841bc60000000000"             \
126
          "  status:       0x0"                                \
127
          "  time taken:"                                      \
128
          "Execution step completed OK."                       \
129
          "Processing WRITE_COMMAND."                          \
130
          "  shifting in:  0x00000000018f4396f780000000100088" \
131
          "ERROR: JTAG WRITE_COMMAND for CPU1 not supported."  \
132
          "  shifted out:  0x164841bc600000000000000000000000" \
133
          "  status:       0x0"                                \
134
          "  time taken:"                                      \
135
          "Execution step completed OK."                       \
136
          "Test completed successfully."]                      \
137
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" "8" \
138
         "SELECT_MODULE" "2" "WRITE_COMMAND" "2" "100000" "4"
139
 
140
# WRITE_COMMAND for invalid module
141
run_libsim "JTAG WRITE_COMMAND invalid module"                 \
142
    [list "Initalization succeeded."                           \
143
          "Execution step completed OK."                       \
144
          "Resetting JTAG."                                    \
145
          "Execution step completed OK."                       \
146
          "Shifting instruction."                              \
147
          "  shifting in:  0x01"                               \
148
          "  shifted out:  0x01"                               \
149
          "  time taken: "                                     \
150
          "Execution step completed OK."                       \
151
          "Selecting module."                                  \
152
          "  shifting in:  0x00000000000424d9ea79"             \
153
          "  shifted out:  0x01893c98e68000000000"             \
154
          "  status:       0x2"                                \
155
          "  time taken:"                                      \
156
          "Execution step completed OK."                       \
157
          "Processing WRITE_COMMAND."                          \
158
          "  shifting in:  0x00000000018f4396f780000000100088" \
159
          "ERROR: JTAG WRITE_COMMAND with no module selected." \
160
          "  shifted out:  0x164841bc600000000000000000000000" \
161
          "  status:       0x0"                                \
162
          "  time taken:"                                      \
163
          "Execution step completed OK."                       \
164
          "Test completed successfully."]                      \
165
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" "8" \
166
         "SELECT_MODULE" "3" "WRITE_COMMAND" "2" "100000" "4"
167
 
168
# WRITE_COMMAND for valid followed by invalid module
169
run_libsim "JTAG WRITE_COMMAND valid then invalid module"      \
170
    [list "Initalization succeeded."                           \
171
          "Execution step completed OK."                       \
172
          "Resetting JTAG."                                    \
173
          "Execution step completed OK."                       \
174
          "Shifting instruction."                              \
175
          "  shifting in:  0x01"                               \
176
          "  shifted out:  0x01"                               \
177
          "  time taken: "                                     \
178
          "Execution step completed OK."                       \
179
          "Selecting module."                                  \
180
          "  shifting in:  0x00000000001993c98e69"             \
181
          "  shifted out:  0x0164841bc60000000000"             \
182
          "  status:       0x0"                                \
183
          "  time taken:"                                      \
184
          "Execution step completed OK."                       \
185
          "Selecting module."                                  \
186
          "  shifting in:  0x00000000000424d9ea79"             \
187
          "  shifted out:  0x01893c98e68000000000"             \
188
          "  status:       0x2"                                \
189
          "  time taken:"                                      \
190
          "Execution step completed OK."                       \
191
          "Processing WRITE_COMMAND."                          \
192
          "  shifting in:  0x00000000018f4396f780000000100088" \
193
          "ERROR: JTAG WRITE_COMMAND with no module selected." \
194
          "  shifted out:  0x164841bc600000000000000000000000" \
195
          "  status:       0x0"                                \
196
          "  time taken:"                                      \
197
          "Execution step completed OK."                       \
198
          "Test completed successfully."]                      \
199
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" "8" \
200
         "SELECT_MODULE" "2" "SELECT_MODULE" "3" "WRITE_COMMAND" "2"  \
201
         "100000" "4"
202
 
203
# WRITE_COMMAND for invalid followed by valid module
204
run_libsim "JTAG WRITE_COMMAND invalid then valid module"      \
205
    [list "Initalization succeeded."                           \
206
          "Execution step completed OK."                       \
207
          "Resetting JTAG."                                    \
208
          "Execution step completed OK."                       \
209
          "Shifting instruction."                              \
210
          "  shifting in:  0x01"                               \
211
          "  shifted out:  0x01"                               \
212
          "  time taken: "                                     \
213
          "Execution step completed OK."                       \
214
          "Selecting module."                                  \
215
          "  shifting in:  0x00000000000424d9ea79"             \
216
          "  shifted out:  0x01893c98e68000000000"             \
217
          "  status:       0x2"                                \
218
          "  time taken:"                                      \
219
          "Execution step completed OK."                       \
220
          "Selecting module."                                  \
221
          "  shifting in:  0x0000000000174841bc61"             \
222
          "  shifted out:  0x0164841bc60000000000"             \
223
          "  status:       0x0"                                \
224
          "  time taken:"                                      \
225
          "Execution step completed OK."                       \
226
          "Processing WRITE_COMMAND."                          \
227
          "  shifting in:  0x00000000018f4396f780000000100088" \
228
          "  shifted out:  0x164841bc600000000000000000000000" \
229
          "  status:       0x0"                                \
230
          "  time taken:"                                      \
231
          "Execution step completed OK."                       \
232
          "Test completed successfully."]                      \
233
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" "8" \
234
         "SELECT_MODULE" "3" "SELECT_MODULE" "0" "WRITE_COMMAND" "2"  \
235
         "100000" "4"
236
 
237
# Tests of WRITE_COMMAND access types for WishBone. Check the different access
238
# types are accepted/rejected as expected (0, 1, 2, 4, 5 and 6 are OK).
239
 
240
# WRITE_COMMAND to write bytes for WishBone (access type 0)
241
run_libsim "JTAG WRITE_COMMAND WB write bytes"           \
242
    [list "Initalization succeeded."                           \
243
          "Execution step completed OK."                       \
244
          "Resetting JTAG."                                    \
245
          "Execution step completed OK."                       \
246
          "Shifting instruction."                              \
247
          "  shifting in:  0x01"                               \
248
          "  shifted out:  0x01"                               \
249
          "  time taken:"                                      \
250
          "Execution step completed OK."                       \
251
          "Selecting module."                                  \
252
          "  shifting in:  0x0000000000174841bc61"             \
253
          "  shifted out:  0x0164841bc60000000000"             \
254
          "  status:       0x0"                                \
255
          "  time taken:"                                      \
256
          "Execution step completed OK."                       \
257
          "Processing WRITE_COMMAND."                          \
258
          "  shifting in:  0x000000000107557c0580000000100008" \
259
          "  shifted out:  0x164841bc600000000000000000000000" \
260
          "  status:       0x0"                                \
261
          "  time taken:"                                      \
262
          "Execution step completed OK."                       \
263
          "Test completed successfully."]                      \
264
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
265
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "0" "100000" "4"
266
 
267
# WRITE_COMMAND to write half words for WishBone (access type 1)
268
run_libsim "JTAG WRITE_COMMAND WB write half words"      \
269
    [list "Initalization succeeded."                           \
270
          "Execution step completed OK."                       \
271
          "Resetting JTAG."                                    \
272
          "Execution step completed OK."                       \
273
          "Shifting instruction."                              \
274
          "  shifting in:  0x01"                               \
275
          "  shifted out:  0x01"                               \
276
          "  time taken:"                                      \
277
          "Execution step completed OK."                       \
278
          "Selecting module."                                  \
279
          "  shifting in:  0x0000000000174841bc61"             \
280
          "  shifted out:  0x0164841bc60000000000"             \
281
          "  status:       0x0"                                \
282
          "  time taken:"                                      \
283
          "Execution step completed OK."                       \
284
          "Processing WRITE_COMMAND."                          \
285
          "  shifting in:  0x00000000001778a9e180000000100108" \
286
          "  shifted out:  0x164841bc600000000000000000000000" \
287
          "  status:       0x0"                                \
288
          "  time taken:"                                      \
289
          "Execution step completed OK."                       \
290
          "Test completed successfully."]                      \
291
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
292
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "1" "100000" "4"
293
 
294
# WRITE_COMMAND to write words for WishBone (access type 2)
295
run_libsim "JTAG WRITE_COMMAND WB write words"           \
296
    [list "Initalization succeeded."                           \
297
          "Execution step completed OK."                       \
298
          "Resetting JTAG."                                    \
299
          "Execution step completed OK."                       \
300
          "Shifting instruction."                              \
301
          "  shifting in:  0x01"                               \
302
          "  shifted out:  0x01"                               \
303
          "  time taken:"                                      \
304
          "Execution step completed OK."                       \
305
          "Selecting module."                                  \
306
          "  shifting in:  0x0000000000174841bc61"             \
307
          "  shifted out:  0x0164841bc60000000000"             \
308
          "  status:       0x0"                                \
309
          "  time taken:"                                      \
310
          "Execution step completed OK."                       \
311
          "Processing WRITE_COMMAND."                          \
312
          "  shifting in:  0x00000000018f4396f780000000100088" \
313
          "  shifted out:  0x164841bc600000000000000000000000" \
314
          "  status:       0x0"                                \
315
          "  time taken:"                                      \
316
          "Execution step completed OK."                       \
317
          "Test completed successfully."]                      \
318
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
319
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "100000" "4"
320
 
321
# WRITE_COMMAND to write access type 3 for WishBone. This should fail with an
322
# error.
323
run_libsim "JTAG WRITE_COMMAND WB write access type 3"   \
324
    [list "Initalization succeeded."                           \
325
          "Execution step completed OK."                       \
326
          "Resetting JTAG."                                    \
327
          "Execution step completed OK."                       \
328
          "Shifting instruction."                              \
329
          "  shifting in:  0x01"                               \
330
          "  shifted out:  0x01"                               \
331
          "  time taken:"                                      \
332
          "Execution step completed OK."                       \
333
          "Selecting module."                                  \
334
          "  shifting in:  0x0000000000174841bc61"             \
335
          "  shifted out:  0x0164841bc60000000000"             \
336
          "  status:       0x0"                                \
337
          "  time taken:"                                      \
338
          "Execution step completed OK."                       \
339
          "Processing WRITE_COMMAND."                          \
340
          "  shifting in:  0x00000000009f6e431380000000100188" \
341
          "ERROR: JTAG WRITE_COMMAND unknown access type 3."   \
342
          "  shifted out:  0x164841bc600000000000000000000000" \
343
          "  status:       0x0"                                \
344
          "  time taken:"                                      \
345
          "Execution step completed OK."                       \
346
          "Test completed successfully."]                      \
347
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
348
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "3" "100000" "4"
349
 
350
# WRITE_COMMAND to read bytes for WishBone (access type 4). All the read
351
# accesses use the init version of the loop, so consistent values are set.
352
run_libsim "JTAG WRITE_COMMAND WB read bytes"            \
353
    [list "Initalization succeeded."                           \
354
          "Execution step completed OK."                       \
355
          "Resetting JTAG."                                    \
356
          "Execution step completed OK."                       \
357
          "Shifting instruction."                              \
358
          "  shifting in:  0x01"                               \
359
          "  shifted out:  0x01"                               \
360
          "  time taken:"                                      \
361
          "Execution step completed OK."                       \
362
          "Selecting module."                                  \
363
          "  shifting in:  0x0000000000174841bc61"             \
364
          "  shifted out:  0x0164841bc60000000000"             \
365
          "  status:       0x0"                                \
366
          "  time taken:"                                      \
367
          "Execution step completed OK."                       \
368
          "Processing WRITE_COMMAND."                          \
369
          "  shifting in:  0x0000000000982f0f3d80000000100048" \
370
          "  shifted out:  0x164841bc600000000000000000000000" \
371
          "  status:       0x0"                                \
372
          "  time taken:"                                      \
373
          "Execution step completed OK."                       \
374
          "Test completed successfully."]                      \
375
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
376
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "4" "100000" "4"
377
 
378
# WRITE_COMMAND to read half words for WishBone (access type 5)
379
run_libsim "JTAG WRITE_COMMAND WB read half words"       \
380
    [list "Initalization succeeded."                           \
381
          "Execution step completed OK."                       \
382
          "Resetting JTAG."                                    \
383
          "Execution step completed OK."                       \
384
          "Shifting instruction."                              \
385
          "  shifting in:  0x01"                               \
386
          "  shifted out:  0x01"                               \
387
          "  time taken:"                                      \
388
          "Execution step completed OK."                       \
389
          "Selecting module."                                  \
390
          "  shifting in:  0x0000000000174841bc61"             \
391
          "  shifted out:  0x0164841bc60000000000"             \
392
          "  status:       0x0"                                \
393
          "  time taken:"                                      \
394
          "Execution step completed OK."                       \
395
          "Processing WRITE_COMMAND."                          \
396
          "  shifting in:  0x00000000018802dad980000000100148" \
397
          "  shifted out:  0x164841bc600000000000000000000000" \
398
          "  status:       0x0"                                \
399
          "  time taken:"                                      \
400
          "Execution step completed OK."                       \
401
          "Test completed successfully."]                      \
402
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
403
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "5" "100000" "4"
404
 
405
# WRITE_COMMAND to read words for WishBone (access type 6)
406
run_libsim "JTAG WRITE_COMMAND WB read words"            \
407
    [list "Initalization succeeded."                           \
408
          "Execution step completed OK."                       \
409
          "Resetting JTAG."                                    \
410
          "Execution step completed OK."                       \
411
          "Shifting instruction."                              \
412
          "  shifting in:  0x01"                               \
413
          "  shifted out:  0x01"                               \
414
          "  time taken:"                                      \
415
          "Execution step completed OK."                       \
416
          "Selecting module."                                  \
417
          "  shifting in:  0x0000000000174841bc61"             \
418
          "  shifted out:  0x0164841bc60000000000"             \
419
          "  status:       0x0"                                \
420
          "  time taken:"                                      \
421
          "Execution step completed OK."                       \
422
          "Processing WRITE_COMMAND."                          \
423
          "  shifting in:  0x00000000001039e5cf800000001000c8" \
424
          "  shifted out:  0x164841bc600000000000000000000000" \
425
          "  status:       0x0"                                \
426
          "  time taken:"                                      \
427
          "Execution step completed OK."                       \
428
          "Test completed successfully."]                      \
429
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
430
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "6" "100000" "4"
431
 
432
# WRITE_COMMAND to read access type 7 for WishBone. This should fail with an
433
# error.
434
run_libsim "JTAG WRITE_COMMAND WB read access type 7"    \
435
    [list "Initalization succeeded."                           \
436
          "Execution step completed OK."                       \
437
          "Resetting JTAG."                                    \
438
          "Execution step completed OK."                       \
439
          "Shifting instruction."                              \
440
          "  shifting in:  0x01"                               \
441
          "  shifted out:  0x01"                               \
442
          "  time taken:"                                      \
443
          "Execution step completed OK."                       \
444
          "Selecting module."                                  \
445
          "  shifting in:  0x0000000000174841bc61"             \
446
          "  shifted out:  0x0164841bc60000000000"             \
447
          "  status:       0x0"                                \
448
          "  time taken:"                                      \
449
          "Execution step completed OK."                       \
450
          "Processing WRITE_COMMAND."                          \
451
          "  shifting in:  0x00000000010014302b800000001001c8" \
452
          "ERROR: JTAG WRITE_COMMAND unknown access type 7."   \
453
          "  shifted out:  0x164841bc600000000000000000000000" \
454
          "  status:       0x0"                                \
455
          "  time taken:"                                      \
456
          "Execution step completed OK."                       \
457
          "Test completed successfully."]                      \
458
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
459
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "7" "100000" "4"
460
 
461
# Tests of WRITE_COMMAND addresses for WishBone. Check different addresses are
462
# all accepted. For all of these we use the simple loop and a byte write. Test
463
# the boundaries (address 0 and address 0xffffffff).
464
 
465
# WRITE_COMMAND for WishBone to address 0
466
run_libsim "JTAG WRITE_COMMAND WB write address 0"       \
467
    [list "Initalization succeeded."                           \
468
          "Execution step completed OK."                       \
469
          "Resetting JTAG."                                    \
470
          "Execution step completed OK."                       \
471
          "Shifting instruction."                              \
472
          "  shifting in:  0x01"                               \
473
          "  shifted out:  0x01"                               \
474
          "  time taken:"                                      \
475
          "Execution step completed OK."                       \
476
          "Selecting module."                                  \
477
          "  shifting in:  0x0000000000174841bc61"             \
478
          "  shifted out:  0x0164841bc60000000000"             \
479
          "  status:       0x0"                                \
480
          "  time taken:"                                      \
481
          "Execution step completed OK."                       \
482
          "Processing WRITE_COMMAND."                          \
483
          "  shifting in:  0x0000000000517c6ee600000000000008" \
484
          "  shifted out:  0x164841bc600000000000000000000000" \
485
          "  status:       0x0"                                \
486
          "  time taken:"                                      \
487
          "Execution step completed OK."                       \
488
          "Test completed successfully."]                      \
489
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
490
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "0" "0" "1"
491
 
492
# WRITE_COMMAND for WishBone to address ffffffff
493
run_libsim "JTAG WRITE_COMMAND WB write address 0xffffffff" \
494
    [list "Initalization succeeded."                              \
495
          "Execution step completed OK."                          \
496
          "Resetting JTAG."                                       \
497
          "Execution step completed OK."                          \
498
          "Shifting instruction."                                 \
499
          "  shifting in:  0x01"                                  \
500
          "  shifted out:  0x01"                                  \
501
          "  time taken:"                                         \
502
          "Execution step completed OK."                          \
503
          "Selecting module."                                     \
504
          "  shifting in:  0x0000000000174841bc61"                \
505
          "  shifted out:  0x0164841bc60000000000"                \
506
          "  status:       0x0"                                   \
507
          "  time taken:"                                         \
508
          "Execution step completed OK."                          \
509
          "Processing WRITE_COMMAND."                             \
510
          "  shifting in:  0x0000000000cd06d25e0001fffffffe08"    \
511
          "  shifted out:  0x164841bc600000000000000000000000"    \
512
          "  status:       0x0"                                   \
513
          "  time taken:"                                         \
514
          "Execution step completed OK."                          \
515
          "Test completed successfully."]                         \
516
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION"   \
517
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "0" "ffffffff" "1"
518
 
519
# Tests of WRITE_COMMAND lengths for WishBone. Check the different lengths are
520
# accepted. For all of these we use the simple loop and write. There is no
521
# point testing sizes outside the range, since these fail in the test rather
522
# than the progrma under test. We use byte reads from the initialized loop
523
 
524
# Test of WRITE_COMMAND for WishBone 1 byte.
525
run_libsim "JTAG WRITE_COMMAND WB read length 1"         \
526
    [list "Initalization succeeded."                           \
527
          "Execution step completed OK."                       \
528
          "Resetting JTAG."                                    \
529
          "Execution step completed OK."                       \
530
          "Shifting instruction."                              \
531
          "  shifting in:  0x01"                               \
532
          "  shifted out:  0x01"                               \
533
          "  time taken:"                                      \
534
          "Execution step completed OK."                       \
535
          "Selecting module."                                  \
536
          "  shifting in:  0x0000000000174841bc61"             \
537
          "  shifted out:  0x0164841bc60000000000"             \
538
          "  status:       0x0"                                \
539
          "  time taken:"                                      \
540
          "Execution step completed OK."                       \
541
          "Processing WRITE_COMMAND."                          \
542
          "  shifting in:  0x0000000001aee68a5c00000000100048" \
543
          "  shifted out:  0x164841bc600000000000000000000000" \
544
          "  status:       0x0"                                \
545
          "  time taken:"                                      \
546
          "Execution step completed OK."                       \
547
          "Test completed successfully."]                      \
548
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
549
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "4" "100000" "1"
550
 
551
# Test of WRITE_COMMAND for WishBone 0x10000 bytes. We only match the first
552
# few bytes of the shifted strings and data.
553
run_libsim "JTAG WRITE_COMMAND WB read length 0x10000"   \
554
    [list "Initalization succeeded."                           \
555
          "Execution step completed OK."                       \
556
          "Resetting JTAG."                                    \
557
          "Execution step completed OK."                       \
558
          "Shifting instruction."                              \
559
          "  shifting in:  0x01"                               \
560
          "  shifted out:  0x01"                               \
561
          "  time taken:"                                      \
562
          "Execution step completed OK."                       \
563
          "Selecting module."                                  \
564
          "  shifting in:  0x0000000000174841bc61"             \
565
          "  shifted out:  0x0164841bc60000000000"             \
566
          "  status:       0x0"                                \
567
          "  time taken:"                                      \
568
          "Execution step completed OK."                       \
569
          "Processing WRITE_COMMAND."                          \
570
          "  shifting in:  0x0000000000d2aaafa3fffe0000100048" \
571
          "  shifted out:  0x164841bc600000000000000000000000" \
572
          "  status:       0x0"                                \
573
          "  time taken:"                                      \
574
          "Execution step completed OK."                       \
575
          "Test completed successfully."]                      \
576
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
577
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "4" "100000" "10000"
578
 
579
# Tests of WRITE_COMMAND with different alignments. Byte access should be
580
# aligned on any boundary. Half-word on half-word boundaries and word on word
581
# boundaries. In each case we use 4 byte transfers.
582
 
583
# Write bytes, aligned on byte 0
584
run_libsim "JTAG WRITE_COMMAND WB write bytes, byte 0 aligned" \
585
    [list "Initalization succeeded."                           \
586
          "Execution step completed OK."                       \
587
          "Resetting JTAG."                                    \
588
          "Execution step completed OK."                       \
589
          "Shifting instruction."                              \
590
          "  shifting in:  0x01"                               \
591
          "  shifted out:  0x01"                               \
592
          "  time taken:"                                      \
593
          "Execution step completed OK."                       \
594
          "Selecting module."                                  \
595
          "  shifting in:  0x0000000000174841bc61"             \
596
          "  shifted out:  0x0164841bc60000000000"             \
597
          "  status:       0x0"                                \
598
          "  time taken:"                                      \
599
          "Execution step completed OK."                       \
600
          "Processing WRITE_COMMAND."                          \
601
          "  shifting in:  0x000000000107557c0580000000100008" \
602
          "  shifted out:  0x164841bc600000000000000000000000" \
603
          "  status:       0x0"                                \
604
          "  time taken:"                                      \
605
          "Execution step completed OK."                       \
606
          "Test completed successfully."]                      \
607
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
608
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "0" "100000" "4"
609
 
610
# Write bytes, aligned on byte 1
611
run_libsim "JTAG WRITE_COMMAND WB write bytes, byte 1 aligned" \
612
    [list "Initalization succeeded."                           \
613
          "Execution step completed OK."                       \
614
          "Resetting JTAG."                                    \
615
          "Execution step completed OK."                       \
616
          "Shifting instruction."                              \
617
          "  shifting in:  0x01"                               \
618
          "  shifted out:  0x01"                               \
619
          "  time taken:"                                      \
620
          "Execution step completed OK."                       \
621
          "Selecting module."                                  \
622
          "  shifting in:  0x0000000000174841bc61"             \
623
          "  shifted out:  0x0164841bc60000000000"             \
624
          "  status:       0x0"                                \
625
          "  time taken:"                                      \
626
          "Execution step completed OK."                       \
627
          "Processing WRITE_COMMAND."                          \
628
          "  shifting in:  0x0000000000c53f4b0580010000100008" \
629
          "  shifted out:  0x164841bc600000000000000000000000" \
630
          "  status:       0x0"                                \
631
          "  time taken:"                                      \
632
          "Execution step completed OK."                       \
633
          "Test completed successfully."]                      \
634
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
635
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "0" "100001" "4"
636
 
637
# Write bytes, aligned on byte 2
638
run_libsim "JTAG WRITE_COMMAND WB write bytes, byte 2 aligned" \
639
    [list "Initalization succeeded."                           \
640
          "Execution step completed OK."                       \
641
          "Resetting JTAG."                                    \
642
          "Execution step completed OK."                       \
643
          "Shifting instruction."                              \
644
          "  shifting in:  0x01"                               \
645
          "  shifted out:  0x01"                               \
646
          "  time taken:"                                      \
647
          "Execution step completed OK."                       \
648
          "Selecting module."                                  \
649
          "  shifting in:  0x0000000000174841bc61"             \
650
          "  shifted out:  0x0164841bc60000000000"             \
651
          "  status:       0x0"                                \
652
          "  time taken:"                                      \
653
          "Execution step completed OK."                       \
654
          "Processing WRITE_COMMAND."                          \
655
          "  shifting in:  0x0000000001e660678580008000100008" \
656
          "  shifted out:  0x164841bc600000000000000000000000" \
657
          "  status:       0x0"                                \
658
          "  time taken:"                                      \
659
          "Execution step completed OK."                       \
660
          "Test completed successfully."]                      \
661
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
662
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "0" "100002" "4"
663
 
664
# Write bytes, aligned on byte 3
665
run_libsim "JTAG WRITE_COMMAND WB write bytes, byte 3 aligned" \
666
    [list "Initalization succeeded."                           \
667
          "Execution step completed OK."                       \
668
          "Resetting JTAG."                                    \
669
          "Execution step completed OK."                       \
670
          "Shifting instruction."                              \
671
          "  shifting in:  0x01"                               \
672
          "  shifted out:  0x01"                               \
673
          "  time taken:"                                      \
674
          "Execution step completed OK."                       \
675
          "Selecting module."                                  \
676
          "  shifting in:  0x0000000000174841bc61"             \
677
          "  shifted out:  0x0164841bc60000000000"             \
678
          "  status:       0x0"                                \
679
          "  time taken:"                                      \
680
          "Execution step completed OK."                       \
681
          "Processing WRITE_COMMAND."                          \
682
          "  shifting in:  0x0000000000240a508580018000100008" \
683
          "  shifted out:  0x164841bc600000000000000000000000" \
684
          "  status:       0x0"                                \
685
          "  time taken:"                                      \
686
          "Execution step completed OK."                       \
687
          "Test completed successfully."]                      \
688
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
689
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "0" "100003" "4"
690
 
691
# Write half words, aligned on byte 0
692
run_libsim "JTAG WRITE_COMMAND WB write half words, byte 0 aligned"    \
693
    [list "Initalization succeeded."                                   \
694
          "Execution step completed OK."                               \
695
          "Resetting JTAG."                                            \
696
          "Execution step completed OK."                               \
697
          "Shifting instruction."                                      \
698
          "  shifting in:  0x01"                                       \
699
          "  shifted out:  0x01"                                       \
700
          "  time taken:"                                              \
701
          "Execution step completed OK."                               \
702
          "Selecting module."                                          \
703
          "  shifting in:  0x0000000000174841bc61"                     \
704
          "  shifted out:  0x0164841bc60000000000"                     \
705
          "  status:       0x0"                                        \
706
          "  time taken:"                                              \
707
          "Execution step completed OK."                               \
708
          "Processing WRITE_COMMAND."                                  \
709
          "  shifting in:  0x00000000001778a9e180000000100108"         \
710
          "  shifted out:  0x164841bc600000000000000000000000"         \
711
          "  status:       0x0"                                        \
712
          "  time taken:"                                              \
713
          "Execution step completed OK."                               \
714
          "Test completed successfully."]                              \
715
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
716
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "1" "100000" "4"
717
 
718
# Write half words, aligned on byte 1
719
run_libsim "JTAG WRITE_COMMAND WB write half words, byte 1 aligned"    \
720
    [list "Initalization succeeded."                                   \
721
          "Execution step completed OK."                               \
722
          "Resetting JTAG."                                            \
723
          "Execution step completed OK."                               \
724
          "Shifting instruction."                                      \
725
          "  shifting in:  0x01"                                       \
726
          "  shifted out:  0x01"                                       \
727
          "  time taken:"                                              \
728
          "Execution step completed OK."                               \
729
          "Selecting module."                                          \
730
          "  shifting in:  0x0000000000174841bc61"                     \
731
          "  shifted out:  0x0164841bc60000000000"                     \
732
          "  status:       0x0"                                        \
733
          "  time taken:"                                              \
734
          "Execution step completed OK."                               \
735
          "Processing WRITE_COMMAND."                                  \
736
          "  shifting in:  0x0000000001d5129ee180010000100108"         \
737
          "ERROR: JTAG WishBone 16-bit access must be 2-byte aligned." \
738
          "  shifted out:  0x164841bc600000000000000000000000"         \
739
          "  status:       0x0"                                        \
740
          "  time taken:"                                              \
741
          "Execution step completed OK."                               \
742
          "Test completed successfully."]                              \
743
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
744
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "1" "100001" "4"
745
 
746
# Write half words, aligned on byte 2
747
run_libsim "JTAG WRITE_COMMAND WB write half words, byte 2 aligned"    \
748
    [list "Initalization succeeded."                                   \
749
          "Execution step completed OK."                               \
750
          "Resetting JTAG."                                            \
751
          "Execution step completed OK."                               \
752
          "Shifting instruction."                                      \
753
          "  shifting in:  0x01"                                       \
754
          "  shifted out:  0x01"                                       \
755
          "  time taken:"                                              \
756
          "Execution step completed OK."                               \
757
          "Selecting module."                                          \
758
          "  shifting in:  0x0000000000174841bc61"                     \
759
          "  shifted out:  0x0164841bc60000000000"                     \
760
          "  status:       0x0"                                        \
761
          "  time taken:"                                              \
762
          "Execution step completed OK."                               \
763
          "Processing WRITE_COMMAND."                                  \
764
          "  shifting in:  0x0000000000f64db26180008000100108"         \
765
          "  shifted out:  0x164841bc600000000000000000000000"         \
766
          "  status:       0x0"                                        \
767
          "  time taken:"                                              \
768
          "Execution step completed OK."                               \
769
          "Test completed successfully."]                              \
770
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
771
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "1" "100002" "4"
772
 
773
# Write half words, aligned on byte 3
774
run_libsim "JTAG WRITE_COMMAND WB write half words, byte 3 aligned"    \
775
    [list "Initalization succeeded."                                   \
776
          "Execution step completed OK."                               \
777
          "Resetting JTAG."                                            \
778
          "Execution step completed OK."                               \
779
          "Shifting instruction."                                      \
780
          "  shifting in:  0x01"                                       \
781
          "  shifted out:  0x01"                                       \
782
          "  time taken:"                                              \
783
          "Execution step completed OK."                               \
784
          "Selecting module."                                          \
785
          "  shifting in:  0x0000000000174841bc61"                     \
786
          "  shifted out:  0x0164841bc60000000000"                     \
787
          "  status:       0x0"                                        \
788
          "  time taken:"                                              \
789
          "Execution step completed OK."                               \
790
          "Processing WRITE_COMMAND."                                  \
791
          "  shifting in:  0x00000000013427856180018000100108"         \
792
          "ERROR: JTAG WishBone 16-bit access must be 2-byte aligned." \
793
          "  shifted out:  0x164841bc600000000000000000000000"         \
794
          "  status:       0x0"                                        \
795
          "  time taken:"                                              \
796
          "Execution step completed OK."                               \
797
          "Test completed successfully."]                              \
798
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
799
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "1" "100003" "4"
800
 
801
# Write words, aligned on byte 0
802
run_libsim "JTAG WRITE_COMMAND WB write words, byte 0 aligned"         \
803
    [list "Initalization succeeded."                                   \
804
          "Execution step completed OK."                               \
805
          "Resetting JTAG."                                            \
806
          "Execution step completed OK."                               \
807
          "Shifting instruction."                                      \
808
          "  shifting in:  0x01"                                       \
809
          "  shifted out:  0x01"                                       \
810
          "  time taken:"                                              \
811
          "Execution step completed OK."                               \
812
          "Selecting module."                                          \
813
          "  shifting in:  0x0000000000174841bc61"                     \
814
          "  shifted out:  0x0164841bc60000000000"                     \
815
          "  status:       0x0"                                        \
816
          "  time taken:"                                              \
817
          "Execution step completed OK."                               \
818
          "Processing WRITE_COMMAND."                                  \
819
          "  shifting in:  0x00000000018f4396f780000000100088"         \
820
          "  shifted out:  0x164841bc600000000000000000000000"         \
821
          "  status:       0x0"                                        \
822
          "  time taken:"                                              \
823
          "Execution step completed OK."                               \
824
          "Test completed successfully."]                              \
825
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
826
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "100000" "4"
827
 
828
# Write words, aligned on byte 1
829
run_libsim "JTAG WRITE_COMMAND WB write words, byte 1 aligned"         \
830
    [list "Initalization succeeded."                                   \
831
          "Execution step completed OK."                               \
832
          "Resetting JTAG."                                            \
833
          "Execution step completed OK."                               \
834
          "Shifting instruction."                                      \
835
          "  shifting in:  0x01"                                       \
836
          "  shifted out:  0x01"                                       \
837
          "  time taken:"                                              \
838
          "Execution step completed OK."                               \
839
          "Selecting module."                                          \
840
          "  shifting in:  0x0000000000174841bc61"                     \
841
          "  shifted out:  0x0164841bc60000000000"                     \
842
          "  status:       0x0"                                        \
843
          "  time taken:"                                              \
844
          "Execution step completed OK."                               \
845
          "Processing WRITE_COMMAND."                                  \
846
          "  shifting in:  0x00000000004d29a1f780010000100088"         \
847
          "ERROR: JTAG WishBone 32-bit access must be 4-byte aligned." \
848
          "  shifted out:  0x164841bc600000000000000000000000"         \
849
          "  status:       0x0"                                        \
850
          "  time taken:"                                              \
851
          "Execution step completed OK."                               \
852
          "Test completed successfully."]                              \
853
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
854
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "100001" "4"
855
 
856
# Write words, aligned on byte 2
857
run_libsim "JTAG WRITE_COMMAND WB write words, byte 2 aligned"         \
858
    [list "Initalization succeeded."                                   \
859
          "Execution step completed OK."                               \
860
          "Resetting JTAG."                                            \
861
          "Execution step completed OK."                               \
862
          "Shifting instruction."                                      \
863
          "  shifting in:  0x01"                                       \
864
          "  shifted out:  0x01"                                       \
865
          "  time taken:"                                              \
866
          "Execution step completed OK."                               \
867
          "Selecting module."                                          \
868
          "  shifting in:  0x0000000000174841bc61"                     \
869
          "  shifted out:  0x0164841bc60000000000"                     \
870
          "  status:       0x0"                                        \
871
          "  time taken:"                                              \
872
          "Execution step completed OK."                               \
873
          "Processing WRITE_COMMAND."                                  \
874
          "  shifting in:  0x00000000016e768d7780008000100088"         \
875
          "ERROR: JTAG WishBone 32-bit access must be 4-byte aligned." \
876
          "  shifted out:  0x164841bc600000000000000000000000"         \
877
          "  status:       0x0"                                        \
878
          "  time taken:"                                              \
879
          "Execution step completed OK."                               \
880
          "Test completed successfully."]                              \
881
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
882
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "100002" "4"
883
 
884
# Write words, aligned on byte 3
885
run_libsim "JTAG WRITE_COMMAND WB write words, byte 3 aligned"         \
886
    [list "Initalization succeeded."                                   \
887
          "Execution step completed OK."                               \
888
          "Resetting JTAG."                                            \
889
          "Execution step completed OK."                               \
890
          "Shifting instruction."                                      \
891
          "  shifting in:  0x01"                                       \
892
          "  shifted out:  0x01"                                       \
893
          "  time taken:"                                              \
894
          "Execution step completed OK."                               \
895
          "Selecting module."                                          \
896
          "  shifting in:  0x0000000000174841bc61"                     \
897
          "  shifted out:  0x0164841bc60000000000"                     \
898
          "  status:       0x0"                                        \
899
          "  time taken:"                                              \
900
          "Execution step completed OK."                               \
901
          "Processing WRITE_COMMAND."                                  \
902
          "  shifting in:  0x0000000000ac1cba7780018000100088"         \
903
          "ERROR: JTAG WishBone 32-bit access must be 4-byte aligned." \
904
          "  shifted out:  0x164841bc600000000000000000000000"         \
905
          "  status:       0x0"                                        \
906
          "  time taken:"                                              \
907
          "Execution step completed OK."                               \
908
          "Test completed successfully."]                              \
909
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
910
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "2" "100003" "4"
911
 
912
# Read bytes, aligned on byte 0
913
run_libsim "JTAG WRITE_COMMAND WB read bytes, byte 0 aligned"  \
914
    [list "Initalization succeeded."                           \
915
          "Execution step completed OK."                       \
916
          "Resetting JTAG."                                    \
917
          "Execution step completed OK."                       \
918
          "Shifting instruction."                              \
919
          "  shifting in:  0x01"                               \
920
          "  shifted out:  0x01"                               \
921
          "  time taken:"                                      \
922
          "Execution step completed OK."                       \
923
          "Selecting module."                                  \
924
          "  shifting in:  0x0000000000174841bc61"             \
925
          "  shifted out:  0x0164841bc60000000000"             \
926
          "  status:       0x0"                                \
927
          "  time taken:"                                      \
928
          "Execution step completed OK."                       \
929
          "Processing WRITE_COMMAND."                          \
930
          "  shifting in:  0x0000000000982f0f3d80000000100048" \
931
          "  shifted out:  0x164841bc600000000000000000000000" \
932
          "  status:       0x0"                                \
933
          "  time taken:"                                      \
934
          "Execution step completed OK."                       \
935
          "Test completed successfully."]                      \
936
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
937
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "4" "100000" "4"
938
 
939
# Read bytes, aligned on byte 1
940
run_libsim "JTAG WRITE_COMMAND WB read bytes, byte 1 aligned"  \
941
    [list "Initalization succeeded."                           \
942
          "Execution step completed OK."                       \
943
          "Resetting JTAG."                                    \
944
          "Execution step completed OK."                       \
945
          "Shifting instruction."                              \
946
          "  shifting in:  0x01"                               \
947
          "  shifted out:  0x01"                               \
948
          "  time taken:"                                      \
949
          "Execution step completed OK."                       \
950
          "Selecting module."                                  \
951
          "  shifting in:  0x0000000000174841bc61"             \
952
          "  shifted out:  0x0164841bc60000000000"             \
953
          "  status:       0x0"                                \
954
          "  time taken:"                                      \
955
          "Execution step completed OK."                       \
956
          "Processing WRITE_COMMAND."                          \
957
          "  shifting in:  0x00000000015a45383d80010000100048" \
958
          "  shifted out:  0x164841bc600000000000000000000000" \
959
          "  status:       0x0"                                \
960
          "  time taken:"                                      \
961
          "Execution step completed OK."                       \
962
          "Test completed successfully."]                      \
963
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
964
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "4" "100001" "4"
965
 
966
# Read bytes, aligned on byte 2
967
run_libsim "JTAG WRITE_COMMAND WB read bytes, byte 2 aligned"  \
968
    [list "Initalization succeeded."                           \
969
          "Execution step completed OK."                       \
970
          "Resetting JTAG."                                    \
971
          "Execution step completed OK."                       \
972
          "Shifting instruction."                              \
973
          "  shifting in:  0x01"                               \
974
          "  shifted out:  0x01"                               \
975
          "  time taken:"                                      \
976
          "Execution step completed OK."                       \
977
          "Selecting module."                                  \
978
          "  shifting in:  0x0000000000174841bc61"             \
979
          "  shifted out:  0x0164841bc60000000000"             \
980
          "  status:       0x0"                                \
981
          "  time taken:"                                      \
982
          "Execution step completed OK."                       \
983
          "Processing WRITE_COMMAND."                          \
984
          "  shifting in:  0x0000000000791a14bd80008000100048" \
985
          "  shifted out:  0x164841bc600000000000000000000000" \
986
          "  status:       0x0"                                \
987
          "  time taken:"                                      \
988
          "Execution step completed OK."                       \
989
          "Test completed successfully."]                      \
990
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
991
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "4" "100002" "4"
992
 
993
# Read bytes, aligned on byte 3
994
run_libsim "JTAG WRITE_COMMAND WB read bytes, byte 3 aligned"  \
995
    [list "Initalization succeeded."                           \
996
          "Execution step completed OK."                       \
997
          "Resetting JTAG."                                    \
998
          "Execution step completed OK."                       \
999
          "Shifting instruction."                              \
1000
          "  shifting in:  0x01"                               \
1001
          "  shifted out:  0x01"                               \
1002
          "  time taken:"                                      \
1003
          "Execution step completed OK."                       \
1004
          "Selecting module."                                  \
1005
          "  shifting in:  0x0000000000174841bc61"             \
1006
          "  shifted out:  0x0164841bc60000000000"             \
1007
          "  status:       0x0"                                \
1008
          "  time taken:"                                      \
1009
          "Execution step completed OK."                       \
1010
          "Processing WRITE_COMMAND."                          \
1011
          "  shifting in:  0x0000000001bb7023bd80018000100048" \
1012
          "  shifted out:  0x164841bc600000000000000000000000" \
1013
          "  status:       0x0"                                \
1014
          "  time taken:"                                      \
1015
          "Execution step completed OK."                       \
1016
          "Test completed successfully."]                      \
1017
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1018
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "4" "100003" "4"
1019
 
1020
# Read half words, aligned on byte 0
1021
run_libsim "JTAG WRITE_COMMAND WB read half words, byte 0 aligned"     \
1022
    [list "Initalization succeeded."                                   \
1023
          "Execution step completed OK."                               \
1024
          "Resetting JTAG."                                            \
1025
          "Execution step completed OK."                               \
1026
          "Shifting instruction."                                      \
1027
          "  shifting in:  0x01"                                       \
1028
          "  shifted out:  0x01"                                       \
1029
          "  time taken:"                                              \
1030
          "Execution step completed OK."                               \
1031
          "Selecting module."                                          \
1032
          "  shifting in:  0x0000000000174841bc61"                     \
1033
          "  shifted out:  0x0164841bc60000000000"                     \
1034
          "  status:       0x0"                                        \
1035
          "  time taken:"                                              \
1036
          "Execution step completed OK."                               \
1037
          "Processing WRITE_COMMAND."                                  \
1038
          "  shifting in:  0x00000000018802dad980000000100148"         \
1039
          "  shifted out:  0x164841bc600000000000000000000000"         \
1040
          "  status:       0x0"                                        \
1041
          "  time taken:"                                              \
1042
          "Execution step completed OK."                               \
1043
          "Test completed successfully."]                              \
1044
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1045
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "5" "100000" "4"
1046
 
1047
# Read half words, aligned on byte 1
1048
run_libsim "JTAG WRITE_COMMAND WB read half words, byte 1 aligned"     \
1049
    [list "Initalization succeeded."                                   \
1050
          "Execution step completed OK."                               \
1051
          "Resetting JTAG."                                            \
1052
          "Execution step completed OK."                               \
1053
          "Shifting instruction."                                      \
1054
          "  shifting in:  0x01"                                       \
1055
          "  shifted out:  0x01"                                       \
1056
          "  time taken:"                                              \
1057
          "Execution step completed OK."                               \
1058
          "Selecting module."                                          \
1059
          "  shifting in:  0x0000000000174841bc61"                     \
1060
          "  shifted out:  0x0164841bc60000000000"                     \
1061
          "  status:       0x0"                                        \
1062
          "  time taken:"                                              \
1063
          "Execution step completed OK."                               \
1064
          "Processing WRITE_COMMAND."                                  \
1065
          "  shifting in:  0x00000000004a68edd980010000100148"         \
1066
          "ERROR: JTAG WishBone 16-bit access must be 2-byte aligned." \
1067
          "  shifted out:  0x164841bc600000000000000000000000"         \
1068
          "  status:       0x0"                                        \
1069
          "  time taken:"                                              \
1070
          "Execution step completed OK."                               \
1071
          "Test completed successfully."]                              \
1072
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1073
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "5" "100001" "4"
1074
 
1075
# Read half words, aligned on byte 2
1076
run_libsim "JTAG WRITE_COMMAND WB read half words, byte 2 aligned"     \
1077
    [list "Initalization succeeded."                                   \
1078
          "Execution step completed OK."                               \
1079
          "Resetting JTAG."                                            \
1080
          "Execution step completed OK."                               \
1081
          "Shifting instruction."                                      \
1082
          "  shifting in:  0x01"                                       \
1083
          "  shifted out:  0x01"                                       \
1084
          "  time taken:"                                              \
1085
          "Execution step completed OK."                               \
1086
          "Selecting module."                                          \
1087
          "  shifting in:  0x0000000000174841bc61"                     \
1088
          "  shifted out:  0x0164841bc60000000000"                     \
1089
          "  status:       0x0"                                        \
1090
          "  time taken:"                                              \
1091
          "Execution step completed OK."                               \
1092
          "Processing WRITE_COMMAND."                                  \
1093
          "  shifting in:  0x00000000016937c15980008000100148"         \
1094
          "  shifted out:  0x164841bc600000000000000000000000"         \
1095
          "  status:       0x0"                                        \
1096
          "  time taken:"                                              \
1097
          "Execution step completed OK."                               \
1098
          "Test completed successfully."]                              \
1099
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1100
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "5" "100002" "4"
1101
 
1102
# Read half words, aligned on byte 3
1103
run_libsim "JTAG WRITE_COMMAND WB read half words, byte 3 aligned"     \
1104
    [list "Initalization succeeded."                                   \
1105
          "Execution step completed OK."                               \
1106
          "Resetting JTAG."                                            \
1107
          "Execution step completed OK."                               \
1108
          "Shifting instruction."                                      \
1109
          "  shifting in:  0x01"                                       \
1110
          "  shifted out:  0x01"                                       \
1111
          "  time taken:"                                              \
1112
          "Execution step completed OK."                               \
1113
          "Selecting module."                                          \
1114
          "  shifting in:  0x0000000000174841bc61"                     \
1115
          "  shifted out:  0x0164841bc60000000000"                     \
1116
          "  status:       0x0"                                        \
1117
          "  time taken:"                                              \
1118
          "Execution step completed OK."                               \
1119
          "Processing WRITE_COMMAND."                                  \
1120
          "  shifting in:  0x0000000000ab5df65980018000100148"         \
1121
          "ERROR: JTAG WishBone 16-bit access must be 2-byte aligned." \
1122
          "  shifted out:  0x164841bc600000000000000000000000"         \
1123
          "  status:       0x0"                                        \
1124
          "  time taken:"                                              \
1125
          "Execution step completed OK."                               \
1126
          "Test completed successfully."]                              \
1127
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1128
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "5" "100003" "4"
1129
 
1130
# Read words, aligned on byte 0
1131
run_libsim "JTAG WRITE_COMMAND WB read words, byte 0 aligned"          \
1132
    [list "Initalization succeeded."                                   \
1133
          "Execution step completed OK."                               \
1134
          "Resetting JTAG."                                            \
1135
          "Execution step completed OK."                               \
1136
          "Shifting instruction."                                      \
1137
          "  shifting in:  0x01"                                       \
1138
          "  shifted out:  0x01"                                       \
1139
          "  time taken:"                                              \
1140
          "Execution step completed OK."                               \
1141
          "Selecting module."                                          \
1142
          "  shifting in:  0x0000000000174841bc61"                     \
1143
          "  shifted out:  0x0164841bc60000000000"                     \
1144
          "  status:       0x0"                                        \
1145
          "  time taken:"                                              \
1146
          "Execution step completed OK."                               \
1147
          "Processing WRITE_COMMAND."                                  \
1148
          "  shifting in:  0x00000000001039e5cf800000001000c8"         \
1149
          "  shifted out:  0x164841bc600000000000000000000000"         \
1150
          "  status:       0x0"                                        \
1151
          "  time taken:"                                              \
1152
          "Execution step completed OK."                               \
1153
          "Test completed successfully."]                              \
1154
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1155
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "6" "100000" "4"
1156
 
1157
# Read words, aligned on byte 1
1158
run_libsim "JTAG WRITE_COMMAND WB read words, byte 1 aligned"          \
1159
    [list "Initalization succeeded."                                   \
1160
          "Execution step completed OK."                               \
1161
          "Resetting JTAG."                                            \
1162
          "Execution step completed OK."                               \
1163
          "Shifting instruction."                                      \
1164
          "  shifting in:  0x01"                                       \
1165
          "  shifted out:  0x01"                                       \
1166
          "  time taken:"                                              \
1167
          "Execution step completed OK."                               \
1168
          "Selecting module."                                          \
1169
          "  shifting in:  0x0000000000174841bc61"                     \
1170
          "  shifted out:  0x0164841bc60000000000"                     \
1171
          "  status:       0x0"                                        \
1172
          "  time taken:"                                              \
1173
          "Execution step completed OK."                               \
1174
          "Processing WRITE_COMMAND."                                  \
1175
          "  shifting in:  0x0000000001d253d2cf800100001000c8" \
1176
          "ERROR: JTAG WishBone 32-bit access must be 4-byte aligned." \
1177
          "  shifted out:  0x164841bc600000000000000000000000"         \
1178
          "  status:       0x0"                                        \
1179
          "  time taken:"                                              \
1180
          "Execution step completed OK."                               \
1181
          "Test completed successfully."]                              \
1182
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1183
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "6" "100001" "4"
1184
 
1185
# Read words, aligned on byte 2
1186
run_libsim "JTAG WRITE_COMMAND WB read words, byte 2 aligned"          \
1187
    [list "Initalization succeeded."                                   \
1188
          "Execution step completed OK."                               \
1189
          "Resetting JTAG."                                            \
1190
          "Execution step completed OK."                               \
1191
          "Shifting instruction."                                      \
1192
          "  shifting in:  0x01"                                       \
1193
          "  shifted out:  0x01"                                       \
1194
          "  time taken:"                                              \
1195
          "Execution step completed OK."                               \
1196
          "Selecting module."                                          \
1197
          "  shifting in:  0x0000000000174841bc61"                     \
1198
          "  shifted out:  0x0164841bc60000000000"                     \
1199
          "  status:       0x0"                                        \
1200
          "  time taken:"                                              \
1201
          "Execution step completed OK."                               \
1202
          "Processing WRITE_COMMAND."                                  \
1203
          "  shifting in:  0x0000000000f10cfe4f800080001000c8"         \
1204
          "ERROR: JTAG WishBone 32-bit access must be 4-byte aligned." \
1205
          "  shifted out:  0x164841bc600000000000000000000000"         \
1206
          "  status:       0x0"                                        \
1207
          "  time taken:"                                              \
1208
          "Execution step completed OK."                               \
1209
          "Test completed successfully."]                              \
1210
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1211
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "6" "100002" "4"
1212
 
1213
# Read words, aligned on byte 3
1214
run_libsim "JTAG WRITE_COMMAND WB read words, byte 3 aligned"          \
1215
    [list "Initalization succeeded."                                   \
1216
          "Execution step completed OK."                               \
1217
          "Resetting JTAG."                                            \
1218
          "Execution step completed OK."                               \
1219
          "Shifting instruction."                                      \
1220
          "  shifting in:  0x01"                                       \
1221
          "  shifted out:  0x01"                                       \
1222
          "  time taken:"                                              \
1223
          "Execution step completed OK."                               \
1224
          "Selecting module."                                          \
1225
          "  shifting in:  0x0000000000174841bc61"                     \
1226
          "  shifted out:  0x0164841bc60000000000"                     \
1227
          "  status:       0x0"                                        \
1228
          "  time taken:"                                              \
1229
          "Execution step completed OK."                               \
1230
          "Processing WRITE_COMMAND."                                  \
1231
          "  shifting in:  0x00000000013366c94f800180001000c8"         \
1232
          "ERROR: JTAG WishBone 32-bit access must be 4-byte aligned." \
1233
          "  shifted out:  0x164841bc600000000000000000000000"         \
1234
          "  status:       0x0"                                        \
1235
          "  time taken:"                                              \
1236
          "Execution step completed OK."                               \
1237
          "Test completed successfully."]                              \
1238
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1239
         "8" "SELECT_MODULE" "0" "WRITE_COMMAND" "6" "100003" "4"
1240
 
1241
# Tests of WRITE_COMMAND for CPU0. Check the different access types are
1242
# accepted/rejected as expected (2 and 6 are OK).
1243
 
1244
# WRITE_COMMAND to write bytes for CPU0 (access type 0). This should fail
1245
# with an error message.
1246 99 jeremybenn
run_libsim "JTAG WRITE_COMMAND CPU0 write bytes"               \
1247 98 jeremybenn
    [list "Initalization succeeded."                           \
1248
          "Execution step completed OK."                       \
1249
          "Resetting JTAG."                                    \
1250
          "Execution step completed OK."                       \
1251
          "Shifting instruction."                              \
1252
          "  shifting in:  0x01"                               \
1253
          "  shifted out:  0x01"                               \
1254
          "  time taken:"                                      \
1255
          "Execution step completed OK."                       \
1256
          "Selecting module."                                  \
1257
          "  shifting in:  0x00000000000aff51d871"             \
1258
          "  shifted out:  0x0164841bc60000000000"             \
1259
          "  status:       0x0"                                \
1260
          "  time taken:"                                      \
1261
          "Execution step completed OK."                       \
1262
          "Processing WRITE_COMMAND."                          \
1263
          "  shifting in:  0x00000000011b285d1780010028000008" \
1264 99 jeremybenn
          "ERROR: JTAG 8-bit access for SPR not supported."    \
1265 98 jeremybenn
          "  shifted out:  0x164841bc600000000000000000000000" \
1266
          "  status:       0x0"                                \
1267
          "  time taken:"                                      \
1268
          "Execution step completed OK."                       \
1269
          "Test completed successfully."]                      \
1270
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
1271
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "0" "2801" "4"
1272
 
1273
# WRITE_COMMAND to write half words for CPU0 (access type 1). This should fail
1274
# with an error message.
1275
run_libsim "JTAG WRITE_COMMAND CPU0 write half words"      \
1276
    [list "Initalization succeeded."                           \
1277
          "Execution step completed OK."                       \
1278
          "Resetting JTAG."                                    \
1279
          "Execution step completed OK."                       \
1280
          "Shifting instruction."                              \
1281
          "  shifting in:  0x01"                               \
1282
          "  shifted out:  0x01"                               \
1283
          "  time taken:"                                      \
1284
          "Execution step completed OK."                       \
1285
          "Selecting module."                                  \
1286
          "  shifting in:  0x00000000000aff51d871"             \
1287
          "  shifted out:  0x0164841bc60000000000"             \
1288
          "  status:       0x0"                                \
1289
          "  time taken:"                                      \
1290
          "Execution step completed OK."                       \
1291
          "Processing WRITE_COMMAND."                          \
1292
          "  shifting in:  0x00000000000b0588f380010028000108" \
1293 99 jeremybenn
          "ERROR: JTAG 16-bit access for SPR not supported."   \
1294 98 jeremybenn
          "  shifted out:  0x164841bc600000000000000000000000" \
1295
          "  status:       0x0"                                \
1296
          "  time taken:"                                      \
1297
          "Execution step completed OK."                       \
1298
          "Test completed successfully."]                      \
1299
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
1300
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "1" "2801" "4"
1301
 
1302
# WRITE_COMMAND to write words for CPU0 (access type 2).
1303
run_libsim "JTAG WRITE_COMMAND CPU0 write words"           \
1304
    [list "Initalization succeeded."                           \
1305
          "Execution step completed OK."                       \
1306
          "Resetting JTAG."                                    \
1307
          "Execution step completed OK."                       \
1308
          "Shifting instruction."                              \
1309
          "  shifting in:  0x01"                               \
1310
          "  shifted out:  0x01"                               \
1311
          "  time taken:"                                      \
1312
          "Execution step completed OK."                       \
1313
          "Selecting module."                                  \
1314
          "  shifting in:  0x00000000000aff51d871"             \
1315
          "  shifted out:  0x0164841bc60000000000"             \
1316
          "  status:       0x0"                                \
1317
          "  time taken:"                                      \
1318
          "Execution step completed OK."                       \
1319
          "Processing WRITE_COMMAND."                          \
1320
          "  shifting in:  0x0000000001933eb7e580010028000088" \
1321
          "  shifted out:  0x164841bc600000000000000000000000" \
1322
          "  status:       0x0"                                \
1323
          "  time taken:"                                      \
1324
          "Execution step completed OK."                       \
1325
          "Test completed successfully."]                      \
1326
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
1327
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "2" "2801" "4"
1328
 
1329
# WRITE_COMMAND to write access type 3. This should fail with an error
1330
# message.
1331 99 jeremybenn
run_libsim "JTAG WRITE_COMMAND CPU0 access type 3"       \
1332 98 jeremybenn
    [list "Initalization succeeded."                           \
1333
          "Execution step completed OK."                       \
1334
          "Resetting JTAG."                                    \
1335
          "Execution step completed OK."                       \
1336
          "Shifting instruction."                              \
1337
          "  shifting in:  0x01"                               \
1338
          "  shifted out:  0x01"                               \
1339
          "  time taken:"                                      \
1340
          "Execution step completed OK."                       \
1341
          "Selecting module."                                  \
1342
          "  shifting in:  0x00000000000aff51d871"             \
1343
          "  shifted out:  0x0164841bc60000000000"             \
1344
          "  status:       0x0"                                \
1345
          "  time taken:"                                      \
1346
          "Execution step completed OK."                       \
1347
          "Processing WRITE_COMMAND."                          \
1348
          "  shifting in:  0x00000000008313620180010028000188" \
1349 99 jeremybenn
          "ERROR: unknown JTAG SPR access type 3."             \
1350 98 jeremybenn
          "  shifted out:  0x164841bc600000000000000000000000" \
1351
          "  status:       0x0"                                \
1352
          "  time taken:"                                      \
1353
          "Execution step completed OK."                       \
1354
          "Test completed successfully."]                      \
1355
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
1356
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "3" "2801" "4"
1357
 
1358
# WRITE_COMMAND to read bytes for CPU0 (access type 4). This should fail
1359
# with an error message.
1360 99 jeremybenn
run_libsim "JTAG WRITE_COMMAND CPU0 read bytes"                \
1361 98 jeremybenn
    [list "Initalization succeeded."                           \
1362
          "Execution step completed OK."                       \
1363
          "Resetting JTAG."                                    \
1364
          "Execution step completed OK."                       \
1365
          "Shifting instruction."                              \
1366
          "  shifting in:  0x01"                               \
1367
          "  shifted out:  0x01"                               \
1368
          "  time taken:"                                      \
1369
          "Execution step completed OK."                       \
1370
          "Selecting module."                                  \
1371
          "  shifting in:  0x00000000000aff51d871"             \
1372
          "  shifted out:  0x0164841bc60000000000"             \
1373
          "  status:       0x0"                                \
1374
          "  time taken:"                                      \
1375
          "Execution step completed OK."                       \
1376
          "Processing WRITE_COMMAND."                          \
1377
          "  shifting in:  0x000000000084522e2f80010028000048" \
1378 99 jeremybenn
          "ERROR: JTAG 8-bit access for SPR not supported."    \
1379 98 jeremybenn
          "  shifted out:  0x164841bc600000000000000000000000" \
1380
          "  status:       0x0"                                \
1381
          "  time taken:"                                      \
1382
          "Execution step completed OK."                       \
1383
          "Test completed successfully."]                      \
1384
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1385
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "4" "2801" "4"
1386
 
1387
# WRITE_COMMAND to read half words for CPU0 (access type 5). This should fail
1388
# with an error message.
1389 99 jeremybenn
run_libsim "JTAG WRITE_COMMAND CPU0 read half words"           \
1390 98 jeremybenn
    [list "Initalization succeeded."                           \
1391
          "Execution step completed OK."                       \
1392
          "Resetting JTAG."                                    \
1393
          "Execution step completed OK."                       \
1394
          "Shifting instruction."                              \
1395
          "  shifting in:  0x01"                               \
1396
          "  shifted out:  0x01"                               \
1397
          "  time taken:"                                      \
1398
          "Execution step completed OK."                       \
1399
          "Selecting module."                                  \
1400
          "  shifting in:  0x00000000000aff51d871"             \
1401
          "  shifted out:  0x0164841bc60000000000"             \
1402
          "  status:       0x0"                                \
1403
          "  time taken:"                                      \
1404
          "Execution step completed OK."                       \
1405
          "Processing WRITE_COMMAND."                          \
1406
          "  shifting in:  0x0000000001947ffbcb80010028000148" \
1407 99 jeremybenn
          "ERROR: JTAG 16-bit access for SPR not supported."   \
1408 98 jeremybenn
          "  shifted out:  0x164841bc600000000000000000000000" \
1409
          "  status:       0x0"                                \
1410
          "  time taken:"                                      \
1411
          "Execution step completed OK."                       \
1412
          "Test completed successfully."]                      \
1413
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1414
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "5" "2801" "4"
1415
 
1416
# WRITE_COMMAND to read words for CPU0 (access type 6)
1417
run_libsim "JTAG WRITE_COMMAND CPU0 read words"            \
1418
    [list "Initalization succeeded."                           \
1419
          "Execution step completed OK."                       \
1420
          "Resetting JTAG."                                    \
1421
          "Execution step completed OK."                       \
1422
          "Shifting instruction."                              \
1423
          "  shifting in:  0x01"                               \
1424
          "  shifted out:  0x01"                               \
1425
          "  time taken:"                                      \
1426
          "Execution step completed OK."                       \
1427
          "Selecting module."                                  \
1428
          "  shifting in:  0x00000000000aff51d871"             \
1429
          "  shifted out:  0x0164841bc60000000000"             \
1430
          "  status:       0x0"                                \
1431
          "  time taken:"                                      \
1432
          "Execution step completed OK."                       \
1433
          "Processing WRITE_COMMAND."                          \
1434
          "  shifting in:  0x00000000000c44c4dd800100280000c8" \
1435
          "  shifted out:  0x164841bc600000000000000000000000" \
1436
          "  status:       0x0"                                \
1437
          "  time taken:"                                      \
1438
          "Execution step completed OK."                       \
1439
          "Test completed successfully."]                      \
1440
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1441
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "6" "2801" "4"
1442
 
1443
# WRITE_COMMAND to read access type 7. This should fail with an error message.
1444 99 jeremybenn
run_libsim "JTAG WRITE_COMMAND CPU0 access type 7"             \
1445 98 jeremybenn
    [list "Initalization succeeded."                           \
1446
          "Execution step completed OK."                       \
1447
          "Resetting JTAG."                                    \
1448
          "Execution step completed OK."                       \
1449
          "Shifting instruction."                              \
1450
          "  shifting in:  0x01"                               \
1451
          "  shifted out:  0x01"                               \
1452
          "  time taken:"                                      \
1453
          "Execution step completed OK."                       \
1454
          "Selecting module."                                  \
1455
          "  shifting in:  0x00000000000aff51d871"             \
1456
          "  shifted out:  0x0164841bc60000000000"             \
1457
          "  status:       0x0"                                \
1458
          "  time taken:"                                      \
1459
          "Execution step completed OK."                       \
1460
          "Processing WRITE_COMMAND."                          \
1461
          "  shifting in:  0x00000000011c691139800100280001c8" \
1462 99 jeremybenn
          "ERROR: unknown JTAG SPR access type 7."             \
1463 98 jeremybenn
          "  shifted out:  0x164841bc600000000000000000000000" \
1464
          "  status:       0x0"                                \
1465
          "  time taken:"                                      \
1466
          "Execution step completed OK."                       \
1467
          "Test completed successfully."]                      \
1468
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1469
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "7" "2801" "4"
1470
 
1471
# Tests of WRITE_COMMAND addresses for CPU0. Addresses up to 0xffff are
1472
# OK. Check different addresses are all accepted. For all of these we use the
1473
# simple loop and a word write. Test the boundaries (addresses 0, 0xffff and
1474
# 0x10000). Over-size addresses should be truncated with a warning. Remember
1475
# these are SPR addresses, which are effectively word addresses.
1476
 
1477
# WRITE_COMMAND for CPU0 to address 0
1478
run_libsim "JTAG WRITE_COMMAND CPU0 write address 0"  \
1479
    [list "Initalization succeeded."                           \
1480
          "Execution step completed OK."                       \
1481
          "Resetting JTAG."                                    \
1482
          "Execution step completed OK."                       \
1483
          "Shifting instruction."                              \
1484
          "  shifting in:  0x01"                               \
1485
          "  shifted out:  0x01"                               \
1486
          "  time taken:"                                      \
1487
          "Execution step completed OK."                       \
1488
          "Selecting module."                                  \
1489
          "  shifting in:  0x00000000000aff51d871"             \
1490
          "  shifted out:  0x0164841bc60000000000"             \
1491
          "  status:       0x0"                                \
1492
          "  time taken:"                                      \
1493
          "Execution step completed OK."                       \
1494
          "Processing WRITE_COMMAND."                          \
1495
          "  shifting in:  0x0000000001efa3017580000000000088" \
1496
          "  shifted out:  0x164841bc600000000000000000000000" \
1497
          "  status:       0x0"                                \
1498
          "  time taken:"                                      \
1499
          "Execution step completed OK."                       \
1500
          "Test completed successfully."]                      \
1501
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
1502
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "2" "0" "4"
1503
 
1504
# WRITE_COMMAND for CPU0 to address 0xffff
1505
run_libsim "JTAG WRITE_COMMAND CPU0 write address 0xffff"  \
1506
    [list "Initalization succeeded."                           \
1507
          "Execution step completed OK."                       \
1508
          "Resetting JTAG."                                    \
1509
          "Execution step completed OK."                       \
1510
          "Shifting instruction."                              \
1511
          "  shifting in:  0x01"                               \
1512
          "  shifted out:  0x01"                               \
1513
          "  time taken:"                                      \
1514
          "Execution step completed OK."                       \
1515
          "Selecting module."                                  \
1516
          "  shifting in:  0x00000000000aff51d871"             \
1517
          "  shifted out:  0x0164841bc60000000000"             \
1518
          "  status:       0x0"                                \
1519
          "  time taken:"                                      \
1520
          "Execution step completed OK."                       \
1521
          "Processing WRITE_COMMAND."                          \
1522
          "  shifting in:  0x00000000012e99654d8001fffe000088" \
1523
          "  shifted out:  0x164841bc600000000000000000000000" \
1524
          "  status:       0x0"                                \
1525
          "  time taken:"                                      \
1526
          "Execution step completed OK."                       \
1527
          "Test completed successfully."]                      \
1528
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
1529
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "2" "ffff" "4"
1530
 
1531
# WRITE_COMMAND for CPU0 to address 0x10000. Should be trucated witha
1532
# warning.
1533
run_libsim "JTAG WRITE_COMMAND CPU0 write address 0x10000"  \
1534
    [list "Initalization succeeded."                           \
1535
          "Execution step completed OK."                       \
1536
          "Resetting JTAG."                                    \
1537
          "Execution step completed OK."                       \
1538
          "Shifting instruction."                              \
1539
          "  shifting in:  0x01"                               \
1540
          "  shifted out:  0x01"                               \
1541
          "  time taken:"                                      \
1542
          "Execution step completed OK."                       \
1543
          "Selecting module."                                  \
1544
          "  shifting in:  0x00000000000aff51d871"             \
1545
          "  shifted out:  0x0164841bc60000000000"             \
1546
          "  status:       0x0"                                \
1547
          "  time taken:"                                      \
1548
          "Execution step completed OK."                       \
1549
          "Processing WRITE_COMMAND."                          \
1550
          "  shifting in:  0x00000000008c6e605180000001000088" \
1551
          "Warning: truncated JTAG SPR address 0x00010000."    \
1552
          "  shifted out:  0x164841bc600000000000000000000000" \
1553
          "  status:       0x0"                                \
1554
          "  time taken:"                                      \
1555
          "Execution step completed OK."                       \
1556
          "Test completed successfully."]                      \
1557
    "lib-jtag/lib-jtag-full" "" "loop/loop" "RESET" "INSTRUCTION" \
1558
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "2" "10000" "4"
1559
 
1560
# Tests of WRITE_COMMAND lengths for CPU0. Check only length 4 is
1561
# accepted. For all of these we use the simple loop and write. There is no
1562
# point in testing values outside the permitted range, since these are
1563
# rejected in the test code, rather than the target code. Test sizes 3, 4, 5
1564
# and 0x10000 bytes.
1565
 
1566
# Test of WRITE_COMMAND for CPU0 3 bytes. This should fail with an error
1567
# message.
1568
run_libsim "JTAG WRITE_COMMAND CPU0 read length 3"             \
1569
    [list "Initalization succeeded."                           \
1570
          "Execution step completed OK."                       \
1571
          "Resetting JTAG."                                    \
1572
          "Execution step completed OK."                       \
1573
          "Shifting instruction."                              \
1574
          "  shifting in:  0x01"                               \
1575
          "  shifted out:  0x01"                               \
1576
          "  time taken:"                                      \
1577
          "Execution step completed OK."                       \
1578
          "Selecting module."                                  \
1579
          "  shifting in:  0x00000000000aff51d871"             \
1580
          "  shifted out:  0x0164841bc60000000000"             \
1581
          "  status:       0x0"                                \
1582
          "  time taken:"                                      \
1583
          "Execution step completed OK."                       \
1584
          "Processing WRITE_COMMAND."                          \
1585
          "  shifting in:  0x0000000001d735c29c800100280000c8" \
1586
          "ERROR: JTAG SPR access 0x3 bytes not supported."    \
1587
          "  shifted out:  0x164841bc600000000000000000000000" \
1588
          "  status:       0x0"                                \
1589
          "  time taken:"                                      \
1590
          "Execution step completed OK."                       \
1591
          "Test completed successfully."]                      \
1592
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1593
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "6" "2801" "3"
1594
 
1595
# Test of WRITE_COMMAND for CPU0 4 bytes.
1596
run_libsim "JTAG WRITE_COMMAND CPU0 read length 4"             \
1597
    [list "Initalization succeeded."                           \
1598
          "Execution step completed OK."                       \
1599
          "Resetting JTAG."                                    \
1600
          "Execution step completed OK."                       \
1601
          "Shifting instruction."                              \
1602
          "  shifting in:  0x01"                               \
1603
          "  shifted out:  0x01"                               \
1604
          "  time taken:"                                      \
1605
          "Execution step completed OK."                       \
1606
          "Selecting module."                                  \
1607
          "  shifting in:  0x00000000000aff51d871"             \
1608
          "  shifted out:  0x0164841bc60000000000"             \
1609
          "  status:       0x0"                                \
1610
          "  time taken:"                                      \
1611
          "Execution step completed OK."                       \
1612
          "Processing WRITE_COMMAND."                          \
1613
          "  shifting in:  0x00000000000c44c4dd800100280000c8" \
1614
          "  shifted out:  0x164841bc600000000000000000000000" \
1615
          "  status:       0x0"                                \
1616
          "  time taken:"                                      \
1617
          "Execution step completed OK."                       \
1618
          "Test completed successfully."]                      \
1619
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1620
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "6" "2801" "4"
1621
 
1622
# Test of WRITE_COMMAND for CPU0 5 bytes. This should fail with an error
1623
# message.
1624
run_libsim "JTAG WRITE_COMMAND CPU0 read length 5"             \
1625
    [list "Initalization succeeded."                           \
1626
          "Execution step completed OK."                       \
1627
          "Resetting JTAG."                                    \
1628
          "Execution step completed OK."                       \
1629
          "Shifting instruction."                              \
1630
          "  shifting in:  0x01"                               \
1631
          "  shifted out:  0x01"                               \
1632
          "  time taken:"                                      \
1633
          "Execution step completed OK."                       \
1634
          "Selecting module."                                  \
1635
          "  shifting in:  0x00000000000aff51d871"             \
1636
          "  shifted out:  0x0164841bc60000000000"             \
1637
          "  status:       0x0"                                \
1638
          "  time taken:"                                      \
1639
          "Execution step completed OK."                       \
1640
          "Processing WRITE_COMMAND."                          \
1641
          "  shifting in:  0x00000000014c51002c400100280000c8" \
1642
          "ERROR: JTAG SPR access 0x5 bytes not supported."    \
1643
          "  shifted out:  0x164841bc600000000000000000000000" \
1644
          "  status:       0x0"                                \
1645
          "  time taken:"                                      \
1646
          "Execution step completed OK."                       \
1647
          "Test completed successfully."]                      \
1648
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1649
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "6" "2801" "5"
1650
 
1651
# Test of WRITE_COMMAND for CPU0 0x10000 bytes. This should fail with an error
1652
# message.
1653
run_libsim "JTAG WRITE_COMMAND CPU0 read length 0x10000"        \
1654
    [list "Initalization succeeded."                            \
1655
          "Execution step completed OK."                        \
1656
          "Resetting JTAG."                                     \
1657
          "Execution step completed OK."                        \
1658
          "Shifting instruction."                               \
1659
          "  shifting in:  0x01"                                \
1660
          "  shifted out:  0x01"                                \
1661
          "  time taken:"                                       \
1662
          "Execution step completed OK."                        \
1663
          "Selecting module."                                   \
1664
          "  shifting in:  0x00000000000aff51d871"              \
1665
          "  shifted out:  0x0164841bc60000000000"              \
1666
          "  status:       0x0"                                 \
1667
          "  time taken:"                                       \
1668
          "Execution step completed OK."                        \
1669
          "Processing WRITE_COMMAND."                           \
1670
          "  shifting in:  0x000000000046c16443ffff00280000c8"  \
1671
          "ERROR: JTAG SPR access 0x10000 bytes not supported." \
1672
          "  shifted out:  0x164841bc600000000000000000000000"  \
1673
          "  status:       0x0"                                 \
1674
          "  time taken:"                                       \
1675
          "Execution step completed OK."                        \
1676
          "Test completed successfully."]                       \
1677
    "lib-jtag/lib-jtag-full" "" "loop/loop-init" "RESET" "INSTRUCTION" \
1678
         "8" "SELECT_MODULE" "1" "WRITE_COMMAND" "6" "2801" "10000"

powered by: WebSVN 2.1.0

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