MBS2TIFF Command Line Operation

MBS2TIFF/GDS can be executed from the command line. A typical application might be to convert the MEBES data received from the wafer the fab back to GDSII to compare the fractured data against the original source.

MBS2TIFF/GDSII Command Line Syntax

mbs2tiff [options] input_file output_file

mbs2tiff Name of the executable. A full path may be specified if the executable is not in the current working directory.

-nogui Run in comamnd line mode. No mbs2tiff dialog box will open. On Windows, the progress dialog box will open; however this can be disabled with -silent option.

-silent Disables progress messages showing percent complete. Use this option to run the program in the background; only a status messageg will be generated upon completion.

-slice_code:CODE override slice code in the job deck; use the specified value CODE instead.

-slice_width:WIDTH override slice width in the job deck; use the specified value WIDTH instead.

-slice_reflect:REFLECT override slice reflect in the job deck; use the specified value REFLECT (in inches) instead.

-win:llx,lly,urx,ury Defines an extraction window in microns (MEBES units).

-levels:l1,l2,l3 Specify levels in the job deck to be extracted. l1,l2,l3 are the level numbers. This argument is valid only when the MEBES input is a job deck.

-tiff create TIFF bitmap output. [default]


create Windows BMP output. This option only available on Windows.


Specify output width equal to WIDTH in pixels. Default = 1000 pixels. valid only for TIFF/BMP output format.


output height equal to HEIGHT in pixels. Default = 1000 pixels. Valid only for TIFF/BITMAP output format.


used when rendering a full screen view of the pattern file or job deck. Instead of a detailed RIP, it examines the trapezoid coverage of each stripe, and if that coverage exceeds the user supplied THRESHOLD, then that stripe is rendered black. This can decrease the time required to produce a full 1:1 view by 10X or more. If no THRESHOLD is supplied the value defaults to 0.

-gds create GDSII stream output.

-gds_grid:GRID sets the GDSII grid value. If not specified, default = 0.001 (i.e. 1000 ticks per micron.)

-disable_reverse_tone By default, mbs2tiff supports reverse tone command in the MEBES Job Deck for TIFF output. Use this option to turn off reverse tone support.

-offset Instead of using absolute coordinates taken from the MEBES file, the GDSII coordinates are taken from the LL corner of the user defined extraction window. This is useful when the combination of MEBES data extents and grid resolution would overflow the dynamic range of the GDSII data format.

-maxpts:MAXPTS limit the resulting polygons generated by a union operation to a maximum number of vertices. If not specified the default value is 4096.


By default, the mbs2tiff/gds program does not join touching MEBES trapezoids when converting to GDSII. This is the fastest mode of operation but the resulting GDSII file is much larger than necessary because of GDSII's inefficient storage of boundary data.

The -union:POLYNUM directs the program to read in the specified number of trapezoids and unionize them into larger more complex polygons. This will greatly decrease the size of the resulting GDSII stream file.

If the value of POLYNUM is set very large, the time required perform the unionization can become enormous since it is exponentially related to the number of input vertices. Our experiments with a few files indicate a value of 500 for POLYNUM gives reasonably good compression without a large penalty in conversion speed. This parameter is valid only for GDSII output format.

-log:NAME or -log Specify log file name to be created. If name is provided it is used as specified. If name is not provided then the log file name is derived from the output file name with a .log file name extension. The input file name is used to generate the log file name if no output file name is provided.


MBSCHK stops execution when it encounters the first segment. Sample output is shown here used in conjunction -log.

mbschk Version 1.17  (rcs 1.186) (10/19/16) FLEXlm v11.13.1.2 LICENSE (bl...
(C)2016 Artwork Conversion Software, Inc.  (831)426-6163
info@artwork.com,  http://www.artwork.com

Command line:
    ./mbschk 001A010P0.03 -info -log:out.txt
file: 001A010P0.03 (46358470656) bytes
format is 5
number of data fields: 3
address size (bit pattern): 00000000.01000000.00110000.10010010
grid: 0.000500
step height: 1024
cx: 90788200
cy: 90085400
month: 10 day: 13 year: 2016
rdos filename: acsmebes.mbs
pattern file length in 2048 byte records: 22635972 or 46358470656 (bytes) compared to 46358470656 bytes
format is 5
segment[0] @ 12288, 0x3000
segment[1] @ 2541568, 0x26c800
segment[2] @ 8777728, 0x85f000
segment[2769] @ 46354477056, 0xacaf13000
segment[2770] @ 46358122496, 0xacb28d000
mask shop info: AMBS
employing native grid: 0.000500, coerced to: 0.000500
stripes per segment: 87974
segments: 2771 non-empty: 2771
scaling: tick: 1 dtick: 0.000500 grid: 0.000500
extents: 45393.854, 45042.456 (um)
Timing Information:
Elapsed time: 00:00:00 (hh:mm:ss) 0.125 (secs)
Total Elapsed time: 00:00:00 (hh:mm:ss) 0.125 (secs)
Total Bytes Read: 0.0 (MB)
Total Seek Count: 0   EndOfRecord Count: 0


Capture N windows DxD in size at random over entire pattern.
File system caching affects the timing results of consecutive or nearly consecutive execution of multi-window extractions for the same input file and the same window set. The first run would take the longest and then the subsequent runs take much less time. The -rand command line option allows the user to generate a new randomized set of N windows each D x D um^2 with each run over the extent of the pattern file. Randomizing the extraction window list minimizes the effect of file system caching for testing multi-window extractions. If N is negative then the set of random window is generated with the same seed value, i.e. it will produce the same sequence of random window. In addition, the window list is saved base_output_filename.win.txt, e.g. if the user specifies -rand:100,10 and the output file name to be a_clip.gds on the command line, then the output file names will be a_clip_0.gds, a_clip_1.gds .... a_clip_99.gds and the list of 10x10 um^2 windows will be recorded in the file called a_clip.win.txt


do NOT create any GDSII output on disk.
mbschk will perform all operations as normal with the exception that no GDSII will be created. This command is useful to determine the cost of writing GDSII data to disk.


Multi-window extraction results in one GDSII file per extraction window. Sometimes it is desirable to combine the extracted GDSII clips into a single file. The -gdsfilt command line option is a convenience feature that creates a response (or command) file suitable for use with GDSFILT to stitch all the outputs into a single file. This command line option takes no arguments. The name for the command file derived from the output file.
For Example:

g:\WCAD\Mbs2Tiff.v135a\mbschk64.exe 001a010p0.00 -rand:100,10 -index:001a010p0.00.idx -log:gds.log -gds:out.gds -gdsfilt
will create a response file with name out.gdsfilt.cmd. The stitched file will be created using GDSFILT with the following command:
gdsfilt @out.gdsfilt.cmd
The stitched file name is always combo.gds and the top structure containing all the clips is always call combo_top


create and/or use index file F.
In multi-window extraction mode mbschk makes use of a smart seeking algorithm to determine the lowest stripe (tied to minimum y-value of the user specified window) that participates in a user specified window for each segment that crosses the user specified window. The smart seeking algorithm is essentially a binary search which seeks to record boundaries in the pattern file, discovers the next stripe and the iterates this procedure until it gets close to a suitable stripe. Issues that compound the problem of finding the target stripe is that the stripe may or may not exist and density of information in any segment is not uniform.
An approach that avoids issues tied to a seeking involves creating a index of stripe offsets, then using this index to jump directly to the location to a desired stripe. Besides being the fastest method of performing multi-window extraction, this approach has the benefit that once the index has been saved to a file it can be reused over and over again. Having an index file on hand will always result in the fastest throughput in generating GDSII file extractions; the more the extractions the larger increase in throughput. Creating an index file can, of course, be performed offline. One of the costs of this approach is that for large pattern files the index files tend to be large also, e.g. a 44 GB pattern file can generate a 1.8 GB index file. The size of the index file relative to the pattern file depends on the details of the pattern file. The other cost associated with creating the index file is that it does take time to index the file which involves essentially reading the entire pattern file.

Usage to create the index file is simple: mbschk.exe pattern_file_name -index:pattern.idx.
For example:

./mbschk32 001A010P0.03 -index:03.idx
To use the index file the user just adds the -index command line option that points to the previously created index file, For example:
./mbschk32 001A010P0.03 -win:@windows403.txt -gds out.gds -log:out_index.log -index:03.idx

Batch File Example

A user has 4 MEBES files he wishes to convert to GDSII stream data. This can be either by running the same script file over and over or by using one script to call another. The example below was run on Windows but can be modified slightly to work on Linux or Unix.

The first script, convert.bat, contains the command line to launch mbs2tiff, the required arguments and variables for the input and output file names and log files. The -nogui and -silent arguments prevent any messages or windows from popping open. The -gds argument instructs the program to create GDSII stream output and the -union:500 argument instructs mbs2tiff/gds to unionize 500 input trapezoids into larger boundaries in GDSII if possible. The input file variable is set to %1 and the output will use the input file with the suffix .gds.

C:\wcad\Mbs2Tiff\mbs2tiff.exe -nogui -silent -gds -union:500 -log:%1.log %1 %1.gds

The second script is called run.bat and calls convert.bat over and over again, each time passing it a new input file. The net result is 4 GDSII files from the 4 input MEBES files.

call convert 4n01.mbs
call convert 4p01.mbs
call convert 4p00.mbs
call convert 4p01.mbs

On UNIX based systems, the call command is not necessary.

  Price Download Revision History

ARTWORK CONVERSION SOFTWARE, INC.                  Company Profile
417 Ingalls St.,     Santa Cruz, CA 95060         Tel (831) 426-6163     Fax 426-2824               email: info@artwork.com