什么是JTAG

skeyy Post at 2007/6/22 22:17:00
JTAG (Joint Test Action Group)是1985年制定的检测PCB和IC芯片的一个标准,1990年被修改后成为IEEE的一个标准,即IEEE1149.1-1990。通过这个标准,可对具有JTAG接口的芯片的硬件电路进行边界扫描和故障检测。具有JTAG接口的芯片,相关JTAG引脚的定义为:TCK为测试时钟输入;TDI为测试数据输入,数据通过TDI引脚输入JTAG接口;TDO为测试数据输出,数据通过TDO引脚从JTAG接口输出;TMS为测试模式选择,TMS用来设置JTAG接口处于某种特定的测试模式;TRST为测试复位,输入引脚,低电平有效。

什么叫JTAG?

JTAG,它是Joint Test Action Group缩写,是IEEE的标准规范,ARM7TDMI内部提供了3个JTAG型的扫描链,可以进行调试和配置嵌入式的ICE-RT逻辑。
JTAG仿真器也称为JTAG调试器,是通过ARM芯片上的JTAG边界扫描口进行调试的设备。JTAG仿真器比较便宜,连接比较方便。它可以通过现有的JTAG边界扫描与ARM CPU核进行通信,属于完全非插入式调试。它无需目标存储器,不占用目标系统的任何端口。

JTAG Interface


JTAG Bus Description
IEEE Std 1149.1-1990 JTAG (Joint Test Action Group); Test Access Port and Boundary-Scan Architecture. This is a serial bus with four signals: Test Clock (TCK), Test Mode Select (TMS), Test Data Input (TDI), and Test Data Output (TDO). The bus is used as a test bus for the 'Boundary-Scan' of ICs, as in Design-For-Testability (DFT). To use JTAG, during the design, you most select JTAG compatible devices. ICs supporting JTAG will have the four additional pins listed above. Devices reside on the bus in a daisy chain, with TDO of one device feeding TDI of the next device. In addition to having the pins listed above each device most have a Boundary-Scan Register. The Boundary-Scan Register may be used to test the interconnection between ICs [Chip-to-Chip] or test with in the IC. Boundary-scan tests can be used to check continuity between devices. Continuity checks on PWB nets may be performed by sending out a know pattern and receiving that same pattern at the input to another IC(s). Not receiving the test signal or pattern would indicate a broken PWB trace, a failed IC, or cold solder joint.

TCK: [Test Clock] has noting to do with the board or system clock. The Test Clock is used to load the test mode data from the TMS pin, and the test data on the TDI pin [on the rising edge]. On the falling edge test clock outputs the test data on the TDO pin.

TMS: [Test Mode Select Input] controls the operation of the test logic, by receiving the incoming data]. The value at the input on the rising edge of the clock controls the movement through the states of the TAP controller. The TMS line has an internal pull-up, so the input is high with no input.

TDI: [Test Data Input] receives serial input data which is either feed to the test data registers or instruction register, but depends on the state of the TAP controller. The TDI line has an internal pull-up, so the input is high with no input.

TDO: [Test Data Output] outputs serial data which comes from either the test data registers or instruction register, but depends on the state of the TAP controller. Data applies to the TDI pin will appear at the TDO pin but may be shifted of a number of clock cycles, depending on the length of the internal register. The TDO pin is high-Impedance.

TRST: [Test Rest] will asynchronously reset the JTAG test logic. The logic is reset {with TRST) regardless of the state of TMS or TCLK.

Note. BSDL [Boundary Scan Description Language] is a subset of the VHDL standard.
Any manufacturer of a JTAG compliant device must provide a BSDL file for that device. The BSDL file contains information on the function of each of the pins on the device - which are used as I/Os, power or ground. BSDL files describe the Boundary Scan architecture of a JTAG-compliant device, and are written in VHDL. The BSDL file includes:
... 1. Entity Declaration: The entity declaration is a VHDL construct that is used to identify the name of the device that is described by the BSDL file.
... 2. Generic Parameter: The Generic parameter specifies which package is described by the BSDL file.
... 3. Logical Port Description: lists all of the pads on a device, and states whether that pin is an input(in bit;), output(out bit;), bidirectional (inout bit;) or unavailable for boundary scan (linkage bit;).
... 4. Package Pin Mapping: The Package Pin Mapping shows how the pads on the device die are wired to the pins on the device package.
... 5. Use statements: The use statement calls VHDL packages that contain attributes, types, constants, etc. that are referenced in the BSDL File.
... 6. Scan Port Identification: The Scan Port Identification identifies the JTAG pins: TDI, TDO, TMS, TCK and TRST (if used).
... 7. TAP description: provides additional information on the device's JTAG logic; the Instruction Register length, Instruction Opcodes, device IDCODE, etc. These characteristics are device specific.
... 8. Boundary Register description: provides the structure of the Boundary Scan cells on the device. Each pin on a device may have up to three Boundary Scan cells, each cell consisting of a register and a latch.

IEEE Std 1149.5-1995 IEEE Standard for Module Test and Maintenance Bus (MTM-Bus) Protocol
Specifies a serial, backplane, test and maintenance bus (MTM-Bus)..... between a Test Control Master and up to 250 Slave modules.
The interface has 5 signals:
... MTM Clock (MCLK)
... MTM Control (MCTL)
... MTM Master Data (MMD)
... MTM Slave Data (MSD)
... MTM Pause Request (MPR).
This specification is used at the Board level while 1149.1 is used at the chip level.

IEEE Std 1532 Boundary-Scan-based In System Configuration of Programmable Devices; is a follow on or extension to JTAG. IEEE 1532 is a superset of the IEEE 1149.1 JTAG standard. IEEE 1532 also provides additional flexibility for configuring Programmable Logic Devices [FPGA, PLDs].

Standards:
IEEE 1149.1 deals with test for digital assemblies
IEEE 1149.4 deals with test for mixed signal and analog assemblies
IEEE 1149.5 deals with test at system level
IEEE 1532 is a derivative standard for in-system programming of digital devices

Definitions:
ATE: Automatic Test Equipment
BIT: Built-In-Test
BSDL: Boundary Scan Description Language
BSR: Boundary Scan Register
DFT: Design-For-Test
JTAG: Joint Test Action Group
IC: Integrated Circuit

Engineering Design Key words for this page: JTAG Bus, IEEE-std-1149.1, Boundary Scan, JTAG, Scan, Bscan, Boundary Scan, BST, Board-Under-Test, Testability, Joint Test Action Group, Integrated Circuit, IC Bus, Chip-to-Chip, Electrical layer, Multi-Drop, Standard, Serial Communications interface, Interface Standard Data Bus, Standard, Specification, Spec, Validate, IC, Physical Interface, Description, Fault isolation.
已有 8 位网友发表了看法