GLISTER SKILL API Functions
Many of the GLISTER features and actions are also available via SKILL API functions, enabling a tight integration of GLISTER into the user’s customized design flows. This chapter lists the available SKILL API functions.
GLISTER Menu Actions
The SKILL API functions in this category provide a procedural way of performing the actions available from the GLISTER pull-down menu.
xmodelCreateDefaultConfig
xmodelCreateDefaultConfig( libName cellName viewName [ configName ] [ inMemory ] ) => configId
Description
Creates a new configuration view for XMODEL netlisting using the default settings defined by two SKILL variables: xmodelDefaultViewList and xmodelDefaultStopList.
Arguments
libName | Library name of the design cellview. |
cellName | Cell name of the design cellview. |
viewName | View name of the design cellview. |
configName | Desired configuration view name (default: “config”). |
inMemory | Optional flag whether to create an in-memory configuration (default: nil). |
Value Returned
configId | The created configuration view object ID. |
Example
xmodelCreateDefaultConfig( "myLib" "myCell" "schematic" "config" )
Creates a new configuration view using XMODEL default viewlist and stoplist settings.
xmodelEditConfig
xmodelEditConfig( [ libName ] [ cellName ] [ viewName ] [ mode ] )
Description
Open an existing configuration view for read/edit or create a new one using the default settings defined by two SKILL variables: xmodelDefaultViewList and xmodelDefaultStopList. If the cellview specified by libName, cellName, and viewName is a design cellview instead of a configuration view, the function looks for the most likely configuration view associated with the design cellview (the one with the name "config"
takes the highest precedence).
Arguments
libName | Library name of the configuration view (default: nil). |
cellName | Cell name of the configuration view (default: nil). |
viewName | View name of the configuration view (default: nil). |
mode | Access mode (“r”: read, “w”: write, “a”: append). (default: “r”). |
Value Returned
None |
Example
xmodelEditConfig( "myLib" "myCell" "config" "a" )
Open an existing configuration view for editing.
xmodelEditParam
xmodelEditParam( [ libName ] [ cellName ] [ viewName ] )
Description
Open a GUI window for editing the parameters of a model schematic view.
Arguments
libName cellName viewName |
Library/cell/view names of the model schematic view (default: library/cell/view names of the currently-editing cellview). |
Value Returned
None |
Example
xmodelEditParam( "myLib" "myCell" "schematic" )
Open a GUI dialog box for editing the parameters of a model schematic view.
xmodelGenNetlist
xmodelGenNetlist( [ libName ] [ cellName ] [ viewName ] [ simDir ] [ simulator ] [ verbose ] ) => ( sim_dir netlist_dir )
Description
Generate the XMODEL hierarchical netlists of a design and store them into a specified simulation directory. The design cellview can be either a top-level schematic, configuration, or a testbench cellview. If the design hierarchy contains a part that can only be netlisted using an analog netlister (such as hspiceD, spectre, and veriloga), the procedure creates netlists suitable for mixed-mode simulation.
The procedure returns a list of two strings, the paths to the simulation directory and netlist directory, respectively. The simulation directory is where the user can run the simulations by executing "make runsim"
and the netlist directory is where the model and circuit netlists are stored. The netlist directory is typically located as a sub-directory under the simulation directory and its name can be customized using the xmodelModelDir SKILL variable (default: "models"
).
Note that this xmodelGenNetlist()
procedure actually generates more than just netlists. It also generates files necessary for performing simulation, such as a source list file (sources.f; this name is defined by xmodelSourceListFile) and Makefile script. The simulation options set in these files are derived from the values users set using the XMODEL Testbench Editor.
Arguments
libName cellName viewName |
Library/cell/view names of the top-level design cellview (default: those of the currently-editing cellview). |
simDir | Simulation directory to store the generated netlist files (if not specified or nil, it is derived from $XMODEL_SIMDIR and the cellview name). |
simulator | Simulator specifier in |
verbose | If t, display verbose messages during netlisting (default: t). |
Value Returned
sim_dir | The path to the simulation directory. |
netlist_dir | The path to the netlist directory (usually |
Example
xmodelGenNetlist( "myLib" "myCell" "schematic" )
Generate the XMODEL netlist of a schematic view to a specified directory.
xmodelDispNetlist
xmodelDispNetlist( [ libName ] [ cellName ] [ viewName ] [ simDir ] )
Description
Open a text editor and display the generated XMODEL netlist files of a design cellview. In other words, the procedure displays the contents stored in the netlist directory.
Arguments
libName cellName viewName |
Library/cell/view names of the top-level design cellview (default: those of the currently-editing cellview). |
simDir | Simulation directory to store the generated netlist files (if not specified or nil, it is derived from $XMODEL_SIMDIR and the cellview name). |
Value Returned
None |
Example
xmodelDispNetlist( "myLib" "myCell" "schematic" )
Open a text editor for displaying the generated XMODEL netlists of a design cellview.
xmodelRunSim
xmodelRunSim( [ libName ] [ cellName ] [ viewName ] [ simDir ] [ prepOnly ] [ runOnly ] [ wait ] ) => t
Description
Launch an XMODEL simulation specified by a top-level schematic cellview or testbench cellview. The procedure basically netlists the design in the specified simulation directory (if it is not done already) and executes a command "make runsim"
from that directory.
Arguments
libName cellName viewName |
Library/cell/view names of the top-level design or testbench cellview (default: those of the currently-editing cellview). |
simDir | Simulation directory storing the generated netlist files. (if not specified or nil, it is derived from $XMODEL_SIMDIR and the cellview name). |
prepOnly | If t, prepare simulation directory and do not run the simulation (default: nil). |
runOnly | If t, run simulation within the specified simulation directory (simDir) without examining whether the netlist files need to be generated (default: nil). |
wait | If t, run the simulation in foreground mode and wait until the simulation is completed (default: nil). |
Value Returned
t |
Example
xmodelRunSim( "myLib" "myCell" "tb_run" )
Start an XMODEL simulation as specified by a testbench cellview myLib:myCell:tb_run.
xmodelStopSim
xmodelStopSim() => t
Description
Stop all currently-running XMODEL simulations.
Arguments
None |
Value Returned
t |
Example
xmodelStopSim()
Stop all currently-running XMODEL simulations.
xmodelOpenWave
xmodelOpenWave( [ libName ] [ cellName ] [ viewName ] [ simDir ] )
Description
Plot the simulated waveform results stored in the specified simulation directory. The procedure basically executes a command "make plotwave"
from the simulation directory. Unless the user overrides the settings using the XMODEL Testbench Editor, the default behavior is to start the XWAVE Waveform Viewer.
Arguments
libName cellName viewName |
Library/cell/view names of the top-level design or testbench cellview (default: those of the currently-editing cellview). |
simDir | Simulation directory storing the simulation results. (if not specified or nil, it is derived from $XMODEL_SIMDIR and the cellview name). |
Value Returned
None |
Example
xmodelOpenWave( "myLib" "myCell" "tb_run" )
Plot the simulated waveforms using a waveform viewer.
xmodelAddProbe
xmodelAddProbe( [ window ] [ netName ] [ repeat ] )
Description
Add a net probe selected from the specified window and display its waveform in the currently-open XWAVE Waveform Viewer. The procedure is effective only when there is an active XWAVE session running. This is the action triggered when the GLISTER->Add Waveform Probe pull-down menu is selected.
Arguments
window | ID of the schematic editor window (default: ID of the currently editing window). |
netName | The name of the net to be probed from the window. If it is not specified or nil, the procedure enters into an interactive mode for the user to select the net from the schematic window using a mouse click. |
repeat | If t, the procedure stays in the interactive mode for further selection of nets to be probed. |
Value Returned
None |
Example
xmodelAddProbe()
Enter into an interactive mode to select the nets from the currently editing schematic window and display their waveforms in the currently active XWAVE Waveform Viewer.
xmodelDisplayAllProbes
xmodelDisplayAllProbes( [ window ] )
Description
Display all the selected net probes in the window in the currently active XWAVE Waveform Viewer.
Arguments
window | ID of the schematic editor window (default: ID of the currently editing window). |
Value Returned
None |
Example
xmodelDisplayAllProbes()
Display all the selected net probes in the currently editing window in the currently active XWAVE Waveform Viewer.
xmodelDeleteAllProbes
xmodelDeleteAllProbes( [ window ] )
Description
Remove all net probes in the window. This is the action triggered when the GLISTER->Remove All Probes pull-down menu is selected.
Arguments
window | ID of the schematic editor window (default: ID of the currently editing window). |
Value Returned
None |
Example
xmodelDeleteAllProbes()
Delete all net probes in the currently editing window.
xmodelDispSplash
xmodelDispSplash()
Description
Display the GLISTER splash image.
Arguments
None |
Value Returned
None |
Example
xmodelDispSplash()
Display GLISTER splash image.
XMODEL Cellview Management
The SKILL API functions in this category manage the XMODEL source files stored as xmodel-type cellviews in the Cadence® Virtuoso® design database.
xmodelDialogImport
xmodelDialogImport( [ libName ] [ filePath ] )
Description
Open a GUI dialog for importing an XMODEL model file written in SystemVerilog format into the Cadence® Virtuoso® design database. The model file is imported as an "xmodel"
view of the cell with the matching name to the module name. This is the action triggered when a user selects the menu File -> Import -> XMODEL of the Command Interpreter Window (CIW).
Arguments
libName | Optional argument setting the default library name in the GUI dialog window. |
filePath | Optional argument setting the default file path to the model file in the GUI dialog window. |
Value Returned
None |
Example
xmodelDialogImport()
Open a GUI dialog for importing an XMODEL model file.
xmodelOpenCellView
xmodelOpenCellView( libName cellName [ viewName ] [ accessMode ] [ uiMode ] )
Description
Open an xmodel-type cellview. An xmodel-type cellview stores the XMODEL source file describing the functionality of the cell. If the cellview already exists and it is open with read or append access mode, the procedure opens the associated XMODEL source file with the corresponding mode. If the cellview does not exist or it is open with write access mode, a new xmodel-type cellview is created. The template model source file for new xmodel-type cellviews is defined by an xmodelTemplateModel SKILL variable.
Arguments
libName cellName viewName |
Library, cell, view names of the xmodel-type cellview. The default view name is “xmodel”. |
accessMode | Access mode (“r”: read, “w”: write, “a”: append). Default is “r”. |
uiMode | User interface mode (“text” for text-based interface and “gui” for GUI-based interface). Default is “text”. |
Value Returned
None |
Example
xmodelOpenCellView( "myLib" "myCell" "xmodel" "a" )
Open the source file of an xmodel-type cellview myLib:myCell:xmodel in a text editor for editing.
xmodelImportCellView
xmodelImportCellView( srcFile libName [ cellName ] [ viewName ] [ genSymbol ] [ checkSyntax ] [ uiMode ] ) => t
Description
Import an XMODEL source file into an xmodel-type cellview. When importing an XMODEL source file, GLISTER parses the module definitions included in the file and extracts information such as the module name, parameter definitions, and port definitions. GLISTER then stores the information as properties of the newly created cellview and can optionally create a symbol view.
Arguments
srcFile | Name of the XMODEL source file to be imported. |
libName | Library name of the xmodel-type cellview to be created. |
cellName | Cell name of the xmodel-type cellview to be created. The XMODEL source file must define a module with the matching name. If not specified or nil, the name of the first module found in the XMODEL source file is used as the cell name. |
viewName | View name of the xmodel-type cellview to be created (default: “xmodel”). |
genSymbol | If t, generate a symbol view from the port list defined in the XMODEL source file (default: t). |
checkSyntax | If t, check the syntax of the XMODEL source file before importing (default: t). |
uiMode | User interface mode (“text” for text-based interface and “gui” for GUI-based interface). Default is “text”. |
Value Returned
t |
Example
xmodelImportCellView( "model.sv" "myLib" "myCell" )
Import an XMODEL source file named model.sv into an xmodel-type cellview myLib:myCell:xmodel. The XMODEL source file model.sv must contain a definition of a module named “myCell”.
xmodelUpdateCellView
xmodelUpdateCellView( libName cellName [ viewName ] [ genSymbol ] [ uiMode ] )
Description
Update the properties of the specified xmodel-type cellview with the information newly extracted from its source file. Use this procedure when you updated the XMODEL source file directly and want to propagate the changes to the cellview properties. In case you edit the source file using xmodelOpenCellView()
, GLISTER updates the cellview properties automatically when you close the text editor and this procedure need not be called explicitly.
Arguments
libName | Library name of the xmodel-type cellview. |
cellName | Cell name of the xmodel-type cellview. |
viewName | View name of the xmodel-type cellview (default: “xmodel”). |
genSymbol | If t, update a symbol for the xmodel-type cellview with the newly extracted port definitions (default: t). |
uiMode | User interface mode (“text” for text-based interface and “gui” for GUI-based interface). Default is “text”. |
Value Returned
None |
Example
xmodelUpdateCellView( "myLib" "myCell" "xmodel" t )
Update the properties of an xmodel-type cellview myLib:myCell:xmodel and the symbol view using the information defined in its XMODEL source file.
xmodelCheckCellView
xmodelCheckCellView( libName cellName [ viewName ] [ uiMode ] )
Description
Check and update the properties of the specified xmodel-type cellview if they are different from the information extracted from its source file. Use this procedure when you want to make sure that the xmodel-type cellview properties are consistent with the associated XMODEL source file. The difference with xmodelUpdateCellView()
is that this procedure does not overwrite the cellview properties and update its timestamp unless the cellview properties must be newly updated.
Arguments
libName | Library name of the xmodel-type cellview. |
cellName | Cell name of the xmodel-type cellview. |
viewName | View name of the xmodel-type cellview (default: “xmodel”). |
uiMode | User interface mode (“text” for text-based interface and “gui” for GUI-based interface). Default is “text”. |
Value Returned
None |
Example
xmodelCheckCellView( "myLib" "myCell" "xmodel" )
Check and update the properties of the xmodel-type cellview myLib:myCell:xmodel if they are inconsistent with the information stored in the XMODEL source file.
XMODEL Testbench Cellview Management
The SKILL API functions in this category provide a procedural way of creating a new XMODEL testbench cellview, opening it in the XMODEL Testbench Editor, and running the simulation as specified in the XMODEL testbench cellview.
xmodelCreateTestbench
xmodelCreateTestbench( [ libName ] [ cellName ] [ viewName ] )
Description
Create a new testbench cellview with default attributes.
Arguments
libName cellName viewName |
Library, cell, and view names of the XMODEL testbench cellview, respectively. The view name must start with a prefix string “tb_” or simply be “tb”. |
Value Returned
None |
Example
xmodelCreateTestbench( "myLib" "myCell" "tb" )
Create a new testbench cellview myLib:myCell:tb with default attributes.
xmodelOpenTestbenchEditor
xmodelOpenTestbenchEditor( [ libName ] [ cellName ] [ viewName ] )
Description
Open a testbench cellview in the XMODEL Testbench Editor. With the XMODEL Testbench Editor, user can control various options and attributes for performing XMODEL simulations in the GLISTER environment.
Arguments
libName cellName viewName |
Library, cell, and view names of the XMODEL testbench cellview to open, respectively. If not specified, a testbench view or schematic view of the currently-editing cellview is open. |
Value Returned
None |
Example
xmodelOpenTestbenchEditor( "myLib" "myCell" "tb" )
Open a testbench cellview myLib:myCell:tb in the XMODEL Testbench Editor.
xmodelRunTestbench
xmodelRunTestbench( libName cellName viewName mode )
Description
Execute an operation as defined in the testbench view. The supported operations include generating netlists, displaying the netlists, running the simulation, and plotting waveforms. These operations correspond to the actions available in the XMODEL Testbench Editor.
Arguments
libName cellName viewName |
Library, cell, and view names of the XMODEL testbench cellview, respectively. The view name must start with a prefix string “tb_” or simply be “tb”. |
mode | Specify the operation to perform. Possible values are: “netlist”, “viewnetlist”, “runsim”, and “plotwave”. |
Value Returned
None |
Example
xmodelRunTestbench( "myLib" "myCell" "tb" "runsim" )
Start the XMODEL simulation as specified in the testbench cellview myLib:myCell:tb.
MODELZEN Menu Actions
The SKILL API functions in this category provide a procedural way of performing the actions available in the GLISTER/MODELZEN pull-down menu, such as running the MODELZEN either in an interactive or batch mode and opening the dialog window for setting the MODELZEN options.
modelzenRunInteractive
modelzenRunInteractive( [ ?libName libName ] [ ?cellName cellName ] [ ?viewName viewName ] [ ?netlistSimulator netlistSimulator ] [ ?runDir runDir ] [ ?netlistDir netlistDir ] [ ?simDir simDir ] [ ?outDir outDir ] [ ?configFile configFile ] [ ?corner corner ] [ ?logFile logFile ] [ ?forceSim forceSim ] [ ?modelView modelView ] [ ?showCompletionMsgBox showCompletionMsgBox ] ) => processId
Description
Start an interactive session to generate structural models from circuit schematics using MODELZEN. An interactive session interacts with the user through a graphical user interface such as displaying the progress, asking for user confirmation, and notifying the completion. This is the action triggered when the GLISTER->Run MODELZEN pull-down menu is selected.
Basically, the model generation session consists of the following four steps:
- Generating circuit netlists (e.g. spectre or hspiceD netlists) from the circuit schematics using the method defined in the
modelzenGenNetlist()
procedure. - Extracting the MODELZEN properties included in the circuit schematics.
- Generating structural models from the circuit netlists using MODELZEN.
- Import the generated XMODEL source files into the Cadence Virtuoso design database.
Many of the argument options of this procedure use the default values defined by the modelzenDefault… SKILL variables if they are not explicitly specified. The values of those SKILL variables can be set at start-up or modified from the Set MODELZEN Options dialog box which can be invoked by selecting the GLISTER->Set MODELZEN Options pull-down menu. For more details, please refer to the MODELZEN User Guide.
Arguments
libName cellName viewName |
Library, cell, and view names of the top-level circuit design cellview. |
netlistSimulator | Simulator name for circuit netlisting (e.g. spectre, hspiceD, etc.). The circuit netlist is generated using the command: modelzenGenNetlist( libName cellName viewName netlistSimulator ). Its default value is defined by the modelzenDefaultNetlistSimulator SKILL variable. |
runDir | Run directory for MODELZEN. If it is not specified, the path location defined by the modelzenDefaultRunDir SKILL variable is used. |
netlistDir | The directory to store the generated circuit netlists. If not specified, the path location defined by the modelzenDefaultNetlistDir SKILL variable is used. If modelzenDefaultNetlistDir is nil, then a /netlist subdirectory under the runDir directory is used. |
simDir | The directory to store the model calibration results for individual devices. If not specified, the path location defined by the modelzenDefaultSimDir SKILL variable is used. If modelzenDefaultSimDir is nil, then a /sim subdirectory under the runDir directory is used. |
outDir | The directory to store the generated model files. If not specified, the path location defined by the modelzenDefaultModelDir SKILL variable is used. If modelzenDefaultModelDir is nil, then a /model subdirectory under the runDir directory is used. |
configFile | MODELZEN technology configuration filename. If it is not specified, the filename defined by the modelzenDefaultConfigFile SKILL variable is used. |
corner | The name of the simulation corner that defines a set of process or temperature conditions for the devices being characterized. The default value is defined by the modelzenDefaultCorner SKILL variable. |
logFile | MODELZEN output logfile. If it is not specified, the filename defined by the modelzenDefaultLogFile SKILL variable is used. |
forceSim | If t, force new characterizations instead of recycling the previous results (default: nil). |
modelView | View name of the xmodel-type cellview importing the generated structural model file. The default value is defined by the modelzenDefaultModelView SKILL variable. |
showCompletionMsgBox | If t, show a message dialog box when the model generation process is completed (default: t). |
Value Returned
processId | MODELZEN process ID running in background. |
Example
modelzenRunInteractive( "myLib" "myCell" "schematic" )
Start an interactive session to generate structural models of a top-level circuit schematic cellview myLib:myCell:schematic using MODELZEN.
modelzenRunBatch
modelzenRunBatch( [ ?libName libName ] [ ?cellName cellName ] [ ?viewName viewName ] [ ?netlistSimulator netlistSimulator ] [ ?runDir runDir ] [ ?netlistDir netlistDir ] [ ?simDir simDir ] [ ?outDir outDir ] [ ?configFile configFile ] [ ?corner corner ] [ ?logFile logFile ] [ ?forceSim forceSim ] [ ?modelView modelView ] )
Description
Start a non-interactive (i.e. batch) session to generate structural models from circuit schematics using MODELZEN. A non-interactive session does not interact with the user during the process of model generation and is suitable for generating a set of models using a batch script.
Basically, the model generation session consists of the following four steps:
- Generating circuit netlists (e.g. spectre or hspiceD netlists) from the circuit schematics using the method defined in the
modelzenGenNetlist()
procedure. - Extracting the MODELZEN properties included in the circuit schematics.
- Generating structural models from the circuit netlists using MODELZEN.
- Import the generated XMODEL source files into the Cadence Virtuoso design database.
Many of the argument options of this procedure use the default values defined by the modelzenDefault… SKILL variables if they are not explicitly specified. The values of those SKILL variables can be set at start-up or modified from the Set MODELZEN Options dialog box which can be invoked by selecting the GLISTER->Set MODELZEN Options pull-down menu. For more details, please refer to the MODELZEN User Guide.
Arguments
libName cellName viewName |
Library, cell, and view names of the top-level circuit design cellview. |
netlistSimulator | Simulator name for circuit netlisting (e.g. spectre, hspiceD, etc.). The circuit netlist is generated using the command: modelzenGenNetlist( libName cellName viewName netlistSimulator ). Its default value is defined by the modelzenDefaultNetlistSimulator SKILL variable. |
runDir | Run directory for MODELZEN. If it is not specified, the path location defined by the modelzenDefaultRunDir SKILL variable is used. |
netlistDir | The directory to store the generated circuit netlists. If not specified, the path location defined by the modelzenDefaultNetlistDir SKILL variable is used. If modelzenDefaultNetlistDir is nil, then a /netlist subdirectory under the runDir directory is used. |
simDir | The directory to store the model calibration results for individual devices. If not specified, the path location defined by the modelzenDefaultSimDir SKILL variable is used. If modelzenDefaultSimDir is nil, then a /sim subdirectory under the runDir directory is used. |
outDir | The directory to store the generated model files. If not specified, the path location defined by the modelzenDefaultModelDir SKILL variable is used. If modelzenDefaultModelDir is nil, then a /model subdirectory under the runDir directory is used. |
configFile | MODELZEN technology configuration filename. If it is not specified, the filename defined by the modelzenDefaultConfigFile SKILL variable is used. |
corner | The name of the simulation corner that defines a set of process or temperature conditions for the devices being characterized. The default value is defined by the modelzenDefaultCorner SKILL variable. |
logFile | MODELZEN output logfile. If it is not specified, the filename defined by the modelzenDefaultLogFile SKILL variable is used. |
forceSim | If t, force new characterizations instead of recycling the previous results (default: nil). |
modelView | View name of the xmodel-type cellview importing the generated structural model file. The default value is defined by the modelzenDefaultModelView SKILL variable. |
Value Returned
None |
Example
modelzenRunBatch( "myLib" "myCell" "schematic" )
Generate structural models of a top-level circuit schematic cellview myLib:myCell:schematic using MODELZEN in a batch mode.
modelzenDialogSetOptions
modelzenDialogSetOptions()
Description
Open a GUI dialog for setting MODELZEN options. This is the action triggered when the GLISTER->Set MODELZEN Properties pull-down menu is selected.
Arguments
None |
Value Returned
None |
Example
modelzenDialogSetOptions()
Open a GUI dialog for setting MODELZEN options.
MODELZEN Property Editing and Management
The SKILL API functions in this category provide ways of managing the MODELZEN properties defined on schematic cellviews, such as on the pin or cell instances as well as importing or exporting them from/to a file.
modelzenOpenPropBrowser
modelzenOpenPropBrowser( [ ?libName libName ] [ ?cellName cellName ] [ ?viewName viewName ] [ ?hierMode hierMode ] )
Description
Open the MODELZEN Property Browser. Using the MODELZEN Property Browser, users can browse the MODELZEN properties defined for the cellview’s pins or instances. This is the action triggered when the GLISTER->Edit MODELZEN Properties pull-down menu is selected.
Arguments
libName cellName viewName |
Library, cell, and view names of the design cellview. If not specified, the currently editing cellview is used as default. |
netlistSimulator | If t, the MODELZEN Property Browser displays not only the properties defined for the selected cellview, but also those for the dependent cells (default: nil). |
Value Returned
t |
Example
modelzenOpenPropBrowser( "myLib" "myCell" "schematic" )
Open the MODELZEN Property Browser to browse the MODELZEN properties defined for the cellview myLib:myCell:schematic.
modelzenDialogEditPropObj
modelzenDialogEditPropObj( [ objId ] )
Description
Open a GUI dialog window for editing MODELZEN property of a pin or instance object. If no object is selected or specified, it opens the MODELZEN Property Browser window.
Arguments
objID | Object ID (pin or instance ID). If nil, the currently selected object is used. |
Value Returned
None |
Example
modelzenDialogEditPropObj( pinId )
Open a GUI dialog window for editing MODELZEN property of an object (e.g. pin).
modelzenSetPropPin
modelzenSetPropPin( pinInst [ ?portDir portDir ] [ ?sigType sigType ] [ ?sigDesc sigDesc ] [ ?useBuf useBuf ] [ ?level1 level1 ] [ ?level0 level0 ] [ ?thres1 thres1 ] [ ?thres0 thres0 ] [ ?strength strength ] ) => pinInst
Description
Set the MODELZEN properties of a pin. By defining custom MODELZEN properties, users can individually control the type, direction, conversion levels, and thresholds for each pin in the generated model.
Arguments
pinInst | Pin instance ID. |
portDirv | XMODEL port direction. Possible values are “input”, “output”, and “inputOutput”. |
sigType | XMODEL signal type. Possible values are “xreal”, “xbit”, “real”, “bit”, and “auto”. |
sigDesc | Pin description string. |
useBuf | Flag whether to use an isolation buffer (t or nil) |
level1 | Conversion level for logic 1. |
level0 | Conversion level for logic 0. |
thres1 | Threshold for logic 1. |
thres0 | Threshold for logic 0. |
strength | Driving strength. Possible values are “weak”, “pull”, “strong”, and “supply”. |
Value Returned
pinInst | Pin instance ID. |
Example
modelzenSetPropPin( pinId ?level1 2.5 ?level0 0.0 )
Set the MODELZEN properties of a pin. For instance, set the pin instance’s conversion level for logic 1 at 2.5 and conversion level for logic 0 at 0.0.
modelzenSetPropInst
modelzenSetPropInst( instId [ ?type type ] [ ?level_dc level_dc ] [ ?level_ac level_ac ] [ ?vmax vmax ] [ ?vmin vmin ] [ ?instterms instterms ] [ ?vpos vpos ] [ ?vneg vneg ] [ ?vd vd ] [ ?vg vg ] [ ?vs vs ] [ ?vb vb ] )
Description
Set the MODELZEN properties of an instance. By defining custom MODELZEN properties, users can individually control the way each device instance is mapped to an XMODEL primitive by MODELZEN.
For more detailed descriptions on the model-specific attributes such as level_dc and level_ac, please refer to the MODELZEN User Guide.
Arguments
instId | Instance ID. |
type | Model type. Possible values include “open”, “short”, “resistor”, “capacitor”, “inductor”, “res_var”, “cap_var”, “ind_var”, “diode”, “nmosfet”, and “pmosfet”. |
level_dc | Accuracy level of DC model (e.g. I-V characteristics). |
level_ac | Accuracy level of AC model (e.g. C-V characteristics). |
vmax | Maximum voltage level. |
vmin | Minimum voltage level. |
instterms | Instance terminal mapping. |
vpos | DC bias level on the terminal “pos”. |
vneg | DC bias level on the terminal “neg”. |
vd | DC bias level on the terminal “d”. |
vg | DC bias level on the terminal “g”. |
vs | DC bias level on the terminal “s”. |
vb | DC bias level on the terminal “b”. |
Value Returned
t |
Example
modelzenSetPropInst( instId ?type "nmosfet" ?level_dc "pwl" ?level_ac 1 )
Set the MODELZEN properties of a pin. For instance, map the instance to an nmosfet primitive with DC accuracy level of “pwl” and AC accuracy level of 1.
modelzenDeleteProp
modelzenDeleteProp( libName [ cellName ] [ viewName ] [ instName ] )
Description
Clear all MODELZEN properties defined for a library, cell, view, or instance. If all arguments are specified, it clears the MODELZEN properties defined for one particular instance of a particular cellview. If the instName argument is nil or not specified, it clears the MODELZEN properties for all the instances of the cellview. If the viewName argument is nil or not specified, it clears the MODELZEN properties for all the views of the cell. If the cellName argument is nil or not specified, it clears the MODELZEN properties for all the cells in the library.
Arguments
libName | Library name of the design cellview. |
cellName | Cell name of the design cellview (default: nil). |
viewName | View name of the design cellview (default: nil). |
instName | Instance name (default: nil). |
Value Returned
t |
Example
modelzenDeleteProp( "myLib" "myCell" "schematic" )
Clear all MODELZEN properties defined in the cellview myLib:myCell:schematic.
modelzenLoadPropFile
modelzenLoadPropFile( [ filename ] [ merge ] ) => filename
Description
Load a MODELZEN property file into the Cadence design database. A MODELZEN property file is a file that describes the MODELZEN properties defined for the pins or instances of a set of cellviews in XML format. With modelzenSavePropFile()
and modelzenLoadPropFile()
, you can export and import MODELZEN properties to/from the Cadence design database, respectively.
Arguments
filename | Name of the MODELZEN property file. If not specified or nil, a GUI dialog will be open and ask for file selection. |
merge | If t, merge the MODELZEN properties expressed in the file with the ones already in the design. Otherwise, clear the existing MODELZEN properties in the design before loading the new MODELZEN properties from the file (default: nil). |
Value Returned
filename | Name of the MODELZEN property file loaded. |
Example
modelzenLoadPropFile( "dbinfo_myCell.xml" )
Load a MODELZEN property file into the Cadence design database.
modelzenSavePropFile
modelzenSavePropFile( config [ filename ] ) => filename
Description
Save the MODELZEN properties defined in the Cadence design database into a MODELZEN property file. A MODELZEN property file is a file that describes the MODELZEN properties defined for the pins or instances of a set of cellviews in XML format. With modelzenSavePropFile()
and modelzenLoadPropFile()
, you can export and import MODELZEN properties to/from the Cadence design database, respectively.
The config argument is a configuration view ID, specifying the design hierarchy for GLISTER to export the MODELZEN properties from. GLISTER will traverse the design hierarchy as specified in the configuration view and export all MODELZEN properties encountered into an XML format file.
Arguments
config | Configuration view ID. |
filename | Name of the MODELZEN property file to be saved. If not specified or nil, a GUI dialog will be open and ask for a file name. |
Value Returned
filename | Name of the MODELZEN property file that stores the exported MODELZEN properties. |
Example
modelzenSavePropFile( configId "dbinfo_myCell.xml" )
Save the MODELZEN properties defined within the design hierarchy as specified by the configuration view into a file.
modelzenGenDBInfo
modelzenGenDBInfo( netlistDir [ libName ] [ cellName ] [ viewName ] ) => filename
Description
Export the MODELZEN properties defined in the Cadence design database into a MODELZEN design information (DBInfo) file. A MODELZEN design information file is a file that exports the MODELZEN properties defined for the design hierarchy in XML format for the purpose of generating models with MODELZEN. Due to their different purposes, the XML files generated by modelzenGenDBInfo()
and modelzenSavePropFile()
may differ and may not be used interchangeably.
The netlistDir is a location of the netlist directory and modelzenGenDBInfo()
assumes that a Cadence OSS netlister has already performed netlisting within that directory and looks for various mapping information for instance and net names (e.g. current/map file).
If such mapping information cannot be found (e.g. using a non-OSS netlister), modelzenGenDBInfo()
creates a default configuration that traverses down the schematic views in the design hierarchy and uses it to export the MODELZEN properties for all the design cellviews encountered. Users may override modelzenMapInstName()
and modelzenMapNetName()
functions to define any name translations that the netlister uses. In this case, the libName, cellName, and viewName arguments must be specified with the library, cell, and view names of the top-level cellview. Otherwise, the function skips the generation of design information file.
Arguments
netlistDir | Name of the directory where the Cadence OSS netlister has previously performed netlisting for the target top-level cellview. It also specifies the directory where the design information file will be stored. |
libName cellName viewName |
Library, cell, and view names of the target top-level design cellview. Must be defined when the netlistDir directory does not contain the design mapping information generated by the Cadence OSS netlister (e.g. current/map file). |
Value Returned
filename | Path of the MODELZEN design information file that stores the exported MODELZEN properties for the purpose of model generation. |
Example
modelzenGenDBInfo( "modelzen.run/netlist/mylib.mycell:schematic" )
Exports the MODELZEN properties defined within the design hierarchy as specified by the design mapping information contained in the specified netlist directory.
modelzenGenDBInfo( "dbinfo/export" "mylib" "mycell" "schematic" )
Exports the MODELZEN properties defined in the specified top-level cellview and its hierarchies using a default configuration view even when the Cadence OSS design mapping information is not found within the specified directory.
GLISTER License Management
The SKILL API functions in this category provide a way to get the check-out status of the GLISTER license and force its check-in.
xmodelLicenseStatus
xmodelLicenseStatus() => t/nil
Description
Checks whether the current Cadence® Virtuoso® session has checked-out the GLISTER license.
Arguments
None |
Value Returned
t | GLISTER license is in use. |
nil | GLISTER license is not in use. |
Example
xmodelLicenseStatus()
Returns the check-out status of the GLISTER license.
xmodelLicenseCheckIn
xmodelLicenseCheckIn() => t
Description
Checks-in the GLISTER license currently being used. No action if the license is not checked out.
Arguments
None |
Value Returned
t |
Example
xmodelLicenseCheckIn()
Returns the GLISTER license currently being used.
Overridable Functions for User Customization
The SKILL API functions in this category can be overridden by users to define customized behaviors for the SPICE/Spectre circuit netlisting during the GLISTER netlisting or MODELZEN model generation. For instance, one can control the pin ordering, define special mappings for the net or instance names, and generate netlists using their own in-house procedures.
xmodelGenNetlistSPICE
xmodelGenNetlistSPICE( libName cellName viewName simulator ) => netlistFile
Description
Generate the hierarchical SPICE netlist from a circuit schematic cellview. The procedure is called while GLISTER generates a mixed-mode co-simulation netlists. In other words, when GLISTER traverses the design hierarchy and meets a cell that can only be netlisted using the Cadence analog netlister (i.e. circuit schematic), GLISTER invokes this xmodelGenNetlistSPICE()
procedure to extract the SPICE netlists of the cell and its child cells.
Note that the generated netlist must define the top-level circuits within a subcircuit definition. The default definition of xmodelGenNetlistSPICE()
redefines the netlist formatter to enforce this condition for the Cadence ADE netlister.
Arguments
libName cellName viewName |
Library, cell, and view names of the design cellview, respectively. simulator Simulator name setting the netlist format (e.g. “spectre”, “hspiceD”, etc.). |
Value Returned
netlistFile | File path of the generated circuit netlist. |
Example
procedure( xmodelGenNetlistSPICE( libName cellName viewName simulator @key ( useTopCellSubckt t ) ) let( ( netlistFile netlistDir saved_poport ) ; initialize netlist formatter case( simulator ( "hspiceD" xmodelNetlisterInitHspiceD() ) ( "spectre" xmodelNetlisterInitSpectre() ) ( t simulator( simulator ) warn( "Unsupported netlisting format '%s'; proceeding with the basic ADE netlister." simulator ) ) ) ; ADE netlisting with silent output status = errset( let( () saved_poport = poport poport = outfile( "/dev/null" ) design( libName cellName viewName ) xmodelNetlistOption = if( useTopCellSubckt then list( "use_topcellsubckt" ) else nil ) unless( netlistFile = createNetlist( ?recreateAll t ?display nil ) error( "error occurred while netlisting %s.%s:%s." libName cellName viewName ) ) ocnCloseSession() close( poport ) poport = saved_poport ) t ) if( status == nil then close( poport ) poport = saved_poport error( "GLISTER is aborted while %s netlisting the cellview %s.%s:%s." simulator libName cellName viewName ) ) ; restore the default netlist formatter case( simulator ( "hspiceD" xmodelNetlisterRestoreHspiceD() ) ( "spectre" xmodelNetlisterRestoreSpectre() ) ) ; return netlist filename netlistDir = xmodelGetDirName( netlistFile ) strcat( netlistDir "/netlist" ) ) )
xmodelGetPinOrder
xmodelGetPinOrder( cellview ) => pinList
Description
Returns the desired ordering of the cellview’s pins when GLISTER netlists its module definition or instances with ordered port connections.
Arguments
cellview | Cellview ID. |
Value Returned
pinList | A list of pin names sorted according to the ordering. |
Example
procedure( xmodelGetPinOrder( cellview ) schGetPinOrder( cellview ) )
modelzenGenNetlist
modelzenGenNetlist( libName cellName viewName simulator ) => netlistFile
Description
Generate the hierarchical circuit netlist from a circuit schematic cellview. This procedure is used by MODELZEN to extract the circuit netlist of the cellview before generating the structural models. Users can override this procedure to define any site-specific customizations for circuit netlisting.
Arguments
libName cellName viewName |
Library, cell, and view names of the design cellview, respectively. |
simulator | Simulator name setting the netlist format (e.g. “spectre”, “hspiceD”, etc.). |
Value Returned
netlistFile | File path of the generated circuit netlist. |
Example
procedure( modelzenGenNetlist( libName cellName viewName simulator ) let( ( netlistFile netlistDir ) ; initialize simulator simulator( simulator ) ; generate netlist design( libName cellName viewName ) unless( netlistFile = createNetlist( ?recreateAll t ?display nil ) error( "error occurred while netlisting %s.%s:%s." libName cellName viewName ) ) ocnCloseSession() ; return netlist filename netlistDir = xmodelGetDirName( netlistFile ) strcat( netlistDir "/netlist" ) ) )
modelzenGetPinOrder
modelzenGetPinOrder( cellview ) => pinList
Description
Returns the desired ordering of the cellview’s pins when MODELZEN creates the model for the corresponding cellview.
Arguments
cellview | Cellview ID. |
Value Returned
pinList | A list of pin names sorted according to the ordering. |
Example
procedure( modelzenGetPinOrder( cellview ) schGetPinOrder( cellview ) )
modelzenMapInstName
modelzenMapInstName( instName ) => mappedInstName
Description
User-customizable function to define the mapping between the instance names used in the schematic cellviews and those used in the circuit netlists generated by the modelzenGenNetlist()
method.
In case the user’s customized modelzenGenNetlist()
procedure changes the instance names (e.g. prepending ‘M’ to all transistor instance names) during the netlist generation, it is necessary to define the same name mapping in this function so that MODELZEN can correctly apply the MODELZEN properties the user may have defined for those instances with the changed names.
Arguments
instName | Original instance name used in the schematic cellview. |
Value Returned
mappedInstName | Mapped instance name used in the circuit netlist. |
Example
procedure( modelzenMapInstName( instname ) instname )
modelzenMapNetName
modelzenMapNetName( netName ) => mappedNetName
Description
User-customizable function to define the mapping between the net names used in the schematic cellviews and those used in the circuit netlists generated by the modelzenGenNetlist()
method.
In case the user’s customized modelzenGenNetlist()
procedure changes the net names (e.g. prepending “NET_” to all net names starting with a number literal) during the netlist generation, it is necessary to define the same name mapping in this function so that MODELZEN can correctly apply the MODELZEN properties the user may have defined for those nets with the changed names.
Arguments
netName | Original net name used in the schematic cellview. |
Value Returned
mappedNetName | Mapped net name used in the circuit netlist. |
Example
procedure( modelzenMapNetName( netname ) netname )