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::via
via v = via(name)
Creates a via object. The second type of constructor creates a via with name name.
via::setViaName(char *name)
Sets the via's name.
char * via::getViaName()
Gets the via's name.
via::addViaLayer(int16_t layerNum, Rect geom)
Adds a via layer. Note that vias can currently only contain rectangular shapes.
int32_t via::getNumLayers()
Gets the number of layers in the via. Typically this is 3 (two conductor layers and one via layer).
int16_t first_layer = via::getFirstLayer()
Gets the first layer of the via.
int16_t last_layer = via::getLast Layer()
Gets the last layer of the via.
viaLayer via::getViaLayerList()
Returns a viaLayer list which is a structure of the form:
struct viaLayer {
int16_t layer;
Rect geom;
viaLayer *next;
} viaLayer;
via::setViaLayerList(viaLayer vl)
Sets the via's viaLayer list. Normally the viaLayer list is created using addViaLayer().
via::setViaDefault(bool flag)
Sets the via as a default via if flag is true.
bool via::getViaDefault()
Returns true if the via is a default via.
int16_t via::getOtherViaLayer(int16_t layer)
Given one of the via's conducting layers, returns the 'other' conducting layer.
via::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 library::addVia().
library * via::lib()
Gets the library that contains this via.
via::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 via::bBox()
Gets the via's bounding box.
via::setResistance(double r)
Sets the via's resistance in ohms.
float64_t via::getResistance()
Gets the via's resistance in ohms.
via::setPattern(char * name)
Sets the via's pattern name.
char * via::getPattern()
Gets the via's pattern name.