Professional Documents
Culture Documents
2 Ieee BSDL: Medalist I3070 In-Circuit Test System Boundary-Scan Testing
2 Ieee BSDL: Medalist I3070 In-Circuit Test System Boundary-Scan Testing
Boundary-Scan Testing
2
IEEE BSDL
Overview 2-2
Elements of BSDL 2-3
Components of a BSDL Description 2-7
RUNBIST Description 2-42
INTEST Description 2-46
User Extensions to BSDL 2-48
Design Warning 2-50
Standard VHDL Package STD_1149_1_2001 2-51
User-Supplied VHDL Packages 2-55
Example Applications of BSDL 2-62
Sample BSDL Description 2-68
BSDL Quick Reference 2-71
2-1
2 IEEE BSDL
Overview
This chapter describes how to use IEEE Standard 1149.1- 2001 BSDL.
The information in this chapter is derived and/or reprinted from IEEE
Std. 1149.1- 2001, IEEE Standard Test Access Port and Boundary- Scan
Architecture, Copyright © 2001 by the Institute of Electrical and
Electronics Engineers, Inc. The IEEE disclaims any responsibility or
liability resulting from the placement and use in this publication.
Information is reprinted with the permission of the IEEE.
Elements of BSDL
• Character Set
• Strings
• Comments
• Syntax Definitions
• Lexical Atoms
• Commonly Used Syntactic Elements
Character Set
BSDL is not case sensitive and permits the following characters:
• Upper- and lower- case letters A to Z
• Digits 0 to 9
• Special characters " & ’ [ ] ( ) * , - . : ; < = > _
• Logical separators such as space and VHDL characters called:
• horizontal tabulation
• carriage return
Logical separators have two purposes:
• Separate lexical tokens such as reserved words and/or identifiers such
as the reserved word entity which must be separated from the
component name identifier that immediately follows it.
• Create visually appealing layouts.
Strings
A string is defined as a sequence of zero or more characters enclosed
between quotation marks. A quotation mark character is not allowed
within a string in BSDL. Strings are used extensively in BSDL. Since many
BSDL strings are potentially much longer than a single line, the
concatenation operator & is used to break them into manageable pieces.
BSDL does not permit replacement of the quotation mark with any other
character. A string literal has to fit on one line since it is a lexical
element. Therefore, the only legal VHDL format effector in a string literal
is horizontal tabulation.
Comments
Text between a double dash (- - ) and the end of a line is treated as a
comment. The text is allowed to contain any special character allowed by
VHDL. Comments syntactically terminate a line of description. Comments
may be interspersed with lexical elements. For example:
"This is all" & -- string split by comment
" a single string"
Syntax Definitions
BNF Conventions
BSDL syntax is presented in Backus- Naur Form (BNF):
• Any item enclosed in chevrons (< and >) is the name of a syntax item.
• Items enclosed between braces ({ and }) may be omitted or included one
or more times.
• Items enclosed between square brackets ([ and ]) may be omitted or
included only one time.
• Items enclosed between the pipe characters (¦ and ¦) may appear in
any order.
• Items shown in bold type have to be included exactly as presented
except for case.
• Alternative syntaxes are separated by a vertical bar ( | ).
• The symbol “::=” should be read as “is defined as”. Note that the
non- bold face “::=” is only part of a BNF description; in a BSDL file the
bold face characters “::=” are used to indicate assignment.
• White space (spaces, tabulation, carriage returns, etc.) is used in BNF
descriptions to enhance readability and are not part of the syntax.
However, white space needed to resolve lexical ambiguity (logical
separation) is required.
Lexical Atoms
• A <VHDL identifier> is any valid identifier chosen as an item name.
• An <integer> is any valid unsigned VHDL integer made up of an
unsigned numeric character sequence not containing an underscore (_)
character and not using an exponent field.
• A <real number> is any valid VHDL real number of the form
<integer>.<integer> or <integer>.<integer>E<integer> all written
contiguously without spaces or format effectors. Note 1E3 is not real
because it doesn’t contain a decimal point. The number 20.0E6 is real
as is 20000000.0.
• A <pattern> is a contiguous sequence of one or more 0, 1, and X
characters containing no spaces or format effectors. For example,
001X00 and XX010X, are legal. However, 100 X00 is not legal because
of the embedded space. A low state is denoted by 0, a high state is
denoted by 1, and a don’t care value is denoted by X.
• A <32- bit pattern> is a <pattern> with exactly 32 characters in its
character sequence.
• A <left bracket> is the bracket character ( [ ).
• A <right bracket> is right bracket character ( ] ).
• A <string> is any valid string or concatenated string structure.
The definitions of the possible values of <pin type> are given in Table 2- 1.
Value Meaning
in An input-only pin
out An output-only pin that may be connected to a bus wire driven by
multiple drivers (a 3-state or open-collector output)
buffer A 2-state output-only pin where either state is always actively driven
(must not be connected to bus wire)
inout A bidirectional pin
linkage Other pin types such as power, ground, analog, or no-connect
Use Statement
The optional <use statement> identifies a VHDL package in which specific
attributes or constants are defined so they can be referenced elsewhere in
a BSDL description. The use statement uses the following form:
The <user VHDL package identifier> in the <use statement> is the name of
the VHDL package that contains the information to be included. Identifiers
declared in VHDL packages cannot be defined:
• more than once in a single VHDL package.
• in more than one VHDL package referenced by a <user statement> or
<standard use statement> in a single BSDL description.
The use statement for 1149.1 information must also appear in each
user- defined package.
The package name that you assign should not include a pathname to the
package. The software performs a routine search for the package to ensure
that all information is retrieved. The search pattern that the software
follows is:
• current directory (typically, your board directory)
• directory where the BSDL source file is located
• /Agilent_ICT/library/supplemental/bsdl
We suggest that you place your BSDL files and packages in the
/Agilent_ICT/library/supplemental/bsdl directory, which is reserved
for this function. This strategy is particularly useful if you use the same
boundary- scan devices on various types of boards.
If you have a unique device, you might want to place its BSDL file and
associated package(s) in a separate directory (board directory).
constant DW:PIN_MAP_STRING:=
"CLK:1, Q:(2,3,4,5,7,8,9,10)," &
"D:(23,22,21,20,19,17,16,15)," &
"GND:6, VCC:18,OC_NEG:24,TDO:11,TMS:12,TCK:13,TDI:14";
constant FK:PIN_MAP_STRING:=
"CLK:9, Q:(10,11,12,13,16,17,18,19)," &
"D:(6,5,4,3,2,1,26,25), GND1:15, VCC1:8," &
"GND2:14,VCC2:22, OC_NEG:7,TDO:20, TMS:21, TCK:23, TDI:14";
Notice that this is the concatenation of two smaller strings. Agilent Test
System software reads the contents of the string. It matches signal names,
such as CLK, with the names in the port definition. For a given <port
map>, the <pin list> identifies the physical pin (or set of physical pins)
associated with the port called <port name>. A <pin ID> may be a number
or an alphanumeric identifier because some component packages, such as
Pin- Grid Arrays (PGA)s, use coordinate identifiers, such as A07 or H13.
Note, that however, that names like 7A and 13H are illegal since they are
not valid VHDL identifiers.
If signals such as that having <port name> Q in the above example are
identified as bit_vector in the <logical port description>, then there must
be a one- to- one mapping between the members of that bit_vector and the
members of the <pin list> associated with Q. The ordering of items in the
<pin list> is significant, and the ordering provides correlation between a
given <subscripted port name> and its associated <pin ID>. For example, if
Q were defined to have members "1 to 8", then the physical pin mapped
onto port Q(1) in the example above (for the DW component package)
would be pin 2 and Q(2) would be pin 3, etc. If Q were defined to have
members "8 downto 1" then Q(1) would be pin 10 and Q(2) would be pin 9,
etc.
Within a given <pin mapping> each <pin ID> will appear only once.
All non- linkage ports in the <logical port description> of a given BSDL
description will be referenced in each <pin mapping> of that description,
and vice versa. Separate BSDL descriptions are required for components
that do not have pin connections for some non- linkage signals.
For a given <port map> the number of members in the <pin list> must be
the same as the number of bits of the port’s bit_vector, or 1 if the relative
<port dimension> is bit.
The <port map> for a <port name> defined as bit in the <logical port
description> has to be defined using a single <pin ID> without a subscript.
The <port map> for a <port name> defined as a bit_vector in the <logical
description> has to be defined using one or more <pin ID> elements within
parenthesis.
Each <pin mapping name> must be unique within a <pin mappings>.
This BSDL description describes four pairs of voltage differential pins and
four pairs of current differential pins. Any <port ID> used in a <grouped
port identification> must have been declared in the <logical port
description> statement and name a signal of a non- linkage type.
Note the following:
• If a <port ID> is a <subscripted port name>, the <subscript> has to lie
within the range specified for the relevant port’s bit_vector.
• Any <port ID> appearing as a <representative port> has to also appear
as a <port ID> in a <cell spec> in the subsequent <boundary- scan
register description>.
• Any <port ID> appearing as an <associated port> must not appear as a
<port ID> in a <cell spec> in the subsequent <boundary- scan register
description>.
• The two ports listed in a <twin group> have to have the same pin type.
• Any <port ID> appearing in a <twin group> must be a <subscripted port
name>, or a <port name> defined in a <logical port description>
statement with corresponding <port dimension> equal to bit.
Copyright © 2001 IEEE All rights reserved.
IEEE Standard 1149.1 dictates that a device clock can stop in either
NOTE
the LOW state or BOTH; it does not allow for stopping the clock in the
HIGH state alone.
Signal names TDI, TDO, TMS, TRST, and TCK are used in the <logical port
description> in the above example. These names are those defined by
IEEE; however, arbitrary names could have been used.
Regarding the <port ID> elements in the <scan port identification>:
• The unique <port name> element in a <port ID> occurring in a <TDO
stmt> must appear as a value in an <identifier list> of a <pin spec> in
the <logical port description>. The value of <pin type> on that <pin
spec> has to be out.
• The unique <port name> element in a <port ID> occurring in a <TCK
stmt>, a <TDI stmt>, a <TMS stmt>, or a <TRST stmt> must appear as a
value in an <identifier list> of a <pin spec> in the <logical port
description>. The value of <pin type> on that <pin spec> has to be in.
• Any <port ID> appearing in the <scan port identification> has to be
<subscripted port name>, or a <port name> defined in a <logical port
description> statement with corresponding <port dimension> equal to
bit.
• No <port ID> in the <scan port identification> may appear in the
<boundary- scan register description>.
• A given <port ID> may occur at most once in the <scan port
identification>.
• If <port ID> is a <subscripted port name>, the <subscript> has to lie
within the range specified for the relevant port’s bit_vector.
The Agilent In- circuit Test System associates <port ID> elements in
<compliance port list> positionally with the bits in a <pattern>. For
example, the first appearing <port ID> is associated with the first
(left- most) bit in <pattern>, and similarly with the rest.
Note the following:
• The number of <port ID> elements in the <compliance port list> is equal
to the number of bits in each <pattern> within the <pattern list>.
• No <port ID> value may occur more than once in the <compliance port
list>.
• No <port ID> value in the <compliance port list> may also appear as a
<port ID> value in the <scan port identification>.
• Each <port ID> value in the <compliance port list> must appear as a
value in an <identifier list> of a <pin spec> in the <logical port
description>. The value of <pin type> in that <pin spec> has to be in.
• No <port ID> value in the <compliance port list> may later appear in
the <boundary- scan register description>.
INSTRUCTION_LENGTH
The <instruction length stmt> defines the length of the instruction register,
and hence, the number of bits that each opcode pattern must contain in
subsequent statements of the <instruction register description>.
INSTRUCTION_OPCODE
The <instruction opcode stmt> is a BSDL string containing instruction
identifiers and their associated bit patterns. The right- most bit in the
pattern is that closest to TDO (that shifted in first). Each <opcode
description> is such a pair. The IEEE standard mandates the existence of
EXTEST, BYPASS, PRELOAD, and SAMPLE instructions, with mandatory
bit patterns for the BYPASS. Other bit patterns may also decode to these
instructions. Decoding of unused bit patterns defaults to the BYPASS
instruction.
For example, consider the following opcodes for a device:
attribute INSTRUCTION_OPCODE of ttl74bct8374
"BYPASS (11111111, 10001000)," &
"EXTEST (x000x000)," &
"PRELOAD (x0000010)," &
"SAMPLE (x0000010)";
The opcode for EXTEST (x000x000) could decode to one of four codes as
shown below:
00000000
10000000
00001000
10001000
The problem illustrated here is that the last code (10001000) is reserved
as a BYPASS opcode, so the bit positions list as X (don't care) are not
really don't care positions. You must ensure that such ambiguity does not
find its way into your BSDL file. If such a problem does exist in your file,
the BSDL compiler will generate an error message telling you that you
have ambiguous opcodes.
INSTRUCTION_CAPTURE
The <instruction capture stmt> specifies the bit pattern that is loaded into
the instruction register when the TAP controller passes through the
Capture- IR state. This bit pattern is shifted out whenever a new
instruction is shifted in. The IEEE standard mandates that the least
significant bits must be "01". The remainder of this bit pattern is
design- specific.
INSTRUCTION_PRIVATE
The optional <instruction private stmt> identifies instructions that are
private and potentially unsafe for use by other than the component’s
manufacturer. By definition, the effects of these instructions are undefined
to the general public; and their use should be avoided.
Failure to follow warnings about private instructions can result in
CAUTION
damage to the component, circuit board, or system.
Additional details:
• The integer value of the attribute INSTRUCTION_LENGTH has to be
greater than or equal to 2. This value is to be interpreted as the length
of the instruction register.
• All opcodes defined within a <pattern list> have to have length equal to
that of the instruction register.
• The all 1’s opcode must decode to BYPASS or, not be defined explicitly
for any instruction.
• Opcodes for SAMPLE and PRELOAD have to be defined, and the
<opcode description> to which each is defined must have SAMPLE and
PRELOAD as the value of its <instruction name> element, respectively.
Note that each instruction may decode to the SAME opcode bit pattern,
as a single opcode can be used to implement both functions.
• Opcodes containing X bits must not be ambiguous (decodable as two or
more different instructions). That is, if there are two <opcode
description> elements and two <pattern> elements such that one
appears in each of the two <opcode description> elements, the two
<pattern> elements must differ in some character position in which
neither pattern contains the character X.
• The <pattern> value in the <instruction capture stmt> has to have a
length equal to that of the instruction register. The two least significant
bits of this <pattern> have to be 01.
• Only user defined instructions can be defined as private.
• Any <instruction name> appearing in an <instruction list> must appear
only once and also appear in the <opcode table>.
Table 2-2 List of Cells Defined in the Standard VHDL Package and Relevant Figure Numbers in IEEE 1149.1-2001
A very general cell design from IEEE (figure 11- 18) is shown in
Figure 2- 2. Figure 2 shows a symbolic representation of the same cell
design.
The design consists of a parallel input (PI), a parallel output (PO), a
multiplexer controlled by a mode signal, and two flip- flops. The mode
signal is a function of the current instruction. A serial input (SI) and a
serial output (SO) form the shift path through the cell. The mode signal is
a logic 0 or 1 that tells a cell what test function to perform.
Note that the symbolic representation does not include the following:
• the multiplexer controlled by signal ShiftDR.
• the mode signal and multiplexer.
• the clock signals, ClockDR and UpdateDR.
These parts of the cell design do not need to be considered in BSDL
because the control and operation of boundary- scan register cells is fully
defined by IEEE. Figure 2- 3 is a full representation of the cell design
shown in Figure 2- 2 for the purposes of BSDL.
(Shift)
Scan Out Mode
(SO)
Shift-DR
MUX
The parallel input and output are shown on the symbol and these are
connected to various places depending on the application. The two
flip- flops are labeled CAP and UPD to represent their uses. The CAP
flip- flop captures data from the cell’s system data input in the Capture-DR
controller state and lies on the shift register path. The UPD flip- flop loads
data from the CAP flip- flop in the controller state. The shift path is
shown because many such cells will be linked together in a shift chain
that makes up the boundary- scan register. The shift path links only the
CAP flip- flops.
One cell design shown in Figure 2- 3 is an observe- only cell and has a
symbol with no UPD flip- flop. This cell can be used at a system input pin
and has the advantage of lower propagation delay in some
implementations. However, it does not support the optional INTEST
instruction if provided at a non- clock input.
SO SO
C U C
PI A P PO PI A PO
P D P
(a) (b)
SI SI
Figure 2-4 Symbols for a Boundary Cell with Preset (a) and Clear (b) on the UPDATE
Flip-Flop
SO SO
C U C U
PI A P PO PI A P PO
P D P D
(a) (b)
SI SI
The <boundary length stmt> defines the number (LENGTH) of cells in the
boundary- scan register. This number has to match the number of <cell
entry> elements in the <boundary register stmt>, which describes the
structure of the boundary- scan register. Some cells may require two lines
of description.
Notice that many of the cell designs are somewhat general, meaning that
they can be used in more than one context. The value of the <function>
element has important implications in describing a given cell.
The three preceding checks state what <port ID> elements in the <logical
port description> must appear in the <boundary register stmt> and
vice- versa. The following checks state the properties that must exist for
<function> elements within <cell entry> elements.
3 If the preceding step can be satisfied, the <cell entry> has INTEST
support capability, otherwise it does not.
RUNBIST Description
The goal of this section of BSDL description is to provide support for the
RUNBIST instruction as IEEE specifies. In some cases this may not
completely define the Built- In Self_Test (BIST) operational environment. In
such cases additional information must be supplied externally.
The following features of BIST implementation are not explicitly supported
by BSDL:
• Timing related information (beyond active clock and number of clock
cycles)
• Frequency and phase relationships of clocks
RUNBIST is a self- contained health check of the component. The present
clause conforms to the following requirements and constraints imposed by
IEEE.
A duration for BIST to complete execution has to be specified. This is
independent of the board environment. This duration can be given in
terms of absolute time (for example, devices clocked by internally
generated clocks) or, more commonly, by the number of clock cycles of
TCK and/or the system clock(s).
The steps required for completion of the execution of RUNBIST are as
follows:
1 (Optional) Initialize the boundary- scan register (for example, by
PRELOAD). This is required if the pin state during BIST is to be
determined by the data in the latched parallel outputs of the register.
2 Initiate BIST: scan the RUNBIST instruction into the instruction
register.
3 Execute BIST: cause the TAP controller to remain in its Run- Test/Idle
controller state for the duration required for completion of the
execution of BIST.
4 Evaluate BIST results: bring the TAP controller to the Shift- DR
controller state and scan out the test results (a signature) from the
register connected to TDI and TDO by the RUNBIST instruction.
In Example 2- 32, the device needs to wait in the Run- Test/Idle controller
state for the duration sufficient for the application of 23000 clock cycles of
TCK.
INTEST Description
The goal of this section of a BSDL description is to describe:
• How test patterns are to be applied to the component when the INTEST
instruction is selected (the source of clock pulses for the component
and the time for which the test logic must remain in the Run- Test/Idle
controller state to permit execution of each applied test).
• The external behavior of the component while the INTEST instruction is
selected.
Note that the test patterns themselves are not specified and are assumed
to be provided by an alternative method, not specified here. For INTEST,
the duration is not the duration for the entire test (as is the case of
RUNBIST) but the time required for the application of a single vector.
With the application of each vector by the boundary- scan register, IEEE
permits the device to execute a single step of operation which may require
several clock cycles to complete. Otherwise, the interpretation of <pin
spec> is identical to that in RUNBIST_EXECUTION.
INTEST description uses the following format:
Design Warning
A component designer may know of situations in which the system usage
of a component can be subverted by the boundary- scan feature and cause
circuit problems. As a simple example, a component may have dynamic
system logic which requires clocking to maintain its state. Thus, clocking
must be maintained when bringing the component out of system mode and
into test mode for INTEST. The DESIGN_WARNING attribute can be
assigned a string message to alert future consumers of the potential for
problems. Design warning uses the following format:
-- Miscellaneous
This can be read as “for this cell used as an INPUT cell, while EXTEST is
in effect, the capture flip- flop loads the Parallel Input (PI) data at the
CAPTURE- DR state.”
This can be read as “for this cell used as a Bidirectional cell acting as an
input (BIDIR_IN), while INTEST is in effect, the capture flip- flop loads the
value of the Update flip- flop (or latch) data (UPD) at the CAPTURE- DR
state.”
This can be read as “for this cell used as a (2- state) output cell, while
SAMPLE is in effect, the capture flip- flop loads the Parallel Input (PI)
data at the CAPTURE- DR state.”
This can be read as “for this cell used as a (3- state) output cell, while
EXTEST is in effect, the capture flip- flop loads a 0 (ZERO) data at the
CAPTURE- DR state.”
Figure 2-5 A General Model of a Boundary Register Cell Showing CAP Inputs
To next
cell Mode
PI
PO
0
0 1
1 2
X 3
4
5
6 CAP UPD
ClockDR UpdateDR
Semantic Checks
In the following tables, an L indicates legality. An M indicates legality in
the case of merged cells only. An A indicates legality when the cell is an
additional cell not mandated by IEEE. A <capture descriptor> is a (<cell
context> <capture instruction> <data source>) element. An example of an
illegal <capture descriptor> is (Input, Extest, UPD).
package USER_PACKAGE is
use STD_1149_1_2001.all;
Internal Cells
Internal cells can be used to capture "constants" or system- logic- dependent
values (0s and 1s) within a design. One proposed use of this ability is
capturing of a hard- coded value (perhaps in the first few bits of the
boundary- scan register) as an informal identification code. Another
application is to monitor power connections to ensure that they are
receiving the correct input supply and to capture a data bit based on the
measured results. If the power connections are good, the data loaded will
be 1, for example, while a faulty power input would cause a 0 to be
captured. Internal cells, either with control- and- observe capability or
observe- only capability, may sit at the boundary between digital and
analog sections of the core circuitry. Finally, there may be extra, unused,
cells in a programmable component.
Figure 2-6 A Component Illustrating Observe_Only and Internal Cells (Copyright © 2001
IEEE All rights reserved)
INTERNAL
12
11
CONTROL
13
INPUT
OUTPUT3 10 7
14 OUTPUT_1
6 INPUT
INPUT_1
9
INTERNAL
15
OBSERVE_ONLY
8
OUTPUT2 8
16 OUTPUT_2
5 INPUT
INPUT_2
7
D OBSERVE_ONLY
17
OBSERVE_ONLY I
G 6
INTERNAL
I
4
T
INPUT_3 CONTROL 5
A
18 CLOCK,
INPUT, or L
OBSERVE_ONLY
4 9
OUTPUT3
BIDIR_1
19 3
INTERNAL INPUT
2
OBSERVE_ONLY
1
INTERNAL A
N 10
A
ANALOG
INTERNAL
0 L
O
G
3
TDI
2 11
TMS TAP Controller
TCK 1 TDO
Merged Cells
The component shown in Figure 2- 7 on page 2- 66 is used to illustrate a
boundary- scan register description and which special cases are handled.
These special cases arise because IEEE allows boundary- scan cells to be
merged when the system logic between them is null. Cells may be merged
if the "logic" between them is simply a data path, such as a wire or buffer.
When merging is done, the resulting cell must obey a combination of the
rules of the merged cells.
6
BIDIR2 BIDIR3
EN3
4
7
EN4
3 EN2
SYSTEM LOGIC
IN2
8 2 BIDIR1
1
OUT2
0 EN1
9
IN1 OUT1
TDI TDO
• Cells 0, 4, and 7 are control cells located between the system logic and
the enable for signals OUT1, BIDIR2, and BIDIR3. Notice that values are
assigned to the "safe" subfields for these cells to cause the associated
drivers to disable.
• Cell 3 is the control for the reversible cell used on the bidirectional
signal BIDIR1. Notice its "safe" subfield is given the value that causes
BIDIR1 to be an input.
• Cell 1 is a 2- state output data cell. Note that it has the three extra
fields indicating that it controls its own open- collector, asymmetrical
driver. By placing a 1 in cell 1, the driver at OUT2 can be set to the
inactive drive state in which it will output the WEAK1 state.
• Cell 2 is a reversible cell serving either as an input (if the control cell
has turned off the output driver, meaning that cell 3 produces a 0) or
as the data source for the driver (if the output is enabled).
• Note that the structures for BIDIR2 AND BIDIR3 allow observation of
the driver, thus allowing a simple consistency check.
• Cell 5 (and similarly cells 6 and 9) has merged behavior: it serves as
the input receiver for BIDIR3, and as the data source for BIDIR2. As a
result, the cell has two lines of description in the boundary- scan
register definition. The first gives its behavior as an input cell while the
second describes its characteristics as an output cell. Note that cell
BC_1 used in this capacity must support both INPUT and OUTPUT3
functions. This is reflected in the definition of BC_1 where both
functions exist for all instructions.
The example in Figure 2- 7 is extreme and includes several unusual cases.
Most component implementations are quite simple and routine.
D8 15 8 D Q 0 10 Q8
D7 16 9 D Q 1 9 Q7
D6 17 10 D Q 2 8 Q6
D5 19 11 D Q 3 7 Q5
D4 20 12 D Q 4 5 Q4
D3 21 13 D Q 5 4
Q3
D2 22 14 D Q 6 3 Q2
D1 23 15 D Q 7 2
Q1
OC- 24 16
BCR
1 17 Register
CLK
Bypass
Register
Instruction
Register 11 TDO
TDI 14
• The syntax for each statement shows you what information is needed to
use a statement properly. They are broken down into levels and each
level explains the information needed to complete an element of the
syntax.
An element that contains a stack of information (such as
Example 2- 54) shows that information for that level can be written
using any one of the combinations shown.
In this example, the element <Cell Table> can be described using a single
<Cell Entry>, or a list of <Cell Entry>s with each entry separated by a
comma (,).
Statement Description
attribute BOUNDARY_CELLS Identifies which cells are used in the Boundary Register.
attribute BOUNDARY_LENGTH Defines the number of cells in the Boundary Register.
attribute BOUNDARY_REGISTER Describes the Boundary Register itself.
attribute COMPLIANCE_PATTERNS Identifies "compliance enable" pins and their static logic states.
attribute COMPONENT_CONFORMANCE Identifies the edition of the IEEE Standard to which a physical
component’s testability circuitry conforms.
attribute INSTRUCTION_CAPTURE States what bit pattern is loaded into the Instruction Register at
CAPTURE_IR.
attribute INSTRUCTION_LENGTH Defines the length of the device's Instruction Register.
attribute INSTRUCTION_OPCODE Identifies the operation codes of the Instruction Register.
attribute INSTRUCTION_PRIVATE Identifies opcodes that are private and potentially unsafe.
attribute (optional registers) Identifies whether optional registers prescribed by the IEEE
Standard are present.
attribute PIN_MAP Declares the pin mapping function for a device.
attribute REGISTER_ACCESS Tells software that registers other than those prescribed by the
IEEE Standard are present.
attribute TAP_SCAN_CLOCK Describes the devices Test Clock (TCK) port.
attribute TAP_SCAN_IN Identifies the devices Test Data In (TDI) port.
attribute TAP_SCAN_MODE Identifies the devices Test Mode Select (TMS) port.
attribute TAP_SCAN_OUT Identifies the devices Test Data Out (TDO) port.
attribute TAP_SCAN_RESET Identifies the devices Test Reset (TRST) port.
BSDL extension Optional BSDL extensions provide a way to expand BSDL for
proprietary needs without losing compatibility with the
mainstream definition of BSDL. For information about using BSDL
extensions, see User Extensions to BSDL.
constant (entity) Describes the mapping between logical port names and physical
pins.
Statement Description
constant (package) Declares the name of a constant and references it within the
package body.
constant (package body) Describes the parameters of a Boundary-Cell design.
end Marks the end of an entity, package, or package body.
entity Marks the beginning of a block of statements that outline the
overall description of a device.
generic Selects among several packaging options for a device.
package Marks the beginning of a block of statements that describe the
IEEE Standard or a user-specified boundary-cell definition.
package body Marks the beginning of a block of statements that provide the
detailed descriptions of Boundary-Register cells.
port Assigns meaningful symbolic names to the device's system
terminal.
use Identifies a VHDL package needed to define the attributes for a
device.
Syntax
attribute BOUNDARY_CELLS of <device id>: entity is "<Cell List>";
<device id> is a <VHDL identifier>
<Cell List> can be: <Cell Name>
<Cell Name> , <Cell Name>
<Cell Name> , <Cell Name>, . . . <Cell Name>
<Cell Name> is a VHDL IDENTIFIER
Parameters
<Cell List> Identifies the cell designs employed by the Boundary Register.
Most of the time these cells will be part of the intrinsic set of cells
described by IEEE Standard 1149.1. However, these cells may also
be user- designed cells that follow IEEE Standard rules.
<Cell Name> The cells for the IEEE Standard are labeled BC_1 through BC_6
and are used in a standard practice. User- designed cells can have
almost any label except those established as a BSDL standard
practice.
Examples
attribute BOUNDARY_CELLS of My_IC : entity is "BC_1, MyCell";
General Information
(none)
Syntax
attribute BOUNDARY_LENGTH of <device id>: entity is <integer>;
<device id> is a <VHDL identifier>
Parameters
(none)
Examples
attribute BOUNDARY_LENGTH of My_IC : entity is 3;
General Information
(none)
Syntax
attribute BOUNDARY_REGISTER of <device id>: entity is "<Cell Table>";
<device id> is a <VHDL identifier>
<Cell Table> can be: <Cell Entry>
<Cell Entry> , <Cell Entry>
<Cell Entry> , <Cell Entry> , . . . <Cell Entry>
<Cell Entry> can be: <Cell Number> ( <Cell Info> )
<Cell Number> is an <integer>
<Cell Info> can be: <Cell Spec>
<Cell Spec> , <Disable Spec>
<Cell Spec> can be: <Cell ID>,<Port ID>,<Function>,<Safe Value>
<Cell ID> is an <VHDL identifier>
<Port ID> can be: <Port Name>
*
<Port Name> is a <VHDL Identifier>
<Function> can be: Input
Output2
Output3
Control
Controlr
Internal
Clock
Bidir
<Safe Value> can be : 0
1
X
<Disable Spec> can be: <Disable Cell>,<Disable Val>,<Disable Result>
<Disable Cell> can be: <Cell Number>
<Disable Val> can be: 0
1
<Disable Result> can be: Z
Weak0
Weak1
Parameters
<Cell Table> This parameter is a string containing cell numbers and
specifications that define what the cell does.
<Cell Info> The Cell Info parameter contains the cell and port identifications,
the cell's function, and its safe value. It may also contain the
disable specification for the cell if it is a bidirectional cell or
busable output.
<Port ID> The Port ID parameter can be either a symbolic name given to a
port in the logical port description, or an asterisk (*) if the cell
serves as an output control or is an internal cell.
<Function> The Function parameter identifies the cells primary function.
<Safe Value> This parameter identifies the value that a device designer prefers
to have loaded into the UPDATE flip- flop when the software
would otherwise choose a value randomly. An X in this position
signifies that the value does not matter.
<Disable Spec> The disable specification provides the number of the controlling
cell, the value that the controlling cell (ccell) must have to disable
the output driver, and the state (result) that the disabled driver
goes to, which can be a high- impedance state (Z), a weak 1, or a
weak 0.
Examples
attribute BOUNDARY_REGISTER of My_IC : entity is
-- num cell port function safe [ccell disval rslt]
" 0 (BC_1, IN, input, X), " &
" 1 (BC_1, *, control, 0), " &
"
2 (MyCell, OUT, output3, X, 1, 0, Z)";
General Information
(none)
Syntax
attribute COMPLIANCE_PATTERNS of <device id> : entity is <compliance pattern
string> ;
<compliance pattern string>::= " ( <compliance port list> ) ( <pattern list> )"
<compliance port list>::= <port ID> { , <port ID>}
<pattern list>::= <pattern> { , <pattern> }
Parameters
<port ID> A pin name of the device. Note this pin is NOT provisioned with
boundary register cells. It is an error if such a pin is identified
here.
<pattern> A binary pattern of digits "0", "1" or "X" characters containing no
embedded spaces. These are associated right- to- left, one per <port
ID> in the compliance port list. There must be exactly as many
binary pattern digits as there are <port ID> elements. A <pattern>
may contain X bits to reduce the size of a <pattern list>. As an
example, the <pattern list> 1111X, 0XXX0 specifies 10 unique bit
patterns that enable compliance.
Examples
attribute COMPLIANCE_PATTERNS of My_IC: entity is
"(Pin_A, Pin_B, Pin_P, Pin_C1, Pin_C2) (00011)";
General Information
Tests using test facilities defined by 1149.1 must assure that any
compliance- enable conditions are first set up before exercising the TAP of
the affected IC. A compliance- enable pattern must be held constant for the
duration of all boundary- scan testing.
Syntax
attribute COMPONENT_CONFORMANCE of <device id>: entity is <conformance string> ;
<conformance string>::= " <conformance identification> "
<conformance identification>::= STD_1149_1_1990 | STD_1149_1_1993 |
STD_1149_1_2001
Parameters
STD_1149_1_1990 refers to IEEE Std 1149.1- 1990.
STD_1149_1_1993 refers to to IEEE Std 1149.1a- 1993.
STD_1149_1_2001 refers to IEEE Std 1149.1- 2001.
Subsequent editions of this annex may add new values to the conformance
identification syntax.
Examples
attribute COMPONENT_CONFORMANCE of My_Old_IC:entity is
"STD_1149_1_1990"; -- old 1990 component
General Information
(none)
Syntax
attribute INSTRUCTION_CAPTURE of <device id>: entity is "<Pattern>";
<device id> is a <VHDL identifier>
<Pattern> is a <binary string>
Parameters
<Pattern> The pattern is a binary string that identifies the capture function.
The two right- most bits of this pattern must be 01 as prescribed
by the IEEE Standard. Xs are allowed if unknown data is captured
in higher order bits.
Examples
attribute INSTRUCTION_CAPTURE of My_IC : entity is "0101";
General Information
(none)
Syntax
attribute INSTRUCTION_LENGTH of <device id>: entity is <integer>;
<device id> is a <VHDL identifier>
Parameters
(none)
Examples
attribute INSTRUCTION_LENGTH of My_IC : entity is 4;
General Information
(none)
Syntax
attribute INSTRUCTION_OPCODE of <device id>: entity is "<Opcode Table>";
<device id> is a <VHDL identifier>
<Opcode Table> can be: <Opcode Desc>
<Opcode Desc>, <Opcode Desc>
<Opcode Desc>, <Opcode Desc>, . . .<Opcode Desc>
<Opcode Desc> can be: <Opcode Name> ( <Pattern List> )
<Pattern List> can be: <Pattern>
<Pattern> , <Pattern>
<Pattern>, <Pattern>, . . . <Pattern>
<Pattern> is a <binary string>
<Opcode Name> can be : Extest
Sample
Preload
Intest
Runbist
Bypass
IDcode
Usercode
VHDL identifier
Parameters
<Pattern> The pattern is a binary string that identifies the opcode of a
particular function. This string can include 1s 0s or Xs. You
should be careful when you use an X to ensure that the resulting
opcode is not ambiguous such that it might decode to a function
other than what is intended. The BSDL compiler would reject the
code and issue an error message if an ambiguity occurred. The
binary string's length must match the length of the
INSTRUCTION_LENGTH attribute. All related opcodes must also be
the same length. Any unspecified bit pattern will default to the
BYPASS function.
<Opcode Name> The opcode name identifies the function, which is a test name or
user- specified instruction. The bit patterns for the opcode names
are assigned by the device designer except for EXTEST and
BYPASS, which have patterns mandated by IEEE Standard 1149.1.
These two opcode names may have additional bit patterns assigned
by the device designer.
Examples
attribute INSTRUCTION_OPCODE of My_IC : entity is
"Extest (0000), " &
"Bypass (1111), " &
General Information
(none)
Syntax
attribute INSTRUCTION_PRIVATE of <device id>: entity is "<Opcode List>";
<device id> is a <VHDL identifier>
<Opcode List> can be: <Opcode Name>
<Opcode Name>, <Opcode Name>
<Opcode Name>, <Opcode Name>, . . .<Opcode Name>
<Opcode Name> is a VHDL IDENTIFIER
Parameters
<Opcode Name> The opcode (operation code) parameter for this statement is a
VHDL identifier provided by the device designer. It gives the
code(s) that are potentially unsafe for access.
Examples
attribute INSTRUCTION_PRIVATE of My_IC : entity is "Secret";
General Information
(none)
Syntax
attribute <attribute name> of <device id>: entity is "<Pattern>";
<attribute name> can be: IDCODE_REGISTER
USERCODE_REGISTER
<device id> is a <VHDL identifier>
<Pattern> is a <special binary string>
Parameters
<special binary string>The special binary string identifies the optional register. An X
is allowed in this string to specify a “don't care” state for that
position.
Examples
attribute IDCODE_REGISTER of My_IC : entity is
"0011" & -- 4 bit version
"1111000011110000" & -- 16 bit part number
"00000000111" & -- 11 bit manufacturer
"1"; -- mandatory LSB
attribute USERCODE_REGISTER of My_IC : entity is
"10XX" &
"0011110011110000" &
"00000000111" &
"1";
General Information
(none)
Syntax
attribute PIN_MAP of <device id>: entity is PHYSICAL_PIN_MAP;
<device id> is a <VHDL identifier>
Parameters
(none)
Examples
attribute PIN_MAP of ttl74bct8374 : entity is PHYSICAL_PIN_MAP;
General Information
(none)
Syntax
attribute REGISTER_ACCESS of <device id>: entity is "<Register String>";
<device id> is a <VHDL identifier>
<Register String> can be: <Register Assoc>
<Register Assoc> , <Register Assoc>
<Register Assoc>, <Register Assoc>, . . .<Register Assoc>
<Register Assoc> can be: <Register> ( <OpcodeList> )
<Register> can be: <VHDL Identifier> [register length]
BOUNDARY
BYPASS
IDCODE
<Opcode List> can be: Opcode Name>
<Opcode Name>, <Opcode Name>
<Opcode Name>,<Opcode Name>, . . .<Opcode Name>
<Opcode Name> can be: Runbist
VHDL IDENTIFIER
Parameters
<Register Assoc> This parameter identifies the registers associated with the
specified opcode(s).
<Opcode Name> The opcode name identifies the function, which is a user- specified
instruction.
Examples
attribute REGISTER_ACCESS of My_IC : entity is
"Boundary (Secret, User1), " &
"Bypass (Hi_Z, User2), " &
"MyReg [4] (LoadSeed, ReadTest)";
General Information
(none)
Syntax
attribute TAP_SCAN_CLOCK of <port name>: signal is ( <clock record> );
<clock record> is <real number>, <state value>
<state value> can be: low
both
Parameters
<clock record> The clock record parameter identifies the maximum operating
frequency for TCK and the state at which the clock can be
stopped.
<real number> The <real number> parameter specifies the maximum clock
frequency in hertz at which the test clock can run. VHDL requires
that this number include a decimal point.
<state> The <state> parameter tells you what state you can stop the test
clock in without the TAP Controller losing its state. There are only
two possible values for this parameter:
• low tells you that TCK can be stopped only in the low
state.
• both tells you that TCK can be stopped in either state.
Examples
attribute TAP_SCAN_CLOCK of TCK : signal is (17.5e6, BOTH);
General Information
(none)
Syntax
attribute TAP_SCAN_IN of <port name>: signal is <boolean>;
<port name> is <VHDL Identifier>
<boolean> is true
Parameters
<boolean> The value of the boolean for this attribute has no particular
function; it simply satisfies the VHDL syntactical needs of the
statement.
Examples
attribute TAP_SCAN_IN of TDI : signal is true;
General Information
(none)
Syntax
attribute TAP_SCAN_MODE of <port name>: signal is <boolean>;
<port name> is <VHDL Identifier>
<boolean> is true
Parameters
<boolean> The value of the boolean for this attribute has no particular
function; it simply satisfies the VHDL syntactical needs of the
statement.
Examples
attribute TAP_SCAN_MODE of TMS : signal is true;
General Information
(none)
Syntax
attribute TAP_SCAN_OUT of <port name>: signal is <boolean>;
<port name> is <VHDL Identifier>
<boolean> is true
Parameters
<boolean> The value of the boolean for this attribute has no particular
function; it simply satisfies the VHDL syntactical needs of the
statement.
Examples
attribute TAP_SCAN_OUT of TDO : signal is true;
General Information
(none)
Syntax
attribute TAP_SCAN_RESET of <port name>: signal is <boolean>;
<port name> is <VHDL Identifier>
<boolean> is true
Parameters
<boolean> The value of the boolean for this attribute has no particular
function; it simply satisfies the VHDL syntactical needs of the
statement.
Examples
attribute TAP_SCAN_RESET of TRST : signal is true;
General Information
(none)
Syntax
constant <VHDL identifier>: PIN_MAP_STRING := "<Map String>";
<Map String> can be: <Port Name> : <Pin List>, . . .<Port Name>: <Pin List>
<Port Name> can be: <VHDL identifier>
<Pin List> can be: <Pin ID>
( <Pin ID, . . . <Pin ID> )
<Pin ID> can be: <integer>
<VHDL identifier>
Parameters
<Map String> The Map String parameter identifies the mapping between port
names and physical pin numbers.
<Port Name> The Port Name parameter identifies the device pin that the
constant defines. The name of the port must match that given in
the logical port description.
<Pin ID> This parameter identifies the physical pin of a device to which the
port name is mapped. This parameter is typically a pin number,
but can consist of an alphanumeric identifier (A7) for devices such
as pin grid arrays.
Examples
constant dw_package : PIN_MAP_STRING := "CLK:1, Q:(2,3,4,5,7,8,9,10)";
constant fk_package : PIN_MAP_STRING := "CLK:9, Q:(10,11,12,13,14,15,16,17)";
constant PGA_package: PIN_MAP_STRING := "CLK:7, Q:(A4, A5, A6, A7)"
General Information
(none)
Syntax
constant <VHDL identifier>: CELL_INFO ;
Parameters
(none)
Examples
constant BC_1 : CELL_INFO ;
General Information
(none)
Syntax
constant <VHDL id>: CELL_INFO := ((<function code>), . . .(<function code>) )
<function code> is <function>, <instruction>, <CAP data source>
<function> can be: Input
Output2
Output3
Control
Controlr
Internal
Clock
Bidir_in
Bidir_out
<instruction> can be: Extest
Sample
Intest
Runbist
<CAP data source> can be: PI
PO
UPD
CAP
X
ZERO
ONE
Parameters
<function code> This parameter provides the description of a part of the behavior
of a Boundary Register cell. It tells you for a given cell function,
while a certain instruction is in effect, what data is loaded into
the CAPTURE flip- flop when passing through the CAPTURE- DR
state.
<function> The function parameter describes the cells role in the Boundary
Register.
<instruction> The instruction parameter identifies the instruction in effect.
<CAP data source> This parameter identifies the data that will be loaded into the
CAPTURE flip- flop. The value loaded into the CAP flip- flop can
come from:
PI the cell’s parallel input
PO a feedback from the cell's parallel output
UPD a feedback from the cell's update flip- flip, which recalls
previously loaded CAP data
CAP a feedback from the cell's capture flip- flop, which retains
data loaded in the CAP
X an input loading an X (don’t care)
ZERO an input loading a constant 0
ONE an input loading a constant 1
Examples
constant BC_3: CELL_INFO :=
( (input, extest, pi), (internal, extest, pi),
(input, sample, pi), (internal, sample, pi) )
General Information
(none)
end (BSDL)
Marks the end of an entity, package, or package body. The identifier of the
end statement must match that of the statement that it terminates.
Syntax
end <VHDL identifier>;
Parameters
(none)
Examples
end My_New_Cells; -- terminates the package or package body called My_New_Cells
end ttl74bct8374; -- terminates the entity for a specified device
General Information
(none)
entity (BSDL)
Marks the beginning of a block of statements that provide the overall
description a device within VHDL. Within the entity, the boundary- scan
parameters of a device are described. The entity relies upon the package
to provide device attribute information. The definitions related to IEEE
Standard 1149.1 come from a pre- written, standard VHDL package (and
related package body).
Syntax
entity <device id> is
<device id> is a <VHDL identifier>
Parameters
(none)
Examples
entity ttl74bct8374 is -- identifies a device as the entity
General Information
The entity statement is an element of VHDL.
generic (BSDL)
This statement is a parameter within the entity description. It selects
among several packaging options that a device may have. Each option may
have a different mapping between the package pins and the device's
bonding pads. The generic parameter must have the name
PHYSICAL_PIN_MAP so software can identify it.
Syntax
generic ( PHYSICAL_PIN_MAP : string := "<string expression>" );
Parameters
<string expression> This parameter initializes the string to an arbitrary value when
“undefined” and will not pass the parameter; the package will have
to be selected using an external mechanism. If the string is
initialized to a specified value, the parameter will pass its
information.
Examples
generic ( PHYSICAL_PIN_MAP : string := "UNDEFINED") ! the package option will
! have to be specified by an external mechanism
generic (PHYSICAL_PIN_MAP : string := "FK_Package")
! selects the FK package option
General Information
The generic parameter is a VHDL construct used to pass data into a VHDL
model. The external mechanism used by Boundary- Scan Software is the - p
option when running SPD. For more information, refer to Scan Port
Driver.
package (BSDL)
Marks the beginning of a block of statements that describe IEEE Standard
1149.1 or user- specific boundary cell definitions. The package typically
contains general statements that reference items with the related package
body.
Packages are referenced by entities with the use statement. The entity
uses the package to describe the rules under which the device must
operate.
Syntax
package <VHDL identifier> is
Parameters
(none)
Examples
package STD_1149_1_2001 is -- declares the IEEE Standard as the package
package My_New_Cells is -- declares the user-specified cells'
definitions as the package
General Information
(none)
Syntax
package body <VHDL identifier> is
Parameters
(none)
Examples
package body STD_1149_1_2001 is -- declares the IEEE Standard as the
package body
package body My_New_Cells is -- declares the user-defined cells' package
body
General Information
(none)
port (BSDL)
Assigns meaningful symbolic names to the device's system terminals. These
names are used in subsequent descriptions of package pin mapping, scan
port identification, and the Boundary Register descriptions. The names
found in these subordinate statements must match those assigned by the
logical port statement.
Syntax
port ( <pin id>; <pin id>; . . . <pin id> );
<pin id> can be : <identifier list> : <mode> <pin type>
<identifier list> can be: <VHDL id>
<VHDL id> , <VHDL id>
<VHDL id>, <VHDL id>, . . . <VHDL id>
<mode> can be: in
out
inout
buffer
linkage
<pin type> can be: bit
bit_vector ( <range> )
<range> can be: <numeric constant> to <numeric constant>
<numeric constant> downto <numeric constant>
Parameters
<pin id> The pin id assigns a logical port name to a particular signal or set
of signals. The pin id includes an identifier that is referenced by
subsequent program descriptions, a mode assignment that
identifies how the pin is used, and a type assignment that shows
if the pin is used for a single signal or a group of signals.
<mode> The mode identifies how the system uses a device's pin. The
modes include:
• in – Identifies the pin as an input.
• out – Identifies the pin as an output that may participate in
busses.
• buffer – Identifies the pin as an output that may not
participate in buses.
• inout – Identifies the pin as a bidirectional signal pin.
• linkage – Used for other pins such as power, ground, analog,
or no- connect.
<pin type> Specifies the type of the pin. Pin types include:
• bit_vector – Identifies the group of pins that handle a group
of signals within a specified range. The signals are indexed to
allow the system to identify which one is needed at a given
time.
• bit – Identifies a pin as one that handles a single signal. Each
pin assigned must have a unique name.
<range> Specifies the range of a group of signals for a pin vector.
Examples
port (CLK:in bit; Q:out bit_vector (1 to 8) );
-- assigns CLK and Q as port names
-- CLK is an input of type bit
-- Q is an output group of type bit_vector
-- with eight signals Q(1) through Q(8)
General Information
The pin types used with this statement are bit and bit_vector, which
are types known to VHDL. The types are used in this standard practice for
BSDL.
use (BSDL)
Identifies a VHDL package needed to define the attributes of a device. For
BSDL, the use statement specifies the established package for IEEE
Standard 1149.1. BSDL also allows for user- specified packages that
address design applications beyond those established by the IEEE
standard, but that comply with the standard’s rules.
Syntax
use <VHDL identifier>;
Parameters
(none)
Examples
use STD_1149_1_2001.all -- Retrieves IEEE Standard 1149.1 information
use My_New_Cells.all -- Retrieves package defining user-specified cells
General Information
The standard practice for packages requires the .all extension to be
included in the use statements.