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. A default techfile is created with system layers only.
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. Note you need to create a library object before you can read a saved library.
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 the cells in the library.
Returns a Python list of all the view names in the library.
Returns a Python list of the views in the library.
Return the size of a database unit in meters. Deprecated, use cellView::dbu().
Return the number of database units per micron (defaults to 1000). Deprecated, use cellView::dbuPerUU(.)
Rebinds the instance masters for this library. All cellViews in the library are checked, and if their master cellView is unbound, then a search is performed in the currently open libraries in an attempt to rebind it. For example, to rebind all open libraries you can use the following:
libs = getLibList() for lib in libs : lib.dbBindInstMasters()
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.
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.
Gets a via by index from the library. No bounds checking is performed.
Gets a via by name.
Gets a via's index by the via name.
Gets a via's name from its index.
Gets the number of vias in the library's via table. Note the table size is currently limited to 8192 vias.
Iterators
It is possible to use iterators in Python:
iter = cellIterator(library *lib)
Initialises the cell iterator for the library. For example:
# Script to print cell names in a library # from ui import * # cv = getEditCellView() lib = cv.lib() iter = cellIterator(lib) while not iter.end() : cell = iter.value() name = cell.name() print "Cell name = ", name iter.next() #
iter.next()
Advances the iterator to the next instance.
bool iter.end()
Returns false if there are more instances, else returns true if there are no more.
inst = iter.value()
Returns the current instance.
iter = viewIterator(library *lib)
Initialises the view iterator for the library. The iterator has similar next(), end();and value() functions as above.
Copyright © Peardrop Design 2024.