#
# $Id$
#
# JTAG declarations for TNETV1061
# Copyright (C) 2009 aSmig (sf.net)
#
# 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 Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
#
# Documentation:
# [1] MIPS Technologies, "MIPS32 4KETM Processor Core Family
#     Software User’s Manual", January 2004, Document Number:
#     MD00103
# [2] MIPS Technologies, "MIPS® EJTAG Specification", November
#     2008, Document Number: MD00047
#

# see [1] 9.3.3.2 - 9.3.3.7
# see also discovery output
register	BSR		1
register	BR		1
register	DIR		32
register	EJIMPCODE	32
register	EJADDRESS	32
register	EJDATA		32
register	EJCONTROL	32
register	EJALL		96
register	EJFASTDATA	33

# see [1] 9.3.3 Test Access Port (TAP) Instructions
# see also discovery output
instruction length 5

# see [1] Table 9-20 Implemented EJTAG Instructions
# see also [2] Table 7.1 TAP Instruction Overview
instruction BYPASS		11111	BR
instruction SAMPLE/PRELOAD	00010	BSR	# not in datasheets
instruction IDCODE		00001	DIR
instruction EJTAG_IMPCODE	00011	EJIMPCODE
instruction EJTAG_ADDRESS	01000	EJADDRESS
instruction EJTAG_DATA		01001	EJDATA
instruction EJTAG_CONTROL	01010	EJCONTROL
instruction EJTAG_ALL		01011	EJALL
instruction EJTAGBOOT		01100	BR
instruction NORMALBOOT		01101	BR
instruction EJTAG_FASTDATA	01110	EJFASTDATA
instruction TCBCONTROLA		10000	BR
instruction TCBCONTROLB		10001	BR
instruction TCBDATA		10010	BR

initbus ejtag
endian little
