Technology Import ================= To use KLayout and the Photonics-extension efficiently, it is recommended to create a KLayout technology. This chapter explains how to import a technology. To use a new technology either create a new technology from the technology manager :menuselection:`Tools --> Manage Technologies` or create a new package :menuselection:`Tools --> Manage Packages` for the technology. Import Techfile & Creation of LayerProperties --------------------------------------------- KLayout provides an import script for Cadence techfiles. This import creats the Layer Properties automatically for the defined layers. The script can be found in :menuselection:`File --> Import Cadence Techfile` After importing, the properties can be saved via :menuselection:`File --> Save Layer Properties`. Recommended location for the file is in the technology folder in `~/.klayout/tech//` or if using a package `~/.klayout/salt//tech/` .. note:: Suggested filename for easy use with the sample cells: FreePDK45.tf / FreePDK45.lyp In order to use the additional abstract layers in the sample cells paste the following xml snippets into the <>.lyp file: .. code-block:: xml #01ff6b #01ff6b 0 0 I3 I6 true true false 1 false false 0 phot_silicon.drawing 400/0@1 #808080 #808080 0 0 I2 I0 true true false 1 false false 0 phot_poly.drawing 410/0@1 #ff0000 #ff0000 0 0 I9 true true false 1 false false 0 phot_pwell.drawing 420/0@1 #0000ff #0000ff 0 0 I5 true true false 1 false false 0 phot_nwell.drawing 430/0@1 #ff0000 #ff0000 0 0 I11 true true false 1 false false 0 phot_pimplant.drawing 440/0@1 #0000ff #0000ff 0 0 I7 true true false 1 false false 0 phot_nimplant.drawing 450/0@1 Put this block between the last properties block but befor the end of the name block. Import of example Vias ---------------------- Importing a .LEF will create the layerproperties. The layerproperties are the layer-purpose-pairs of KLayout. When using the lef import script built into KLayout, it will automatically load example vias into a new layout. Unfortunately, the layers are not the correct layers from the technology files. The layers can be edited by selecting a layer in the layers sub-window and then editing the layer via :menuselection:`Edit --> Layer --> Edit Layer Specification`. Recommended place is in the `~/.klayout/tech/libraries` or if using a package: `~/.klayout/salt//tech/libraries`. These will automatically be loaded and are available as static cells for insert or in PCells. Layermap -------- The .layermap file is usually supplied by the foundry. This file can be used in the pcell_lib_ext to use layernames instead of layer numbers in the PCell Library. It contains layername | layernumber | layerdatatype on each line for each layer. They have to be separated by white spaces. Afterwards, they can by used by the `self.add_layer(str varname, str layername)` function during the `__init__` of a new class of a PCell. Later the layer is accessible as `self.varname`. Recommended place is again in the tech folder.