Device 1 Device 2 Device 3 Device 4

Similar documents
Using the XC9500/XL/XV JTAG Boundary Scan Interface

Using the XSV Board Xchecker Interface

Section 24. Programming and Diagnostics

COE758 Xilinx ISE 9.2 Tutorial 2. Integrating ChipScope Pro into a project

Section 24. Programming and Diagnostics

Virtual JTAG Megafunction (sld_virtual_jtag)

IEEE Standard (JTAG) in the Axcelerator Family

12. IEEE (JTAG) Boundary-Scan Testing for the Cyclone III Device Family

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems

Laboratory Exercise 7

Testing Sequential Logic. CPE/EE 428/528 VLSI Design II Intro to Testing (Part 2) Testing Sequential Logic (cont d) Testing Sequential Logic (cont d)

Chapter 19 IEEE Test Access Port (JTAG)

Tools to Debug Dead Boards

Comparing JTAG, SPI, and I2C

18 Nov 2015 Testing and Programming PCBA s. 1 JTAG Technologies

PicoBlaze. for Spartan-3, Virtex-II, Virtex-IIPRO and Virtex-4 devices. JTAG Loader. Quick User Guide. Kris Chaplin and Ken Chapman

Overview of BDM nc. The IEEE JTAG specification is also recommended reading for those unfamiliar with JTAG. 1.2 Overview of BDM Before the intr

Ilmenau, 9 Dec 2016 Testing and programming PCBA s. 1 JTAG Technologies

Flip-flop and Registers

Product Update. JTAG Issues and the Use of RT54SX Devices

STATIC RANDOM-ACCESS MEMORY

Laboratory Exercise 7

7 Nov 2017 Testing and programming PCBA s

16 Dec Testing and Programming PCBA s. 1 JTAG Technologies

sld_virtual_jtag Megafunction User Guide

3. Configuration and Testing

JTAG Boundary- ScanTesting

Lab 3: VGA Bouncing Ball I

11. JTAG Boundary-Scan Testing in Stratix V Devices

Spartan-II Development System

A Briefing on IEEE Standard Test Access Port And Boundary-Scan Architecture ( AKA JTAG )

XJTAG DFT Assistant for

Debugging of VHDL Hardware Designs on Altera s DE2 Boards

Introduction to JTAG / boundary scan-based testing for 3D integrated systems. (C) GOEPEL Electronics -

Universal ByteBlaster

DIGITAL SYSTEM DESIGN VHDL Coding for FPGAs Unit 7

BTW03 DESIGN CONSIDERATIONS IN USING AS A BACKPLANE TEST BUS International Test Conference. Pete Collins

XJTAG DFT Assistant for

Design Problem 4 Solutions

Lab 4: Hex Calculator

Figure 1 Block diagram of a 4-bit binary counter

IE1204 Digital Design F11: Programmable Logic, VHDL for Sequential Circuits

download instant at

library IEEE; use IEEE.STD_LOGIC_1164.ALL;

Raspberry Pi debugging with JTAG

Memory Interfaces Data Capture Using Direct Clocking Technique Author: Maria George

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

Y. Tsiatouhas. VLSI Systems and Computer Architecture Lab. Boundary Scan (JTAG ) 2

of Boundary Scan techniques.

XJTAG DFT Assistant for

XJTAG DFT Assistant for

BSDL Validation: A Case Study

SAU510-USB ISO PLUS v.2 JTAG Emulator. User s Guide 2013.

IE1204 Digital Design. F11: Programmable Logic, VHDL for Sequential Circuits. Masoumeh (Azin) Ebrahimi

Programmable Logic Design I

CoLinkEx JTAG/SWD adapter USER MANUAL

Debugging IDT S-RIO Gen2 Switches Using RapidFET JTAG

Lecture 6: Simple and Complex Programmable Logic Devices. EE 3610 Digital Systems

Lab 6: Video Game PONG

Unit V Design for Testability

ACS College of Engineering. Department of Biomedical Engineering. HDL pre lab questions ( ) Cycle-1

ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32

Using Test Access Standards Across The Product Lifecycle

Memory Interfaces Data Capture Using Direct Clocking Technique Author: Maria George

ECE 3401 Lecture 12. Sequential Circuits (II)

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

Using IEEE Boundary Scan (JTAG) With Cypress Ultra37000 CPLDs

the Boundary Scan perspective

SignalTap Plus System Analyzer

Entry Level Tool II. Reference Manual. System Level Solutions, Inc. (USA) Murphy Avenue San Martin, CA (408) Version : 1.0.

Lecture 17: Introduction to Design For Testability (DFT) & Manufacturing Test

SµMMIT E & LXE/DXE JTAG Testability for the SJ02 Die

TMS320C6000: Board Design for JTAG

Section 24. Programming and Diagnostics

JRC ( JTAG Route Controller ) Data Sheet

COMPUTER ENGINEERING PROGRAM

SµMMIT E & LXE/DXE Built-In-Self-Test Functionality for the JA01 Die

UNIT IV CMOS TESTING. EC2354_Unit IV 1

Remote Diagnostics and Upgrades

Digital Integrated Circuits Lecture 19: Design for Testability

Obsolete Product(s) - Obsolete Product(s)

STEVAL-CCM003V1. Graphic panel with ZigBee features based on the STM32 and SPZBE260 module. Features. Description

4:1 Mux Symbol 4:1 Mux Circuit

LFSRs as Functional Blocks in Wireless Applications Author: Stephen Lim and Andy Miller

Enhanced JTAG to test interconnects in a SoC

Based on slides/material by. Topic 14. Testing. Testing. Logic Verification. Recommended Reading:

In-System Programmability Guidelines

Configuring FLASHlogic Devices

University of Arizona January 18, 2000 Joel Steinberg Rev. 1.6

CPC (Cosmics Personality Card) for the L3+Cosmics experiment.

SignalTap Analysis in the Quartus II Software Version 2.0

ECE337 Lab 4 Introduction to State Machines in VHDL

Obsolete Product(s) - Obsolete Product(s)

Outline. CPE/EE 422/522 Advanced Logic Design L04. Review: 8421 BCD to Excess3 BCD Code Converter. Review: Mealy Sequential Networks

IIIHIII III. Signal in. BIST ShiftDR United States Patent (19) Tsai et al. Out Mode Signal out. mclockdr. SCOn

Outputs Combinational circuit. Next state. Fig. 4-1 Block Diagram of a Sequential Circuit

2608 Sweetgum Drive Apex NC Toll-free: International: FAX: How to install and use your new XStend Board

MaxView Cinema Kit Quick Install Guide

Chapter 10 Exercise Solutions

Transcription:

APPLICATION NOTE 0 The Tagalyzer - A JTAG Boundary Scan Debug Tool XAPP 103 March 1, 2007 (Version 1.1) 0 3* Application Note Summary The Tagalyzer is a diagnostic tool that helps debug long JTAG boundary scan chains. It can be modified to adapt to a wide variety of different testing situations, and is made from a single XC9536 CPLD. It can be used to debug JTAG chains made up of any manufacturers parts. The Tagalyzer can be expanded, to support arbitrarily long boundary scan chains and adapted to change its functionality, as needed. Xilinx Family XC9500 Introduction JTAG Boundary Scan designs can become complex and difficult to debug. This can warrant the need for specialized tools capable of isolating and defining the exact state of the JTAG chain. One such tool - the Tagalyzer - is surprisingly inexpensive and easy to use while providing highly useful information to the board level engineer. Using a single Xilinx CPLD, this tool can be built for a few dollars and debug JTAG test circuits of arbitrary length. This paper includes a detailed discussion of the design, operation and modification of the basic instrument. With the design presented in this paper, designers will be able to rapidly debug their JTAG systems in a practical and straightforward way. Design details include complete VHDL code for the Tagalyzer as well as a technical discussion of its use. JTAG Review and Other Resources For this discussion, it will be assumed that the reader is an experienced JTAG user. If that is not the case, that problem is easily remedied by studying available resources. Please refer to Xilinx application notes: XAPP068, XAPP069 and XAPP070. Currently, these application notes are located on Xilinx World Wide Web at: http://www.xilinx.com/apps/epld.htm The heart of any JTAG test chain (Figure 1) is the Test Access Port (TAP) controller (Figure 2). The TAP controller is a 16 state Moore type state machine that dictates the control of all JTAG activities. JTAG boundary scan testing is accomplished with only four external signals: Test Mode Select (TMS), Test Clock (TCK), Test Data Input (TDI) and Test Data Output (TDO). When parts are interconnected with a JTAG boundary scan chain, their various TMS, TCK, TDI and TDO signals are attached in various configurations. It is difficult to tell from the outside pin view, exactly what is going on inside each chip. In particular, it is hard to tell what state that chip's TAP controller is in. That is where the Tagalyzer comes in. TDO TDI Device 1 Device 2 Device 3 Device 4 TMS TCK Figure 1: JTAG Boundary Scan Control Signal Connections 1998-2007 Xilinx, Inc. All rights reserved. All Xilinx trademarks, registered trademarks, patents, and further disclaimers are as listed at http://www.xilinx.com/legal.htm. PowerPC is a trademark of IBM Inc. All other trademarks and registered trademarks are the property of their respective owners. All specifications are subject to change without notice. NOTICE OF DISCLAIMER: Xilinx is providing this design, code, or information "as is." By providing the design, code, or information as one possible implementation of this feature, application, or standard, Xilinx makes no representation that this implementation is free from any claims of infringement. You are responsible for obtaining any rights you may require for your implementation. Xilinx expressly disclaims any warranty whatsoever with respect to the adequacy of the implementation, including but not limited to any warranties or representations that this implementation is free from claims of infringement and any implied warranties of merchantability or fitness for a particular purpose.

The Tagalyzer - A JTAG Boundary Scan Debug Tool Figure 2: The JTAG TAP CONTROLLER Note that in Figure 2, there are sixteen states. Each state has a precise meaning and definition, which directly reflects the state of the boundary scan test chain at any point in time. In Figure 2, the upper left two states are key beginning and ending states. The center column of states (starts with Select-DR-Scan) describes bit processing for the JTAG data register. The right column of states (starts with Select-IR-Scan) describes bit processing for the JTAG instruction register. Transitions between all states is done by applying combinations of TMS, TCK and TDI. By attaching to these signals, it is possible to create a separate version of the TAP state machine that tracks the TAP states, and displays them. It is also possible to capture and display the JTAG instruction and data registers. That's what the Tagalyzer does. The Tagalyzer Structure Although not required, the Tagalyzer is conveniently constructed on the XC9536 Customer Demo Card (Figure 3). This card can be obtained for a nominal fee from Xilinx Customer Support or Xilinx Sales. It combines an XC9536 with power connections making it easy to use with a single 9V battery. Delivered, the card has a set of 10 LEDs installed that will be used as part of the Tagalyzer. Additional LED displays will need to be installed to replicate the unit described here. Basically, the idea is simple - build a copy of the TAP controller in an XC9536 so that it externally displays the current TAP controller state. Additionally, it is possible to display (current LED column) the contents of the JTAG instruction or data register. VHDL code for the TAP controller is included in the appendix of this application note.

Figure 3: XC9536 Customer Demo Board Figure 4 shows how the Tagalyzer can be connected to various points along a 4 device JTAG boundary scan chain. At each site, 3 external leads must be attached to the respective TCK, TMS and TDI points of the chain. At that position, the Tagalyzer will track the internal TAP controller and display its matching state. This permits debuggers the ability to quickly identify misconnections and correct any TAP controller misconceptions about internal operation. It also permits, to some degree, the tracking of TDO (for subset conditions like Bypass configurations). It is also useful to display the current data and instruction registers. A point to remember is that you won't be attaching the XC9536 JTAG pins at these points, but rather pins which are attached to ordinary XC9536 I/O points. There is no limit on the number of parts that can be tested with the Tagalyzer. It will track the state of whatever part to which it is attached. Also, because the XC9536 can be easily modified, the design inside the Tagalyzer can be altered to suit the specific problem addressed. For instance, the column can display instruction in one version and data in another. For larger problems, the design can be migrated to larger XC9500 parts, if needed, but it must be rebuilt on a larger card. Software Support Xilinx M1.4 Design Software includes a JTAGProgrammer module. The JTAGProgrammer module has a special feature that is appropriate to use with the Tagalyzer, which permits low level delivery of a prescribed number of clocks and delivery of TDI and capture of TDO. The debugger (see Figure 5) provides you with a method to apply boundary-scan test access port stimulus. This feature allows you to set TDI and TMS, then pulse TCK a specified number times. You can monitor TDO, TDI and TMS using the Tagalyzer to see if the boundary scan chain is operating correctly. The debugger also displays the current TAP state and allows you to reset the chain to Run Test Idle. To access the debugger: File -> Debug Chain

The Tagalyzer - A JTAG Boundary Scan Debug Tool TDO TDI Device 1 Device 2 Device 3 Device 4 TMS TCK Attach TDI to desired point Attach to any TDI point (above) as needed. TDO (observation point) TAGALYZER Figure 4: Possible Tagalyzer Attachments

Figure 5: M1 JTAG Downloader Debug GUI The features of this dialog box operate as follows: 1. The first selection box allows you to set a logic state for TDI. This state will not be set until you click on the Apply button. 2. The second selection box allows you to set a logic state for TMS. This state will not be set until you click on the Apply button. 3. The third selection box allows you to set a number of pulses to apply to TCK. These pulses will not be sent until you click on the Apply button. If you want to see the pulses again, click the Apply button as often as you want. 4. The TAP State window displays the current state of the controller. 5. The Return to RTI (Run Test Idle) button executes a Test Logic Reset, then returns to Run Test Idle. Conclusion The Tagalyzer is an easy to use, very inexpensive but powerful diagnostic tool. It can be used to debug JTAG chains of any length and virtually any manufacturer's parts. It is easily constructed using Xilinx XC9536 customer demo board and Xilinx M1.4 Design Software.

The Tagalyzer - A JTAG Boundary Scan Debug Tool Appendix A Tagalyzer VHDL Source Code library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; --use WORK.tag_defs.ALL; --use WORK.ALL; entity tagalize is port ( my_tdi:in std_logic; my_tck:in std_logic; my_tms:in std_logic; my_tdo:in std_logic; Instruction:buffer std_logic_vector (7 downto 0); Data:buffer std_logic_vector (2 downto 0); tdo_output:buffer std_logic_vector (2 downto 0); TLR:out std_logic; RTI:out std_logic; SDR:out std_logic; CDR:out std_logic; SHDR:out std_logic; E1DR:out std_logic; PDR:out std_logic; E2DR:out std_logic; UDR:out std_logic; SIR:out std_logic; CIR:out std_logic; SHIR:out std_logic; E1IR:out std_logic; PIR:out std_logic; E2IR:out std_logic; UIR:out std_logic ); end tagalize; architecture behavior of tagalize is --************************************************************************** -- STATE MACHINE SIGNAL DECLARATION: type StateType is ( test_logic_reset, run_test_idle, sel_dr_scan, sel_ir_scan, capture_dr, capture_ir, shift_dr, shift_ir, exit1_ir, exit1_dr, pause_dr, pause_ir, exit2_dr, exit2_ir, update_dr,

update_ir ); signal CurrentState, NextState : StateType; --************************************************************************** begin TLR <= '1' when (CurrentState = test_logic_reset) else '0'; RTI <= '1' when (CurrentState = run_test_idle) else '0'; SDR <= '1' when (CurrentState = sel_dr_scan) else '0'; SIR <= '1' when (CurrentState = sel_ir_scan) else '0'; CDR <= '1' when (CurrentState = capture_dr ) else '0'; CIR <= '1' when (CurrentState = capture_ir ) else '0'; SHDR <='1' when (CurrentState = shift_dr ) else '0'; SHIR <='1' when (CurrentState = shift_ir ) else '0'; E1DR <='1' when (CurrentState = exit1_ir ) else '0'; E1IR <='1' when (CurrentState = exit1_dr ) else '0'; PDR <= '1' when (CurrentState = pause_dr ) else '0'; PIR <= '1' when (CurrentState = pause_ir ) else '0'; E2DR <='1' when (CurrentState = exit2_dr ) else '0'; E2IR <='1' when (CurrentState = exit2_ir ) else '0'; UDR <= '1' when (CurrentState = update_dr ) else '0'; UIR <= '1' when (CurrentState = update_ir ) else '0'; process(my_tck) begin if (my_tck'event and my_tck = '1') then CurrentState <= NextState; end process; process(currentstate) begin case CurrentState is when test_logic_reset => if my_tms = '1' then NextState <= test_logic_reset; else NextState <= run_test_idle; when run_test_idle => if my_tms = '1' then NextState <= sel_dr_scan; else NextState <= run_test_idle; when sel_dr_scan => if my_tms = '1' then NextState <= sel_ir_scan; else NextState <= capture_dr; when sel_ir_scan => if my_tms = '1' then NextState <= test_logic_reset; else NextState <= capture_ir; when capture_dr => if my_tms = '1' then NextState <= exit1_dr; else NextState <= shift_dr; when capture_ir => if my_tms = '1' then NextState <= exit1_ir; else NextState <= shift_ir;

The Tagalyzer - A JTAG Boundary Scan Debug Tool end process; when shift_dr => if my_tms = '1' then NextState <= exit1_dr; else NextState <= shift_dr; when shift_ir => if my_tms = '1' then NextState <= exit1_ir; else NextState <= shift_ir; when exit1_dr => if my_tms = '1' then NextState <= update_dr; else NextState <= pause_dr; when exit1_ir => if my_tms = '1' then NextState <= update_ir; else NextState <= pause_ir; when pause_dr => if my_tms = '1' then NextState <= exit2_dr; else NextState <= pause_dr; when pause_ir => if my_tms = '1' then NextState <= exit2_ir; else NextState <= pause_ir; when exit2_dr => if my_tms = '1' then NextState <= update_dr; else NextState <= shift_dr; when exit2_ir => if my_tms = '1' then NextState <= update_ir; else NextState <= shift_ir; when update_dr => if my_tms = '1' then NextState <= sel_dr_scan; else NextState <= run_test_idle; when update_ir => if my_tms = '1' then NextState <= sel_dr_scan; else NextState <= run_test_idle; when others => NextState <= test_logic_reset; end case; process(my_tck) begin if (my_tck'event and my_tck = '1')then if CurrentState = shift_dr then Data (1 downto 0) <= Data (2 downto 1); Data (2) <= my_tdi; tdo_output (1 downto 0) <= tdo_output (2 downto 1); tdo_output (2) <= my_tdo; if CurrentState = shift_ir then

end process; Instruction (6 downto 0) <= Instruction (7 downto 1); Instruction (7) <= not my_tdi; tdo_output (1 downto 0) <= tdo_output (2 downto 1); tdo_output (2) <= my_tdo; end behavior; Revision History The following table shows the revision history for this document. Date Version Revision 01/23/98 1.0 Initial Xilinx release. 03/01/07 1.1 Updated code example, Appendix A.

The Tagalyzer - A JTAG Boundary Scan Debug Tool