November 4, 2009

onTAP BIST (Built In Self Test)

Flynn Systems Corporation
C

Flynn Systems provides the best JTAG boundary scan test software with their onTAP series 4000 with ProScan

Tests may be defined in script files which may then be translated into executable Serial Vector Format (SVF) files. The general approach is to place all of the required BSDL files into a folder and then to relate the BSDL files to circuit locations in declarations at the beginning of the script file. Once BIT_STRINGS are defined, instruction register scans may be created by simply declaring the instruction names to be used. And data scans can be created by concatenating BIT_STRINGS. String variables may be assigned values and then multiple variables may be concatenated. In addition literal string assignments may be used directly or mixed with variables.

Values are always expressed as binary strings, BIT_STRINGS. If zero and one values are present in a TDO string, the corresponding MASK bits will be set to one. If ‘X’ characters are present in a TDO string, the corresponding mask bits are set to zero.
The following example shows a very literal application of an IDCODE test to a three device chain. Comments, beginning with the ! character, explain the purpose of each statement and are consistent with SVF syntax. Note that onTAP allows C-like flow control expressions to be embedded within SVF files and that these expressions also use exclamation marks. onTAP distinguishes the two based on context.
As found in the onTAP folder on your computer:
Example of a User Defined IDCODE Test for Three Devices , U2,U3,U4( see onTAP/examples/UserDefinedTests/ idcode_batch.txt).
!Begin here….
create svf c:bsdappsUserDefinedidcode.svf;     ! the following user statements will be placed in this SVF file
 
! onTAP uses the declarations between the begin chain and end chain lines to define the chain and to associate a BSDL file with each
! circuit location in the chain.
 
begin chain;
 U2 = xc9536xl_pc44;
 U3 = ispLSI2032VE;
 U4 = 3032AL44;
end chain;
 
BIT_STRING u2_version, U2_part_num, U2_manuf_id, U2_required;   // declare string variables for U2 IDCODE fields
BIT_STRING u3_version, U3_part_num, U3_manuf_id, U3_required;   // declare string variables for U3 IDCODE fields
BIT_STRING u3_version, U3_part_num, U3_manuf_id, U3_required;   // declare string variables for U4 IDCODE fields
BIT_STRING u4_version, U4_part_num, U4_manuf_id, U4_required;   // declare string variables for U4 IDCODE fields
BIT_STRING zeroes;
 
state reset;     ! place chain defined in TAPMAP in reset state
 
begin scan;      ! onTAP creates one SIR scan in SVF file for U1,U2,U3
 
   U2=IDCODE;   ! if the BSDL file is in the folder, onTAP will find the opcode for U2’s IDCODE instruction
   U3=IDCODE;
   U4=IDCODE;
 
end scan;
 
! When compliled with Tools/Compose SVF, onTAP uses the declarations between begin scan and end scan lines
! to create an SIR scan that loads the IDCODE instructions.
 
U2_version = “XXXX”;   ! IDCODE version field from U2’s BSDL file
U2_part_num = “1001011000000010”; ! part number
U2_manuf_id = “00001001001”;   U2’s manufacturer’s id
U2_required = “1”;         // required by BSDL spec
 
U3_version = “0001”;   ! IDCODE version field from U3’s BSDL file
U3_part_num = “0000001100000001”; ! part number
U3_manuf_id = “00000100001”;   U3’s manufacturer’s id
U3_required = “1”;         // required by 1149.1 spec
 
U4_version = “0001”;   ! IDCODE version field from U4’s BSDL file
U4_part_num = “0111000000110010”; ! part number
U4_manuf_id = “00001101110”;   U4’s manufacturer’s id
U4_required = “1”;         // required by BSDL spec
 
zeroes = “00000000000000000000000000000000”;   // 32 zeroes
 
! TDI definesTest Data In and TDO defines Test Data Out.
 
! The strings in the TDO expression will be concatenated. LSB is on the right.
 
begin scan;
 U2 = TDI(zeroes) TDO(U2_version+ U2_part_num+ U2_manuf_id+ U2_required);    !concatenate BIT_STRINGS to form TDO string
 U3 = TDI(zeroes) TDO(U3_version+ U3_part_num+ U3_manuf_id+ U3_required);
 U4 = TDI(zeroes) TDO(U4_version+ U4_part_num+ U4_manuf_id+ U4_required);
end scan;
 
! When compiled with Tools/Compose SVF, the declarations between begin and end scan will be compiled into
! an SVF SDR scan.
 
! Examples of test statements that may be applied follow. onTAP will extract the measured value from SDR scans and will update
! BIT_STRING values so that they can be used in control flow branch expressions as shown below.
 
 
if ( U3_part_num != “0000001100000001” )
{
    MESSAGE_PAUSE(“U3’s IDCODE part number, %%s, is incorrect. Should be “0000001100000001””,U3_part_num);
}
 
if ( !(U2_part_num & “010”))
{
    MESSAGE(“bit 1 in U2’s part number reads low but should be high”);
}
 
if ( U3_part_num != “0000001100000001” )
{
    MESSAGE(“U3’s part number reads %%s, but should read 0000001100000001”, U3_part_num);
}
 
if ( FAIL )
{
    MESSAGE(“IDCODE test fails”);
}
 
 
User defined script files may be compiled into SVF files by selecting the Compose SVF File menu item from the Tools menu.
 
When the command file, idcode_batch.txt, is called a new SVF file, IDCODE.SVF is created. Instructions such as “state reset;” are transferred directly into the new SVF file. onTAP compiles chain-wide SIR and SDR instructions based on a list of SIR and SDR instructions for each device in the target chain. SIR and SDR statements for the first device in a chain are listed first and statements for the last device are listed last.
 
A “log scan data on;” statement enables all scan-in and scan-out data to be captured in the scandata.txt file.
 
User Defined Instruction Statements
Statement
Use
 
create filename.svf;
Begin ceation of a new SVF file.
state state_name
Sequence TAP to designated state.
begin scan;
Begin steps that will be compiled into an SIR or SDR scan .
end scan;
End steps that will be compiled into an SIR or SDR scan .
BIT_STRING_name;
Declare string variables.
LogScanDataOn()
Enables logging of scan data to the project folder file scandata.txt.
LogScanDataOff()
Disables logging of scan data to the project folder file scandata.txt.

Recent Posts

Flynn Systems Corporation

November 4, 2009

0 Comments