Glade Reference


Instance class

An instance is a reference to a cellview, in another cellview. Instances correspond to GDS2 SREFs or DEF components. Instances are created using the cellView::dbCreateInst() function.

 

int32_t inst::left()

Get the left edge of the instance's bounding box

 

int32_t inst::bottom()

Get the bottom edge of the instance's bounding box

 

int32_t inst::right()

Get the right edge of the instance's bounding box

 

int32_t inst::top()

Get the top edge of the instance's bounding box

 

bool inst::offGrid(int32_t grid)

Checks if an instance origin is on the grid grid, which is in database units.

 

inst::status(db_PlaceStatus s)

Set the placement status of the instance. db_PlaceStatus can be one of: DB_UNPLACED, DB_PLACED, DB_FIXED, DB_COVER, DB_UNKNOWN.

 

db_PlaceStatus inst::status()

Get the placement status of the instance.

 

const char * inst::getPlacementStatusStr()

Get the placement status of the instance as a string.

 

inst::orient(orient_t o)

Set the instance orientation. db_Orient can be one of: R0, R90, R180, R270, MX, MXR90, MY, MYR90.

 

orient_t inst::orient ()

Get the instance orientation.

i.source(db_SourceType s)

Set the instance source type. db_SourceType can be one of: DB_SRC_NONE, DB_SRC_NETLIST, DB_SRC_DIST, DB_SRC_USER, DB_SRC_TIMING.

 

db_SourceType  i.source()

Get the instance source type

 

const char * inst::getPlacementSourceStr()

Get the instance source type as a string

 

inst::bound(bool b)

Set the instance binding. This should probably not be set by the user.

 

bool inst::bound()

Get the instance binding status. An instance is bound if it references a valid master.

 

Point inst::origin()

Get the origin of the instance. Note that an instance's origin does not have to be e.g. the lower left of its bounding box - it can be anywhere.

 

inst::origin(const Point &p)

inst::origin(int32_t x, int32_t y)

Set the origin of the instance.

 

inst::orient(orient_t o)

Set the instance's orientation. It can be one of R0, R90, R180, R270, MX, MXR90, MY, MYR90.

 

int32_t inst::orient()

Get the instance's orientation.

 

i.mag(float64_t mag)

Set the instance's magnification. Magnifications other than 1.0 are supported, but their use is strongly discouraged.

 

float64_t inst::mag()

Get the instance's magnification. Magnifications other than 1.0 are supported, but their use is strongly discouraged.

 

const char * inst::libName()

Get the instance's lib name.

 

library * inst::lib()

Get the instance's library.

 

const char * inst::cellName()

Get the instances's cell name.

 

i.cellName(const char * s)

Set the instance master's cellName.

 

const char * inst::viewName()

Get the instance's view name.

 

inst::instName(cellView * cv, const char * instName)

Set the instance's instName. cv is the cellView containing the instance.

 

const char * inst::instName()

Get the instance's instName.

 

cellView * inst::getMaster()

Get the cellview of the instance's master.

 

inst::setMaster(cellView * cv)

Set the instance's master.

 

Rect box = i.bBox()

Get the instance's bounding box.

inst::updateBbox()

Updates the instance bounding box after e.g. changing origin/orient/mag.

 

Rect inst::getBoundary()

Gets the instance's boundary rectangle. If the instance is e.g. a LEF macro then it will contain a shape on the TECH_PRBOUNDARY_LAYER, and the Rect representing this boundary shape will be returned.The shape is transformed according to the inst's origin, orientation and magnification. For symbols, the boundary layer defines a rectangle used in schematics for selection and dynamic highlighting, rather than the symbol's bounding box itself.

 

db_Type inst::objType()

Returns the objects type as INST

 

const char * inst::objName()

Returns the print name i.e. "INST"

 

int32_t inst::.getNearestEdge(Point p, segment &edge)

Get the nearest edge of this object.

 

inst::transform(transform &trans)

Transform the instance by the given transform.

 

inst::scale(float64_t scalefactor, int32_t grid)

Scale the instance origin coordinates by scalefactor, snapping to grid.

 

inst::Move(cellView * cv, Point delta, bool opt = true)

Move the instance origin by delta.  If opt is True then the database is re-optimised for the new inst position. If there are a lot of objects to move it makes sense to turn this off and instead use the cellView update() function after moving them all.

 

dbObj * inst::Copy(cellView * cv, Point delta)

Copy the instance. cv is the destination cellview, delta is the offset from the current origin.

 

dbObjList<dbObj> * inst::Flatten(cellView * cv, transform trans, bool hier = true)

Flatten the instance into the cellView cv, with the given transform trans.

 

inst::dbCreateInstPin(net *n, char *name)

Create an instance pin on this instance for the net n and pin name name.

 

inst::dbDeleteInstPin(instPin * ip)

Delete the instPin ip from this instance.

 

instPin * inst::dbFindInstPinByName(const char * name)

Find the inst pin with name name on this instance. Returns null if not found.

 

inst::getInstPins()

Get a python list of all instPins for this instance.

 

int inst::getNumInstPins()

Get the number of instPins for this instance.

 

 

Contents|Index

Copyright © Peardrop Design 2024.