stdf4_to_xtdf1.pl - Converts an STDF version 4 file to an XTDF version 1 file
perl stdf4_to_xtdf1.pl [OPTIONS] ARGUMENTS
OPTIONS
-a, --about
Displays information about this program.
-d, --debug
Enables debug mode which outputs debug information to
standard output.
-h, --help
Displays help for this program.
ARGUMENTS
StdfFileSpec
The input STDF file specification.
RETURNS
The program returns a value of unix true (0) if no errors
occur; otherwise, a value of unix false (1) is returned.
STANDARD INPUT
Standard input is ignored.
STANDARD OUTPUT
All output is sent to standard output.
STANDARD ERROR
If an error occurs then a message is output to standard error.
perl stdf4_to_xtdf1.pl -a
perl stdf4_to_xtdf1.pl --about
Displays information about the program.
perl stdf4_to_xtdf1.pl -h
perl stdf4_to_xtdf1.pl --help
Displays the help for the program.
perl stdf4_to_xtdf1.pl StdfFileSpec
Surveys the STDF file specified by StdfFileSpec and outputs
the survey results to standard output.
perl stdf4_to_xtdf1.pl -d StdfFileSpec
perl stdf4_to_xtdf1.pl --debug StdfFileSpec
Surveys the STDF file specified by StdfFileSpec and outputs
the survey results and debug information to standard output.
NOTE: Use command line redirection to capture standard
output to a file.
This program converts an STDF version 4 file to an XTDF version 1 file. An XTDF file is an XML version of a binary STDF file. The STDF field names and data types are emulated using XML as closely as possible to preserve the STDF file structure and content.
Advantages of XTDF compared to STDF:
+ Compatible with standard XML utilities.
+ Easy to enhance and extend contents.
+ Platform independent ASCII.
+ Easy to read.
+ Easy to edit.
Disadvatages of XTDF compared to STDF:
- Larger file size.
The official ASCII format for a binary STDF file is the ASCII Test Data Format (ATDF) defined by Teradyne.
Advantages of XTDF compared to ATDF:
+ Preserves all STDF content (enables loss less conversion back to STDF).
+ Compatible with standard XML utilities.
+ Same syntax as STDF (ATDF has different syntax than STDF).
+ Easy to enhance and extend the syntax.
Disadvatages of XTDF compared to ATDF:
- Larger file size.
The default output consists of the XTDF tags and data.
<?xml version='1.0' ?>
<!-- stdf4_to_xtdf1.pl V1.0.0 -->
<!-- Copyright (C) 2005 Michael Hackerott -->
<!-- All Rights Reserved -->
<XTDF>
<CREATED>11:20:07 06-DEC-2005</CREATED>
<FILENAME TYPE="INPUT">FT_J750_112KB.stdf</FILENAME>
<FILESIZE TYPE="INPUT" UNIT="BYTES">113756</FILESIZE>
<STDF>
<FAR>
<CPU_TYPE>2</CPU_TYPE>
<STDF_VER>4</STDF_VER>
</FAR>
<MIR>
<SETUP_T>17:12:18 02-NOV-2005</SETUP_T>
<START_T>17:12:18 02-NOV-2005</START_T>
<STAT_NUM>0</STAT_NUM>
<MODE_COD>P</MODE_COD>
<RTST_COD>Y</RTST_COD>
<PROD_COD></PROD_COD>
<BURN_TIM>65535</BURN_TIM>
<CMOD_COD></CMOD_COD>
<LOT_ID>TJMEA0360Y00</LOT_ID>
<PART_TYP>MC9S08GT60CFD</PART_TYP>
<NODE_NAM>J750-08</NODE_NAM>
<TSTR_TYP>J750</TSTR_TYP>
<JOB_NAM>Final_Test_44qfp</JOB_NAM>
<JOB_REV>9S08GB60_J05</JOB_REV>
<SBLOT_ID></SBLOT_ID>
<OPER_NAM>HR268</OPER_NAM>
<EXEC_TYP>IG-XL</EXEC_TYP>
<EXEC_VER>3.40.09</EXEC_VER>
<TEST_COD>FCN</TEST_COD>
<TST_TEMP>-40</TST_TEMP>
<USER_TXT></USER_TXT>
<AUX_FILE></AUX_FILE>
<PKG_TYP></PKG_TYP>
<FAMLY_ID>MC9S08GT60CFD</FAMLY_ID>
<DATE_COD></DATE_COD>
<FACIL_ID>TJN</FACIL_ID>
<FLOOR_ID></FLOOR_ID>
<PROC_ID>L31R</PROC_ID>
<OPER_FRQ>20</OPER_FRQ>
<SPEC_NAM></SPEC_NAM>
<SPEC_VER></SPEC_VER>
<FLOW_ID>MC9S08GT60CFD_FCN</FLOW_ID>
<SETUP_ID>9999</SETUP_ID>
<DSGN_REV></DSGN_REV>
<ENG_ID></ENG_ID>
<ROM_COD></ROM_COD>
<SERL_NUM></SERL_NUM>
<SUPR_NAM></SUPR_NAM>
</MIR>
...
<MRR>
<FINISH_T>18:12:44 02-NOV-2005</FINISH_T>
<DISP_COD></DISP_COD>
<USR_DESC></USR_DESC>
<EXC_DESC></EXC_DESC>
</MRR>
</STDF>
<ELAPSED UNIT="SECONDS">0</ELAPSED>
</XTDF>
If the debug mode is enabled then debug information is output in addition to the default XTDF output. (NOTE: debug mode increases the runtime time and amount of output by approximately 15 to 25 times!)
%gOptions = ('debug' => 1);
$gStdfFile{'SPEC'} = '..\\data\\inp\\STDF\\FT_J750_112KB.stdf';
$gStdfFile{'PATH'} = '..\\data\\inp\\STDF';
$gStdfFile{'NAME'} = 'FT_J750_112KB.stdf';
$gStdfFile{'SIZE'} = 113756;
<?xml version='1.0' ?>
<!-- stdf4_to_xtdf1.pl V1.0.0 -->
<!-- Copyright (C) 2005 Michael Hackerott -->
<!-- All Rights Reserved -->
<XTDF>
<CREATED>11:39:05 06-DEC-2005</CREATED>
<FILENAME TYPE="INPUT">FT_J750_112KB.stdf</FILENAME>
<FILESIZE TYPE="INPUT" UNIT="BYTES">113756</FILESIZE>
<STDF>
$gStdfFile{'ABO'} = 0;
$gStdfRec{'LENBIN'} =
0000 00000010 02 2 ¤
0001 00000000 00 0 ¤
$stdfRecordRead::status = 2;
$gStdfRec{'LENHEX'} = '0200';
$gStdfFile{'ENDIAN'} = 1;
$stdfRecordRead::lenhex = '0002';
$gStdfRec{'LENDEC'} = '2';
$gStdfRec{'TYPBIN'} =
0000 00000000 00 0 ¤
$gStdfRec{'TYPHEX'} = '0';
$gStdfRec{'TYPDEC'} = 0;
$gStdfRec{'SUBBIN'} =
0000 00001010 0A 10 ¤
$gStdfRec{'SUBHEX'} = '0';
$gStdfRec{'SUBDEC'} = 10;
$gStdfRecName = 'FAR';
$gStdfRec{'DATBIN'} =
0000 00000010 02 2 ¤
0001 00000100 04 4 ¤
$gStdfRec{'DATHEX'} = '0204';
$gStdfRec{'DATTXT'} = '°°';
<FAR>
$gStdfFld{'LEN'} = 1
$gStdfRec{'ABO'} = 0
$gStdfFld{'BIN'} =
$gStdfFld{'HEX'} = 02
$gStdfFld{'DAT'} = 2
$gStdfFld{'LEN'} = 1
$gStdfRec{'ABO'} = 1
$gStdfFld{'BIN'} =
$gStdfFld{'HEX'} = 04
$gStdfFld{'DAT'} = 4
<CPU_TYPE>2</CPU_TYPE>
<STDF_VER>4</STDF_VER>
</FAR>
$gStdfFile{'ABO'} = 6;
$gStdfRec{'LENBIN'} =
0000 10101010 AA 170 ¤
0001 00000000 00 0 ¤
$stdfRecordRead::status = 2;
$gStdfRec{'LENHEX'} = 'AA00';
$stdfRecordRead::lenhex = '00AA';
$gStdfRec{'LENDEC'} = '170';
$gStdfRec{'TYPBIN'} =
0000 00000001 01 1 ¤
$gStdfRec{'TYPHEX'} = '0';
$gStdfRec{'TYPDEC'} = 1;
$gStdfRec{'SUBBIN'} =
0000 00001010 0A 10 ¤
$gStdfRec{'SUBHEX'} = '0';
$gStdfRec{'SUBDEC'} = 10;
$gStdfRecName = 'MIR';
...
<MRR>
$gStdfFld{'LEN'} = 4
$gStdfRec{'ABO'} = 0
$gStdfFld{'BIN'} = œiC
$gStdfFld{'HEX'} = 9C016943
$gStdfFld{'DAT'} = 1130955164
$gStdfFld{'LEN'} = 1
$gStdfRec{'ABO'} = 4
$gStdfFld{'BIN'} =
$gStdfFld{'HEX'} =
$gStdfFld{'DAT'} =
<FINISH_T>18:12:44 02-NOV-2005</FINISH_T>
<DISP_COD></DISP_COD>
<USR_DESC></USR_DESC>
<EXC_DESC></EXC_DESC>
</MRR>
</STDF>
<ELAPSED UNIT="SECONDS">0</ELAPSED>
</XTDF>
• Perl 5.6 or newer.
• Perl core module strict.
• Perl custom module TDF.pm.
• perl core and module documentation.
• STDF Specification V4 published by Teradyne, Inc.
• ATDF Specification V2 published by Teradyne, Inc.
• Michael Hackerott, michael.hackerott@mrhackerott.org
Copyright © 2005 Michael Hackerott. All rights reserved.
This program is free software; you can redistribute it and/r modify it under the terms of either the GNU General Public License or the Artistic License as specified in the Perl README file.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The Standard Test Data Format (STDF) and ASCII Test Data Format (ATDF) specifications are the original works of Teradyne Inc.
• The Vn data type not implemented. Therefore, GDR records are not implemented.
1.0.0 (200512031456) Michael Hackerott
• Created program.