next up previous contents index
Next: Main Functions 1 Up: xicmanual Previous: Help System   Contents   Index

Interface Functions

There is a growing library of user interface functions which control various aspects of Xic for use in scripts.

Functions that manipulate objects in the database use a coordinate system based in microns (1 micron usually equals 1000 database units). All coordinates are real values.

There are two levels of run-time error reporting. For serious errors, a message is emitted to the controlling terminal, and the script terminates. Most interface functions will generate this type of error only in response to bad arguments, meaning usually arguments of the wrong type. Less serious errors simply cause the function to return, returning a value that indicates that the operation was unsuccessful. Many of the functions return 1 if successful, or 0 if not successful. In some cases where a string is normally returned, a null string return indicates an error occurred. It is up to the user to test the return values for success or failure.

When the documentation specifies that a null string value is acceptable as a function argument, the value zero can be passed instead of a string variable. The token NULL, which is predefined as 0, can be used equivalently.

The tables below list the collections of interface functions presently available, by category and sub-category. Most of these functions return a value. In the descriptions, if a value is returned, the type, in parentheses, is indicated ahead of the function name.

The first group of main module functions:

Main Functions 1
Current Cell
Edit(name, symname) Edit cell
OpenCell(name, symname, curcell) Read file into memory
Push(object_handle) Make a subcell the current cell
Pop() Make parent cell the current cell
NewCellName() Return empty new cell name
CurCellName() Return current cell name
TopCellName() Return cell name at top of editing hierarchy
FileName() Return file name for current cell
CurCellBB(array) Return current cell bounding box
SetCellFlag(cellname, flagname, set) Set the state of a cell flag
GetCellFlag(cellname, flagname) Get cell flag state
Save(newname) Save to disk
UpdateNative(dir) Save modified hierarchy cells as native
Cell Info
CellBB(cellname, array [, symbolic]) Obtain cell bounding box
ListSubcells(cellname, depth, array, incl_top) List subcells in area to depth
ListParents(cellname) List instantiating cells
InitGen() Return handle to subcell name list
CellsHandle(cellname, depth) Return handle to subcell name list
GenCells(handle) Return name from name list
Database
Clear(cellname) Delete cells from memory
ClearAll() Delete all cells and reinitialize
IsCellInMem(cellname) Check if cell is in memory
IsFileInMem(filename) Check if cell from file is in memory
NumCellsInMem() Count cells in memory
ListCellsInMem(options_str) List names of cells in memory
ListTopCellsInMem() List names of top-level cells in memory
ListModCellsInMem() List names of modified cells in memory
ListTopFilesInMem() List source files of top-level cells in memory
Symbol Tables
SetSymbolTable(tabname) Switch to new or existing symbol table
ClearSymbolTable(destroy) Clear or destroy current symbol table
CurSymbolTable() Return the name of the current symbol table
Display
Window(x, y, width, win) Set display window view
GetWindow() Return window containing pointer
GetWindowView(win, array) Return window view area coordinates
GetWindowMode(win) Return window display mode
Expand(win, string) Set expansion status
Display(display_string, win_id, l, b, r, t) Exportable rendering service
FreezeDisplay(freeze) Turn off/on graphics screen updates
Redraw(win) Redraw the window
Exit
Exit() Exit script
Halt() Exit script
Annotation
AddMark(type, arguments ...) Show a user-specified mark
EraseMark(id) Erase a mark
DumpMarks(filename) Dump current cell marks to file
ReadMarks(filename) Read marks from file
Ghost Rendering
PushGhost(array, numpts) Register ghost-drawn polygon
PushGhostBox(left, bottom, right, top) Register ghost-drawn box
PopGhost() Unregister ghost-drawn figure
ShowGhost(type) Show ghost-drawn figures
Graphics
GRopen(display, window) Open a graphics context
GRcheckError() Return graphics error status
GRcreatePixmap(handle, width, height) Return a new pixmap id
GRdestroyPixmap(handle, pixmap) Free pixmap
GRcopyDrawable(handle, dst, src, xs, ys, ws, hs, x, y) Copy area between drawables
GRdraw(handle, l, b, r, t) Render cell
GRgetDrawableSize(handle, drawable, array) Return size of drawable
GRresetDrawable(handle, drawable) Switch drawable in context
GRclear(handle) Clear window
GRpixel(handle, x, y) Draw pixel
GRpixels(handle, array, num) Draw pixels
GRline(handle, x1, y1, x2, y2) Draw line
GRpolyLine(handle, array, num) Draw path
GRlines(handle, array, num) Draw lines
GRbox(handle, l, b, r, t) Draw box
GRboxes(handle, array, num) Draw boxes
GRarc(handle, x0, y0, rx, ry, theta1, theta2) Draw arc
GRpolygon(handle, array, num) Draw polygon
GRtext(handle, text, x, y, transform) Draw text
GRtextExtent(handle, text, array) Return text size
GRdefineColor(handle, red, green, blue) Return color code
GRsetBackground(handle, pixel) Set default background color
GRsetWindowBackground(handle, pixel) Set window background color
GRsetColor(handle, pixel) Set foreground color
GRdefineLinestyle(handle, index, mask) Define a line style
GRsetLinestyle(handle, index) Set current line style
GRdefineFillpattern(handle, index, nx, ny, array_string) Define a fill pattern
GRsetFillpattern(handle, index) Set current fill pattern
GRupdate(handle) Update rendering
GRsetMode(handle, mode) Set drawing mode
Hard Copy
HClistDrivers() Return list of available drivers
HCsetDriver(driver) Set current driver
HCgetDriver() Return current driver name
HCsetResol(resol) Set current driver resolution
HCgetResol() Return current driver resolution
HCgetResols(array) Return available driver resolutions
HCsetBestFit(best_fit) Set ``best fit'' mode
HCgetBestFit() Return ``best fit'' mode
HCsetLegend(legend) Set ``legend'' mode
HCgetLegend() Return ``legend'' mode
HCsetLandscape(landscape) Set ``landscape'' mode
HCgetLandscape() Return ``landscape'' mode
HCsetMetric(metric) Set ``metric'' mode
HCgetMetric() Return ``metric'' mode
HCsetSize(x, y, w, h) Set rendering area
HCgetSize(array) Return rendering area
HCshowAxes(style) Set axes display style
HCshowGrid(show, mode) Set grid displayed or not
HCsetGridInterval(spacing, mode) Set grid spacing
HCsetGridStyle(linemod, mode) Set grid line style
HCsetGridCrossSize(xsize, mode) Set grid ``dot'' cross size
HCsetGridOnTop(on_top, mode) Draw grid above or below geometry
HCdump(l, b, r, t, filename, command) Generate output
HCerrorString() Retrun error message
HClistPrinters() List MS Windows printers
HCmedia(index) Set MS Windows page size
Libraries
OpenLibrary(path_name) Open a library file
CloseLibrary(path_name) Close an open library
Mode
Mode(window, mode) Set physical or electrical mode
CurMode(window) Return current mode
Prompt Line
StuffText(string) Register text for future access
TextCmd(string) Execute a prompt line command
GetLastPrompt() Return most recent prompt line message
Scripts
ListFunctions() Return list of library file functions
Exec(script) Execute a script
SetKey(password) Set the current password for script decryption
Technology File
GetTechName() Return technology name
GetTechExt() Return technology file extension
SetTechExt(extension) Define effective technology file extension
TechParseLine() Parse text in technology file format
Variables
Set(name, string) Set a variable
Unset(name) Unset a variable
PushSet(name, string) Set a variable, allow revert
PopSet(name) Revert PushSet
SetExpand(string, use_env) Perform variable substitution
Get(name) Return variable contents
JoinLimits(flags) Set or remove join operation limits
Xic Version
VersionString() Return current Xic version

The second group of main module functions:

Main Functions 2
Arrays
ArrayDims(out_array, array) Get array dimensions
ArrayDimension(out_array, array) Get array dimensions
GetDims(array, out_array) Get array dimensions
DupArray(dest_array, src_array) Copy an array
SortArray(array, size, descend, indices) Sort array elements
Bitwise Logic
ShiftBits(bits, val) Shift bit field
AndBits(bits1, bits2) AND operation
OrBits(bits1, bits2) OR operation
XorBits(bits1, bits2) XOR operation
NotBits(bits) NOT operation
Error Reporting
GetError() Return error message
AddError(string) Save error string
GetLogNumber() Return current message index
GetLogMessage(message_num) Return string for message index
AddLogMessage(string, error) Add message to log
Generic Handle Functions
NumHandles() Returns the number of active handles
HandleContent(handle) Returns count of list items
HandleTruncate(handle, count) Truncate a list of items
HandleNext(handle) Advance list to next item
HandleDup(handle) Duplicate a handle and list
HandleDupNitems(handle, count) Duplicate a handle and list, truncating list
H(scalar) Create temporary handle from scalar
HandleArray(handle, array) Write an array of handles to list elements
HandleCat(handle1, handle2) Add handle2 list to end of handle1 list
HandleReverse(handle) Reverse list order
HandlePurgeList(handle1, handle2) Remove from second list items in first
Close(handle) Close a handle
CloseArray(array, size) Close an array of handles
Memory Management
FreeArray(array) Free memory used by array
CoreSize() Return kilobytes used by program
Script Variables
Defined(variable) Check if variable is defined
TypeOf(variable) Return variable type
Path Manipulation and Query
PathToEnd(path_name, dir) Modify search path
PathToFront(path_name, dir) Modify search path
InPath(path_name, dir) Check if directory is in search path
RemovePath(path_name, dir) Remove directory from the search path
Regular Expressions
RegCompile(regex, case_insens) Compile regular expression
RegCompare(regex_handle, string, array) Regular expression evaluation
RegError(regex_handle) Return error string
String List Handles
StringHandle(string, sepchars) Return handle to string tokens
ListHandle(arglist) Return handle to string arguments
ListContent(stringlist_handle) Return referenced string
ListReverse(stringlist_handle) Reverse order of strings in list
ListNext(stringlist_handle) Return referenced string and advance to next
ListAddFront(stringlist_handle, string) Add string to list
ListAddBack(stringlist_handle, string) Add string to list
ListAlphaSort(stringlist_handle) Sort string list
ListUnique(stringlist_handle) Remove duplicates from list
ListFormatCols(stringlist_handle, columns) Format strings into columns
ListConcat(stringlist_handle, sepchars) Create single string from list
ListIncluded(stringlist_handle, string) Check if string is in list
String Manipulation and Conversion
Strcat(string1, string2) String concatenation
Strcmp(string1, string2) String comparison
Strncmp(string1, string2, n) String comparison, fixed length
Strcasecmp(string1, string2) String comparison, case insensitive
Strncasecmp(string1, string2, n) String comparison, case insensitive, fixed length
Strdup(string) String copy
Strtok(str, sep) String tokenization
Strchr(string, char) Return pointer to first instance of character
Strrchr(string, char) Return pointer to last instance of character
Strstr(string, substring) Return pointer to first instance of substring
Strpath(string) Return pointer to filename in path
Strlen(string) Return length of string
Sizeof(arg) Return string length or array size
ToReal(string) Convert string to number
ToString(real) Convert number to string
ToFormat(format, arg_list) Print variables according to format string
ToChar(integer) Convert character constant to string representation
Current Directory
Cwd(path) Set current directory
Pwd() Return current directory
Date and Time
DateString() Return the date/time
Time() Return system-encoded time
MakeTime(array, gmt) Create system-encoded time from values
TimeToString(time, gmt) Return string from system-encoded time
TimeToVals(time, gmt, array) Parse system-encoded time
MilliSec() Return elapsed time in milliseconds
StartTiming(array) Initialize resource timing
StopTiming(array) Obtain resource times
File System Interface
Glob(pattern) Perform global expansion
Open(file, mode) Open a file for read/write
Popen(command, mode) Open a process for read/write
Sopen(host, port) Open a socket for read/write
ReadLine(maxlen, file_handle) Read a line of text from a file
ReadChar(file_handle) Read a character from a file
WriteLine(string, file_handle) Write a line of text to a file
WriteChar(c, file_handle) Write a character to a file
TempFile(prefix) Create a temporary file name
ListDirectory(path, filter) Return handle to list of file names
MakeDir(path) Create directory tree
FileStat(path, array) Get file/directory statistics
DeleteFile(path) Destroy file or empty directory
MoveFile(from_path, to_path) Move (rename) file
CopyFile(from_path, to_path) Copy file
CreateBak(path) Move file to backup
Socket and Xic Client/Server Interface
ReadData(size, skt_handle) Read data from a socket
ReadReply(retcode, skt_handle) Read a message from the Xic server
ConvertReply(message, retcode) Parse Xic server response
WriteMsg(string, skt_handle) Write a message to a socket
System Command Interface
Shell(command) Execute a shell command
System(command) Execute a shell command
GetPID(parent) Return process ID
Menu Buttons
SetButtonStatus(menu, button, set) Set button toggle status
GetButtonStatus(menu, button) Return button toggle status
PressButton(menu, button) Synthesize a button press
BtnDown(num, state, x, y, widget) Synthesize a button press
BtnUp(num, state, x, y, widget) Synthesize a button release
KeyDown(keysym, state, widget) Synthesize a key press
KeyUp(keysym, state, widget) Synthesize a key release
Mouse Input
Point(array) Wait for a mouse button press
Graphical Input
PopUpInput(message, default, buttontext, multiline) Pop up text input dialog
PopUpAffirm(message) Pop up yes/no dialog
PopUpNumeric(message, initval, minval, maxval, delta, numdgt) Pop up numeric entry dialog
Text Input
AskReal(prompt, default) Prompt for a number from prompt line
AskString(prompt, default) Prompt for a string from prompt line
AskConsoleReal(prompt, default) Prompt for a number from console
AskConsoleString(prompt, default) Prompt for a string from console
GetKey() Wait for key press
Text Output
SepString(string, repeat) Create separation or indentation string
ShowPrompt(arg_list) Show arguments on prompt line
SetIndent(level) Set indentation level for printing
SetPrintLimits(num_array_elts, num_zoids) Limit number of array values and trapezoids printed
Print(arg_list) Print arguments to console window
PrintLog(file_handle, arg_list) Print arguments to file
PrintString(arg_list) Print arguments to a string
PrintStringEsc(arg_list) Print arguments to a string
Message(arg_list) Print arguments to pop-up window
ErrorMsg(arg_list) Print arguments to pop-up error window
TextWindow(fname, readonly) Show file in text editor

The third group of main module functions:

Main Functions 3
Grid
ShowGrid(on, win) Set grid visibility in window
ShowAxes(style, win) Set axes style in window
SetGrid(interval, snap, win) Set grid parameters for window
GetGridInterval(win) Return grid spacing
GetGridSnap(win) Return grid snap number
SetGridStyle(style, win) Set grid line style
GetGridStyle(win) Return grid line style
SetGridCrossSize(xsize, win) Set grid ``dot'' cross size
GetGridCrossSize(win) Return grid ``dot'' cross size
SetGridOnTop(ontop, win) Set grid on top of geometry
GetGridOnTop(win) Return grid top/bottom status
ClipToGrid(coord, win) Move coord to grid
Layers
SetCurLayer(name) Set current layer, layer must exist
SetCurLayerAlias(longname) Set long name of current layer
SetCurLayerDescr(description) Set description of current layer
NewCurLayer(name) Set current layer, create if necessary
GetCurLayer() Return name of current layer
GetCurLayerAlias() Return long name of current layer
GetCurLayerDescr() Return description of current layer
AddLayer(layer_name) Add a new layer
RemoveLayer(layer_name) Remove a layer
RenameLayer(oldname, newname) Give a new name to a layer
LayerHandle(down) Return a handle to a list of layer names
GenLayers(stringlist_handle) Return a layer name and advance list to next
IsLayerDefined(lname) Return nonzero if layer exists with given name
IsLayerVisible(lname) Return nonzero for Visible
SetLayerVisible(lname, visible) Set Visible flag
IsLayerSymbolic(lname) Return nonzero for Symbolic
SetLayerSymbolic(lname, visible) Set Symbolic flag
IsLayerNoMerge(lname) Return nonzero for NoMerge
SetLayerNoMerge(lname, visible) Set NoMerge flag
GetLayerMinDimension(lname) Return minimum dimension
GetLayerWireWidth(lname) Return default wire width
AddLayerGdsOutMap(lname, layer_num, datatype) Add GDSII output layer mapping
RemoveLayerGdsOutMap(lname, layer_num, datatype) Remove GDSII output layer mapping
AddLayerGdsInMap(lname, string) Add GDSII input layer mapping
ClearLayerGdsInMap(lname) Clear GDSII input layer mapping
SetLayerNoDRCdatatype(lname, datatype) Set GDSII NoDRC datatype
Selections
SetLayerSpecific(state) Set layer-specific mode
SetLayerSearchUp(state) Set layer traversal direction
SetSelectMode(ptr_mode, area_mode, sel_mode) Set selection modes
SetSelectTypes(string) Set selectable object types
Select(left, bottom, right, top, types) Select objects
Deselect() Deselect objects
Pseudo-Flat Generator
FlatObjList(l, b, r, t, depth) Return list of object copies
FlatObjGen(l, b, r, t, depth) Return handle to object generator
FlatObjGenLayers(l, b, r, t, depth, layers) Return handle to object generator
FlatGenNext(handle) Return handle to next object copy
FlatGenCount(handle) Count objects accessible by handle
FlatOverlapList(object_handle, touch_ok, depth, layers) Return handle to next object copy
Geometry Measurement
Distance(x, y, x1, y1) Measure distance between points
MinDistPointToSeg(x, y, x1, y1, x2, y2, aret) Measure minimum distance between point and line segment
MinDistPointToObj(x, y, object_handle, aret) Measure minimum distance between point and object
MinDistSegToObj(x1, y1, x2, y2, object_handle, aret) Measure minimum distance between line segment and object
MinDistObjToObj(object_handle1, object_handle2, aret) Measure minimum distance between objects
MaxDistPointToObj(x, y, object_handle, aret) Measure maximum distance from point to object
MaxDistObjToObj(object_handle1, object_handle2, aret) Measure maximum distance between objects
Intersect(object_handle1, object_handle2, touchok) Check if objects touch or overlap

Function related to reading and writing of layout data:

Layout File Input/Output Functions
Layer Aliasing
ReadLayerAliases(handle_or_filename) Read file containing layer aliases
DumpLayerAliases(handle_or_filename) Dump file containing layer aliases
ClearLayerAliases() Delete all layer aliases
AddLayerAlias(lname, new_lname) Add layer alias to table
RemoveLayerAlias(lname) Remove layer alias from table
GetLayerAlias(lname) Return alias for layer name
Cell Name Mapping
SetMapToLower(state, rw) Set cell name case conversion
SetMapToUpper(state, rw) Set cell name case conversion
Cell Table
CellTabAdd(cellname, expand) Add cell(s) to cell table
CellTabCheck(cellname) Return true if name is in cell table
CellTabRemove(cellname) Remove name from cell table
CellTabList(cellname) List names in cell table
CellTabClear(cellname) Clear all names from cell table
Windowing and Flattening
SetConvertFlags(use_window, clip, flatten, ecf_level, rw) Set modes for format translation or output
SetConvertArea(l, b, r, t, rw) Set filter/clipping area for translation or output
Scale Factor
SetConvertScale(scale, which) Set scale factor for import/export
Export Flags
SetStripForExport(state) Set flag to write physical data only
SetSkipInvisLayers(code) Set code to skip invisible layers in output
Import Flags
SetMergeInRead(state) Enable box and wire merging in input
Layout File Format Conversion
FromArchive(file_or_chd, destination) Translate archive file to another format
FromTxt(text_file, gds_file) Create GDSII file from GDSII text
FromNative(dir_path, archive_file) Translate native cell files to archive
Export Layout File
SaveCellAsNative(cellname, directory) Write a native cell file in the directory
ToXIC(destination_dir) Write Xic files
ToCGX(cgx_name) Write CGX file
ToCIF(cif_name) Write CIF file
ToGDS(gds_name) Write GDSII file
ToGdsLibrary(gds_name, cellname_list) Write GDSII library file
ToOASIS(oas_name) Write OASIS file
ToTxt(archive_file, text_file, cmdargs) Write text-mode GDSII/CGX/OASIS file
Cell Hierarchy Digest
FileInfo(filename, handle_or_filename, flags) Obtain info about archive file
OpebCellHierDigest(filename, info_saved) Create new CHD
WriteCellHierDigest(chd_name, filename, incl_geom, no_compr) Write CHD to file
ReadCellHierDigest(filename, cgd_type) Obtain CHD from file
ChdList() Return a list of CHD access names
ChdChangeName(old_chd_name, new_chd_name)) Change the access name of a CHD
ChdIsValid(chd_name) Return true if named CHD exists
ChdDestroy(chd_name) Destroy the CHD
ChdInfo(chd_name, handle_or_filename, flags) Obtain CHD information
ChdFileName(chd_name) Obtain archive file name
ChdFileType(chd_name) Obtain archive file format
ChdTopCells(chd_name) Obtain archive top-level cell names
ChdListCells(chd_name, cellname, mode, all) Obtain list of cell names
ChdLayers(chd_name) Obtain layers used in archive
ChdInfoMode(chd_name) Return saved info mode
ChdInfoLayers(chd_name, cellname) Return saved layer info
ChdInfoCells(chd_name) Return saved cell names
ChdInfoCounts(chd_name) Return saved statistics
ChdCellBB(chd_name, cellname, array) Obtain cell bounding box
ChdSetDefCellName(chd_name, cellname) Configure default cell name
ChdDefCellName(chd_name) Obtain default cell name
ChdLoadGeometry(chd_name) Create and link to a new Cell Geometry Digest
ChdLinkCgd(chd_name, cgd_name) Link or unlink a CGD to the CHD
ChdGetGeomName(chd_name) Return name of attached Cell Geometry Digest
ChdClearGeometry(chd_name) Unlink attached Cell Geometry Digest
ChdSetSkipFlag(chd_name, cellname, skip) Set or clear skip flag
ChdClearSkipFlags(chd_name) Clear all skip flags
ChdCompare(chd_name1, cname1, chd_name2, cname2, layer_list, skip_layers, maxdiffs, obj_types, geometric, array) Compare objects in cells
ChdCompareFlat(chd_name1, cname1, chd_name2, cname2, layer_list, skip_layers, maxdiffs, area, coarse_mult, find_grid, array) Compare objects in flat cell hierarchies
ChdEdit(chd_name, scale, cellname) Open cell for editing
ChdOpenFlat(chd_name, scale, cellname, array, clip) Read a flattened hierarchy into memory
ChdSetFlatReadTransform(tfstring, x, y) Set a transform for flat reading
ChdEstFlatMemoryUse(chd_name, cellname, array, counts_array) Estimate memory required for flat read
ChdWrite(chd_name, scale, cellname, array, clip, all, flatten, ecf_level, outfile) Write cells to file
ChdWriteSplit(chd_name, cellname, basename, array, regions_or_gridsize, numregions_or_bloatval, maxdepth, scale, flags) Write to flat files
ChdCreateReferenceCell(chd_name, cellname) Create a reference cell in memory
ChdLoadCell(chd_name, cellname) Load cell in memory, reference subcells
ChdIterateOverRegion(chd_name, cellname, funcname, array, coarse_mult, fine_grid, bloat_val) Iterate over grid, call callback function
ChdWriteDensityMaps(chd_name, cellname, array, coarse_mult, fine_grid, save) Iterate over grid, compute density
Cell Geometry Digest
OpenCellGeomDigest(idname, string, type) Create a new CGD
NewCellGeomDigest() Create a new empty CGD
WriteCellGeomDigest(cgd_name, filename) Write CGD to file
CgdList() Return a list of CGD access names
CgdChangeName(old_cgd_name, new_cgd_name) Change the access name of a CGD
CgdIsValid(cgd_name) Return true if named CGD exists
CgdDestroy(cgd_name) Destroy the CGD
CgdIsValidCell(cgd_name, cellname) Return true if cell is found in CGD
CgdIsValidLayer(cgd_name, cellname, layername) Return true if cell containing layer is found in CGD
CgdRemoveCell(cgd_name, cellname) Remove a cell from the CGD
CgdIsCellRemoved(cgd_name, cellname) Return true if the cell was removed from the CGD
CgdRemoveLayer(cgd_name, cellname, layername) Remove layer data from a cell in the CGD
CgdAddCells(cgd_name, chd_name, cells_list) Add cells to the CGD
CgdContents(cgd_name, cellname, layername) List contents of CGD
CgdOpenGeomStream(cgd_name, cellname, layername) Open geometry stream from CGD
GsReadObject(gs_handle) Read geometry from a geometry stream
GsDumpOasisText(gs_handle) Dump OASIS ASCII text representation to console
Assembly Stream
StreamOpen(outfile) Open an assembly stream
StreamTopCell(stream_handle, cellname) Define a top-level cell in the stream
StreamSource(stream_handle, file_or_chd, scale, layer_filter, name_change) Register a source archive for streaming
StreamInstance(stream_handle, cellname, x, y, my, rot, magn, scale, no_hier, ecf_level, flatten, array, clip) Add an instance conversion spec to a source
StreamRun(stream_handle) Initiate streaming to output

First group of functions for geometry editing

Geometry Editing Functions 1
General Editing
Commit() Finalize changes in database
Undo() Undo last operation
Redo() Redo last undone operation
SelectLast(types) Select most recent new object
Cells
ClearCell(undoable, layer_list) Clear content of current cell
CopyCell(name, newname) Copy a cell
RenameCell(oldname, newname) Globally rename cell in memory, fix references
Current Transform
SetTransform(angle, reflection, magnification) Set current transform
StoreTransform(register) Save current transform parameters
RecallTransform(register) Recall current transform parameters
GetCurAngle() Return current transform angle
GetCurMX() Return current transform mirror-x
GetCurMY() Return current transform mirror-y
GetCurMagn() Return current transform magnification
UseTransform(enable, x, y) Enable use of current transform
Object Management by Handles
SelectHandle() Return handle to a list of selected objects
SelectHandleTypes(types) Return handle to a list of selected objects of given types
AreaHandle(l, b, r, t, types) Return handle to a list of objects in area
ObjectHandleDup(object_handle, types) Duplicate handle with given object types
ObjectHandlePurge(object_handle, types) Remove from list objects with given types
ObjectNext(object_handle) Advance list to next object
MakeObjectCopy(numpts, array) Create a phony object copy
ObjectString(object_handle) Return CIF-like string for object
ObjectCopyFromString(object_handle, layer) Return new object from CIF-like string
FilterObjects(object_list, template_list, all, touchok, remove) Select objects via template
CheckObjectsConnected(object_handle) Return 1 if objects in list form one group
CheckForHoles(object_handle, all) Return 1 if object(s) have ``holes''
FilterObjectsA(object_list, array, array_size, touchok, remove) Select objects via given polygon
BloatObjects(object_handle, all, dimen, lname, mode) Create list of bloated objects
EdgeObjects(object_handle, all, dimen, lname, mode) Create list of edge ``wire'' polygons
ManhattanizeObjects(object_handle, all, dimen, lname, mode) Create list of Manhattanized objects
GroupObjects(object_handle, array) Create connected groups of objects
JoinObjects(object_handle, lname) Join touching objects in a list
SplitObjects(object_handle, all, lname, vert) Split into trapezoids objects in a list
DeleteObjects(object_handle, all) Delete objects
SelectObjects(object_handle, all) Select objects
DeselectObjects(object_handle, all) Deselect objects
MoveObjects(object_handle, all, refx, refy, x, y) Move object(s)
MoveObjectsToLayer(object_handle, all, refx, refy, x, y, oldlayer, newlayer) Move object(s) with layer change
CopyObjects(object_handle, all, refx, refy, x, y, repcnt) Copy object(s)
CopyObjectsToLayer(object_handle, all, refx, refy, x, y, oldlayer, newlayer, repcnt) Copy object(s) with layer change
GetObjectType(object_handle) Return the object's type code
GetObjectID(object_handle) Return the object's id number
GetObjectArea(object_handle) Return the object's area in square microns
GetObjectPerim(object_handle) Return the object's perimeter in microns
GetObjectBB(object_handle, array) Return the object's bounding box
SetObjectBB(object_handle, array) Set the object's bounding box, scale object
GetObjectXY(object_handle, array) Return the object's reference point
SetObjectXY(object_handle, x, y) Set the object's reference point
GetObjectLayer(object_handle) Return the object's layer name
SetObjectLayer(object_handle, layername) Set the object's layer
GetObjectFlags(object_handle) Return the object's flags
GetObjectState(object_handle) Return the object's state
GetObjectGroup(object_handle) Return the object's conductor group number
SetObjectGroup(object_handle, group_num) Set the object's conductor group number
GetObjectCoords(object_handle, array) Return the object's coordinates
SetObjectCoords(object_handle, array, size) Set the object's coordinates
GetObjectMagn(object_handle) Return the magnification of a subcell
SetObjectMagn(object_handle, magn) Set object's magnification, rescale object
GetWireWidth(object_handle) Return width of wire
SetWireWidth(object_handle, width) Set width of wire
GetWireStyle(object_handle) Return wire end style
SetWireStyle(object_handle, code) Set wire end style
SetWireToPoly(object_handle) Convert wire to polygon
GetWirePoly(object_handle, array) Return wire bounding polygon
GetLabelText(object_handle) Return text of label
SetLabelText(object_handle, text) Set text in label
GetLabelXform(object_handle) Return transform code for label
SetLabelXform(object_handle, xform) Set transform code for label
GetInstanceArray(object_handle, array) Return instance array parameters
SetInstanceArray(object_handle, array) Set instance array parameters, resize array
GetInstanceXform(object_handle) Return instance transformation string
GetInstanceXformA(object_handle, array) Return instance transformation in array
SetInstanceXform(object_handle, transform) Set instance transformation from string
SetInstanceXformA(object_handle, array) Set instance transformation from array
GetInstanceName(object_handle) Return name of instance cell
SetInstanceName(object_handle, newname) Set instance name, replace instance

Second group of functions for geometry editing

Geometry Editing Functions 2
Clipping Functions
ClipAround(object_handle1, all1, object_handle2, all2) Clip object around other objects
ClipAroundCopy(object_handle1, all1, object_handle2, all2, lname) Clip objects around other objects, return copies
ClipTo(object_handle1, all1, object_handle2, all2) Clip objects to other objects
ClipToCopy(object_handle1, all1, object_handle2, all2, lname) Clip objects to other objects, return copies
ClipObjects(object_handle, merge) Clip object list so no overlap
ClipIntersectCopy(object_handle1, all1, object_handle2, all2, lname) Exclusive-or objects or lists
Other Object Management Functions
ChangeLayer() Change layer of selected objects
Bloat(dimen, mode) Bloat selected objects
Manhattanize(dimen, mode) Manhattanize selected objects
Join() Join selected objects
Decompose(vert) Convert selected objects to trapezoids
Box(left, bottom, right, top) Create a box
Polygon(num, arraypts) Create a polygon
Arc(x, y, rad1X, rad1Y, rad2X, rad2Y, ang_start, ang_end) Create an arc polygon
Sides(numsides) Set the number of sides used for round objects
Wire(width, num, arraypts, end_style) Create a wire
Label(text, x, y [, width, height, xform]) Create a label
Logo(string, x, y [, width, height]) Create physical text
Justify(hj, vj) Set default text justification
Place(cellname, x, y [, refpt, array, smash]) Place an instance
PlaceTemplateArgs(cell, args) Set template parameter string
Replace(cellname, add_xform) Replace an instance
Delete() Delete selected objects
DeleteEmpties(recurse) Delete empty cells
Erase(left, bottom, right, top) Erase objects in area
EraseUnder() Erase overlap with selected objects
Yank(left, bottom, right, top) Grab geometry into buffer
Put(x, y, bufnum) Place stored geometry
Xor(left, bottom, right, top) Exclusive-or geometry in area
Copy(fromx, fromy, tox, toy, repcnt) Copy selected objects
CopyToLayer(fromx, fromy, tox, toy, oldlayer, newlayer, repcnt) Copy selected objects and change layer
Move(fromx, fromy, tox, toy) Move selected objects
MoveToLayer(fromx, fromy, tox, toy, oldlayer, newlayer) Move selected objects and change layer
Rotate(x, y, ang, remove) Rotate selected objects
RotateToLayer(x, y, ang, oldlayer, newlayer, remove) Rotate selected objects and change layer
Split(x, y, flag, orient) Divide selected objects
Flatten(depth, use_merge, fast_mode) Flatten hierarchy
CreateCell(cellname, [orig_x, orig_y]) Create new cell from selected objects
Layer(string, mode, depth, recurse, noclear, use_merge, fast_mode) Apply geometric manipulations
Property Management by Handles
PrptyHandle(object_handle) Return handle to a list of the object's properties
PrptyNumber(prpty_handle) Return the property number
PrptyString(prpty_handle) Return the property string
PrptyNext(prpty_handle) Advance to the next property
PrptyAdd(object_handle, number, string) Add a property
PrptyRemove(object_handle, number, string) Remove a property
GetPrpHandle(number) Return a handle to certain properties
GetCellPrpHandle(number) Return a handle to list of current cell properties
GetProperty(prpty_handle, number) Get the next property from a properties list
GetPropertyString(object_handle, number) Get a property string
Other Property Management Functions
AddProperty(number, string) Add properties to selected objects
AddCellProperty(number, string) Add property to current cell
RemoveProperty(number, string) Remove properties from selected objects
RemoveCellProperty(number, string) Remove properties from current cell

These are the computational geometry functions:

Computational Geometry and layer Expressions
Trapezoid lists and Layer Expressions
SetZref(thing) Set background clipping zoidlist
GetZref() Return background clipping zoidlist
GetZrefBB(array) Return background clipping zoidlist bounding box
AdvanceZref(clear, array) Establish or advance grid clipping area
Zhead(zoidlist) Extract and return leading trapezoid
Zvalues(zoidlist, array) Extract parameters of leading trapezoid
Zlength(zoidlist) Return number of trapezoids in list
Zarea(zoidlist) Return total area of trapezoids in list
GetZlist(layername, depth) Create zoidlist from cell
GetSqZlist(layername) Create zoidlist from selected objects
TransformZ(zoid_list, refx, refy, newx, newy) Apply a transformation to a zoidlist
BloatZ(dimen, zoid_list, mode) Bloat a zoidlist
EdgesZ(dimen, zoid_list, mode) Create an edge zoidlist
ManhattanizeZ(dimen, zoid_list, mode) Manhattanize a zoidlist
RepartitionZ(zoid_list) Canonicalize for horizontal split
BoxZ(l, b, r, t) Create zoidlist from box
ZoidZ(xll, xlr, yl, xul, xur, yu) Create zoidlist from trapezoid
ObjectZ(object_handle, all) Create zoidlist from object(s)
ParseLayerExpr(string) Create lexper from string
EvalLayerExpr(lexper, zoidlist, depth, isclear) Evaluate layer expression in zoidlist
TestCoverage(lexper, zoidlist, testfull) Test layer expression in zoidlist
ZtoObjects(zoidlist, lname, join, to_dbase) Create objects from zoidlist
ZtoTempLayer(longname, zoidlist, join) Put objects from zoidlist in layer
ClearTempLayer(longname) Clear objects in layer
ZtoFile(filename, zoidlist, ascii) Save trapezoid list in file
ZfromFile(filename) Extract trapezoid list from file
ReadZfile(filename) Read trapezoids from file into current cell
ChdGetZlist(chd_name, cellname, scale, array, clip, all) Extract trapezoid list through CHD
Operations
GeomAnd(zoids1 [, zoids2]) Geometrical AND function
GeomAndNot(zoids1, zoids2) Clip second list from first
GeomCat(zoids1, ...) Concatenate zoidlists
GeomNot(zoids1) Invert zoidlist
GeomOr(zoids1, ...) Merge zoidlist
GeomXor(zoids1 [, zoids2]) Exclusive-Or zoidlists
Spatial Parameter Tables
ReadSPtable(filename) Create or replace a table
NewSPtable(name, x0, dx, nx, y0, dy, ny) Create a table
WriteSPtable(name, filename) Write a table to a file
ClearSPtable(name) Destroy a table
FindSPtable(name, array) Find a table
GetSPdata(name, x, y) Obtain value from table
SetSPdata(name, x, y, value) Set table value
Polymorphic Flat Database
ChdOpenOdb(chd_name, scale, cellname, array, clip, dbname) Open a flat object database
ChdOpenZdb(chd_name, scale, cellname, array, clip, dbname) Open a flat trapezoid database
ChdOpenZbdb(chd_name, scale, cellname, array, dbname, dx, dy, bx, by) Open a binned flat trapezoid database
GetObjectsOdb(dbname, layer_list, array) Read objects from database
ListLayersDb(dbname) List the layers used in the database
GetZlistDb(dbname, layer_name, zoidlist) Read trapezoids from database
GetZlistZbdb(dbname, layer_name, nx, ny) Read trapezoids from ZBDB database
DestroyDb(dbname) Destroy a database
ShowDb(dbname, array) Display database region
Named String Tables
FindNameTable(tabname, create) Verify existence of or create named string table
RemoveNameTable(tabname) Destroy named string table
ListNameTables() List existing named string tables
ClearNameTables() Destroy all named string tables
AddNameToTable(tabname, name, value) Add name/value to named string table
RemoveNameFromTable(tabname, name) Remove name from named string table
FindNameInTable(tabname, name) Return value for name in named string table
ListNamesInTable(tabname) Return list of names in named string table

These functions are specific to design rule checking:

Design Rule Checking Functions
DRC
DRCstate(state) Set interactive DRC
DRCsetLimits(batch_cnt, intr_cnt, intr_time, skip_cells) Set DRC limit values
DRCgetLimits(array) Return DRC limit values
DRCsetLevel(level) Set DRC error reporting level
DRCgetLevel() Return DRC error reporting level
DRCcheckArea(array, file_handle_or_name) Perform DRC in area
DRCchdCheckArea(chdname, cellname, gridsize, array, file_handle_or_name) Perform DRC in area using CHD
DRCcheckObjects(file_handle) Perform DRC for selected objects
DRCregisterExpr(expr) Register a layer expression
DRCtestBox(left, bottom, right, top, ld) Perform DRC for given box
DRCtestPoly(num, points, ld) Perform DRC for given polygon

Functions specifically for the extraction system:

Extraction Functions
Menu Commands
DumpPhysNetlist(filename, depth, modestring, names) Dump physical netlist
DumpElecNetlist(filename, depth, modestring, names) Dump electrical netlist
SourceSpice(filename, modestring) Update electrical from SPICE file
ExtractAndSet(depth, modestring) Update electrical from physical
FindPath(x, y, depth, use_extract) Return objects in netlist
FindPathOfGroup(groupnum, depth) Return objects in netlist
Terminals
ModifyTerminal(xe, ye, xp, yp, name, lname, type, remove) Modify connection point
GetTerminalName(terminal_handle) Return terminal name
GetTerminalType(terminal_handle) Return terminal type code
GetTerminalFlags(terminal_handle) Return terminal flags
GetTerminalLocation(terminal_handle, array) Return terminal location
GetTerminalInstance(terminal_handle) Return handle to associated subcell/device instance
IsTerminalFormal(terminal_handle) Return 1 for formal terminals, 0 for subcell/device terminals
GetTerminalObject(terminal_handle) Return handle to associated object
GetTerminalVgroup(terminal_handle) Return virtual group number
GetTerminalLayer(terminal_handle) Return associated layer name
ListTermLabels(file_handle_or_name) Print terminal label list
ListLabelTerms() Return label terminal list
Physical Conductor Groups
Group() Run extraction
GetNumberGroups() Return number of groups
GetGroupBB(group, array) Return bounding box of group
GetGroupNode(group) Return node of group
GetGroupName(group) Return net or formal terminal name
GetGroupNetName(group) Return net name
GetGroupCapacitance(group) Return group capacitance
ListGroupObjects(group) Return list of objects in group
ListGroupDevContacts(group) Return list of device contacts in group
ListGroupSubcContacts(group) Return list of subcircuit contacts in group
ListGroupTerminals(group) Return list of formal terminals in group
ListGroupTerminalNames(group) Return list of formal terminal names in group
Physical Devices
ListPhysDevs(name, pref, indices, area_array) Return list of physical devices
GetPdevName(device_handle) Return device name
GetPdevIndex(device_handle) Return device index
GetPdevDual(device_handle) Return corresponding electrical device
GetPdevBB(device_handle, array) Return device bounding box
GetPdevMeasure(device_handle, mname) Return device measurement
ListPdevMeasures(device_handle) Return list of measurement keywords
ListPdevContacts(device_handle) Return list of device contacts
GetPdevContactName(dev_contact_handle) Return device contact name
GetPdevContactBB(dev_contact_handle, array) Return device contact bounding box
GetPdevContactGroup(dev_contact_handle) Return device contact conductor group
GetPdevContactLayer(dev_contact_handle) Return device contact layer
GetPdevContactDev(dev_contact_handle) Return device containing contact
GetPdevContactDevName(dev_contact_handle) Return name of device containing contact
GetPdevContactDevIndex(dev_contact_handle) Return index of device containing contact
Physical Subcircuits
ListPhysSubckts(name, index, l, b, r, t) Return list of physical subcircuits
GetPscName(subckt_handle) Return name of physical subcircuit
GetPscIndex(subckt_handle) Return index of physical subcircuit
GetPscDual(subckt_handle) Return corresponding electrical subcircuit
GetPscBB(subckt_handle, array) Return physical subcircuit bounding box
ListPscContacts(subckt_handle) Return list of contacts
IsPscContactIgnorable(subc_contact_handle) Return 1 if contact to ignored subcircuit
GetPscContactName(subc_contact_handle) Return name of subcircuit
GetPscContactGroup(subc_contact_handle) Return conductor group of contact
GetPscContactSubcGroup(subc_contact_handle) Return group of contact in subcircuit
GetPscContactSubc(subc_contact_handle) Return subcircuit containing contact
GetPscContactSubcName(subc_contact_handle) Return name of subcircuit containing contact
GetPscContactSubcIndex(subc_contact_handle) Return index of subcircuit containing contact
Electrical Devices
ListElecDevs(regex) Return list of electrical devices
SetEdevProperty(devname, prpty, string) Set electrical device property
GetEdevProperty(devname, prpty) Return electrical device property
GetEdevObj(devname) Return electrical device subcell object
Resistance/Inductance Extraction
ExtractRL(conductor_zoidlist, layername, r_or_l, array, term, ...) Extract resistance or inductance from object
ExtractNetResistance(net_handle, spicefile, array, term, ...) Extract resistance from wire net
Layers
SetCurLayerExKeyword(string) Set extraction keyword/value of current layer
RemoveCurLayerExKeyword(keyword) Remove extraction keyword spec from current layer
IsLayerConductor(lname) Return nonzero for Conductor
IsLayerRouting(lname) Return nonzero for Routing
IsLayerGround(lname) Return nonzero for GroundPlane
IsLayerContact(lname) Return nonzero for Contact
IsLayerVia(lname) Return nonzero for Via
IsLayerDarkField(lname) Return nonzero for DarkField
GetLayerThickness(lname) Return Thickness
GetLayerRho(lname) Return resistivity
GetLayerResis(lname) Return resistance per square
GetLayerEps(lname) Return dielectric constant
GetLayerCap(lname) Return capacitance per area
GetLayerCapPerim(lname) Return capacitance per length
GetLayerLambda(lname) Return penetration depth

Functions for electrical schematic editing:

Schematic Editor Functions
Output Generation
ToSpice(spicefile) Write SPICE file
Electrical Nodes
IncludeNoPhys(flag) Set NoPhys property usage
GetNumberNodes() Return number of nodes in circuit
SetNodeName(node, name) Set text name for node
GetNodeName(node) Return text name for node
GetNodeNumber(name) Return node number for named node
GetNodeGroup(node) Return corresponding group for node
ListNodeTerminals(node) Return list of connected terminals
ListNodeTerminalNames(node) Return list of connected terminal names
Symbolic Mode
ShowSymbolic(show) Turn on/off symbolic display
MakeSymbolic() Create simple symbolic representation



Subsections
next up previous contents index
Next: Main Functions 1 Up: xicmanual Previous: Help System   Contents   Index
Stephen R. Whiteley 2012-04-01