An 039
An 039
1 JTAG
®
Boundary-Scan Testing
in Altera Devices
June 2005, ver. 6.0 Application Note 39
Introduction As printed circuit boards (PCBs) become more complex, the need for
thorough testing becomes increasingly important. Advances in surface-
mount packaging and PCB manufacturing have resulted in smaller
boards, making traditional test methods—external test probes and “bed-
of-nails” test fixtures—harder to implement. As a result, cost savings from
PCB space reductions are sometimes offset by cost increases in traditional
testing methods.
In the 1980s, the Joint Test Action Group (JTAG) developed a specification
for boundary-scan testing that was later standardized as the IEEE
Std. 1149.1 specification. This boundary-scan test (BST) architecture offers
the capability to efficiently test components on PCBs with tight lead
spacing.
This BST architecture can test pin connections without using physical test
probes and capture functional data while a device is operating normally.
Boundary-scan cells (BSCs) in a device can force signals onto pins, or
capture data from pin or core logic signals. Forced test data is serially
shifted into the BSCs. Captured data is serially shifted out and externally
compared to expected results. Figure 1 illustrates the concept of
boundary-scan testing.
Core Core
Logic Logic
Interconnection
to Be Tested
JTAG Device 1 JTAG Device 2
Table 1 summarizes the Altera ® devices that comply with the IEEE
Std. 1149.1 specification by providing BST capability for input, output,
and dedicated configuration pins.
Altera Corporation 1
AN-039-6.0
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Note to Table 1:
(1) Although EPM7032S and EPM7064S devices contain circuitry to support the Test Access Port (TAP) controller, these
devices do not offer the BSCs required to support the EXTEST and SAMPLE/PRELOAD instructions. When the
instruction register is updated with these instructions, the BYPASS register is selected. Therefore, you can place
EPM7032S and EPM7064S devices in a chain of boundary-scan test (BST) devices.
This application note discusses how to use the IEEE Std. 1149.1 BST
circuitry in Altera devices. The topics are as follows:
2 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
In addition to BST, you can use the IEEE Std. 1149.1 controller for in-
system programming or for in-circuit reconfiguration for Altera devices
with that feature. The MAX 3000A, MAX 7000AE, MAX 7000B, and
enhanced configuration devices support IEEE 1532 programming, which
utilizes the IEEE Std. 1149.1 TAP interface. This application note only
discusses the BST feature of the IEEE Std. 1149.1 circuitry.
f For more information on using IEEE Std. 1149.1 circuitry for in-system
programming and in-circuit reconfiguration, see the following
documents:
IEEE Std. A device operating in IEEE Std. 1149.1 BST mode uses four required pins,
TDI, TDO, TMS, and TCK, and one optional pin, TRST. Table 2 summarizes
1149.1 BST the functions of each of these pins.
Architecture
Table 2. IEEE Std. 1149.1 Pin Descriptions (Part 1 of 2)
Altera Corporation 3
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Altera devices either have pins dedicated for IEEE Std. 1149.1 operation or
the IEEE Std. 1149.1 pins are dual purpose; they can either be used for
JTAG only or as regular I/O pins. For the families that support it, you can
use the four JTAG pins as I/O pins by turning off the JTAG option with
the MAX+PLUS ® II or Quartus® II software (see “Enabling IEEE Std.
1149.1 BST Circuitry” on page 32 of this application note). Go to the
appropriate device family data sheet for specific information on device
and package combinations.
The IEEE Std. 1149.1 BST circuitry requires the following registers:
4 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
TDI
TDO
UPDATEIR
CLOCKIR
SHIFTIR
Instruction Decode
TAP
TMS Controller
TCLK
UPDATEDR Data Registers
CLOCKDR Bypass Register
TRST (1) SHIFTDR
Notes to Figure 2:
(1) The TRST pin is optional. Check the data sheet and pin tables for individual device support.
(2) The device ID register is available in all JTAG-compliant families except EPM9320 and EPM9560 devices.
(3) The private registers are used for in-system programmability (ISP) in MAX 9000 (including MAX 9000A),
MAX 7000A, MAX 7000B, MAX 7000S, and MAX 3000A devices and for in-circuit reconfigurability (ICR) in Stratix,
Mercury, APEX II, APEX 20K, ACEX 1K, and FLEX 10K devices.
(4) Refer to the appropriate device family data sheet for register lengths.
Altera Corporation 5
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
IEEE Std. The boundary-scan register is a large serial shift register that uses the TDI
pin as an input and the TDO pin as an output. The boundary-scan register
1149.1 consists of 3-bit peripheral elements that are either I/O pins, dedicated
Boundary-Scan inputs, or dedicated configuration pins. You can use the boundary-scan
register to test external pin connections or to capture internal data.
Register Figure 3 shows how test data is serially shifted around the periphery of
the IEEE Std. 1149.1 device.
Each peripheral
element is either an
I/O pin, dedicated
input pin, or
Internal Logic dedicated
configuration pin.
TAP Controller
6 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
These pins continue to clock internal user registers, but the capture
register associated with the pin can be used for external pin connectivity
tests. The pin can receive data but cannot force data onto external
connections. The data values associated with the other two capture
registers should be ignored.
These pins are used only during FPGA configuration, but the capture
register associated with the pin can be used for external pin connectivity
tests. The pin can receive data but cannot force data onto external
connections. The data values associated with the other two capture
registers should be ignored.
Altera Corporation 7
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
HardCopy II, HardCopy Stratix, Stratix, Stratix GX, Cyclone & APEX II
Boundary Scan Cells
Figure 4 shows the user I/O BSC for HardCopy II, HardCopy Stratix,
Stratix, Stratix GX, Cyclone, and APEX II devices.
8 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Figure 4. HardCopy II, HardCopy Stratix, Stratix, Stratix GX, Cyclone & APEX II User I/O BSC with IEEE
Std. 1149.1 BST Circuitry
INJ
SDO
PIN_IN
0
0
D Q D Q 1
1
OEJ
0 PIN_OE
0
D Q D Q 0 1
OUTJ 1
1
PIN_OUT
0
0 Pin
D Q D Q 1
1
Output
Buffer
Capture Update
Registers Registers
Altera Corporation 9
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Tables 3 and 4 describe the capture and update register capabilities of all
BSCs within HardCopy II, HardCopy Stratix, Stratix, Stratix GX, Cyclone,
and APEX II devices. They describe user I/O pins (that match Figure 4
exactly), dedicated clock input, dedicated inputs, dedicated bidirectional,
and dedicated outputs cells.
Table 3. HardCopy II, HardCopy Stratix, Stratix, Stratix GX & Cyclone Device BSC Descriptions Note (1)
Notes to Table 3:
(1) All VCC, VREF, GND, GX_RX, GX_TX, RREF, REFCLK, and TEMP_DIODE pins do not have BSCs.
(2) For Stratix and Stratix GX this includes pins PLL_ENA, nCONFIG, MSEL0, MSEL1, MSEL2, DCLK, nCE, VCCSEL,
PORSEL, nIO_PULLUP. For Cyclone, this includes nCONFIG, MSEL0, MSEL1, DCLK, and nCE.
(3) This includes pins CONF_DONE and nSTATUS.
(4) This includes pin nCEO.
(5) N.C.: No Connect.
10 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Notes to Table 4:
(1) TDI, TDO, TMS, TCK, and TRST pins and all VCC and GND pin types do not have BSCs.
(2) Includes CLKp and CLKLK_FBINp pins.
(3) Includes pins PLL_ENA, DATA0, nCONFIG, MSEL0, MSEL1, DCLK, nCE, VCCSEL, and nIO_PULLUP.
(4) Includes CLKLK_OUTp pins.
(5) Includes pins CONF_DONE and nSTATUS.
(6) Includes pin nCEO.
(7) N.C.: No Connect.
Mercury BSCs
Figure 5 shows the user I/O BSC for Mercury devices.
Altera Corporation 11
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Figure 5. A Mercury User I/O BSC with IEEE Std. 1149.1 BST Circuitry
SDO
INJ
PIN_IN
0
D Q
1
INPUT
From or
to Device
I/O Cell OEJ 0 PIN_OE
Circuitry 0
and/or D Q D Q 1
Logic 1 OE OE
Array
OUTJ 0 PIN_OUT
0 Pin
D Q D Q 1
1
Output
OUTPUT OUTPUT
Buffer
UPDATE Global
SHIFT CLOCK MODE
Signals
12 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Table 5 describes the capture and update register capabilities of all BSCs
within Mercury devices. It describes user I/O pins (will match Figure 5
exactly), dedicated clock input, dedicated inputs, dedicated bidirectional
and dedicated outputs cells.
Notes to Table 5:
(1) All VCC and GND pin types do not have BSCs.
(2) Includes CLKp/n, HSDI_CLKp/n, and CLKLK_FBINp/n pins.
(3) Includes pins PLL_ENA, DATA0, nCONFIG, MSEL0, MSEL1, DCLK, nCE, VCCSEL, nIO_PULLUP.
(4) Includes CLKLK_OUTp/n and HSDI_TXCLKOUTp/n pins.
(5) Includes pins CONF_DONE and nSTATUS.
(6) Includes pin nCEO and PLLRDY.
(7) N.C.: No Connect.
Altera Corporation 13
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
APEX 20K, ACEX 1K, FLEX 10K, FLEX 6000 & FLEX 8000 BSCs
Figure 6 shows the user I/O BSC for APEX 20K, ACEX 1K, FLEX 10K,
FLEX 6000, and FLEX 8000 devices.
Figure 6. An APEX 20K, ACEX 1K, FLEX 10K, FLEX 6000 & FLEX 8000 User I/O BSC with IEEE Std. 1149.1 BST
Circuitry
SDO
INJ
PIN_IN
0
0
D Q D Q 1
1
INPUT INPUT
From or
to Device
I/O Cell OEJ 0
0 PIN_OE
Circuitry
and/or D Q D Q 1
1
Logic OE OE
Array
OUTJ 0 PIN_OUT
0 Pin
D Q D Q
1
1
Output
OUTPUT OUTPUT
Buffer
UPDATE Global
SHIFT CLOCK MODE
Signals
14 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Table 6 describes the capture and update register capabilities of all BSCs
within APEX 20K, ACEX 1K, FLEX 10K, FLEX 6000, and FLEX 8000
devices. It describes user I/O pins (will match Figure 4 exactly), dedicated
clock input, dedicated inputs, dedicated bi-directional, and dedicated
outputs cells.
Table 6. APEX 20K, ACEX 1K, FLEX 10K, FLEX 6000 & FLEX 8000 Device BSC Descriptions Note (1)
Altera Corporation 15
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Figure 7. A MAX 9000 User I/O BSC with IEEE Std. 1149.1 BST Circuitry
SDO
INJ
PIN_IN
0
0
D Q D Q 1
1
INPUT INPUT
From or
to Device
I/O Cell OEJ 0
0 PIN_OE
Circuitry
and/or D Q D Q 1
1
Logic OE OE
Array
OUTJ 0 PIN_OUT
0 Pin
D Q D Q
1
1
Output
OUTPUT OUTPUT
Buffer
UPDATE Global
SHIFT CLOCK MODE
Signals
16 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Table 7 describes the capture and update register capabilities of all BSCs
within MAX 9000 devices. It describes user I/O pins (will match Figure 7
exactly), and dedicated inputs.
Notes to Table 7:
(1) All VCC and GND pins do not have BSCs.
(2) These pins include DIN1, DIN2, DIN3, and DIN4.
(3) N.C.: No Connect.
MAX 7000S, MAX 7000A, MAX 7000B & MAX 3000A BSCs
Figure 8 shows the user I/O BSC for MAX 7000S, MAX 7000A,
MAX 7000B, and MAX 3000A devices.
Altera Corporation 17
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Figure 8. A MAX 7000S, MAX 7000A, MAX 7000B & MAX 3000A User I/O BSC with IEEE Std. 1149.1 BST
Circuitry
SDO
INJ
PIN_IN
0
D Q
1
INPUT
From or
to Device
I/O Cell OEJ 0 PIN_OE
Circuitry 0
and/or D Q D Q 1
1
Logic OE OE
Array
OUTJ 0 PIN_OUT
0 Pin
D Q D Q
1
1
Output
OUTPUT OUTPUT
Buffer
UPDATE Global
SHIFT CLOCK MODE
Signals
18 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Table 8 describes the capture and update register capabilities of all BSCs
within MAX 7000S, MAX 7000A, MAX 7000B, and MAX 3000A devices. It
describes user I/O pins (will match Figure 7 exactly), and dedicated
inputs.
Table 8. MAX 7000S, MAX 7000A, MAX 7000B & MAX 3000A Device BSC Descriptions Note (1)
Notes to Table 8:
(1) All VCC and GND pins do not have BSCs.
(2) These pins include all four dedicated inputs.
(3) N.C. No Connect.
Altera Corporation 19
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Figure 9. An EPC16, EPC8, EPC4 & EPC2 I/O BSC with IEEE Std. 1149.1 BST Circuitry Note (1)
SDO
INJ
PIN_IN
0
0
D Q D Q 1
1
INPUT INPUT
From or
to Device
I/O Cell OEJ 0
0 PIN_OE
Circuitry
and/or D Q D Q 1
1
Logic OE OE
Array
OUTJ 0 PIN_OUT
0 Pin
D Q D Q
1
1
Output
OUTPUT OUTPUT
Buffer
UPDATE Global
SHIFT CLOCK MODE
Signals
Note to Figure 9:
(1) The EPC2 tri-state buffer is active-high.
20 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Tables 9 and 10 describe the capture and update register capabilities of all
BSCs within EPC16, EPC8, EPC4, and EPC2 configuration devices. They
describe I/O pins (will match Figure 8 exactly), and dedicated input and
open-drain pins.
Table 9. EPC16, EPC8 & EPC4 Device BSC Descriptions Note (1)
Notes to Table 9:
(1) All VCC and GND pin types do not have BSCs.
(2) These pins include DCLK, DATA, DQ, C_WE, C_RP, OEN, and some C_A, and A pins. Check the BSDL file for more
information.
(3) These pins include nCS, EXTCLK, PORSEL, PGM0, PGM1, and PGM2.
(4) This pin includes nINIT_CONF.
(5) N.C.: No Connect
Altera Corporation 21
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
IEEE Std. Altera IEEE Std. 1149.1 devices implement the following BST instructions:
SAMPLE/PRELOAD, EXTEST, BYPASS, USERCODE, IDCODE,
1149.1 Std. CLAMP, and HIGHZ. Table 11 summarizes the BST instructions, which
Operation are described in detail later in this application note. Instructions that are
available for specific devices can be found in the device-specific BSDL file
Control on the Altera Web site.
Mode Description
SAMPLE/ Allows a snapshot of the signals at the device pins to be
PRELOAD captured and examined during normal device operation, and
permits an initial data pattern to be output at the device pins.
EXTEST Allows the external circuitry and board-level interconnections
to be tested by forcing a test pattern at the output pins and
capturing test results at the input pins.
BYPASS Places the 1-bit bypass register between the TDI and TDO
pins, which allows the BST data to pass synchronously
through the selected device to adjacent devices during
normal device operation.
IDCODE Selects the IDCODE register and places it between TDI and
TDO, allowing the IDCODE to be serially shifted out of TDO.
USERCODE Selects the USERCODE register and places it between TDI
and TDO, allowing the USERCODE to be serially shifted out
of TDO.
CLAMP (1) Places the 1-bit bypass register between the TDI and TDO
pins, which allows the BST data to pass synchronously
through selected devices to adjacent devices during normal
device operation, while holding I/O pins to a state defined by
the data in the boundary scan register.
HIGHZ (1) Places the 1-bit bypass register between the TDI and TDO
pins, which allows the BST data to pass synchronously
through selected devices to adjacent devices during normal
device operation, while tri-stating all of the I/O pins.
The IEEE Std. 1149.1 TAP controller, a 16-state state machine clocked on
the rising edge of TCK, uses the TMS pin to control IEEE Std. 1149.1
operation in the device. Figure 10 shows the TAP controller state machine.
22 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
TEST_LOGIC/
TMS = 1 RESET
TMS = 1 TMS = 1
RUN_TEST/
TMS = 0 IDLE
TMS = 0 TMS = 0
TMS = 1 TMS = 1
CAPTURE_DR CAPTURE_IR
TMS = 0 TMS = 0
SHIFT_DR SHIFT_IR
TMS = 0 TMS = 0
TMS = 1 TMS = 1
TMS = 1 TMS = 1
EXIT1_DR EXIT1_IR
TMS = 0 TMS = 0
PAUSE_DR PAUSE_IR
TMS = 0 TMS = 0
TMS = 1 TMS = 1
TMS = 0 TMS = 0
EXIT2_DR EXIT2_IR
TMS = 1 TMS = 1
TMS = 1 TMS = 1
UPDATE_DR UPDATE_IR
TMS = 0 TMS = 0
Altera Corporation 23
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
TMS
TDI
tJCP
tJCH tJCL tJPSU tJPH
TCK
TDO
tJSSU tJSH
Signal
to Be
Captured
tJSZX tJSCO tJSXZ
Signal
to Be
Driven
The timing values for each Altera device are provided in the appropriate
device family data sheet.
24 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
TCK
TMS
TDI
TDO
TAP_STATE SHIFT_IR
The TDO pin is tri-stated in all states except in the SHIFT_IR and
SHIFT_DR states. The TDO pin is activated at the first falling edge of TCK
after entering either of the shift states and is tri-stated at the first falling
edge of TCK after leaving either of the shift states.
When the SHIFT_IR state is activated, TDO is no longer tri-stated, and the
initial state of the instruction register is shifted out on the falling edge of
TCK. TDO continues to shift out the contents of the instruction register as
long as the SHIFT_IR state is active. The TAP controller remains in the
SHIFT_IR state as long as TMS remains low.
Altera Corporation 25
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
OUTJ
0
0
D Q D Q 1
1
Capture Update
Registers Registers
Capture Update
Registers Registers
26 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
New test data shifted into the TDI pin appears at the TDO pin after being
clocked through the entire boundary-scan register. Figure 14 shows that
the instruction code at TDI does not appear at the TDO pin until after the
capture register data is shifted out. If TMS is held high on two consecutive
TCK clock cycles, the TAP controller advances to the UPDATE_DR state for
the update phase.
TMS
TDI
TDO
SHIFT_IR SHIFT_DR
TAP_STATE
EXIT1_IR Data stored in After boundary-scan EXIT1_DR
Instruction Code UPDATE_IR CAPTURE_DR boundary-scan register data has been UPDATE_DR
register is shifted shifted out, data
SELECT_DR_SCAN
out of TDO. entered into TDI
shifts out of TDO.
Altera Corporation 27
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
28 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Capture Update
Registers Registers
Altera Corporation 29
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
TMS
TDI
TDO
SHIFT_IR SHIFT_DR
TAP_STATE
EXIT1_IR Data stored in After boundary-scan EXIT1_DR
Instruction Code UPDATE_IR CAPTURE_DR boundary-scan register data has been UPDATE_DR
register is shifted shifted out, data
SELECT_DR_SCAN
out of TDO. entered into TDI
shifts out of TDO.
30 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
TCK
TMS
SHIFT_IR SHIFT_DR
Altera Corporation 31
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Enabling IEEE Std. The IEEE Std. 1149.1 BST circuitry for Altera devices is enabled upon
device power-up. Because this circuitry may be used for BST, ISP, or
1149.1 BST ICR (depending on the device), this circuitry must be enabled only at
Circuitry specific times. In the device sections you will find a description of
how to enable the IEEE Std. 1149.1 circuitry when needed and to
ensure that the circuitry is not inadvertently enabled when it is not
needed.
32 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
MAX 7000S, MAX 7000A, MAX 7000B & MAX 3000A Devices
The IEEE Std. 1149.1 BST circuitry of MAX 7000S, MAX 7000A,
MAX 7000B, and MAX 3000A devices is enabled by an IEEE Std.
1149.1 enable bit within the device. A blank device always has the
BST circuitry enabled. The Altera MPU or a third-party programmer
can set the state of this enable bit when programming the device. The
state of the JTAG enable bit may not be changed using ISP via the
IEEE Std. 1149.1 port.
Because these devices have four pins that can be used as either JTAG
pins or user I/O pins, you must enable or disable the JTAG circuitry
before compilation. For a design that has been compiled with JTAG
pins enabled, the four pins operate as dedicated pins only. If these
devices are not using the IEEE Std. 1149.1 circuitry, tying the pins to
the appropriate state (shown in Table 12) disables the circuitry.
Altera Corporation 33
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
The IEEE Std. 1149.1 BST circuitry for Altera devices is enabled upon
device power-up. You can use the IEEE Std. 1149.1 BST circuitry both
before and after device configuration. In FLEX 8000 and FLEX 6000
devices, the nCONFIG pin must be held low when you perform
boundary-scan testing before configuration.
Because these devices have four pins that can be used as either JTAG
pins or user I/O pins, you must enable or disable the JTAG circuitry
before compilation. For a design that has been compiled with JTAG
pins enabled, the four pins operate as dedicated pins only. If these
devices are not using the IEEE Std. 1149.1 circuitry, tying the pins to
the appropriate state (shown in Table 12) disables the circuitry.
34 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Altera Corporation 35
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
■ Make sure the revision of the file you are using is the latest BSDL
version.
■ Check that the part number and package are correct.
■ Find the instruction length and OPCODE under
INSTRUCTIONS AND REGISTER ACCESS
■ Find the boundary scan length and the description of every BSC
in the boundary scan register under BOUNDARY SCAN CELL
INFORMATION
■ Check the DESIGN WARNINGS section for helpful hints (this
information is not available in all BSDL files).
-- ************************************************************************
-- * IMPORTANT NOTICE *
-- ************************************************************************
--
-- Altera, Stratix and EP1S25 are trademarks of Altera
-- Corporation. Altera products, marketed under trademarks, are
-- protected under numerous US and foreign patents and pending
-- applications, maskwork rights, and copyrights. Altera warrants
-- performance of its semiconductor products to current specifications
-- in accordance with Altera's standard warranty, but reserves the
-- right to make changes to any products and services at any time
-- without notice. Altera assumes no responsibility or liability
-- arising out of the application or use of any information, product,
-- or service described herein except as expressly agreed to in
36 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
port (
--I/O Pins
IOC1 , IOD2 , IOE3 , IOE4 , IOE1 , IOE2 , IOF3 ,
IOF4 , IOF1 , IOF2 , IOG5 , IOG6 , IOG1 , IOG2 ,
IOG3 , IOG4 , IOH1 , IOH2 , IOH3 , IOH4 , IOH6 ,
IOH5 , IOJ7 , IOH7 , IOJ4 , IOJ3 , IOJ2 , IOJ1 ,
IOJ6 , IOJ5 , IOK4 , IOK3 , IOK2 , IOK1 , IOK9 ,
IOJ8 , IOK6 , IOK5 , IOK8 , IOK7 , IOL3 , IOL2 ,
IOL5 , IOL4 , IOL7 , IOL6 , IOM6 , IOM7 , IOM4 ,
IOM5 , ION6 , ION7 , IOM8 , IOM9 , IOP8 , ION8 ,
IOP6 , IOP7 , IOR6 , IOR7 , IOR8 , IOR9 , IOR4 ,
IOR5 , IOT3 , IOT2 , IOT7 , IOT6 , IOT5 , IOT4 ,
IOU6 , IOU5 , IOU2 , IOU1 , IOU8 , IOU7 , IOU4 ,
IOU3 , IOU9 , IOV8 , IOV6 , IOV5 , IOV1 , IOV2 ,
IOW5 , IOW6 , IOV3 , IOV4 , IOW7 , IOW8 , IOW1 ,
IOW2 , IOY3 , IOY4 , IOW3 , IOW4 , IOY6 , IOY5 ,
IOY2 , IOY1 , IOAA6 , IOAA5 , IOAA2 , IOAA1 , IOAA4 ,
IOAA3 , IOAB2 , IOAB1 , IOAB4 , IOAB3 , IOAC2 , IOAD1 ,
IOAC4 , IOAC3 , IOAD5 , IOAC5 , IOAD2 , IOAE2 , IOAD3 ,
IOAE4 , IOAD4 , IOAE3 , IOAB5 , IOAF3 , IOAB6 , IOAC6 ,
IOAC7 , IOAD6 , IOAE7 , IOAF5 , IOAB7 , IOAD7 , IOAE6 ,
IOAA7 , IOAF7 , IOAF6 , IOAC8 , IOAB8 , IOAD8 , IOAE8 ,
IOAF8 , IOY9 , IOY8 , IOW9 , IOAA8 , IOAC9 , IOAD9 ,
Altera Corporation 37
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
use STD_1149_1_1994.all;
38 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
-- ************************************************************************
-- * PIN MAPPING *
-- ************************************************************************
attribute PIN_MAP of EP1S25F672 : entity is PHYSICAL_PIN_MAP;
constant FBGA672 : PIN_MAP_STRING :=
--I/O Pins
"IOC1 : C1 , IOD2 : D2 , IOE3 : E3 , IOE4 : E4 , "&
"IOE1 : E1 , IOE2 : E2 , IOF3 : F3 , IOF4 : F4 , "&
"IOF1 : F1 , IOF2 : F2 , IOG5 : G5 , IOG6 : G6 , "&
"IOG1 : G1 , IOG2 : G2 , IOG3 : G3 , IOG4 : G4 , "&
"IOH1 : H1 , IOH2 : H2 , IOH3 : H3 , IOH4 : H4 , "&
"IOH6 : H6 , IOH5 : H5 , IOJ7 : J7 , IOH7 : H7 , "&
"IOJ4 : J4 , IOJ3 : J3 , IOJ2 : J2 , IOJ1 : J1 , "&
"IOJ6 : J6 , IOJ5 : J5 , IOK4 : K4 , IOK3 : K3 , "&
"IOK2 : K2 , IOK1 : K1 , IOK9 : K9 , IOJ8 : J8 , "&
"IOK6 : K6 , IOK5 : K5 , IOK8 : K8 , IOK7 : K7 , "&
"IOL3 : L3 , IOL2 : L2 , IOL5 : L5 , IOL4 : L4 , "&
"IOL7 : L7 , IOL6 : L6 , IOM6 : M6 , IOM7 : M7 , "&
"IOM4 : M4 , IOM5 : M5 , ION6 : N6 , ION7 : N7 , "&
"IOM8 : M8 , IOM9 : M9 , IOP8 : P8 , ION8 : N8 , "&
"IOP6 : P6 , IOP7 : P7 , IOR6 : R6 , IOR7 : R7 , "&
"IOR8 : R8 , IOR9 : R9 , IOR4 : R4 , IOR5 : R5 , "&
"IOT3 : T3 , IOT2 : T2 , IOT7 : T7 , IOT6 : T6 , "&
"IOT5 : T5 , IOT4 : T4 , IOU6 : U6 , IOU5 : U5 , "&
"IOU2 : U2 , IOU1 : U1 , IOU8 : U8 , IOU7 : U7 , "&
"IOU4 : U4 , IOU3 : U3 , IOU9 : U9 , IOV8 : V8 , "&
"IOV6 : V6 , IOV5 : V5 , IOV1 : V1 , IOV2 : V2 , "&
"IOW5 : W5 , IOW6 : W6 , IOV3 : V3 , IOV4 : V4 , "&
"IOW7 : W7 , IOW8 : W8 , IOW1 : W1 , IOW2 : W2 , "&
"IOY3 : Y3 , IOY4 : Y4 , IOW3 : W3 , IOW4 : W4 , "&
"IOY6 : Y6 , IOY5 : Y5 , IOY2 : Y2 , IOY1 : Y1 , "&
"IOAA6 : AA6 , IOAA5 : AA5 , IOAA2 : AA2 , IOAA1 : AA1 , "&
"IOAA4 : AA4 , IOAA3 : AA3 , IOAB2 : AB2 , IOAB1 : AB1 , "&
"IOAB4 : AB4 , IOAB3 : AB3 , IOAC2 : AC2 , IOAD1 : AD1 , "&
"IOAC4 : AC4 , IOAC3 : AC3 , IOAD5 : AD5 , IOAC5 : AC5 , "&
"IOAD2 : AD2 , IOAE2 : AE2 , IOAD3 : AD3 , IOAE4 : AE4 , "&
"IOAD4 : AD4 , IOAE3 : AE3 , IOAB5 : AB5 , IOAF3 : AF3 , "&
"IOAB6 : AB6 , IOAC6 : AC6 , IOAC7 : AC7 , IOAD6 : AD6 , "&
"IOAE7 : AE7 , IOAF5 : AF5 , IOAB7 : AB7 , IOAD7 : AD7 , "&
"IOAE6 : AE6 , IOAA7 : AA7 , IOAF7 : AF7 , IOAF6 : AF6 , "&
"IOAC8 : AC8 , IOAB8 : AB8 , IOAD8 : AD8 , IOAE8 : AE8 , "&
"IOAF8 : AF8 , IOY9 : Y9 , IOY8 : Y8 , IOW9 : W9 , "&
"IOAA8 : AA8 , IOAC9 : AC9 , IOAD9 : AD9 , IOAB9 : AB9 , "&
"IOAF9 : AF9 , IOAD10 : AD10, IOAE10 : AE10, IOAA9 : AA9 , "&
"IOAC10 : AC10, IOY10 : Y10 , IOAA10 : AA10, IOW10 : W10 , "&
"IOAB10 : AB10, IOAF10 : AF10, IOAB11 : AB11, IOAE11 : AE11, "&
"IOAC11 : AC11, IOY11 : Y11 , IOAD11 : AD11, IOAA11 : AA11, "&
"IOAD12 : AD12, IOAF12 : AF12, IOAB12 : AB12, IOAA12 : AA12, "&
"IOAB14 : AB14, IOAA14 : AA14, IOAB13 : AB13, IOAA13 : AA13, "&
"IOW15 : W15 , IOAC15 : AC15, IOY16 : Y16 , IOAD15 : AD15, "&
"IOAA16 : AA16, IOAC16 : AC16, IOAB16 : AB16, IOAD16 : AD16, "&
"IOW17 : W17 , IOAE16 : AE16, IOY17 : Y17 , IOAF17 : AF17, "&
"IOAA17 : AA17, IOY18 : Y18 , IOAE17 : AE17, IOW18 : W18 , "&
"IOAB17 : AB17, IOAA18 : AA18, IOY19 : Y19 , IOAF18 : AF18, "&
"IOAC17 : AC17, IOAD17 : AD17, IOAE18 : AE18, IOAF19 : AF19, "&
"IOY20 : Y20 , IOAA19 : AA19, IOAD18 : AD18, IOAB19 : AB19, "&
"IOAD19 : AD19, IOAC18 : AC18, IOAC19 : AC19, IOAE19 : AE19, "&
"IOAF20 : AF20, IOAE20 : AE20, IOAA20 : AA20, IOAB20 : AB20, "&
"IOAF21 : AF21, IOAC20 : AC20, IOAA21 : AA21, IOAB21 : AB21, "&
"IOAE21 : AE21, IOAD20 : AD20, IOAC21 : AC21, IOAE25 : AE25, "&
"IOAF22 : AF22, IOAF24 : AF24, IOAE22 : AE22, IOAD23 : AD23, "&
"IOAB22 : AB22, IOAE23 : AE23, IOAD24 : AD24, IOAC23 : AC23, "&
"IOAC22 : AC22, IOAD22 : AD22, IOAE24 : AE24, IOAD25 : AD25, "&
"IOAC24 : AC24, IOAD26 : AD26, IOAC25 : AC25, IOAB24 : AB24, "&
"IOAB23 : AB23, IOAB26 : AB26, IOAB25 : AB25, IOAA24 : AA24, "&
"IOAA23 : AA23, IOAA26 : AA26, IOAA25 : AA25, IOAA22 : AA22, "&
"IOY22 : Y22 , IOY26 : Y26 , IOY25 : Y25 , IOY24 : Y24 , "&
"IOY23 : Y23 , IOW23 : W23 , IOW24 : W24 , IOW21 : W21 , "&
Altera Corporation 39
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
40 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
-- ************************************************************************
-- * IEEE 1149.1 TAP PORTS *
-- ************************************************************************
-- ************************************************************************
-- * INSTRUCTIONS AND REGISTER ACCESS *
-- ************************************************************************
attribute INSTRUCTION_LENGTH of EP1S25F672 : entity is 10;
attribute INSTRUCTION_OPCODE of EP1S25F672 : entity is
"BYPASS (1111111111), "&
"EXTEST (0000000000), "&
"SAMPLE (0000000101), "&
"IDCODE (0000000110), "&
"USERCODE (0000000111), "&
"CLAMP (0000001010), "&
"HIGHZ (0000001011)";
-- ************************************************************************
-- * BOUNDARY SCAN CELL INFORMATION *
-- ************************************************************************
Altera Corporation 41
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
:
:
--BSC group 67 for I/O pin H10
"201 (BC_1, IOH10, input, X)," &
"202 (BC_1, *, control, 1)," &
"203 (BC_1, IOH10, output3, X, 202, 1, Z)," &
-- ************************************************************************
-- * DESIGN WARNING *
-- ************************************************************************
attribute DESIGN_WARNING of EP1S25F672 : entity is
"This EP1S25 BSDL file supports 1149.1 testing before device"&
"configuration. Boundary scan testing with differential pin"&
"pairs after configuration requires changes to this file. Please"&
"read the comments at the top of the file for further instruction.";
end EP1S25F672;
Conclusion The IEEE Std. 1149.1 BST circuitry available in Altera devices
provides a cost-effective and efficient way to test systems that
contain devices with tight lead spacing. Circuit boards with Altera
and other IEEE Std. 1149.1-compliant devices can use the EXTEST,
SAMPLE/PRELOAD, and BYPASS modes to create serial patterns
that internally test the pin connections between devices and check
device operation.
References Bleeker, H., P. van den Eijnden, and F. de Jong. Boundary-Scan Test:
A Practical Approach. Eindhoven, The Netherlands: Kluwer
Academic Publishers, 1993.
42 Altera Corporation
AN 39: IEEE 1149.1 (JTAG) Boundary-Scan Testing in Altera Devices
Revision History The information contained in version 6.0 of AN 39: JTAG Boundary-
Scan Testing in Altera Devices supersedes information published in
previous versions.
Version 6.0
The following changes were made to AN 39: JTAG Boundary-Scan
Testing in Altera Devices version 6.0:
Altera Corporation 43
AN 39: JTAG Boundary-Scan Testing in Altera Devices
Copyright © 2005 Altera Corporation. All rights reserved. Altera, The Programmable Solutions Company,
the stylized Altera logo, specific device designations, and all other words and logos that are identified as
trademarks and/or service marks are, unless noted otherwise, the trademarks and service marks of Altera
Corporation in the U.S. and other countries. All other product or service names are the property of their re-
101 Innovation Drive spective holders. Altera products are protected under numerous U.S. and foreign patents and pending
applications, maskwork rights, and copyrights. Altera warrants performance of its semiconductor products
San Jose, CA 95134
to current specifications in accordance with Altera's standard warranty, but reserves the right to make chang-
(408) 544-7000 es to any products and services at any time without notice. Altera assumes no responsibility or liability
http://www.altera.com arising out of the application or use of any information, product, or service described
herein except as expressly agreed to in writing by Altera Corporation. Altera customers
Applications Hotline: are advised to obtain the latest version of device specifications before relying on any pub-
(800) 800-EPLD lished information and before placing orders for products or services .
Literature Services:
[email protected]
44 Altera Corporation