flow page

Sample Function Flow

Often our users need to clip out many small windows from a large GDSII file in order to do some sort of yield or process analysis. To make matters more complicated, they may need to use two separate GDSII source layers and produce a third "derived" layer for the analysis. A common example of this might be a poly layer which is often defined using a base layer and a cut layer as shown below.

the poly data on wafer is derived from two separate GDSII layers - a base layer consisting of regularly spaced stripes and a cut layer.

Let's set up the following example and see how QISMLIB and QISMBOOL can be used by a "client" to extract thousands of small windows from our GDSII data.

Filenameinput.gds
Top CellTOP
File Size35 GB
Poly Base Layer33:0
Poly Cut Layer33:20
GDSII unitsmicrons
GDSII resolution0.001 um
Clip Window10 x 10 um
Desired Outputflat list of polygons, clipped to window, unionized
placed in memory for client application to use.


The Functional Flow

Below you will find a functional flow chart of which functions to call in the correct order. The flow will initialize the library, create an "exploder" instant, import the desired layers, set a clipping window and then place the extracted vectors from layer 33:0 into a memory buffer. A second exploder instance will be created and used to extract vectors into a separate buffer from layer 33:20.

Once both exploder threads are done, the QISMBOOL Boolean library will be used to clip and subtract the one set from the other and produce a third set of vectors in memory that the client program can use for its analysis.

[ Click on a function box to get some details about why it is used, what parameters are passed to it and what gets returned. ]

two thread exploder sample flow
initialize note load_file note create_exploder_A note Set_layers_on_A note Set_exact_window_A note Set_Convert_paths_to_boundaries note Create_new_thread_A note Get_Vector_Data_A note Vector Callback A note create_exploder_B note Set_layers_on_B note Set_exact_window_B note Set_Convert_paths_to_boundaries note Create_new_thread_B note Get_Vector_Data_B note Vector Callback B note

[Next Page --> Boolean Function Call Flow]


Notes

QisMLib_initialize_once: here's where the client initializes the library. Parameter's include the full path to the library. License is checked; and if not available a Null will be returned instead of a handle.

Load_file - this scans the input file, builds a quad tree and generally loads the data into memory. For clip applications, one typically would load only layers to be clipped - this reduced the memory footprint and speeds up the load time.

Create Exploder - The exploder is the function that traverses the data base and extracts any paths and boundaries that "cross" the selection window. Because QisLib_MT is multi-threaded, the client can create a number of exploder instances. This is most useful when extracting small amounts of data from very large files.

Set_layers_on (A) - within the first exploder instance we will extract geometries on layer 33:0 i.e. the A group.

Set_exact_window - within the first exploder instance we define our clipping window.

Set_Convert_paths to boundaries - the Boolean library only operates on boundaries - not paths. By setting this flag, we tell the exploder to convert all paths in extracts into a boundary equivalent.

Create New Thread (A) - the client creates a new thread for the first instance of the exploder to traverse through the database.

Get_Vector_Data - this launches the traversal of our first instance through the database. Vectors (our fancy name for polygons or boundaries) are collected by a client call back function. In this particular example, those vectors are simply stored in memory. We are not expecting too many vectors in a 10 x 10 um windows - maybe 10K-25K boundaries and 100K to 400K total vertices.

Qn_qismt_vector A - This is a client call back function used to collect the vectors produced by the exploder and do "something" with them. In this case, "something" is merely adding them to memory as they come in. For other applications that "something" could be processing or transmitting vectors to another workstation or to custom hardware through a data channel. The number of vectors returned for any given clip window is unknown as is the time it will take.

Create Exploder B - While Exploder A is extracting geometries from layer 33:0, we will create a second exploder instance whose job is to extract geometries from layer 33:20. As the GDSII file and its quad tree are already loaded and in memory, there is no overhead (as compared to reloading the database.)

Set_layers_on (B) - within the second exploder instance we will extract geometries on layer 33:20 i.e. the B group.

Set_exact_window - within the second exploder instance we define our clipping window. In this example it is the same as the clipping window for Group A. If you did not need to process multiple layers, this second exploder could be working on a different region of the chip.

Set_Convert_paths to boundaries - the Boolean library only operates on boundaries - not paths. By setting this flag, we tell the exploder to convert all paths in extracts into a boundary equivalent.

Create New Thread (B) - the client creates a second child thread for the second instance of the exploder to traverse through the database. This time it will be collecting geometries on layer 33:20 instead of 33:0.

Get_Vector_Data - this launches the traversal of our second instance through the database.

Qn_qismt_vector B - This client call back function collects the vectors from the second thread and places them in memory section B.