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 (rather lengthly) table that follows lists the interface functions presently available, by category. These are described in detail in the following sections. 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.
Control Functions | |
Current Cell | |
Edit(name, symname) | Edit cell |
OpenCell(name, symname) | Read file into memory |
NewCellName() | Return empty new cell name |
ClearCell(undoable, layer_name) | Clear content of current cell |
Push(object_handle) | Push editing context to subcell |
Pop() | Pop editing context to parent |
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 |
Save(newname) | Save to disk |
UpdateNative(dir) | Save modified hierarchy cells as native |
Database | |
RenameCell(oldname, newname) | Globally rename cell in memory, fix references |
Clear(name) | 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() | 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 |
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 |
ShowSymbolic(show) | Turn on/off symbolic display |
Exit | |
Exit() | Exit script |
Halt() | Exit script |
Annotation | |
AddMark(type, arguments ...) | Show a user-specified mark |
EraseMark(id) | Erase a mark |
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, radius, 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 |
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 | |
Techfile(techname) | Not implemented |
GetTechExt() | Return technology file extension |
SetTechExt(extension) | Define effective technology file extension |
Variables | |
Set(name, string) | Set a variable |
Unset(name) | Unset a variable |
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 |
Utility Functions | |
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 |
Cell Name Enumeration | |
InitGen() | Return handle to subcell name list |
CellsHandle(cellname, depth) | Return handle to subcell name list |
GenCells(handle) | Return name from name list |
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) | 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 |
Miscellaneous | |
SepString(string, repeat) | Create separation or indentation string |
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 |
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 |
String and Array Size | |
Strlen(string) | Return length of string |
Sizeof(arg) | Return string length or array size |
Operating System and Input/Output Functions | |
Archive File Context | |
FileInfo(filename, handle_or_filename, flags) | Obtain info about archive file |
GetArchiveContext(filename, scale, save_pcinfo) | Create new archive context |
SaveArchiveContext(cx_handle, name) | Save archive context |
RecallArchiveContext(name, remove) | Retrieve archive context |
WriteArchiveContext(cx_handle, filename) | Write archive context to file |
ReadArchiveContext(filename) | Obtain archive context from file |
CxInfo(cx_handle, handle_or_filename, flags) | Obtain archive context information |
CxEstFlatMemoryUse(cx_handle, cellname, array, counts_array) | Estimate memory required for flat read |
CxCompare(cx_handle1, cx_handle2, cellname, layer_list, obj_types, skip_layers, geometric, array) | Compare objects in cell between archives |
CxFileName(cx_handle) | Obtain archive file name |
CxFileType(cx_handle) | Obtain archive file format |
CxTopCells(cx_handle) | Obtain archive top-level cell names |
CxLayers(cx_handle) | Obtain layers used in archive |
CxEstSkelSize(cx_handle) | Obtain estimated skeleton memory requirement |
CxCellBB(cx_handle, cellname, array) | Obtain cell bounding box |
CxSetArea(cx_handle, cellname, l, b, r, t) | Configure context to area |
CxClearArea(cx_handle) | Undo area configuration |
CxSetSkipFlag(cx_handle, cellname, skip) | Set or clear skip flag |
CxSetSkipEmpties(cx_handle, cellname [, left, bottom, right, top ]) | Set skip flags for empty cells |
CxClearSkipFlags(cx_handle) | Unset all skip flags |
CxEdit(cx_handle, cellname) | Open cell for editing |
CxSetupSkeleton(cx_handle, cellname, l, b, r, t) | Create skeleton-mode cells |
CxWrite(cx_handle, scale, cellname, array, clip, all, flatten, no_empties, outfile) | Write cells to file |
CxOpenFlat(cx_handle, scale, cellname, array, clip) | Read a flattened hierarchy into memory |
Conversion | |
SetConvertScale(scale, which) | Set scale factor for import/export |
SetMapToLower(state, rw) | Set cell name case conversion |
SetMapToUpper(state, rw) | Set cell name case conversion |
FromArchive(archive_file, destination) | Translate archive file to another format |
FromTxt(text_file, gds_file) | Create GDSII file from GDSII text |
Conversion -- Export | |
SaveCellAsNative(cellname, directory) | Write a native cell file in the directory |
SetStripForExport(state) | Set flag to write physical data only |
SetSkipInvisLayers(code) | Set code to skip invisible layers in output |
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, symbol_list) | Write GDSII library file |
ToOASIS(oas_name) | Write OASIS file |
ToTxt(archive_file, text_file) | Write text-mode GDSII file |
ToSpice(spicefile) | Write SPICE file |
WriteGeomSplit(fname, cname, bname, l, b, r, t, x0, y0, w, h, bw) | Convert to flat files |
Conversion -- Import | |
SetConvertFlags(use_window, clip, flatten, no_empties) | Set modes for format translation |
SetConvertArea(l, b, r, t) | Set filter/clipping area for translation |
SetMergeInRead(state) | Enable box and wire merging in input |
Skeleton Mode | |
SkelSetDataWin(l, b, r, t) | Set skeleton mode clipping window |
SkelClear() | Clear or revert skeleton hierarchies |
SkelClearGeom() | Clear skeleton mode geometry cache |
SkelReadGeom(depth) | Load skeleton mode geometry cache |
SkelWriteGeom(depth, filename, flat, clip) | Write data to file |
SkelWriteGeomSplit(basename, x0, y0, wid, hei, border) | Write flattened data to files |
SkelWriteDigest(digest_file) | Write digest file for current cell/archive |
SkelReadDigest(digest_file, archive_file) | Read digest file and set current cell |
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_context, scale, layer_list, use_layer_list, layer_aliases, cname_prefix, cname_suffix, ccvt) | Register a source archive for streaming |
StreamInstance(stream_handle, cellname, x, y, my, rot, magn, no_empties, flatten, array, clip) | Add an instance conversion spec to a source |
StreamRun(stream_handle) | Initiate streaming to output |
Current Directory | |
Cwd(path) | Set current directory |
Pwd() | Return current directory |
Date and Time | |
DateString() | Return the date/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(directory, filter) | Return handle to list of file names |
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 |
System Command Interface | |
Shell(command) | Execute a shell command |
System(command) | Execute a shell command |
GetPID(parent) | Return process ID |
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 | |
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 |
Geometry Management Functions | |
General | |
Commit() | Finalize changes in database |
Undo() | Undo last operation |
Redo() | Redo last undone operation |
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 |
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 |
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 |
SetCurLayerExKeyword(string) | Set extraction keyword/value of current layer |
RemoveCurLayerExKeyword(keyword) | Remove extraction keyword spec from 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 |
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 |
IsLayerVisible(lname) | Return nonzero for Visible |
SetLayerVisible(lname, visible) | Set Visible flag |
GetLayerMinDimension(lname) | Return minimum dimension |
GetLayerWireWidth(lname) | Return default wire width |
GetLayerThickness(lname) | Return Thickness |
GetLayerRho(lname) | Return resistivity |
GetLayerEps(lname) | Return dielectric constant |
GetLayerLambda(lname) | Return penetration depth |
GetLayerResis(lname) | Return resistance per square |
GetLayerCap(lname) | Return capacitance per area |
GetLayerCapPerim(lname) | Return capacitance per length |
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 |
Layer Alias Table | |
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 |
LayerAlias(lname) | Return alias for layer name |
Selections | |
SetLayerSpecific(state) | Set layer-specific mode |
SetSelectMode(ptr_mode, area_mode, sel_mode) | Set selection modes |
Select(left, bottom, right, top, types) | Select objects |
SelectLast(types) | Select most recent new object |
Deselect() | Deselect objects |
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 |
MakeObjectCopy(numpts, array) | Create a phony object copy |
BloatObjects(object_handle, dimen, lname, mode) | Create list of bloated objects |
EdgeObjects(object_handle, dimen, lname, all) | Create list of edge ``wire'' polygons |
ManhattanizeObjects(object_handle, dimen, lname) | 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, lname, vert) | Split into trapezoids objects in a list |
CheckObjectsConnected(object_handle) | Return 1 if objects in list form one group |
CheckForHoles(object_handle, all) | Return 1 if object(s) have ``holes'' |
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 |
ObjectDelete(object_handle) | Delete an object |
ObjectSelect(object_handle) | Select an object |
ObjectDeselect(object_handle) | Deselect a selected object |
ObjectMove(object_handle, refx, refy, x, y, all) | Move object(s) |
ObjectMoveToLayer(object_handle, refx, refy, x, y, all, oldlayer, newlayer) | Move object(s) with layer change |
ObjectCopy(object_handle, refx, refy, x, y, all) | Copy object(s) |
ObjectCopyToLayer(object_handle, refx, refy, x, y, all, oldlayer, newlayer) | Copy object(s) with layer change |
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, touchok, useall, remove) | Select objects via template |
FilterObjectsA(object_list, array, array_size, touchok, remove) | Select objects via given polygon |
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 |
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 |
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 |
Pseudo-Flat Generator Functions | |
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 |
Clipping Functions | |
ClipAround(object_handle1, object_handle2 [, all1, all2]) | Clip object around other objects |
ClipAroundCopy(object_handle1, object_handle2 [, lname, all1, all2]) | Clip objects around other objects, return copies |
ClipAroundAll(object_handle1, object_handle2) | Clip object list around another object list |
ClipAroundAllCopy(object_handle1, object_handle2) | Clip object list around another object list, return copies |
ClipTo(object_handle1, object_handle2 [, all1, all2]) | Clip objects to other objects |
ClipToCopy(object_handle1, object_handle2 [, lname, all1, all2]) | Clip objects to other objects, return copies |
ClipToAll(object_handle1, object_handle2) | Clip object list to another object list |
ClipToAllCopy(object_handle1, object_handle2) | Clip object list to another object list, return copies |
ClipObjects(object_handle, merge) | Clip object list so no overlap |
ClipIntersectCopy(object_handle1, object_handle2, lname, all1, all2) | Exclusive-or objects or lists |
Other Object Management Functions | |
ChangeLayer() | Change layer of selected objects |
Bloat(dimen, mode) | Bloat selected objects |
Manhattanize(dimen) | 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(cell, x, y) | Place an instance |
PlaceTemplateArgs(cell, args) | Set template parameter string |
Replace(cellname, add_xform) | Replace an instance |
PlaceParams(llref, nx, ny, dx, dy) | Set default placement parameters |
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) | Copy selected objects |
CopyToLayer(fromx, fromy, tox, toy, oldlayer, newlayer) | 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) | Rotate selected objects |
RotateToLayer(x, y, ang, oldlayer, newlayer) | Rotate selected objects and change layer |
Split(x, y, flag, orient) | Divide selected objects |
Flatten(depth, fast) | Flatten hierarchy |
CreateSymbol(symname, [orig_x, orig_y]) | Create new symbol from selected objects |
Layer(string, depth, flat, undoable) | 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 |
Design Rule Checking | |
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(left, bottom, right, top, file_handle) | Perform DRC in area |
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 |
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 |
Zoidlists and Layer Expressions | |
SetZref(thing) | Set background clipping zoidlist |
GetZref() | Return background clipping zoidlist |
AdvanceZref(clear) | 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 |
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) |
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) | Manhattanize a zoidlist |
RepartitionZ(zoid_list) | Canonicalize for horizontal split |
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) | Save trapezoid list in file |
ZfromFile(filename) | Extract trapezoid list from file |
CxGetZlist(cx_handle, cellname, scale, array, clip, all) | Extract trapezoid list from context |
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 |
ClearSPtable(name) | Destroy a table |
GetSPdata(name, x, y) | Obtain value from table |
SetSPdata(name, x, y, value) | Set table value |
Polymorphic Flat Database | |
CxOpenOdb(cx_handle, scale, cellname, array, clip, dbname) | Open a flat object database |
CxOpenZdb(cx_handle, scale, cellname, array, clip, dbname) | Open a flat trapezoid database |
CxOpenZbdb(cx_handle, scale, cellname, array, clip, dbname) | Open a binned flat trapezoid database |
GetObjectsOdb(dbname, layer_list, array) | Read objects from database |
GetZlistDb(dbname, layer_name, zoidlist) | Read trapezoids from database |
ShowDb(dbname, array) | Display database region |
DestroyDb(dbname) | Destroy a database |
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 |
ExtractRL(conductor_zoidlist, layername, r_or_l, array, term, ...) | Extract resistance or inductance from object |
ExtractNetResistance(x, y, spicefile, array, term, ...) | Extract resistance from wire net |
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 |
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, index, l, b, r, t) | 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 Nodes | |
EnableNodeMap(on) | Enable/disable node name mapping |
GetNumberNodes(on) | 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 |
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 |