1 |
97 |
jeremybenn |
# jtag-basic.exp. Basic tests of the library JTAG interface functions.
|
2 |
|
|
|
3 |
|
|
# Copyright (C) 2010 Embecosm Limited
|
4 |
|
|
|
5 |
|
|
# Contributor Jeremy Bennett
|
6 |
|
|
|
7 |
|
|
# This file is part of OpenRISC 1000 Architectural Simulator.
|
8 |
|
|
|
9 |
|
|
# This program is free software; you can redistribute it and/or modify it
|
10 |
|
|
# under the terms of the GNU General Public License as published by the Free
|
11 |
|
|
# Software Foundation; either version 3 of the License, or (at your option)
|
12 |
|
|
# any later version.
|
13 |
|
|
|
14 |
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
15 |
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
16 |
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
17 |
|
|
# more details.
|
18 |
|
|
|
19 |
|
|
# You should have received a copy of the GNU General Public License along
|
20 |
|
|
# with this program. If not, see . */
|
21 |
|
|
|
22 |
|
|
# -----------------------------------------------------------------------------
|
23 |
|
|
# This code is commented throughout for use with Doxygen.
|
24 |
|
|
# -----------------------------------------------------------------------------
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
# These are the tests based on feeding in plain instruction or data registers
|
28 |
|
|
# to the JTAG interface.
|
29 |
|
|
|
30 |
|
|
# Just check if we can reset
|
31 |
|
|
run_libsim "lib-jtag reset" \
|
32 |
|
|
[list "Initalization succeeded." \
|
33 |
|
|
"Execution step completed OK." \
|
34 |
|
|
"Resetting JTAG." \
|
35 |
|
|
"Execution step completed OK." \
|
36 |
|
|
"Test completed successfully."] \
|
37 |
|
|
"lib-jtag/lib-jtag" "" "loop/loop" "R"
|
38 |
|
|
|
39 |
|
|
# Check instruction loading, 4 bits, MS bit shifted from the bottom.
|
40 |
|
|
run_libsim "lib-jtag IR 0000" \
|
41 |
|
|
[list "Initalization succeeded." \
|
42 |
|
|
"Execution step completed OK." \
|
43 |
|
|
"Resetting JTAG." \
|
44 |
|
|
"Execution step completed OK." \
|
45 |
|
|
"Shifting instruction register." \
|
46 |
|
|
" shifting in: 00" \
|
47 |
|
|
"Warning: JTAG EXTEST shifted" \
|
48 |
|
|
" shifted out: 00" \
|
49 |
|
|
" time taken " \
|
50 |
|
|
"Execution step completed OK." \
|
51 |
|
|
"Test completed successfully."] \
|
52 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "0"
|
53 |
97 |
jeremybenn |
|
54 |
|
|
run_libsim "lib-jtag IR 0001" \
|
55 |
|
|
[list "Initalization succeeded." \
|
56 |
|
|
"Execution step completed OK." \
|
57 |
|
|
"Resetting JTAG." \
|
58 |
|
|
"Execution step completed OK." \
|
59 |
|
|
"Shifting instruction register." \
|
60 |
|
|
" shifting in: 08" \
|
61 |
|
|
"Warning: JTAG SAMPLE/PRELOAD shifted" \
|
62 |
|
|
" shifted out: 08" \
|
63 |
|
|
" time taken " \
|
64 |
|
|
"Execution step completed OK." \
|
65 |
|
|
"Test completed successfully."] \
|
66 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "8"
|
67 |
97 |
jeremybenn |
|
68 |
|
|
run_libsim "lib-jtag IR 0010" \
|
69 |
|
|
[list "Initalization succeeded." \
|
70 |
|
|
"Execution step completed OK." \
|
71 |
|
|
"Resetting JTAG." \
|
72 |
|
|
"Execution step completed OK." \
|
73 |
|
|
"Shifting instruction register." \
|
74 |
|
|
" shifting in: 04" \
|
75 |
|
|
"Warning: JTAG IDCODE shifted" \
|
76 |
|
|
" shifted out: 04" \
|
77 |
|
|
" time taken " \
|
78 |
|
|
"Execution step completed OK." \
|
79 |
|
|
"Test completed successfully."] \
|
80 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "4"
|
81 |
97 |
jeremybenn |
|
82 |
|
|
run_libsim "lib-jtag instr reg 0011" \
|
83 |
|
|
[list "Initalization succeeded." \
|
84 |
|
|
"Execution step completed OK." \
|
85 |
|
|
"Resetting JTAG." \
|
86 |
|
|
"Execution step completed OK." \
|
87 |
|
|
"Shifting instruction register." \
|
88 |
|
|
" shifting in: 0c" \
|
89 |
98 |
jeremybenn |
"ERROR: Unknown JTAG instruction 0x3 shifted" \
|
90 |
97 |
jeremybenn |
" shifted out: 0c" \
|
91 |
|
|
" time taken " \
|
92 |
|
|
"Execution step completed OK." \
|
93 |
|
|
"Test completed successfully."] \
|
94 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "c"
|
95 |
97 |
jeremybenn |
|
96 |
|
|
run_libsim "lib-jtag instr reg 0100" \
|
97 |
|
|
[list "Initalization succeeded." \
|
98 |
|
|
"Execution step completed OK." \
|
99 |
|
|
"Resetting JTAG." \
|
100 |
|
|
"Execution step completed OK." \
|
101 |
|
|
"Shifting instruction register." \
|
102 |
|
|
" shifting in: 02" \
|
103 |
98 |
jeremybenn |
"ERROR: Unknown JTAG instruction 0x4 shifted" \
|
104 |
97 |
jeremybenn |
" shifted out: 02" \
|
105 |
|
|
" time taken " \
|
106 |
|
|
"Execution step completed OK." \
|
107 |
|
|
"Test completed successfully."] \
|
108 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "2"
|
109 |
97 |
jeremybenn |
|
110 |
|
|
run_libsim "lib-jtag instr reg 0101" \
|
111 |
|
|
[list "Initalization succeeded." \
|
112 |
|
|
"Execution step completed OK." \
|
113 |
|
|
"Resetting JTAG." \
|
114 |
|
|
"Execution step completed OK." \
|
115 |
|
|
"Shifting instruction register." \
|
116 |
|
|
" shifting in: 0a" \
|
117 |
98 |
jeremybenn |
"ERROR: Unknown JTAG instruction 0x5 shifted" \
|
118 |
97 |
jeremybenn |
" shifted out: 0a" \
|
119 |
|
|
" time taken " \
|
120 |
|
|
"Execution step completed OK." \
|
121 |
|
|
"Test completed successfully."] \
|
122 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "a"
|
123 |
97 |
jeremybenn |
|
124 |
|
|
run_libsim "lib-jtag instr reg 0110" \
|
125 |
|
|
[list "Initalization succeeded." \
|
126 |
|
|
"Execution step completed OK." \
|
127 |
|
|
"Resetting JTAG." \
|
128 |
|
|
"Execution step completed OK." \
|
129 |
|
|
"Shifting instruction register." \
|
130 |
|
|
" shifting in: 06" \
|
131 |
98 |
jeremybenn |
"ERROR: Unknown JTAG instruction 0x6 shifted" \
|
132 |
97 |
jeremybenn |
" shifted out: 06" \
|
133 |
|
|
" time taken " \
|
134 |
|
|
"Execution step completed OK." \
|
135 |
|
|
"Test completed successfully."] \
|
136 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "6"
|
137 |
97 |
jeremybenn |
|
138 |
|
|
run_libsim "lib-jtag instr reg 0111" \
|
139 |
|
|
[list "Initalization succeeded." \
|
140 |
|
|
"Execution step completed OK." \
|
141 |
|
|
"Resetting JTAG." \
|
142 |
|
|
"Execution step completed OK." \
|
143 |
|
|
"Shifting instruction register." \
|
144 |
|
|
" shifting in: 0e" \
|
145 |
98 |
jeremybenn |
"ERROR: Unknown JTAG instruction 0x7 shifted" \
|
146 |
97 |
jeremybenn |
" shifted out: 0e" \
|
147 |
|
|
" time taken " \
|
148 |
|
|
"Execution step completed OK." \
|
149 |
|
|
"Test completed successfully."] \
|
150 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "e"
|
151 |
97 |
jeremybenn |
|
152 |
|
|
run_libsim "lib-jtag instr reg 1000" \
|
153 |
|
|
[list "Initalization succeeded." \
|
154 |
|
|
"Execution step completed OK." \
|
155 |
|
|
"Resetting JTAG." \
|
156 |
|
|
"Execution step completed OK." \
|
157 |
|
|
"Shifting instruction register." \
|
158 |
|
|
" shifting in: 01" \
|
159 |
|
|
" shifted out: 01" \
|
160 |
|
|
" time taken " \
|
161 |
|
|
"Execution step completed OK." \
|
162 |
|
|
"Test completed successfully."] \
|
163 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "1"
|
164 |
97 |
jeremybenn |
|
165 |
|
|
run_libsim "lib-jtag IR 1001" \
|
166 |
|
|
[list "Initalization succeeded." \
|
167 |
|
|
"Execution step completed OK." \
|
168 |
|
|
"Resetting JTAG." \
|
169 |
|
|
"Execution step completed OK." \
|
170 |
|
|
"Shifting instruction register." \
|
171 |
|
|
" shifting in: 09" \
|
172 |
|
|
"Warning: JTAG MBIST shifted" \
|
173 |
|
|
" shifted out: 09" \
|
174 |
|
|
" time taken " \
|
175 |
|
|
"Execution step completed OK." \
|
176 |
|
|
"Test completed successfully."] \
|
177 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "9"
|
178 |
97 |
jeremybenn |
|
179 |
|
|
run_libsim "lib-jtag instr reg 1010" \
|
180 |
|
|
[list "Initalization succeeded." \
|
181 |
|
|
"Execution step completed OK." \
|
182 |
|
|
"Resetting JTAG." \
|
183 |
|
|
"Execution step completed OK." \
|
184 |
|
|
"Shifting instruction register." \
|
185 |
|
|
" shifting in: 05" \
|
186 |
98 |
jeremybenn |
"ERROR: Unknown JTAG instruction 0xa shifted" \
|
187 |
97 |
jeremybenn |
" shifted out: 05" \
|
188 |
|
|
" time taken " \
|
189 |
|
|
"Execution step completed OK." \
|
190 |
|
|
"Test completed successfully."] \
|
191 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "5"
|
192 |
97 |
jeremybenn |
|
193 |
|
|
run_libsim "lib-jtag instr reg 1011" \
|
194 |
|
|
[list "Initalization succeeded." \
|
195 |
|
|
"Execution step completed OK." \
|
196 |
|
|
"Resetting JTAG." \
|
197 |
|
|
"Execution step completed OK." \
|
198 |
|
|
"Shifting instruction register." \
|
199 |
|
|
" shifting in: 0d" \
|
200 |
98 |
jeremybenn |
"ERROR: Unknown JTAG instruction 0xb shifted" \
|
201 |
97 |
jeremybenn |
" shifted out: 0d" \
|
202 |
|
|
" time taken " \
|
203 |
|
|
"Execution step completed OK." \
|
204 |
|
|
"Test completed successfully."] \
|
205 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "d"
|
206 |
97 |
jeremybenn |
|
207 |
|
|
run_libsim "lib-jtag instr reg 1100" \
|
208 |
|
|
[list "Initalization succeeded." \
|
209 |
|
|
"Execution step completed OK." \
|
210 |
|
|
"Resetting JTAG." \
|
211 |
|
|
"Execution step completed OK." \
|
212 |
|
|
"Shifting instruction register." \
|
213 |
|
|
" shifting in: 03" \
|
214 |
98 |
jeremybenn |
"ERROR: Unknown JTAG instruction 0xc shifted" \
|
215 |
97 |
jeremybenn |
" shifted out: 03" \
|
216 |
|
|
" time taken " \
|
217 |
|
|
"Execution step completed OK." \
|
218 |
|
|
"Test completed successfully."] \
|
219 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "3"
|
220 |
97 |
jeremybenn |
|
221 |
|
|
run_libsim "lib-jtag instr reg 1101" \
|
222 |
|
|
[list "Initalization succeeded." \
|
223 |
|
|
"Execution step completed OK." \
|
224 |
|
|
"Resetting JTAG." \
|
225 |
|
|
"Execution step completed OK." \
|
226 |
|
|
"Shifting instruction register." \
|
227 |
|
|
" shifting in: 0b" \
|
228 |
98 |
jeremybenn |
"ERROR: Unknown JTAG instruction 0xd shifted" \
|
229 |
97 |
jeremybenn |
" shifted out: 0b" \
|
230 |
|
|
" time taken " \
|
231 |
|
|
"Execution step completed OK." \
|
232 |
|
|
"Test completed successfully."] \
|
233 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "b"
|
234 |
97 |
jeremybenn |
|
235 |
|
|
run_libsim "lib-jtag instr reg 1110" \
|
236 |
|
|
[list "Initalization succeeded." \
|
237 |
|
|
"Execution step completed OK." \
|
238 |
|
|
"Resetting JTAG." \
|
239 |
|
|
"Execution step completed OK." \
|
240 |
|
|
"Shifting instruction register." \
|
241 |
|
|
" shifting in: 07" \
|
242 |
98 |
jeremybenn |
"ERROR: Unknown JTAG instruction 0xe shifted" \
|
243 |
97 |
jeremybenn |
" shifted out: 07" \
|
244 |
|
|
" time taken " \
|
245 |
|
|
"Execution step completed OK." \
|
246 |
|
|
"Test completed successfully."] \
|
247 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "7"
|
248 |
97 |
jeremybenn |
|
249 |
|
|
run_libsim "lib-jtag IR 1111" \
|
250 |
|
|
[list "Initalization succeeded." \
|
251 |
|
|
"Execution step completed OK." \
|
252 |
|
|
"Resetting JTAG." \
|
253 |
|
|
"Execution step completed OK." \
|
254 |
|
|
"Shifting instruction register." \
|
255 |
|
|
" shifting in: 0f" \
|
256 |
|
|
"Warning: JTAG BYPASS shifted" \
|
257 |
|
|
" shifted out: 0f" \
|
258 |
|
|
" time taken " \
|
259 |
|
|
"Execution step completed OK." \
|
260 |
|
|
"Test completed successfully."] \
|
261 |
98 |
jeremybenn |
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "f"
|