Difference between revisions of "Target Interface JTAG"

From SEGGER Wiki
Jump to: navigation, search
(Created page with "JTAG is the acronym for '''J'''oint '''T'''est '''A'''ction '''G'''roup. In the scope of this document, "the JTAG standard" means compliance with IEEE Standard 1149....")
 
Line 6: Line 6:
 
provide access to many test support functions built into a component. It is composed
 
provide access to many test support functions built into a component. It is composed
 
as a minimum of the three input connections (TDI, TCK, TMS) and one output con-
 
as a minimum of the three input connections (TDI, TCK, TMS) and one output con-
nection (TDO). An optional fourth input connection (nTRST) provides for asynchro-
+
nection (TDO). An optional fourth input connection (nTRST) provides for asynchronous initialization of the test logic.
  +
nous initialization of the test logic.
 
  +
{| class="wikitable"
  +
!colspan="6"|Shopping List
  +
|-
  +
|rowspan="2"|Bread & Butter
  +
|Pie
  +
|Buns
  +
|Danish
  +
|colspan="2"|Croissant
  +
|-
  +
|Cheese
  +
|colspan="2"|Ice cream
  +
|Butter
  +
|Yogurt
  +
|}
  +
  +
== Data registers (DR-Scan path) ==
  +
JTAG requires at least two data registers to be present: the bypass and the bound-
  +
ary-scan register. Other registers are allowed but are not obligatory.
  +
Bypass data register
  +
A single-bit register that passes information from TDI to TDO.
  +
Boundary-scan data register
  +
A test data register which allows the testing of board interconnections, access to
  +
input and output of components when testing their system logic and so on.
  +
  +
== Instruction register (IR-Scan path) ==
  +
The instruction register holds the current instruction and its content is used by the
  +
TAP controller to decide which test to perform or which data register to access. It
  +
consist of at least two shift-register cells.
  +
  +
== The TAP controller ==
  +
The TAP controller is a synchronous finite state machine that responds to changes at
  +
the TMS and TCK signals of the TAP and controls the sequence of operations of the
  +
circuitry.
  +
TAP controller state diagram
  +
<TBD>
  +
  +
=== State descriptions ===
  +
'''Reset'''
  +
The test logic is disabled so that normal operation of the chip logic can continue
  +
unhindered. No matter in which state the TAP controller currently is, it can change
  +
into Reset state if TMS is high for at least 5 clock cycles. As long as TMS is high, the
  +
TAP controller remains in Reset state.
  +
'''Idle'''
  +
Idle is a TAP controller state between scan (DR or IR) operations. Once entered, this
  +
state remains active as long as TMS is low.
  +
'''DR-Scan'''
  +
Temporary controller state. If TMS remains low, a scan sequence for the selected
  +
data registers is initiated.
  +
'''IR-Scan'''
  +
Temporary controller state. If TMS remains low, a scan sequence for the instruction
  +
register is initiated.
  +
'''Capture-DR'''
  +
Data may be loaded in parallel to the selected test data registers.
  +
'''Shift-DR'''
  +
The test data register connected between TDI and TDO shifts data one stage towards
  +
the serial output with each clock.
  +
'''Exit1-DR'''
  +
Temporary controller state.
  +
'''Pause-DR'''
  +
The shifting of the test data register between TDI and TDO is temporarily halted.
  +
'''Exit2-DR'''
  +
Temporary controller state. Allows to either go back into Shift-DR state or go on to
  +
Update-DR.
  +
'''Update-DR'''
  +
Data contained in the currently selected data register is loaded into a latched parallel
  +
output (for registers that have such a latch). The parallel latch prevents changes at
  +
the parallel output of these registers from occurring during the shifting process.
  +
'''Capture-IR'''
  +
Instructions may be loaded in parallel into the instruction register.
  +
'''Shift-IR'''
  +
The instruction register shifts the values in the instruction register towards TDO with
  +
each clock.
  +
'''Exit1-IR'''
  +
Temporary controller state.
  +
'''Pause-IR'''
  +
Wait state that temporarily halts the instruction shifting.
  +
'''Exit2-IR'''
  +
Temporary controller state. Allows to either go back into Shift-IR state or go on to
  +
Update-IR.
  +
'''Update-IR'''
  +
The values contained in the instruction register are loaded into a latched parallel out-
  +
put from the shift-register path. Once latched, this new instruction becomes the cur-
  +
rent one. The parallel latch prevents changes at the parallel output of the instruction
  +
register from occurring during the shifting process.

Revision as of 09:48, 30 September 2015

JTAG is the acronym for Joint Test Action Group. In the scope of this document, "the JTAG standard" means compliance with IEEE Standard 1149.1-2001.

Test access port (TAP)

JTAG defines a TAP (Test access port). The TAP is a general-purpose port that can provide access to many test support functions built into a component. It is composed as a minimum of the three input connections (TDI, TCK, TMS) and one output con- nection (TDO). An optional fourth input connection (nTRST) provides for asynchronous initialization of the test logic.

Shopping List
Bread & Butter Pie Buns Danish Croissant
Cheese Ice cream Butter Yogurt

Data registers (DR-Scan path)

JTAG requires at least two data registers to be present: the bypass and the bound- ary-scan register. Other registers are allowed but are not obligatory. Bypass data register A single-bit register that passes information from TDI to TDO. Boundary-scan data register A test data register which allows the testing of board interconnections, access to input and output of components when testing their system logic and so on.

Instruction register (IR-Scan path)

The instruction register holds the current instruction and its content is used by the TAP controller to decide which test to perform or which data register to access. It consist of at least two shift-register cells.

The TAP controller

The TAP controller is a synchronous finite state machine that responds to changes at the TMS and TCK signals of the TAP and controls the sequence of operations of the circuitry. TAP controller state diagram <TBD>

State descriptions

Reset The test logic is disabled so that normal operation of the chip logic can continue unhindered. No matter in which state the TAP controller currently is, it can change into Reset state if TMS is high for at least 5 clock cycles. As long as TMS is high, the TAP controller remains in Reset state. Idle Idle is a TAP controller state between scan (DR or IR) operations. Once entered, this state remains active as long as TMS is low. DR-Scan Temporary controller state. If TMS remains low, a scan sequence for the selected data registers is initiated. IR-Scan Temporary controller state. If TMS remains low, a scan sequence for the instruction register is initiated. Capture-DR Data may be loaded in parallel to the selected test data registers. Shift-DR The test data register connected between TDI and TDO shifts data one stage towards the serial output with each clock. Exit1-DR Temporary controller state. Pause-DR The shifting of the test data register between TDI and TDO is temporarily halted. Exit2-DR Temporary controller state. Allows to either go back into Shift-DR state or go on to Update-DR. Update-DR Data contained in the currently selected data register is loaded into a latched parallel output (for registers that have such a latch). The parallel latch prevents changes at the parallel output of these registers from occurring during the shifting process. Capture-IR Instructions may be loaded in parallel into the instruction register. Shift-IR The instruction register shifts the values in the instruction register towards TDO with each clock. Exit1-IR Temporary controller state. Pause-IR Wait state that temporarily halts the instruction shifting. Exit2-IR Temporary controller state. Allows to either go back into Shift-IR state or go on to Update-IR. Update-IR The values contained in the instruction register are loaded into a latched parallel out- put from the shift-register path. Once latched, this new instruction becomes the cur- rent one. The parallel latch prevents changes at the parallel output of the instruction register from occurring during the shifting process.