web page logo for WMBatch

Convert and Slice Multiple Maps - Command2.txt

Assuming you completed Example 1 you probably have two comments:

So that's what we are going to do in this example

Situation

  1. we have 3 SINF files as input
  2. we want to convert to SECS-EG(TXT) format
  3. we want to divide each input map into four quadrants
  4. our input map files have a dimension of 262 x 262 devices
The input map has 262 rows and 262 columns

Figure 1: The input map has 262 rows and 262 columns.

Organization

To most effectively use and reuse the command files, one should organize input and output locations so that the command file can be used again and again with no modifications assuming the wafers have the same array dimensions and the same bin codes. This is a good assumption if one repeatedly receives wafers of the same product from the same foundry.

My recommended directory structure is shown below:


recommended directory organization

Coordinates for the Four Quadrants

To "slice" a wafer map into 4 quadrants we are essentially going to define four "windows" that we want to keep and the rest of the map will be filled with the NULL bincode. (It is also possible to specify a bin code that is not the NULL one, if for some reason this is needed.) So the directive is actually called "wafer fill" because we are filling the region outside the wafer with NULL bincodes.

Each window is defined by four array coordinates. Essentially the upper left and lower right corners.

When entering coordinates there are a few things to remember.

the four quadrants of a 262x262 array

Using Directory Repeat Loops

In order to handle anywhere from 1 to 25 wafers at a time without modifying the command file we are going to use the directory repeat directive that will enable the program to loop through all the files in the input directory. The syntax is:

repeat start files in "<directory>"
 command
 command
 command
 .
 .
 .
repeat end


Example

Suppose we want to process all the map files in the directory: E:\cad_data[2]\foundry2.product\input. We could write in our command2.txt file:

repeat start files in "E:\cad_data[2]\foundry2.product\input"
 command
 command
 command
repeat end

and our program would pick the first file in the directory input, process the commands and then when it hits the repeat end directive it will loop back and work on the next file in the input directory. It will continue to loop back until all the files in the input directory have been processed.


Notes

1. do not put any other files in the input directory except for the map files. The program will try to process these other files and it may crash.

2. all the map files in the input directory should share the same format and array size.



Use of Intermediate Directory

Because we have two separate operations - 1) conversion and 2) slicing we actually will be using two separate repeat loops.

Loop 1

The first repeat loop will handle the conversion from SINF to SECS-EG(TXT) and it will do all files found in the input directory.

the first repeat loop is used to convert all the files from SINF to SECS-EG(TXT)

The first loop converts from SINF to SECS-EG


Loop 2

Before we start Loop2 we will redefine our input and output directories. Instead of reading from input and writing to intermediate, we will read from intermediate and write to output.

The second repeat loop will handle the slicing of the map files into four quadrants and write each quadrant map file to the output directory.

the second repeat loop slices up the SECS-EG(TXT) files into quadrants

The second repeat loop slices up the SECS-EG(TXT) files into quadrants



The Full Command File

It's good practice to fully document your command file so that if you want to use it later for a different foundry or different product you can easily see where to edit it. Use lots of comments.

# using repeat loops to automate multiple wafers
# first converting SINF to SECS-EG(TXT)for die sort machine
# Mapping bin codes to: PASS=1 FAIL=2 NULL=.
# slicing each 262x262 SECS-EG(TXT) wafer map into quarters
# Steve DiBartolomeo
# April 21, 2021

input_dir "E:\cad_data[2]\foundry2.product\input"
output_dir "E:\cad_data[2]\foundry2.product\intermediate"

# repeat loop runs through all the SINF map files in the input directory
# and converts them to SECS-EG(TXT) format
# the bin map converts source bins to our desired bin codes
# (1 for PASS, 2 for FAIL, . for NULL)

repeat start files in "E:\cad_data[2]\foundry2.product\input"
open <FILE.EXT> format SINF HEX
convert format SECS-EG(TXT) ASCII-1
Bin map 00 1
Bin map 01 2
Bin map 50 2
Bin map __ .
save <FILE>.txt
repeat end

# now we have all the files in the desired format in the directory
# called intermediate. We are going to redefine input_dir and output
# dir to read from intermediate and write to output.
# the second loop slices each input file into 4 quarter slices

input_dir "E:\cad_data[2]\foundry2.product\intermediate"
output_dir "E:\cad_data[2]\foundry2.product\output"

repeat start files in "E:\cad_data[2]\foundry2.product\intermediate"
open <FILE.EXT> format SECS-EG(TXT)

# coordinates: left_col top_row right_col bottom_row

wafer fill outside 0 0 130 130
save <FILE>_UL.txt

wafer reload
wafer fill outside 131 0 261 130
save <FILE>_UR.txt

wafer reload
wafer fill outside 0 131 130 261
save <FILE>_LL.txt

wafer reload
wafer fill outside 131 131 261 261
save <FILE>_LR.txt

repeat end


Results

Here's the .bat file that launches the conversion:


C:\WCAD\WMBatch\WMBatch64.exe "-batch_file:%CD%\command2.txt" "-log_file:%CD%\example2.log"

Here are the directories involved:

the 'root' directory contents of foundry2.product before running the .bat file

The "root" directory contents foundry2.product before running the .bat file


the input directory - it should only contain the map files to be converted and sliced. Nothing else.

the input directory - it should only contain the map files to be converted and sliced.


The intermediate directory - it will contain the files converted from SINF to SECS-EG(TXT)

The intermediate directory - it will contain the files converted from SINF to SECS-EG(TXT)


The output has a total of 12 map files. For each of the three input files 4 quadrants were created.

The output will have a total of 12 map files. For each of the three input files 4 quadrants were created.