Non-Standard Cell Types in BSDL Files
Introduction
The IEEE1149.1-2001 (JTAG) standard includes a definition of the Boundary Scan Description Language (BSDL). The language describes the testability features of components which comply to the IEEE1149.1 standard. This file is required for every compliant component before JTAG test tools can use their test features. BSDL is a subset of the VHSIC Hardware Description Language (VHDL) (IEEE Std 1076) and describes, amongst other things, the type of boundary scan cell associated with each pin on the device. Standard cell types are described in a VHDL package (STD_1149_1_2001) which is included as part of the XJTAG BSDL parser.
Standard defined boundary cell types are BC_0, BC_1 ... BC_10. Sometimes, however, manufacturers of IEEE1149.1 compliant devices may be required (or wish) to use cell type variants that are not included in these 'standard' types. In this case, additional cell type definition information is required.
This application note describes how to identify such devices and how the additional information should be made available for XJTAG system to interpret these 'non-standard' cell types correctly.
Additions to the BSDL File
Every BSDL file uses a standard cell type package. The current package is STD_1149_1_2001, but older components may refer to earlier standard packages such as STD_1149_1_1994. The reference to the package will be contained within the component entity declaration block as a use statement, as shown in the following abbreviated example of a typical BSDL file entity:
entity COMPONENT_NAME is -- Generic definitions and default assignments generic... -- Port declarations port ( ...declarations... ); -- Standard pin-type package use clause use STD_1149_1_1994.all; -- Miscellaneous constants and attributes constant... attribute ... attribute ... ... etc ... end COMPONENT_NAME;
If additional definitions or non-standard boundary scan cell types are incorporated into the component, their definitions are usually supplied by the manufacturer in a separate 'package' file and an additional use statement will be included in the BSDL file entity declaration. For example, the following line could be added to the BSDL file to show that the MY_PACKAGE_NAME package is needed for BSDL analysis.
use MY_PACKAGE_NAME.all;
Identifying when additional BSDL package files may be required
If you attempt to run an XJEase project that uses a BSDL file which requires an additional package file, an error will be displayed. E.g.:
my_project.xje(230): Syntax Error bsdl_filename.bsd(155): cell type IO not found
In this example, the XJEase project file line 230 associates the BSDL file "bsdl_filename.bsd" with a JTAG device ...
IC27 := "bsdl_filename.bsd";
...and the BSDL file referenced a bidirectional pin (called, in this case, PIN2) with a custom cell type of "IO" at line 155...
"44 (IO, PIN2, BIDIR, X, 5, 1, Z)," &
The non-standard cell type "IO" is defined in a package called MY_PACKAGE_NAME and the package is referenced by a use clause in the BSDL file.
use MY_PACKAGE_NAME.all;
Supplying Additional BSDL Package Files to XJTAG using XJEase
To correct the error shown in the previous example, you need to find the referenced package file. This will usually be available on the component manufacturer's website and a copy should be saved in the same directory as the component's BSDL file.
The XJEase project file must then be modified to tell XJTAG the location of the package file using the BSDL (PACKAGE := "filename") syntax, as shown in the following example.
IC27 := "bsdl_filename.bsd" BSDL (PACKAGE := "package_file.bsd");
This will enable the XJTAG BSDL parser to locate and interpret the package file ("package_file.bsd" in the above example) and to process the custom cell types correctly.
Supplying Custom BSDL Package Files to XJAnalyser
The above solution provides the ability to specify additional BSDL packages for XJEase projects. However, this will not work for XJAnalyser projects, as they do not use XJEase project files.
References to BSDL files for XJAnalyser projects are maintained in XJAnalyser BSDL library files and, at present, no mechanism exists for including supplementary BSDL package files in these BSDL libraries. Attempting to use the BSDL file in this case will produce a BSDL parsing error similar to that shown below when the BSDL parser attempts to process the undefined IO cell type.
This error can be circumvented by not selecting a BSDL file for this device thus forcing XJAnalyser to place the device into BYPASS mode. A warning (below) will be displayed and you should select "Yes" to set the device into BYPASS mode. XJAnalyser will then continue to operate as normal but no monitoring or control of any of the pins on this device will be possible.
However the supplementary BSDL package file may be included within the BSDL source file by copying its entire contents into the BSDL file in place of the use statement as shown in the following example. This will allow XJAnalyser to use all the features of the device, and there will not be any need to include the BSDL (package := "filename") modifier to the BSDL file assignment statement in your XJEase project file. However remember that if you ever replace the BSDL file with an updated version it will be necessary to modify the new file in the same manner.
To modify the BSDL file look for the use statement which defines the package file to be included and replace this statement with the entire contents of the package file using cut and paste within your text editor. Be careful not to replace the use statement for the standard package file STD_1149_1_XXXX as this will still be required.
For example:
... use STD_1149_1_1994.all; use MY_PACKAGE_NAME.all; attribute PIN_MAP of COMPONENT_NAME : entity is PHYSICAL_PIN_MAP; ...
should be replaced by:
... use STD_1149_1_1994.all; package MY_PACKAGE_NAME is constant IO : CELL_INFO; end MY_PACKAGE_NAME; package body MY_PACKAGE_NAME is constant IO : CELL_INFO := ((BIDIR_IN, EXTEST, PI), (BIDIR_IN, SAMPLE, PI), (BIDIR_IN, INTEST, PO), (BIDIR_OUT, EXTEST, PO), (BIDIR_OUT, SAMPLE, PO), (BIDIR_OUT, INTEST, PI)); end MY_PACKAGE_NAME; attribute PIN_MAP of COMPONENT_NAME : entity is PHYSICAL_PIN_MAP; ...
An example of how to do this is contained in the attached zip file AN3.zip which contains the original and modified versions of the BSDL file for a Philips SAA7113 device as well as the associated package file.
Summary
The XJTAG system offers two ways to cope with the custom boundary scan cell types which are occasionally used in a manufacturer's BSDL files. Either the package defining the cell type can be cut and pasted into the BSDL file as illustrated above or the package can be referenced from within the XJEase project file using the BSDL (package := "filename") modifier to the BSDL file assignment statement. The first solution allows XJAnalyser to use all the features of the device at the cost of a small reduction in maintainability, the choice is yours.