Glade Reference


Instance

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

 

int coord = i.left()

Get the left edge of the instance's bounding box

 

int coord = i.bottom()

Get the bottom edge of the instance's bounding box

 

int coord = i.right()

Get the right edge of the instance's bounding box

 

int coord = i.top()

Get the top edge of the instance's bounding box

 

bool  i.offGrid(int grid)

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


 i.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 i.status()

 Get the placement status of the instance.


 const char * i.getPlacementStatusStr()

 Get the placement status of the instance as a string.


 i.orient(orient_t o) 

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


orient_t  i.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


char * i.getPlacementSourceStr()

Get the instance source type as a string


i.bound(bool b)

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

 

bool i.bound()

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

 

Point p = i.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.

 

i.origin(Point p)

i.origin(int x, int y)

Set the origin of the instance.

 

i.orient(orient_t o)

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

 

int i.orient()

Get the instance's orientation.

 

i.mag(double mag)

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

 

double i.mag()

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

 

const char * s = i.libName()

Get the instance's lib name.

 

library * lib = i.lib()

Get the instance's library.

 

const char * s = i.cellName()

Get the instances's cell name.

 

i.cellName(const char * s)

Set the instance master's cellName.

 

char * s = i.viewName()

Get the instance's view name.

 

i.instName(cellView * cv, const char * instName)

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

 

const char *s = i.instName()

Get the instance's instName.

 

cellView * cv = i.getMaster()

Get the cellview of the instance's master.

 

i.setMaster(cellView * cv)

Set the instance's master.

 

Rect box = i.bBox()

Get the instance's bounding box.

 

i.updateBbox()

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

 

Rect box = i.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 i.objType()

Returns the objects type as INST

 

const char * i.objName()

Returns the print name i.e. "INST"

 

int  dist = i.getNearestEdge(Point p, segment &edge)

Get the nearest edge of this object.


 

i.transform(transform &trans)

Transform the instance by the given transform.

 

i.scale(double scalefactor, int grid)

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

 

i.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 * obj = i.Copy(cellView * cv, Point delta)

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

 

dbObjList<dbObj> * objs = i.Flatten(cellView * cv, transform trans, bool hier = True)

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

 

i.dbCreateInstPin(net * n, char * name)

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

 

i.dbDeleteInstPin(instPin * ip)

Delete the instPin ip from this instance.

 

instPin * ip = i.dbFindInstPinByName(const char * name)

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

 

list = i.getInstPins()

Get a list of all instPins for this instance.

 

int num = i.getNumInstPins()

Get the number of instPins for this instance.

 

Contents|Index

Copyright © Peardrop Design 2020.