Glade Reference


Via class

The Via class represents a via master, which is a kind of special cellView. Instances of vias are called viaInsts, and are simplified forms on insts. Normally a via is created with a given name; its shapes are added with addViaLayer(), and then the via is added to the library using library::addVia().

 

via v   = via

via v = via(name)

Creates a via object. The second type of constructor creates a via with name name.

 

v.setViaName(char *name)

Sets the via's name.

 

char *name = v.getViaName()

Gets the via's name.

 

v.addViaLayer(int layerNum, Rect geom)

Adds a via layer. Note that vias can currently only contain rectangular shapes.

 

int num = v.getNumLayers()

Gets the number of layers in the via. Typically this is 3 (two conductor layers and one via layer).

 

int first_layer = v.getFirstLayer()

Gets the first layer of the via.

 

int last_layer = v.getLast Layer()

Gets the last layer of the via.

 

viaLayer vl = v.getViaLayerList()

Returns a viaLayer list which is a structure of the form

struct viaLayer {
    int layer;
    Rect geom;
    viaLayer *next;
} viaLayer;

v.setViaLayerList(viaLayer vl)

Sets the via's viaLayer list. Normally the viaLayer list is created using addViaLayer().

 

v.setViaDefault(bool flag)

Sets the via as a default via if flag is True.

 

bool v.getViaDefault()

Returns True if the via is a default via.

 

int other_layer = v.getOtherViaLayer(int layer)

Given one of the via's conducting layers, returns the 'other' conducting layer.

 

v.setLib(library *lib)

Sets the library for this via. Normally this should not be used, as a via, after creation, should be added to a library using lib.addVia(v).

 

library *lib = v.lib()

Gets the library that contains this via.

 

v.bBox(Rect box)

Updates the via's bounding box. Note this creates a new bounding box which is the union of the existing bounding box and the new box.

 

Rect box = v.bBox()

Gets the via's bounding box.

 

v.setResistance(double r)

Sets the via's resistance in ohms.

 

double val = v.getResistance()

Gets the via's resistance in ohms.

 

v.setPattern(char *name)

Sets the via's pattern name

 

char *name = v.getPattern()

Gets the via's pattern name

 

Contents|Index

Copyright © Peardrop Design 2020.