xsection

XS File Reference

This document details the functions available in XS scripts. An introduction is available as a separate document: Writing XS Files - an Introduction

In XS scripts, there are basically three kind of functions and methods:

Functions

The following standalone functions are available:

Function Description
all A pseudo-mask, covering the whole wafer
below(b) Configures the lower height of the processing window for backside processing (see below)
bulk A pseudo-material describing the wafer body
dbu(d) Configures the computation database unit (see below)
delta(d) Configures the accuracy parameter (see below)
deposit() (synonyms: grow, diffuse) Deposits material as a uniform sheet. Equivalent to all.grow(). Gives a material data object
depth(d) Configures the depth of the processing window or the wafer thickness for backside processing (see below)
etch() Uniform etching. Equivalent to all.etch(…)
extend(x) Configures the computation margin (see below)
flip starts or ends backside processing
height(h) Configures the height of the processing window (see below)
layer(layer_spec) Fetches an input layer from the original layout. Returns a layer data object.
layers_file(lyp_filename) Configures a .lyp layer properties file to be used on the cross-section layout
mask(layout_data) Designates the layout_data object as a litho pattern (mask). This is the starting point for structured grow or etch operations. Gives a mask data object.
output(layer_spec, material) Outputs a material object to the output layout
pause Stops and prompts whether to continue
planarize() Planarization
snapshot Starts a new tab

all method

This method delivers a mask data object which covers the whole wafer. It’s used as seed for the global etch and grow function only.

below, depth and height methods

The material operations a performed in a limited processing window, which extends a certain height over the wafer top surface (“height”), covers the wafer with a certain depth (“depth”) and extends below the wafer for backside processing (“below” parameter). Material cannot grow outside the space above or below the wafer. Etching cannot happen deeper than “depth”. For backside processing, “depth” also defines the wafer thickness.

The parameters can be modified with the respective functions. All functions accept a value in micrometer units. The default value is 2 micrometers.

bulk method

This methods returns a material data object which represents the wafer at it’s initial state. This object can be used to represent the unmodified wafer substrate and can be target of etch operations. Every call of “bulk” will return a fresh object, so the object needs to be stored in a variable for later use:

substrate = bulk
mask(layer).etch(0.5, :into => substrate)
output("1/0", substrate)

dbu method

The cross section generator is based on polygon operations which are performed in an integer-coordinate space. The “database unit” is the multiplier which turns integer coordinates into physical coordinates - i.e. the resolution of the algorithm.

By default, this resolution is taken from the input layout. To achieve a higher resolution, you can choose a finer database unit for the computation of the material geometries. Use “dbu” with a value to set the computation database unit in micrometer units:

dbu(0.0001)

will set the computation DBU to 0.1 nm (0.0001 micrometer).

Using “dbu” without a value will return the current computation database unit, so to decrease the DBU to a tenth you can use:

dbu(0.1 * dbu)

It’s recommended to put a DBU modication statement before all other statements in the script. If the database unit should is made too small, coordinate overflow may happen.

delta method

Due to limitations of the underlying processor which cannot handle infinitely thin polygons, there is an accuracy limit for the creation or modification or geometrical regions. The delta parameter will basically determine that accuracy level and in some cases, for example the sheet thickness will only be accurate to that level.

In addition, healing or small gaps and slivers during the processing uses the delta value as a dimension threshold, so shapes or gaps smaller than this value cannot be produced.

The default value of “delta” is 10 database units. To modify the value, call the “delta” function with the desired delta value in micrometer units. The minimum value recommended is 2 database unit. That implies that the accuray can be increased by using a smaller database unit for the input layout.

If you wish to increase the accuracy, you can also use the “dbu” function to set a smaller computation database unit.

deposit (grow, diffuse) method

This function will deposit material uniformely. “grow” and “diffuse” are just synomyms. It is equivalent to all.grow(…). For a description of the parameters see the “grow” method on the mask data object.

The “deposit” function will return a material object representing the deposited material.

etch method

This function will perform a uniform etch and is equivalent to all.etch(…). For a description of the parameter see the “etch” function on the mask data object.

extend method

To reduce the likelihood of missing important features, the cross section script will sample the layout in a window around the cut line. The dimensions of that window are controlled by the “extend” parameter. The window extends the specified value to the left, the right, the start and end of the cut line.

The default value is 2 micrometers. To catch all relevant input data in cases where positive sizing values larger than the extend parameter are used, increase the extend value by calling “extend” with the desired value in micrometer units.

In addition, the extend parameter determines the extension of an invisible part left and right of the cross section, which is included in the processing to reduce border effects. If deposition or etching happens with dimensions bigger than the extend value, artefacts start to appear at the borders of the simulation window. The extend value can then be increased to hide these effects.

flip method

This function will start backside processing. After this function, modifications will be applied on the back side of the wafer. Calling flip again, will continue processing on the front side.

layer method

The layer method fetches a layout layer and prepares a layout data object for further processing. The “layer” function expects a single string parameter which encodes the source of the layout data.

The function understands the following variants:

layers_file method

This function specifies a layer properties file which will be loaded when the cross section has been generated. This file specifies colors, fill pattern and other parameters of the display:

layers_file("/home/matthias/xsection/lyp_files/cmos1.lyp")

mask method

The “mask” function designates the given layout data object as a litho mask. It returns a mask data object which is the starting point for further “etch” or “grow” operations:

l1 = layer("1/0")
metal = mask(l1).grow(0.3)
output("1/0", metal)

output method

The “output” function will write the given material to the output layout. The function expects two parameters: an output layer specification and a material object:

output("1/0", metal)

The layer specifications follow the same rules than for the “layer” function described above.

An “output” call will overwrite any previous outputs on the same layer. An “output” will also produce the material generated so far. So if you put “output” before an etch statement you will see the material before the etch.

This is useful for working with “pause” or “snapshot” for debugging cross section scripts. In order to produce a certain material of interest, put a corresponding “output” in front of the “pause” or “snapshot” call.

pause function

When this function is called, the cross section script will display the material data produced with “output” so far and prompt whether to continue. This is a useful function for debugging.

A name can be given which is copied into the tab’s headline to indicate the step you’re at.

pause
pause("Stopped at step #17")

A similar function is “snapshop” which does not stop, but saves everything in the current tab and continues with a new one.

planarize method

The “planarize” function removes material of the given kind (“into” argument) down to a certain level. The level can be determined numerically or by a stop layer.

The function takes a couple of named parameters in the Ruby notation (“:name => value”), for example:

planarize(:downto => substrate, :into => metal)
planarize(:less => 0.5, :into => [ metal, substrate ])

The named parameters are:

Name Description
:into (mandatory) A single material or an array or materials. The planarization will remove these materials selectively
:downto Value is a material. Planarization stops at the topmost point of that material. Cannot be used together with :less or :to.
:less Value is a micrometer distance. Planarization will remove a horizontal alice of the given material, stopping “less” micrometers measured from the topmost point of that material before the planarization. Cannot be used together with :downto or :to.
:to Value is micrometer z value. Planarization stops when reaching that value. The z value is measured from the initial wafer surface. Cannot be used together with :downto or :less.

snapshot method

The “snapshop” method will save all materials provided with “output” so far and continue with a new tab. A name can be given which will be copied to the headline of the current tab.

snapshot
snapshot("Step #17")

Methods on original layout layers or material data objects

The following methods are available for these objects:

Method Description
size(s) or size(x, y) Isotropic or anisotropic sizing
sized(s) or sized(x, y) Out-of-place version of size
invert Invert a layer
inverted Out-of-place version of invert
or(other) Boolean OR (merging) with another layer
and(other) Boolean AND (intersection) with another layer
xor(other) Boolean XOR (symmetric difference) with another layer
not(other) Boolean NOT (difference) with another layer

size method

This method will apply a bias to the layout data. A bias is applied by shifting the edges to the outside (for positive bias) or the inside (for negative bias) of the figure.

Applying a bias will increase or reduce the dimension of a figure by twice the value.

Two versions are available: isotropic or anisotropic sizing. The first version takes one sie value in micrometer units and applies this value in x and y direction. The second version takes two values for x and y direction.

The “size” method will modify the layer object (in-place). A non-modifying version (out-of-place) is “sized”.

l1 = layer("1/0")
l1.size(0.3)
metal = mask(l1).grow(0.3)

sized method

Same as “size”, but returns a new layout data object rather than modifying it:

l1 = layer("1/0")
l1_sized = l1.sized(0.3)
metal = mask(l1_sized).grow(0.3)
# l1 can still be used in the original form

invert method

Inverts a layer (creates layout where nothing is drawn and vice versa). This method modifies the layout data object (in-place):

l1 = layer("1/0")
l1.invert
metal = mask(l1).grow(0.3)

A non-modifying version (out-of-place) is “inverted”.

inverted method

Returns a new layout data object representing the inverted source layout:

l1 = layer("1/0")
l1_inv = l1.inverted
metal = mask(l1_inv).grow(0.3)
# l1 can still be used in the original form

or, and, xor or not methods

These methods perform boolean operations. Their notation is somewhat unusual but follows the method notation of Ruby:

l1 = layer("1/0")
l2 = layer("2/0")
one_of_them = l1.xor(l2)

Here is the output of the operations:

a b a.or(b) a.and(b) a.xor(b) a.not(b)
clear clear clear clear clear clear
drawn clear drawn clear drawn drawn
clear drawn drawn clear drawn clear
drawn drawn drawn drawn clear clear

Methods on mask data objects - grow and etch

The following methods are available for mask data objects:

Method Description
grow() Deposition of material where this mask is present
etch() Removal of material where this mask is present

grow method

This method is important and has a rich parameter set, so is is described in an individual document here: Grow Method

etch method

This method is important and has a rich parameter set, so is is described in an individual document here: Etch Method