Glade Reference
All design data is stored in libraries. Libraries contain cells and views; the combination of a cell and a view is a cellView, which contains the actual design data. For example a library may contain a cell 'NAND2'. This cell may contain a cellView 'NAND2' 'layout', where 'layout is the view of the cell.
Construct a library called "fred", returning the library object.
Opens and reads a previously saved library. libPath is the full path to the library, including the library name. Returns True if the library can be opened successfully, otherwise False.
Saves a library to disk. libPath is the full path to the library, including the library name. Returns True if the library can be saved successfully, otherwise False.
Closes a cellview. Currently this does not purge the cellview from virtual memory.
Returns a Python list of all the cell names in the library.
Returns a Python list of all the view names in the library.
Return the size of a database unit in meters.
Return the number of database units per micron (defaults to 1000)
Returns a cellView object. "mode" can be 'r', 'w' or 'a'. 'w' mode is used to create a new cellView; the cellView must not exist. 'a' mode is used to append (edit) an existing cellView; the cellView must exist. 'r' mode is used to read an existing cellView; the cellView must exist. An exception is thrown on failure.
Copies a cellview. Returns True if successful.
Renames a cellView. Returns True if successful.
Returns a cellView object corresponding to the given cellName and viewName, or None if it does not exist in the library.
Returns a cell object corresponding to the given cellName, or None if it does not exist.
Returns a view object corresponding to the given viewName, or None if it does not exist.
Deletes the cellview specified by cellName and viewName and returns True if sucessful, None if not.
Renames a cell. Returns True if sucessful, False if not.
Deletes the cell specified by cellName and returns True if sucessful, False if not.
Returns the name of the library.
Returns the library path if the library has been read or saved on disk, otherwise None.
Returns a pointer to the library's techfile.
Get a library by name.
int index = lib.addVia(via *v, bool check)
Adds a via v to the library via table and returns the via's index in that table. If check is true (the default is false), the via name is checked and the new via will NOT be added; the index returned is that of the existing via.
via *v = lib.getVia(int index)
Gets a via by index from the library. No bounds checking is performed.
via *v = lib.getViaByName(char *name)
Gets a via by name.
int index = lib.getViaIndexByName(char *name)
Gets a via's index by the via name.
char *name = lib.getViaNameByindex(int index)
Gets a via's name from its index.
int num = lib.getNumVias()
Gets the number of vias in the library's via table. Note the table size is currently limited to 8192 vias.
Copyright © Peardrop Design 2016.