polysearch web page logo

Examples

The examples below show how Polysearch can be used for pattern matching.


Example 1

Our input file to be searched is a small (very vintage) chip layout as shown below:

input file to be searched for matching polygons

This layout is approximately 9700 um wide and 9500 um tall.


Template File

Our template data is contained in a very small GDSII file that looks like this.

template 1 containing two polygons.

The rectangle at bottom is about 90 um wide. Notice that the C-shaped polygon is actually built from two boundaries that overlap. These will be unionized by Polysearch to produce a single boundary.


Command Line

We know that the polygons we are searching for are located on Layer 1 of the input file. So when we invoke Polysearch we will use the -layers: argument to select only this layer. We always double quote any arguments with paths and file names to insure that if there are spaces in them they are correctly parsed.


"C:\wcad\polysearch\polysearch64.exe"                       path to the polysearch64 executable 

"+input:D:\cad_data[2]\psearch\input.gds"                   path and filename of the input GDSII to be searched

"+output:D:\cad_data[2]\psearch\output\example1.gds"        path/filename of the output GDSII file to produce

"+polyf:D:\cad_data[2]\psearch\template1.gds"               path/filename of the template file

-layers:1                                                   process layer 1 from the input file

-bylayers                                                   match by layer

"-log:output\example1.log"                                  produce this log file


Results

The resulting GDSII file, example1.gds, contains polygons (boundaries) that matched one of the polygons in the template file.

output for example1

Notice that while our template had the polygons in one orientation, Polysearch found all four rotational variations on different sides of the chip layout.

all four rotations were found by polysearch




Example 2 - Using a List of Windows

In this example, rather than search the entire layout (default behavior), we wish to provide Polysearch with a number of smaller windows. One might do this if it is known in advance the areas where the desired polygons are to be found. By searching only those areas, the time it takes to match the polygons can be greatly reduced.

We will be using the @window:LLUR: argument and point to a file containing a list of the lower left and upper right corners of three windows. The file's contents are:

-4150,-200,-3000,0
1530,2235,2260,4070
800,-2250,1480,-925

This represents three rectangular regions inside our chip layout (see Example 1 for snapshot of the chip).


The Template File

The template file, template3.gds is a simple GDSII file containing four boundaries. Since these overlap, they will be unionized to create a single template pattern.

the layout of the template polygons

The Command Line

"C:\wcad\polysearch\polysearch64.exe"                       path to the polysearch64 executable 

"+input:D:\cad_data[2]\psearch\input.gds"                   path and filename of the input GDSII to be searched

"+output:D:\cad_data[2]\psearch\output\example2.gds"        path/filename of the output GDSII file to produce

"+polyf:D:\cad_data[2]\psearch\template3.gds"               path/filename of the template file

-layers:5                                                   load and process layer 5 from the input file

"@window:LLUR:D:\cad_data[2]\psearch\LLUL_window.txt"       open the file LLUL_window.txt and get
                                                            windows from this file

-by_layer                                                   match by layer

"-log:output\example2.log"                                  produce this log file

Results

After matching is complete, the resulting GDSII file has matching polygons (boundaries) in the following locations which correlate with our three windows:

matching polygons found in the three specified windows

Compare this with Example 3 where we used the same template file to search layer 5, but we did not use any window so the entire layout extents was searched.





Example 3 - Using a Template Text File

In this example we are going to use the same input file to search, but our template will be in the form of a text file instead of a GDSII file. We will be searching on layer 5.


"C:\wcad\polysearch\polysearch64.exe"                       path to the polysearch64 executable 

"+input:D:\cad_data[2]\psearch\input.gds"                   path and filename of the input GDSII to be searched

"+output:D:\cad_data[2]\psearch\output\example3.gds"        path/filename of the output GDSII file to produce

"+polyf:D:\cad_data[2]\psearch\template3.txt"               path/filename of the template file - in this case
                                                            a text file

-layers:5                                                   process layer 5 from the input file

-bylayers                                                   match by layer

"-log:output\example3.log"                                  produce this log file


The Template File

The template file is a simple ASCII file that contains the following lines

4
5
1303300 916150
1323700 916150
1323700 910800
1303300 910800
1303300 916150
5
1316850 917750
1323700 917750
1323700 892450
1316850 892450
1316850 917750
5
1303300 901050
1323700 901050
1323700 895700
1303300 895700
1303300 901050
5
1303300 917750
1310150 917750
1310150 895700
1303300 895700
1303300 917750
the layout of the template polygons  

Each of the 4 polygons has 5 vertices (actually 4 physical vertices with last vertex = first vertex.) These make up 4 overlapping rectangles which will be unionized by Polysearch when it does the matching.


Results

The resulting GDSII file, example3.gds, contains 210 matching polygons (various rotations and mirroring.) These are quite small (25 x 20 um) and cannot be seen clearly at full chip extents view; however one can use Artwork's Qckvu3 viewer and apply a marker at the first vertex of each polygon to see where they are located.

locations of matching polygons in example3.gds

If we zoom in we can see some of the matching polygons.

zoom in view of matching polygons for example3.gds



Examples Download Revision History Price




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