Glade

db_Techfile class

The techFile class contains technology related parameters, in particular the layers used in a design. A 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()

      

bool techFile::techLoad(const char *fileName)

Loads a techfile specified by fileName. Returns true on success.

bool techFile::techSave(const char *fileName)

Saves a techfile to fileName. Returns true on success.

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 techFile::isSelectable(int16_t layer)

Returns true if layer is selectable, else returns false.

techFile::selectable(int16_t layer, bool sel)

Sets a layer selectable is sel is nonzero.

bool techFile::isVisible(int16_t layer)

Returns true if layer is visible, else returns false.

techFile::visible(int16_t layer, bool vis)

Sets a layer visible is vis is nonzero.

techFile::isUsed(int16_t layer)

Returns true if layer is used, else returns false.

techFile::setUsed(int16_t layer, bool used)

Sets a layer used if used is nonzero.

int32_t techFile::color(int16_t layer)

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

techFile::color(int16_t layer, int32_t color)

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

techFile::setLayerName(int16_t layer, const char *name)

Sets a layer's name.

const char * techFile::getLayerName(int16_t layer)

Gets the layer's name.

techFile::setLayerPurpose(int16_t layer, const char *name)

Sets a layer's purpose.

const char * techFile::getLayerPurpose(int16_t layer)

Gets the layer's purpose.

const char * techFile::getLayerPurposePair(int16_t layer)

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

techFile::setLayerGdsLayer(int16_t layer, int16_t gdsNum)

Sets a layer's GDS number to gdsNum.

int16_t techFile::getLayerGdsLayer(int16_t layer)

Gets a layer's GDS number.

techFile::setLayerDataType(int16_t layer, int16_t gdsNum)

Sets a layer's GDS datatype to gdsNum.

int16_t techFile::getLayerDataType(int16_t layer)

Gets a layer's GDS datatype.

int16_t techFile::getLayerNum(const char *name, const char *purpose, bool 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.

int16_t techFile::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.

techFile::setLayerType(int16_t layer, lyrType 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.

lyrType techFile::getLayerType(int16_t layer)

Gets the layer type.

techFile::setLayerWidth(int16_t layer, int32_t width)

Sets the layer minWidth.

int32_t techFile::getLayerWidth(int16_t layer)

Gets the layer minWidth.

techFile::setLayerSpacing(int16_t layer, int32_t spacing)

Sets the layer minSpace.

int32_t techFile::getLayerSpacing(int16_t layer)

Gets the layer minSpacing.

techFile::setLayerPitch(int16_t layer, int32_t pitch)

Sets the layer pitch.

int32_t techFile::getLayerPitch(int16_t layer)

Gets the layer pitch.

techFile::setLayerDir(int16_t layer, db_RouteDir dir)

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

db_RouteDir techFile::getLayerDir(int16_t layer)

Gets the layer routing direction.

const char * techFile::getLayerDirAsStr(int16_t layer)

Gets the layer routing direction as a string.

techFile::setLayerResistance(int16_t layer, float64_t r)

Sets the layer resistance.

float64_t techFile::getLayerResistance(int16_t layer)

Gets the layer resistance.

techFile::setLayerAreaCap(int16_t layer, float64_t c)

Sets the layer area capacitance.

float64_t techFile::getLayerAreaCap(int16_t layer)

Gets the layer area capacitance.

techFile::setLayerEdgeCap(int16_t layer, float64_t c)

Sets the layer edge capacitance.

float64_t techFile::getLayerEdgeCap(int16_t layer)

Gets the layer edge capacitance.

techFile::setLayerOrder(int16_t layer, int16_t order)

Sets the layer order

int16_t techFile::getLayerOrder(int16_t layer)

Gets the layer order.

techFile::setLineStyle(int16_t layer, Qt::PenStyle style)

Sets the layer linestyle

Qt::PenStyle techFile::getLineStyle(int16_t layer)

Gets the layer linestyle.

techFile::setLineWidth(int16_t layer, int32_t width)

Sets the layer linewidth

int32_t techFile::getLineWidth(int16_t layer)

Gets the layer linewidth.

techFile::setFillPattern(int16_t layer, bits[128], bool exists=0, const char *name = NULL, int32_t xbits=16, int32_t ybits=16)

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

bits[128] techFile::getFillPattern(int16_t layer)

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

char * techFile::getFillName(int16_t layer)

Gets a fill pattern name for the layer.

techFile::setFillType(int16_t layer)

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

int techFile::getFillType(int16_t layer)

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

int16_t techFile::getCurrentLayer()

Gets the current layer as set by the LSW.