Glade Reference


db_Techfile

The db_Techfile class contains technology related parameters, in particular the layers used in a design. A db_Techfile object does not normally need to be created as creating a library will initialise a techfile associated with that library. For example:

lib = library("myLib")

tech = lib.tech()

int tech.techLoad(char *fileName)

Loads a techfile specified by fileName.

int tech.techSave(char *fileName)

Saves a techfile to fileName.

 

Layer related operations

Layers are signed 16 bit integers and map to layer-purpose pairs. A layer number of -1 signifies an invalid layer.

bool tech.isSelectable(int layer)

Returns True if layer is selectable, else returns False.

tech.selectable(int layer, bool sel)

Sets a layer selectable is sel is nonzero.

bool tech.isVisible(int layer)

Returns True if layer is visible, else returns False.

tech.visible(int layer, bool vis)

Sets a layer visible is vis is nonzero.

bool tech.isUsed(int layer)

Returns True if layer is used, else returns False.

tech.setUsed(int layer, bool used)

Sets a layer used if used is nonzero.

int tech.color(int layer)

Returns a 32 bit int of the layer color in rgba format.

tech.color(int layer, int color)

Sets a layer color. color is a 32 bit integer in rgba format.

tech.setLayerName(int layer, const char *name)

Sets a layer's name.

const char * tech.getLayerName(int layer)

Gets the layer's name.

tech.setLayerPurpose(int layer, const char *name)

Sets a layer's purpose.

const char * tech.getLayerPurpose(int layer)

Gets the layer's purpose.

const char * tech.getLayerPurposePair(int layer)

Gets the layer's layer-purpose pair name e.g. "metal1 drawing".

tech.setLayerGdsLayer(int layer, int gdsNum)

Sets a layer's GDS number to gdsNum.

int tech.getLayerGdsLayer(int layer)

Gets a layer's GDS number.

tech.setLayerDataType(int layer, int gdsNum)

Sets a layer's GDS datatype to gdsNum.

int tech.getLayerDataType(int layer)

Gets a layer's GDS datatype.

int tech.getLayerNum(const char *name, const char *purpose, int warn=True)

Gets a layer number if one exists with the specified name and purpose. If it does not exist a warning is given unless warn is set to False.

int tech.createLayer(const char *name, const char *purpose)

Creates a layer in the techfile with the specified name and purpose. Returns the layer number or -1 if the layer cannot be created.

tech.setLayerType(int layer, int type)

Sets the layer type. type can be one of T_CUT, T_ROUTING, T_BLOCKAGE, T_PIN, T_OVERLAP, T_MASTERSLICE or T_NONE.

int tech.getLayerType(int layer)

Gets the layer type.

tech.setLayerWidth(int layer, int width)

Sets the layer minWidth.

int tech.getLayerWidth(int layer)

Gets the layer minWidth.

tech.setLayerSpacing(int layer, int spacing)

Sets the layer minSpace.

int tech.getLayerSpacing(int layer)

Gets the layer minSpacing.

tech.setLayerPitch(int layer, int pitch)

Sets the layer pitch.

int tech.getLayerPitch(int layer)

Gets the layer pitch.

tech.setLayerDir(int layer, int dir)

Sets the layer routing direction. The routing direction can be LAYER_HORIZONTAL or LAYER_VERTICAL.

int tech.getLayerDir(int layer)

Gets the layer routing direction.

const char *tech.getLayerDirAsStr(int layer)

Gets the layer routing direction as a string.

tech.setLayerResistance(int layer, double r)

Sets the layer resistance.

double tech.getLayerResistance(int layer)

Gets the layer resistance.

tech.setLayerAreaCap(int layer, double c)

Sets the layer area capacitance.

double tech.getLayerAreaCap(int layer)

Gets the layer area capacitance.

tech.setLayerEdgeCap(int layer, double c)

Sets the layer edge capacitance.

double tech.getLayerEdgeCap(int layer)

Gets the layer edge capacitance.

tech.setLayerOrder(int layer, int order)

Sets the layer order

int tech.getLayerOrder(int layer)

Gets the layer order.

tech.setLineStyle(int layer, int style)

Sets the layer linestyle

int tech.getLineStyle(int layer)

Gets the layer linestyle.

tech.setLineWidth(int layer, int width)

Sets the layer linewidth

int tech.getLineWidth(int layer)

Gets the layer linewidth.

tech.setFillPattern(int layer, bits[128], int exists=0, char *name = NULL, int full32bit=0)

Sets the layer fill pattern. The bit array is 128 bytes when using OpenGL, 32 bytes when not using OpenGL.

bits[128] tech.getFillPattern(int layer)

Gets the layer fill pattern as an array of bytes; 128 bytes when using OpenGL else 32 bytes.

char * tech.getFillName(int layer)

Gets a fill pattern name for the layer.

tech.setFillType(int layer)

Gets the layer fill type. Can be one of F_HOLLOW, F_SOLID, F_CROSSED, F_STIPPLE.

int tech.getFillType(int layer)

Gets the layer fill type. Can be one of F_HOLLOW, F_SOLID, F_CROSSED, F_STIPPLE.

int tech.getCurrentLayer()

Gets the current layer as set by the LSW.

 

Contents|Index

Copyright © Peardrop Design 2020.