web page logo for WMBatch

Repeat Directory Loops

In a production environment, WMBatch's repeat directory loop makes converting incoming wafer maps very fast and efficient.

The Production Scenario

Imagine that you work in a chip assembly operation and you have a wafer foundry client that routinely sends you wafer lots along with map files for the wafers in the lot. In this situation the following assumptions are usually true:


To add some specifics to our hypothetical situation, lets say that:


Therefore the assembly house is going to need to convert each map file from UF3000 into EM format in order to process the wafer.

foundry to assembly house transfer of wafers and map files

Setting Up WMBatch

On our computer we are going to set up a directory structure for Excalibre. The directory structure will look like this: repeat loop directory structure

Excalibre - the directory assigned to the foundry called Excalibre

Map In - the directory where we will place all of the UF3000 files from a given lot

Map Out - the directory where the converted EM files will be produced for our pick-and-place machine

secs_to_em.bat - the DOS batch file which will launch WMBatch.

secs_to_em.txt - the command file which will control the conversion.


The uf3000_to_em.bat Dos Batch File

This is a simple DOS batch file (.bat) that saves us from typing a long command line every time we want to run WMBatch. There are only three arguments:

C:\wcad\wmbatch\WMBatch64.exe

full path to WMBatch program

-command_file:E:\Excalibre\uf3000_to_em.txt

tells WMBatch to use this command file

-log_file:E:\Excalibre\uf3000_to_em.log

tells WMBatch to write the log file here



The uf3000_to_em.txt Command File

Here is where we the repeat directive to process all of the files located in the Map in directory.


Always start your command file by defining your input_dir and output_dir

input_dir "E:\Excalibre\Map In"

output_dir "E:\Excalibre\Map Out"


Now use the "repeat for files in" directive referencing the directory we want to get the map files from.

repeat start files in "E:\Excalibre\Map In"

The WMBatch program will cycle through all the files it finds in the "Map In" directory, processing each one; then looping back to process the next file.

[Note] It is important to only put the correct map files in the "Map In" directory. Otherwise WMBatch will try to open a file that it is not expecting and may stop or lock up on the unknown file.


Opening the Map File

Now Use the "open" directive to open a file and tell WMBatch that the format of this file is UF3000.

open format UF3000

WMBatch parses the file and loads the data into its input buffer. It also makes a second copy and places it in the output buffer. The input buffer is read-only; the output buffer can be modified with further directives.


Convert the Map File

Next, use the "convert" directive telling WMBatch to convert the contents of the input buffer into the EM format and place it in the output buffer.

convert format EM(MAP)


Save the new Map File

Use the "save" directive to save your map file. You can modify the extension (i.e. from .map to .xml) if you wish, since the map file name is stored as two components: <FILE>.<EXT>

save <FILE>.txt



Results

Using the above two files (UF3000_to_EM.bat and UF3000_to_EM.txt) we execute wmbatch64 and we can then see that for the 23 input files (left) we generated 23 output files (right). This required less than one second.

Input UF 3000 files from the Map In directory converted to the Map Out directory

Below is the output file MAP_0002.txt

WaferId: 123456789AA-2
Flat/Notch: Right
MaxXY: 68 46

....................................................................
............................PPPPP.PPPPPP............................
.......................PPPPPPPPPPPPPPPPPPPPPP.......................
...................PPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...................
..................PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.P.................
...............PP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPP..............
.............PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPF............
...........PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...........
..........PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP...........
..........PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PP........
.......FPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP.......
......PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP......
.....FPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPP.....
.....PPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPF....
....PFPPFPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP....
...PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...
...FPFFPP.PFPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.P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
.....PFFP.PPPPPPP.PPPPPFP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPP....
.....PPPP.FPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPP.....
......FPPPFPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP......
.......PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP.......
..........PPPPPPP.FFPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PP........
..........PPPPPPP.PPPFPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP...........
...........PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...........
.............PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP............
..............PPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PPPP..............
................F.PPPPPPP.PPPPPPP.PPPPPPP.PPPPPPP.PP................
...................PPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...................

We get this result because of the nature of the UF3000 prober's bin codes. The UF3000 format actually has two separate bytes for each device in the matrix. One byte holds a number of bit flags such as PASS, FAIL, SKIP, INK, NO INK ... The second byte is a user defined byte in which the person that programs the prober can adjust in any way they want.

The problem is that most wafer maps only support a single byte of data for their bin codes.

Further, we found in the field that very often the second byte was not used at all. All the bits in the second byte are often set = 0.

So when we read a UF3000 binary file, we ignore the second byte and simply look at the flags: PASS, FAIL and SKIP. Then we convert these to P, F and . (which is the default bin code in ASCII for NULL or SKIP)

This is not a completely satisfactory solution since if one had different grades of PASS devices (or if one wanted to separate different kinds of failures) we lose the information contained in the second byte. However at the moment it is the best solution we have since the data in the second byte is essentially free-form.

However this does lead into the next part of the example -- how to control the bin codes used in the output map file.


Mapping Bin Codes

It is very common that the bin codes used by one map file format are not the ones wanted for the converted map format. Therefore the user often needs to "map" the input bin codes to the desired output bin codes.

Let's continue with this example. When the UF3000 map file was read and loaded by WMBatch, the parser examined the bit flags of the first byte of the UF 3000 bin code and stored it in memory as either "P", "F", or ".". But suppose our pick-and-place machine requires a "1" to pick the device and a "0" to not pick the device. How do we manage that?

We use the command file directive "bin map" followed by the input map value and then the desired output map value

So in our current example we would have:

bin map P 1
bin map F 0

Place these directives in our command file after the "convert" directive which will modify the output copy of the map file that is in memory.

.
.
.
convert format EM(MAP)
bin map P 1
bin map F 0
save <FILE>.txt