Conversion tools

Alfredo Tomasini 10/21/2011

The idea behind this code is to try to automate the process of controlling the correctness of the limits when transferred from PE to TE (PE = Product Engineer, TE = TEST Engineer). Today this is a tedious manual check that takes several days as shown in the following itemized list.

  1. TE write the prototype code for characterization (5 days, but it may much more if it is the first device)
  2. characterization data are generated by running the prototype program (2 days)
  3. the program generate stdf files that are used to generate limits by PE (5 days)
  4. limits are transferred to TE to enter them one by one into the original program (1-2 days)
  5. program goes back to PE for inspection (1 day)
  6. potential changes and corrections (0.5 days)

The flow is very error prone. The problem is that while 1) is done in a c-like environment call Testing Language (TL),limits are set within a different environment with excel with csv files ( will be call this CSV ). Both environment have the same information but no way to use one into the other.

The intention is to create this bidirectional flow to save time a reduce errors. This is specially true for devices that are very similar in nature with same test and test-parameters.

In the previous list there steps that cannot be shorten like 1), 2). Step 3) can be almost completely automated or drastically reduced with proper statistical tools, but that is not the intention here. The focus here is to reduce or eliminate manual intervention on steps 4,5,6, what TE does manually PE should use it without re-entering information that are already there. Vice versa what PE does for setting the limits should be translated back to TL without manual intervention on the TE side.

Preliminary considerations

TL language has roughly the following format:

SEQUENCER DEVICE_site0()
{
if(1)
 seq analog_cont()
 {
        $1
                >-1.20v <-0.10v                 "VDD@40ma"                      f(Continuity_Bin);
                >-1.20v <-0.10v                 "OVDD@40ma"                     f(Continuity_Bin);
                >-1.20v <-0.10v                 "AINA+_cont"        f(Continuity_Bin);
                >-1.20v <-0.10v                 "AINA-_cont"        f(Continuity_Bin);
                >-1.20v <-0.10v                 "AINB+_cont"        f(Continuity_Bin);
                >-1.20v <-0.10v                 "AINB-_cont"        f(Continuity_Bin);
        /*      >-1.20v <-0.10v                 "VCM_cont"                      f(Continuity_Bin);  */
                >-1.20v <-0.10v                 "VREF_cont"                     f(Continuity_Bin);
                >-1.20v <-0.10v                 "SENSE_cont"            f(Continuity_Bin);

 }/*end analog_cont*/
  seq leakage(1.8v, 1.8v)  /*vdd, ovdd*/
  {

   "AINA+_leakage@vcc"  FR: >-0.450ua   <0.450ua
                                                QR: >-0.720ua   <0.720ua
                                                QT: >-0.730ua   <0.730ua        f(leakage_Bin);
 }
 }

The software is fragmented into sequences, each sequence has a function that is used to idendify what to measure, for instance analog_cont() mean: measure analog continuitity.
Within the sequence the are tests, a generic test, not related to specific temperature, shows only upper and lower limits like:

	>-1.20v <-0.10v                 "VDD@40ma"                      f(Continuity_Bin);

this check if the parameter "VDD@40ma" goes below -1.20v or above -0.1v, if the parameter exceed these limits a violation will occour and error is recorde as "Continuity_Bin". This is the meaning of f(Continuity_Bin) syntax.

When the parameter is really important there are three possible situations that need to be checked:

The software does not support other catherories, for instance there is not option for a FT: test

Those three categories have their own bin definition, for instance "AINA+_leakage@vcc" (above) has FR: QT: and QR: options each with a specific limits range and bin f(leakage_Bin).

tl_to_csv & csv_to_tl

These programs are based on sed,gawk and bash, it works under linux solaris but not native windows. To have them under windows you need to install Cygwin which is a linux environment under windows (works with Xp I do not know whether it works with other version of windows). when you install Cygwin set the sofware under c:\cygwin, save the setup.exe into this directory and choose c:\cygwin as main installation directory. Install just the basic tools (no selection). When the installtion is done, clik on the icon, a command line window like CMD will appear. From this windows your C: drive is acessible by typing the following command:

cd /cydrive/c

Basic unix commands UNIX tutorial

The version under solaris is only available under cat1sim and cat2sim /home/prodeng/bin.

Tl_to_csv takes as input the catalyst tl language and generates a csv template file the PE can use to set limits base on characterization data.

Csv_to_tl is the complementary sofware that convert csv into TL language

DOWLOAD AREA :

tl_to_csv
csv_to_tl
lim_sanity

tl_to_csv

Tl_to_csv is a converter from TL language to text file .txt and .csv. Various options allows to get different ouput formats.

Each program comes with a simple help triggered by just typing the program name, for instance tl_to_scv without anything will output:


> tl_to_csv

	missing file


	This script convert test language program into text and csv format it takes the c-like
	*.tl file and it generates a csv/txt output.


		/users/gnu/links-bin/tl_to_csv -f -s -C -q

	f:      .tl file
	s:      seq function
	C:      output csv
	q:      keep test function name

	example:

		tl_to_csv -f sample.tl -q -c > sample.csv

To convert TL file into CSV, the command line is :


> tl_to_csv -f sample.tl -q -C > sample.csv 

Output will be: Output .

At the end of the file, tl_to_csv logs what it had found, in this case:


	# found:
	# 4   if(0)
	# 3   SEQUENCER

This means sample.tl found: four "if(0)" sections and three SEQUENCER's .
The if(0) are piece of codes that are not execuded during the normal test but for debugging purpose, the script remove them from the output. There are some limitation about tl_to_csv capability to filter out "if(0)". It works if the if(0) statment is like:

		
if(0)
 seq linearity_LVDS_DDR_RTHM(1.8v,1.8v)
 {

        >0.00LSB        <0.50LSB                "A channel pos dnl"                     f(DNL_Bin);
        >-0.50LSB       <0.00LSB                "A channel neg dnl"                     f(DNL_Bin);
        >0.00LSB        <10.00LSB               "A channel pos inl"                     f(INL_Bin);
        >-10.00LSB      <0.00LSB                "A channel neg inl"                     f(INL_Bin);



        >0.00LSB        <0.50LSB                "B channel pos dnl"                     f(DNL_Bin);
        >-0.50LSB       <0.00LSB                "B channel neg dnl"                     f(DNL_Bin);
        >0.00LSB        <10.00LSB               "B channel pos inl"                     f(INL_Bin);
        >-10.00LSB      <0.00LSB                "B channel neg inl"                     f(INL_Bin);

 }

with no blank lines or "{" between "if" and "seq" statements. It also assume no "}" within the seq call except the last parantesis, in other world, "}" must be the closure of seq.
For instance the following example tl_to_csv wont work properly.

		
if(0)
{
 seq linearity_LVDS_DDR_RTHM(1.8v,1.8v)
 {

        >0.00LSB        <0.50LSB                "A channel pos dnl"                     f(DNL_Bin);
        >-0.50LSB       <0.00LSB                "A channel neg dnl"                     f(DNL_Bin);
        >0.00LSB        <10.00LSB               "A channel pos inl"                     f(INL_Bin);
        >-10.00LSB      <0.00LSB                "A channel neg inl"                     f(INL_Bin);



        >0.00LSB        <0.50LSB                "B channel pos dnl"                     f(DNL_Bin);
        >-0.50LSB       <0.00LSB                "B channel neg dnl"                     f(DNL_Bin);
        >0.00LSB        <10.00LSB               "B channel pos inl"                     f(INL_Bin);
        >-10.00LSB      <0.00LSB                "B channel neg inl"                     f(INL_Bin);

 }
}

The three SEQUENCER's correspond (typically) to the sites the device goes throught, these SEQUENCERs are output with a "##" with all the test concatenated.

NEVER REMOVE ANY FIELD and ROW HAVING ## AT THE BEGINNING OF THE LINE, THESE FIELDS ARE USED BY csv_to_tl
You can remove single "#" rows because they are considered comments.

Another possible format is text. Very useful with text editor like vi or emacs, the comman like is:


> tl_to_csv -f sample.tl  

The output is available here: TEXT ONLY.

Due to csv inherent format, any function with parameters will have "," replaced with "@" by tl_to_csv. This should not be changed by any means, csv_to_tl is aware of this and it will convert them back to ",".

A "#" in the first line is a comment. Tl_to_csv creates a one line comment in the output file that contains:

date, command line options, author, and release number.

This information is just to keep track of the origin of the file and what option has been used.
Line 2 is a header with special keywords.

DO NOT CHANGE THE HEADER UNLESS YOU KNOW WHAT YOU ARE DOING.

This header contains some key fields used by csv_to_tl, the complete list of keywords and meaning is shown here:

CSV Header
Test name tnum seqfunc binfunc unit min max FRmin FRmax QRmin QRmax QTmin QTmax DSmin DSmax

Header keywords sequence is not important, but:

Limitations

tl_to_csv does not handle special situations, for instance if a device needs special screen (see 2158), tl_to_csv wont be able to separate them from any other test. For instance a stantement like:


if(switchvar_32==1) /*FH hot screen*/
seq ac_140MHz_195(1.95v,1.95v)   /* vdd, ovdd 1.95v=sense*/
{

the part "if(switchvar_32==1)" will be ignored, the test sequence will be merge with the others.
This is a problem because "switchvar_32" is used to identify a special test that should not be performed in the normal flow. This is an unfortunate situation where TE needs to manually change the code.

tl_to_csv

This script converts CSV file, generated by tl_to_csv, into TL language. When typing this command without and option the output will show a short help:


missing file


This script converts csv into Test Language, the input must be compatible
with the output format of tl_to_csv


        /users/gnu/links-bin/csv_to_tl -f

        f:      .csv limits file



Csv_to_tl does not add "if(1)" or "if(0)", it assumes that all the test are good and must be executed.
All the special identifirers "## string" are converted into "string" and copied to the output

How to use tl_to_csv and csv_to_tl

The idea is that PE should not start from scratch, they should ask TE to create a template with tl_to_csv, use the template to set limits and convert it back to TL with csv_to_tl.

However this flow wont prevent PE from creating a template from existing device and give them to TE for implementation. This will be useful for defining special test name, for instance by adding prefix for test name that are datasheet limits.

A few examples:


	creating a test.csv output file from a test.tl

	tl_to_csv -f test.tl -q -C > test.csv

	(notice the use of ">" to redirect the output to a file)
	 
       #####################################################################
	WARNING WARNING !!  THIS WILL KILL YOUR .TL FILE 

		tl_to_csv -f test.tl -q -C > test.tl

       #####################################################################
	

	creating a text.txt output

	tl_to_csv -f test.tl -q > test.txt

	Convert test.csv back

	csv_to_tl -f test.csv > test.tl

	 
       #####################################################################
	WARNING WARNING !!  THIS WILL KILL YOUR .CSV FILE 

		csv_to_tl -f test.csv > test.csv

       #####################################################################
	


	under Solaris you can remove ^M left over by windows pplication by
	using

	dos2unix intput-file output-file

lim_sanity

The last application is for sanity check, this is more a PE tools that TE. When the limits are set they should be properly encapsulated in order to avoid QA failure that trigger a full lot test.

To run the program:

lim_sanity -f csv_file.csv