# jtag-basic.exp. Basic tests of the library JTAG interface functions.
|
# jtag-basic.exp. Basic tests of the library JTAG interface functions.
|
|
|
# Copyright (C) 2010 Embecosm Limited
|
# Copyright (C) 2010 Embecosm Limited
|
|
|
# Contributor Jeremy Bennett
|
# Contributor Jeremy Bennett
|
|
|
# This file is part of OpenRISC 1000 Architectural Simulator.
|
# This file is part of OpenRISC 1000 Architectural Simulator.
|
|
|
# This program is free software; you can redistribute it and/or modify it
|
# This program is free software; you can redistribute it and/or modify it
|
# under the terms of the GNU General Public License as published by the Free
|
# under the terms of the GNU General Public License as published by the Free
|
# Software Foundation; either version 3 of the License, or (at your option)
|
# Software Foundation; either version 3 of the License, or (at your option)
|
# any later version.
|
# any later version.
|
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
# more details.
|
# more details.
|
|
|
# You should have received a copy of the GNU General Public License along
|
# You should have received a copy of the GNU General Public License along
|
# with this program. If not, see . */
|
# with this program. If not, see . */
|
|
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
# This code is commented throughout for use with Doxygen.
|
# This code is commented throughout for use with Doxygen.
|
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# These are the tests based on feeding in plain instruction or data registers
|
# These are the tests based on feeding in plain instruction or data registers
|
# to the JTAG interface.
|
# to the JTAG interface.
|
|
|
# Just check if we can reset
|
# Just check if we can reset
|
run_libsim "lib-jtag reset" \
|
run_libsim "lib-jtag reset" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R"
|
|
|
# Check instruction loading, 4 bits, MS bit shifted from the bottom.
|
# Check instruction loading, 4 bits, MS bit shifted from the bottom.
|
run_libsim "lib-jtag IR 0000" \
|
run_libsim "lib-jtag IR 0000" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 00" \
|
" shifting in: 00" \
|
"Warning: JTAG EXTEST shifted" \
|
"Warning: JTAG EXTEST shifted" \
|
" shifted out: 00" \
|
" shifted out: 00" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "0"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "0"
|
|
|
run_libsim "lib-jtag IR 0001" \
|
run_libsim "lib-jtag IR 0001" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 08" \
|
" shifting in: 08" \
|
"Warning: JTAG SAMPLE/PRELOAD shifted" \
|
"Warning: JTAG SAMPLE/PRELOAD shifted" \
|
" shifted out: 08" \
|
" shifted out: 08" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "8"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "8"
|
|
|
run_libsim "lib-jtag IR 0010" \
|
run_libsim "lib-jtag IR 0010" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 04" \
|
" shifting in: 04" \
|
"Warning: JTAG IDCODE shifted" \
|
"Warning: JTAG IDCODE shifted" \
|
" shifted out: 04" \
|
" shifted out: 04" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "4"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "4"
|
|
|
run_libsim "lib-jtag instr reg 0011" \
|
run_libsim "lib-jtag instr reg 0011" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 0c" \
|
" shifting in: 0c" \
|
"ERROR: Unknown JTAG instruction 0x3 shifted" \
|
"ERROR: Unknown JTAG instruction 0x3 shifted" \
|
" shifted out: 0c" \
|
" shifted out: 0c" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "c"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "c"
|
|
|
run_libsim "lib-jtag instr reg 0100" \
|
run_libsim "lib-jtag instr reg 0100" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 02" \
|
" shifting in: 02" \
|
"ERROR: Unknown JTAG instruction 0x4 shifted" \
|
"ERROR: Unknown JTAG instruction 0x4 shifted" \
|
" shifted out: 02" \
|
" shifted out: 02" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "2"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "2"
|
|
|
run_libsim "lib-jtag instr reg 0101" \
|
run_libsim "lib-jtag instr reg 0101" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 0a" \
|
" shifting in: 0a" \
|
"ERROR: Unknown JTAG instruction 0x5 shifted" \
|
"ERROR: Unknown JTAG instruction 0x5 shifted" \
|
" shifted out: 0a" \
|
" shifted out: 0a" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "a"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "a"
|
|
|
run_libsim "lib-jtag instr reg 0110" \
|
run_libsim "lib-jtag instr reg 0110" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 06" \
|
" shifting in: 06" \
|
"ERROR: Unknown JTAG instruction 0x6 shifted" \
|
"ERROR: Unknown JTAG instruction 0x6 shifted" \
|
" shifted out: 06" \
|
" shifted out: 06" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "6"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "6"
|
|
|
run_libsim "lib-jtag instr reg 0111" \
|
run_libsim "lib-jtag instr reg 0111" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 0e" \
|
" shifting in: 0e" \
|
"ERROR: Unknown JTAG instruction 0x7 shifted" \
|
"ERROR: Unknown JTAG instruction 0x7 shifted" \
|
" shifted out: 0e" \
|
" shifted out: 0e" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "e"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "e"
|
|
|
run_libsim "lib-jtag instr reg 1000" \
|
run_libsim "lib-jtag instr reg 1000" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 01" \
|
" shifting in: 01" \
|
" shifted out: 01" \
|
" shifted out: 01" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "1"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "1"
|
|
|
run_libsim "lib-jtag IR 1001" \
|
run_libsim "lib-jtag IR 1001" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 09" \
|
" shifting in: 09" \
|
"Warning: JTAG MBIST shifted" \
|
"Warning: JTAG MBIST shifted" \
|
" shifted out: 09" \
|
" shifted out: 09" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "9"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "9"
|
|
|
run_libsim "lib-jtag instr reg 1010" \
|
run_libsim "lib-jtag instr reg 1010" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 05" \
|
" shifting in: 05" \
|
"ERROR: Unknown JTAG instruction 0xa shifted" \
|
"ERROR: Unknown JTAG instruction 0xa shifted" \
|
" shifted out: 05" \
|
" shifted out: 05" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "5"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "5"
|
|
|
run_libsim "lib-jtag instr reg 1011" \
|
run_libsim "lib-jtag instr reg 1011" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 0d" \
|
" shifting in: 0d" \
|
"ERROR: Unknown JTAG instruction 0xb shifted" \
|
"ERROR: Unknown JTAG instruction 0xb shifted" \
|
" shifted out: 0d" \
|
" shifted out: 0d" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "d"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "d"
|
|
|
run_libsim "lib-jtag instr reg 1100" \
|
run_libsim "lib-jtag instr reg 1100" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 03" \
|
" shifting in: 03" \
|
"ERROR: Unknown JTAG instruction 0xc shifted" \
|
"ERROR: Unknown JTAG instruction 0xc shifted" \
|
" shifted out: 03" \
|
" shifted out: 03" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "3"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "3"
|
|
|
run_libsim "lib-jtag instr reg 1101" \
|
run_libsim "lib-jtag instr reg 1101" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 0b" \
|
" shifting in: 0b" \
|
"ERROR: Unknown JTAG instruction 0xd shifted" \
|
"ERROR: Unknown JTAG instruction 0xd shifted" \
|
" shifted out: 0b" \
|
" shifted out: 0b" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "b"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "b"
|
|
|
run_libsim "lib-jtag instr reg 1110" \
|
run_libsim "lib-jtag instr reg 1110" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 07" \
|
" shifting in: 07" \
|
"ERROR: Unknown JTAG instruction 0xe shifted" \
|
"ERROR: Unknown JTAG instruction 0xe shifted" \
|
" shifted out: 07" \
|
" shifted out: 07" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "7"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "7"
|
|
|
run_libsim "lib-jtag IR 1111" \
|
run_libsim "lib-jtag IR 1111" \
|
[list "Initalization succeeded." \
|
[list "Initalization succeeded." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Resetting JTAG." \
|
"Resetting JTAG." \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Shifting instruction register." \
|
"Shifting instruction register." \
|
" shifting in: 0f" \
|
" shifting in: 0f" \
|
"Warning: JTAG BYPASS shifted" \
|
"Warning: JTAG BYPASS shifted" \
|
" shifted out: 0f" \
|
" shifted out: 0f" \
|
" time taken " \
|
" time taken " \
|
"Execution step completed OK." \
|
"Execution step completed OK." \
|
"Test completed successfully."] \
|
"Test completed successfully."] \
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "f"
|
"lib-jtag/lib-jtag" "" "loop/loop" "R" "I" "4" "f"
|
|
|