Sign in to PrePAN

Parse::STDF Parses files in Standard Test Data Format into Perl objects



use strict;
use warnings;
use Time::localtime;
use Parse::STDF;

( $#ARGV == 0 ) || die "Usage: $0 stdf\n";
my $stdf = $ARGV[0];

my $s = Parse::STDF->new ( $stdf );

while ( $s->get_record() )
  if ( $s->recname() eq "MIR" )
        my $mir = $s->mir();
	printf ("Started At: %s\n", ctime($mir->{START_T}) );
	printf ("Station Number: %s\n", $mir->{STAT_NUM} );
  	printf ("Station Mode: %s\n", $mir->{MODE_COD} );
	printf ("Retst Code: %s\n", $mir->{RTST_COD} );
	printf ("Lot: %s\n", $mir->{LOT_ID} );
	printf ("Part Type: %s\n", $mir->{PART_TYP} );
	printf ("Node Name: %s\n", $mir->{NODE_NAM} );
	printf ("Tester Type: %s\n", $mir->{TSTR_TYP} );
	printf ("Program: %s\n", $mir->{JOB_NAM} );
	printf ("Version: %s\n", $mir->{JOB_REV} );
	printf ("Sublot: %s\n", $mir->{SBLOT_ID} );
	printf ("Operator: %s\n", $mir->{OPER_NAM} );
	printf ("Executive: %s\n", $mir->{EXEC_TYP} );
	printf ("Test Code: %s\n", $mir->{TEST_COD} );
	printf ("Test Temprature: %s\n", $mir->{TST_TEMP} );
	printf ("Package Type: %s\n", $mir->{PKG_TYP} );
	printf ("Facility ID: %s\n", $mir->{FACIL_ID} );
	printf ("Design Revision: %s\n", $mir->{DSGN_REV} );



Standard Test Data Format (STDF) is a widely used standard file format for semiconductor test information. It is a commonly used format produced by automatic test equipment (ATE) platforms from companies such as LTX-Credence, Roos Instruments, Teradyne, Advantest, and others.

STDF is compacted into binary format according to a well defined STDF specification originally designed by Teradyne. The record layouts, field definitions, and sizes are all defined in the specification. Over the years, parser tools have been developed to decode this binary format in several scripting languages, but as of yet nothing has been released to CPAN for perl.

This module would be a first attempt. It utilizes an underlying open sourced C library called libstdf ( to do the grunt work of parsing binary data into structs (STDF records) as defined by the specification.

An object-oriented Parse::STDF module is provided for the end user. It's object methods make the API calls to to libstdf.


Parse::STDF might be a more appropriate name.
Good advice!

Please sign up to post a review.