6
Simulation Commands
The following OCEAN simulation commands let you set up and run your simulation.
ac
ac(g_fromValue g_toValue g_ptsPerDec) => undefined/ nil
ac(g_fromValue g_toValue t_incType g_points) => undefined/ nil
Description
To know more about this analysis, see the simulator-specific user guide.
Arguments
Value Returned
Examples
Specifies an AC analysis from 1 to 10000 with 2 points per decade.
ac(1 10000 2)
Specifies an AC analysis from 1 to 10000 by 100.
ac(1 10000 "Linear" 100)
Specifies an AC analysis from 1 to 5000 with 10 logarithmic points per decade.
ac(1 5000 "Logarithmic" 10)
analysis
analysis(s_analysisType[ ?analysisOption1g_analysisOptionValue1]… [ ?analysisOptionNg_analysisOptionValueN] ) => undefined / nil
Description
Specifies the analysis to be simulated.
You can include as many analysis options as you want. Analysis options vary, depending on the simulator you are using. To include an analysis option, replace analysisOption1 with the name of the desired analysis option and include another argument to specify the value for the option. If you have an AC analysis, the first option/value pair might be [?from 0].
ac, dc, tran, and noise commands. Use the ocnHelp( 'analysis ) command for more information on the analysis types for the simulator you choose. Arguments
Value Returned
|
Returns |
Examples
Runs an AC analysis from 1Hz to 10000Hz with a linear step of 100Hz for the Spectre® circuit simulator.
analysis( 'ac ?start 1 ?stop 10000 ?lin 100 )
Specifies that a transient analysis must be performed from 0 to 1u with a sweep value of 10n for the Spectre.
analysis( 'tran ?start 0 ?stop 1u ?step 10n )
Specifies that the temperature sweep starts at -50 and stops at 100 for the Spectre® circuit simulator when DC analysis is performed.
analysis('dc ?oppoint "rawfile" ?save "allpub"
?param "temp" ?start -50 ?stop 100 )
Ssaves the operating point information when performing DC analysis for Spectre.
analysis('dc ?saveOppoint t )
Specifies that a dc transfer function analysis must be performed from 0 to 100 with a linear sweep of 2 and frequency of 1 on the probe v4.
analysis('xf ?start 0 ?stop 100 ?lin 2 ?dev "v3" ?param "dc" ?freq 1 ?probe "v4")
Specifies that a Spectre sensitivity analysis must be performed with the dcOp, dc and ac analyses and the output is saved to the instance I7:3.
analysis('sens ?analyses_list list("dcOp" "dc" "ac") ?output_list list("I7:3" "OUT")
Specifies that a Spectre noise analysis must be performed from 1 to 10e6 and probes the operating point on instance V4.
analysis( 'noise ?start 1 ?stop 10e6 ?oprobe "V4" )
Specifies that a Spectre dcmatch analysis for the temperature of operating point PR1 is performed from 24 to 26°F with a linear sweep of 5.
analysis( 'dcmatch ?oprobe "/PR1" )
analysis( 'dcmatch ?param "temp" ?start "24" ?stop "26 ?lin "5" )
Specifies that a Spectre pz analysis must be performed on the operating point rawfile with a frequency of 2 and fmax of 4.5GHz.
analysis('pz ?freq "2" ?readns "./abc" ?oppoint "rawfile" ?fmax "4.5GHz" ?zeroonly "no" ?prevoppoint "no" ? restart "no" ?annotate "no" ?stats "no"
)
Specifies that a Spectre stability analysis must be performed from 10 to 10G on the probe instance PR1.
analysis('stb ?start "10" ?stop "10G" ?dec "10" ?probe "/PR1" ?prevoppoint "yes"
?readns "./abc" ?save "lvl" ?nestlvl "1" ?oppoint "logfile" ?restart "yes"
?annotate "no" ?stats "yes" )
Specifies that the Spectre pss RF analysis must be performed with fundamental frequency of 100M, solution harmonics set to 3, and a moderate error level.
analysis('pss ?fund "100M" ?harms "3" ?errpreset "moderate" )
Specifies that a Spectre pnoise RF analysis must be performed from 1K to 30M with a maxsideband of 3, a logarithmic sweep of 20, and input and output probes set to rf and rif respectively.
analysis('pnoise ?start "1K" ?stop "30M" ?log "20" ?maxsideband "3"
?oprobe "/rif" ?iprobe "/rf" ?refsideband "0" )
Specifies that a Spectre pac RF analysis must be performed from 700M to 800M with a relative linear sweep of 5 and a maxsideband of 3.
analysis(“pac ?sweeptype "relative" ?relharmnum "" ?start "700M" ?stop "800M"
?lin "5" ?maxsideband "3")
Specifies that a Spectre pxf RF analysis must be performed from 10M to 1.2G with a linear sweep of 100 and maxsideband of 3 between the open terminals Plo and gnd!.
analysis(“pxf ?start "10M" ?stop "1.2G" ?lin "100" ?maxsideband "3" ?p "/Plo"
?n "/gnd!" )
Specifies that a Spectre qpss RF analysis must be performed from -25 to -10 with a linear sweep of 5 for the fundamental frequencies of flo and frf. Here, the number of harmonics of each fundamental to be considered is 0, the number of parameters to be updated are saved in prf, and the error level is set to moderate.
analysis('qpss ?funds list("flo" "frf") ?maxharms list("0" "0") ?errpreset "moderate" ?param "prf" ?start "-25" ?stop "-10" ?lin "5" )
Specifies that a Spectre qpac analysis must be performed from 920M with clockmaxharm set to 0.
analysis('qpac ?start "920M" ?stop "" ?clockmaxharm "0" )
Specifies that the S-Parameter analysis must be performed from 100M to 1.2G with a sweep value of 100 between the open terminals /Port0 and /RF. Additionally, noise analysis is also performed.
analysis('sp ?start "100M" ?stop "1.2G" ?step "100" ?donoise "yes"
?oprobe "/PORT0" ?iprobe "/RF" )
Related Topics
converge
converge(s_convName t_netName1 f_value1... [t_netNameN f_valueN] ) => undefined/ nil
Description
Sets convergence criteria on nets.
Arguments
|
Name of the convergence type. Valid values are |
|
|
Name of the net to which you want to set convergence criteria. |
|
Value Returned
Examples
Sets the convergence name for the initial condition net1 to 5 volts.
converge( 'ic "/I0/net1" 5 )
Sets the convergence name for nodeset of net1 to 5 volts.
converge( 'nodeset "/I0/net1" 5 )
Related Topics
connectRules
connectRules(t_ruleName[?libt_libName] [?viewt_viewName] [?baseRulet_baseRule] [?moduleInfol_moduleInfo] [?resolutionInfol_resolutionInfo] [?commonParaml_commonParam] [?userDefineds_userDefined] ) => t / nil
connectRules (t_ruleName)=>t / nil
connectRules(
?none s_tag
)
=> t / nil
The following arguments are composed of other arguments as described below:
l_moduleInfo: ((s_moduleName1 [?mode s_mode] [?paramInfo l_paramInfo] [ ?direction1 s_direction1][?discipline1 s_discipline1 ] [ ?direction2 s_direction2] [?discipline2 s_discipline2 ]) [ (s_moduleName2 - ) - ]
l_paramInfo: ((s_paramName1 s_value1) [ (s_paramName2 s_value2) - ])
l_resolutionInfo: ((s_resolvedDiscipline1 s_equivalentDisciplines1) [ (s_resolvedDiscipline2 s_equivalentDisciplines2) - ])
l_commonParam: ((s_paramName1 s_value1 [ (s_moduleName1 s_moduleName2 - ) ]) [ (s_paramName2 s_value2 ) - ]
Description
Sets connect rules for a given AMS OCEAN session required by the elaborator. To specify multiple connect rules, use this command multiple times. To add a connect rule to an OCEAN session, you can either choose a built-in rule from the connectLib library (by specifying t_ruleName, t_libName and t_viewName) or one of your own compiled built-in connect rules (by specifying t_ruleName, t_libName and t_viewName). To add a user defined connect rule to an OCEAN session specify s_userDefined. To modify an existing built-in rule, you need to specify t_baseRule (the name of the built-in rule that needs be modified), specify a new name (by specifying t_ruleName, t_libName and t_viewName) and also specify one or more of the optional arguments.
You can use the delete('connectRules) command to delete one or more specified connect rules. See the examples provided with the delete command.
You can use ocnDisplay('connectRules) to view the currently active connect rules in an OCEAN session. You may use ocnDisplay('connectRules 'all) to display all information about all active connect rules in an OCEAN session.
Arguments
Value Returned
Examples
Sets ConnRules_5V_full as the current connect rule from the default connectLib located in your hierarchy.
connectRules("ConnRules_5V_full")
Sets CustomRules_9V_high from myConnectLib, where myConnectLib contains a list of user-compiled connect rules and myViewName is the specified view name.
connectRules("CustomRules_9V_high" ?lib "myConnectLib" ?view "myViewName")
Checks if connRule3 exists in the session. If it does, it updates direction1 to input and direction2 to output for E2L and description for this rule. If this rule does not exist, then it takes the base values as values from ConnRules_18V_full and updates direction1, direction2, and description and names the new rule as connRule3.
connectRules("connRule3" ?lib "lib2" ?view "view2" ?baseRule "ConnRules_18V_full" ?description "updated directions" ?moduleInfo ((?name "E2L" ?direction1 "input" ?direction2 "output")))
Checks if connRule3 exists. If it does not exist, as no base rule is specified, a relevant error message appears. If the rule exists, it would update mode to split for the existing connect rule connRule3 for the module E2L.
connectRules("connRule3" ?lib "lib2" ?view "view2" ?moduleInfo ((?name "E2L" ?mode "split")))
If connRule3 does not exist and the base rule is not specified but description, moduleInfo and resolutionInfo are specified, the connect rule connRule3 is added with the values specified for moduleInfo, resolutionInfo and description.
In this case, no checks are done. This means that module names and parameter names are not checked against base information as no base rule information is available) This command is applicable while using the connectRules command as saved in OCEAN.
connectRules("connRule3" ?lib "lib2" ?view "view2" ?description "desc123" ?moduleInfo ((?name "E2L" ?mode "split" ?direction1 "input" ?direction2 "output")) ?resolutionInfo nil)
Updates the parameters vsup and vtlo for the existing rule connRule3 in the L2E module.
connectRules("connRule3" ?lib "lib2" ?view "view2" ?moduleInfo ((?name "L2E" ?paramInfo (("vsup" "1.7")("vtlo" "3.2")))
Updates resolutionInfo for the existing connect rule connRule3. The old resolutionInfo value for this rule is replaced with the new information. It also updates the vsup parameter to 1.2 for all connRule3 modules and updates vtlo to 3.4 for the modules L2E and Bidir.
connectRules("connRule3" ?lib "lib2" ?view "view2" ?resolutionInfo (("r1" "e1 e2")("r2" "e4 e5")) ?commonParam (("vsup" "1.2") ("vtlo" "3.4" ("L2E" "Bidir"))
Sets connRule3 from view2 of lib2 as a user defined connect rule for the Cellview-based netlister flow.
connectRules("connRule3" ?lib "lib2" ?view "view2" ?userDefined 3step)
Sets connRule3 from the connectLib library as a user defined connect rule for the OSS-based netlister with irun flow.
connectRules("connRule3" ?userDefined irun)
Sets connRule3 from file1 as a user defined connect rule for the OSS-based netlister with irun flow.
connectRules("connRule3" ?userDefined irun ?file "file1")
No user-defined connect rule name is specified for the OSS-based netlister with irun flow. Hence, the first rule found in file1 will be used for AMS simulation.
connectRules(?userDefined irun ?file "file1")
Sets the current connect rule to None so that no connect rule is provided to ncelab during elaboration.
connectRules(?none t)
=> t
Deletes the connect rule myrule in the library mylib with the view myview. It also deletes the connect rule myrule1 in the library mylib1 with the view myview1.
delete('connectRules list("mylib" "myrule" "myview") list("mylib1" "myrule1" "myview1"))
Deletes the specified connect rule rule1 from the default connectLib library.
delete('connectRules list("" "rule1" ""))
createFinalNetlist
createFinalNetlist( ) => t / nil
Description
Creates the final netlist for viewing purposes. The netlist also can be saved but is not required to run the simulator.
createNetlist instead. Arguments
Value Returned
Examples
Creates the final netlist for the current simulation run.
createFinalNetlist()
=> t
createNetlist
createNetlist( [ ?recreateAll g_recreateAll] [?displayg_display] )=>t_filename/ nil
Description
Creates the simulator input file.
If the design is specified as a cellview, this command netlists the design, if required, and creates the simulator input file. When the g_recreateAll argument is set to t and the design is specified as cellview, all the cells in the design hierarchy are renetlisted, before creating the simulator input file. If the design is specified as netlist file, that netlist is included in the simulator input file.
Arguments
Value Returned
Examples
Creates simulator input file for the current simulation run.
createNetlist()
=> "/usr/foo/netlist/input.scs"
Netlists and creates simulator input file for the current simulation run.
design( "test" "mytest" "spectre")
createNetlist( ?recreateAll t )
=>"/usr/foo/netlist/input.scs"
Netlists and creates simulator input file for the given simulation run but does not display the input.scs file in a new window. By default, the ?display argument is set to t which means that netist file would be displayed.
If you regenerate the netlist after changing the design in a different Virtuoso session, the netlist is not updated with the design changes. To update the netlist with the current cellview, run the ddsRefresh command before running the createNetlist command as shown below:
design( "test" "mytest1" "spectre")
createNetlist( ?recreateAll t ?display nil )
=>"/usr/foo/netlist/input.scs"
ddsRefresh command before running the createNetlist command as shown below:ddsRefresh( ?cellview t )
=> t
createNetlist( ?recreateAll t )
=> "/usr/foo/netlist/input.scs"
Related Topics
dc
dc(t_compName[t_compParam]g_fromValue g_toValue g_byValue) => undefined/ nil
Description
Specifies a DC sweep analysis with limited options. If other analysis options are needed, use the analysis command.
To know more about this analysis, see the simulator-specific user guide.
Note: t_compParam is valid only for Spectre.
Arguments
|
Indicates that the component parameter is to be swept by Spectre. |
|
Value Returned
Examples
Specifies two DC sweep analyses for Spectre.
dc("v1" "dc" 0 5 1)
dc("r1" "r" 0 5 1)
Specifies one DC sweep analysis for a simulator other than Spectre.
dc("v1" 0 5 1)
definitionFile
definitionFile(t_fileName[t_fileName2...t_fileNameN] ) =>l_fileNames/ nil
Description
Specifies definitions files to be included in the simulator input file.
Definitions files define functions and global variables that are not design variables. Examples of such variables are model parameters or internal simulator parameters.
Arguments
|
The name of the definition file that would typically contain functions or parameter statements. |
Value Returned
Examples
Includes functions.def and constants.def files in the simulator input file.
definitionFile( "functions.def" "constants.def" )
=> ("functions.def" "constants.def")
Returns the definition files set earlier.
definitionFile( )
=> ("functions.def" "constants.def")
delete
delete(s_command[g_commandArg1] [g_commandArg2]… ) => t / nil
Description
Deletes all the information specified.
The s_command argument specifies the command whose information you want to delete. If you include only this argument, all the information for the command is deleted. If you supply subsequent arguments, only information specified by these arguments is deleted, and not all the information for the command.
Arguments
|
Command that was initially used to add the items that are now being deleted.
Valid values: |
|
Value Returned
Examples
delete( 'save )
=> t
Deletes only the nets. The rest of the information can be saved in subsequent simulations.
delete( 'save 'v )
=> t
Deletes only net23. The rest of the information can be saved in subsequent simulations.
delete( 'save "net23" )
=> t
Turns off the monteCarlo command and sets everything back to the defaults.
delete( 'monteCarlo )
=> t
deleteOpPoint
deleteOpPoint(t_instName[@restl_args] ) => t / nil
Description
Deletes the specified operating point instance.
Arguments
|
List of optional arguments that can be passed to this function. |
Values Returned
Examples
This example deletes the operating point instance I8/Q3.
deleteOpPoint( "/I8/Q3" )
design
design(t_cktFile|t_libt_cellt_view[t_mode] ) =>t_cktFile/ nil|(t_lib t_cell t_view) / nil
Description
Specifies the directory path to the netlist of a design or the name of a design to be simulated.
For the lib, cell, view version of the design command, you can specify the design mode as r, w, or a, representing read, write, or append respectively.
Arguments
Value Returned
|
Prints an error message if there is a problem using the specified design. |
|
Examples
Specifies that the netlist file netlist must be used for the simulation.
design( "./opampNetlist/netlist" )
=> netlist
Specifies that the schematic view of the simple design from the tests library must be used in the simulation.
design( "tests" "simple" "schematic" )
=> (tests simple schematic)
Specifies that the schematic view of the ampTest design from your mylib library be appended to the simulation.
design("mylib" "ampTest" "schematic" "a")
=> (mylib ampTest schematic)
Returns the name of the library, cell, and view being used in the current session. If a design has not been specified, it returns nil.
design()
=> (mylib ampTest schematic)
desVar
desVar(t_desVar1f_value1… [t_desVarNf_valueN] ) => undefined/nil
Description
Sets the values of design variables used in your design. You can set the values for as many design variables as you want.
Arguments
Value Returned
Examples
Returns the design variables set last, if any. Otherwise, it returns nil.
desVar( )
Sets the rs design variable to 1k.
desVar( "rs" 1k )
Sets the r1 design variable to rs, or 1k, and sets the r2 design variable to rs*2, or 2k.
desVar( "r1" "rs" "r2" "rs*2" )
a = evalstring( desVar( "rs")) / 2
discipline
discipline(g_discipline1[g_discipline2... ] )=> t / nil
Description
Adds discrete disciplines to the existing set of disciplines for a given AMS OCEAN session. You can use delete('discipline) to delete one or more specified disciplines. You can use ocnDisplay('discipline) to view the currently active disciplines in an OCEAN session.
Arguments
Value Returned
Examples
Disciplines to be added can be either strings or lists containing the discipline name. If no disciplines have been added so far, this sample command adds the three discrete disciplines logic1, logic2 and logic3 to the session; otherwise, it adds these three disciplines to the existing set of disciplines.
discipline( "logic1" "logic2" '("logic3") )
=> t
Adds discipline LL to the existing set of disciplines. If logic1, logic2 and logic3 are already added, LL is added as the fourth discipline.
discipline("LL")
=> t
Deletes disciplines logic2 and LL from the session.
delete('discipline "logic2" "LL")
=> t
Deletes all the specified disciplines in the session.
delete('discipline)
=> t
displayNetlist
displayNetlist( ) => t / nil
Description
Displays the concatenated design information file used in a given OCEAN session for AMS. The concatenated file displays the netlisting of the cellviews used in the configuration along with the analog control file and the generated TCL file. This command is applicable for Spectre.
Arguments
Value Returned
Examples
Displays the concatenated design information file.
displayNetlist()
=> t
envOption
envOption(s_envOption1g_value1… [s_envOptionNg_valueN] ) => undefined/ nil
Description
To get the list of environment options that can be set for a simulator, first set the simulator and then run the OCEAN online help command ocnHelp('envOption).
For example, setting the following command displays a list of environment options that can be set for Spectre.
simulator('spectre)
ocnHelp('envOption)
includeFile command instead of the envOption command. Similarly, to set a model path, use the path command instead of the envOption command.Arguments
Value Returned
Examples
Sets the paramRangeCheckFile environment option.
envOption( 'paramRangeCheckFile "./myDir/range.check" )
Sets the initFile environment option.
envOption( 'initFile "./myDotSFiles/init" )
Sets the updateFile environment option.
envOption( 'updateFile "./myDotSFiles/update" )
evcdFile
evcdFile(t_evcdFileName) =>t_evcdFileName/nil
Description
Sets an EVCD file for a given UltraSim OCEAN session. You also need to specify an EVCD information file while using this command. You can specify only one EVCD file for a session. You may use ocnDisplay('evcdFile) to view the currently active EVCD file.
Arguments
Value Returned
Examples
Specifies /tmp/evcdFile.dat as the EVCD file to be used for the current UltraSim OCEAN session.
evcdFile("/tmp/evcdFile.dat")
=> "/tmp/evcdFile.dat"
evcdInfoFile
evcdInfoFile(t_evcdInfoFileName) =>t_evcdInfoFileName/ nil
Description
Sets an EVCD information file for a given UltraSim OCEAN session. You also need to specify an EVCD file while using this command. You can specify only one EVCD information file for a session. You may use ocnDisplay('evcdInfoFile) to view the currently active EVCD information file.
Arguments
Value Returned
Examples
Specifies /tmp/evcdInfoFile.dat as the EVCD file to be used for current UltraSim OCEAN session.
evcdInfoFile("tmp/evcdInfoFile.dat")
=> "/tmp/vcdInfoFile.dat"
forcenode
forcenode(t_netName1f_value1… [t_netNameNf_valueN] ) => undefined/ nil
Description
Holds a node at a specified value.
Arguments
Value Returned
Examples
Sets the force nodes of "net1" to 5 and "net34" to 2.
forcenode( "net1" 5 "net34" 2 )
globalSigAlias
globalSigAlias(g_signalList1[g_signalList2 ...] ) => t / nil
Description
Removes all the previous signal aliases and creates the specified aliases. The signal names in each of the signal lists are marked as aliases of each other. Each of the signal lists is a set of signal names that are to be aliased. The signal names should match the names that were specified using the globalSignal command. To remove the aliases for all signals, specify nil instead of the signal lists.
Arguments
|
A list of signals that are to be marked as aliases of each other. |
Value Returned
|
The previous signal aliases are removed successfully and new aliases are created according to the specified signal lists. |
|
Examples
Removes the previous signal aliases and marks sig1 and sig2 as aliases of each other and sig4, sig5 and sig8 as aliases of each other. The signal names in each of the signal lists are marked as aliases of each other.
globalSigAlias('("sig1" "sig2") '("sig4" 'sig5" 'sig8"))
=> t
If there is just one list of signals to be aliased, it can be given without the list. In this case, signal2, signal6 and signal3 are marked as aliases of each other.
globalSigAlias("signal2" "signal6" "signal3")
=> t
Related Topics
globalSignal
globalSignal( [?namet_signalName] [?langt_langName] [?wireTypet_wireType] [?disciplinet_discipline] [?groundt_ground]@Restargs) => t / nil
Description
Adds or modifies a global signal for a given AMS OCEAN session needed by the elaborator. If the global signal already exists in the session, the values are updated. If it does not exist, a global signal with the specified name is added. In case of a vector signal, the range information can be appended with the name of the signal.
Arguments
Value Returned
|
The specified global signal is added or modified successfully. |
|
Examples
Adds the global signal signal1 with wire type as tri, default language as CDBA, and ground as NO to the list of global signals if it has not already been added. If it already exists, then it updates the wire type for signal1.
globalSignal("signal1" ?wireType "tri")
=> t
Adds signal2 with language as Spectre, discipline as electrical, and ground as NO to the list of global signals if it is not already added. If it already exists, then it updates language to Spectre and discipline to electrical.
globalSignal("signal2" ?lang "Spectre" ?discipline "electrical")
=> t
Deletes sig1 and sig2 after removing their aliases if they are in aliased sets.
delete('globalSignal "sig1" "sig2")
=> t
Deletes all user-specified global signals.
delete('globalSignal)
=> t
ic
ic(t_netName1f_value1… [t_netNameNf_valueN] ) => undefined / nil
Description
Sets initial conditions on nets in a transient analysis.
Arguments
Value Returned
Examples
Holds the nodes of "/net1" at 5 and "/net34" at 2.
ic( "/net1" 5 "/net34" 2 )
includeFile
includeFile(t_fileName) =>t_fileName/ nil
Description
Includes the specified file in the final netlist of the simulator for the current session.
-
This command is not available for the direct simulator. Use the
modelFileorstimulusFilecommand instead. -
Using this command is comparable to using the Environment Options form of the Virtuoso® Analog Design Environment to name an include file and specify that the syntax for the file be that of the target simulator. If you want the include file to be in Cadence-SPICE circuit simulator syntax, you must edit the raw netlist file (which has a
.cor.Csuffix), and manually add the include file.
Arguments
Value Returned
Example
includeFile( "~/projects/nmos" )
=> "~/projects/nmos"
Includes the nmos file in the final netlist of the simulator for the current session.
includeFile()
=>"~/projects/nmos"
Returns the includeFile, if one was set earlier. Otherwise, it returns nil.
modelFile
modelFile( [g_modelFile1[g_modelFile2… ] ] ) =>l_modelFile
Description
Specifies model files to be included in the simulator input file.
This command returns the model files used. When model files are specified through the arguments, the model files are set accordingly. Use of full paths for the model file is recommended.
Arguments
|
This argument can be a string to specify the name of the model file. |
|
|
This argument can be a list of two strings to specify the name of the model file and the name of the section. |
Value Returned
|
Returned when no file section pairs have been specified with the current call or a previous call of this command. The |
Example
modelFile( "bjt.scs" "nmos.scs" )
=>( ("bjt.scs" "") ("nmos.scs" "") )
modelFile( "bjt.scs" ’("nmos.scs" "typ") ’my_models )
=> ( ("bjt.scs" "") ("nmos.scs" "typ") ("my_models" "") )
modelFile()
=> ( ("bjt.scs" "") ("nmos.scs" "") )
Returns the modelFile, if one was set earlier. Otherwise, it returns nil.
nodeset
nodeset(t_netName1f_value1… [t_netNameNf_valueN] ) => undefined / nil
Description
Sets the initial estimate for nets in a DC analysis, or sets the initial condition calculation for a transient analysis.
To know more about convergence, refer to the chapter Helping a Simulation to Converge of the Virtuoso Analog Design Environment L User Guide.
Arguments
Value Returned
Example
nodeset( "net1" 5 "net34" 2 )
Sets the initial estimates of "net1" to 5 and "net34" to 2.
noise
noise(t_outputt_source) => undefined / nil
Description
Arguments
Value Returned
|
Returns |
Example
noise( "n1" "v1" )
ocnCloseSession
ocnCloseSession( ) => t / nil
Description
Closes the current OCEAN session without saving any settings made during the session. The command has no effect if no session is currently active.
Value Returned
|
Returns |
Example
ocnCloseSession()
=> t
Closes the current OCEAN session.
ocnDisplay
ocnDisplay( [?outputt_filename|p_port]s_command[g_commandArg1] [g_commandArg2] … ) => t / nil
Description
Displays all the information specified.
The s_command argument specifies the command whose information you want to display. If you include only this argument, all the information for the command displays. If you supply subsequent arguments, only those particular pieces of information display as opposed to displaying all the information for that command. If you provide a filename as the ?output argument, the ocnDisplay command opens the file and writes the information to it. If you provide a port (the return value of the SKILL outfile command), the ocnDisplay command appends the information to the file that is represented by the port.
Arguments
|
File in which to write the information. The |
|
|
Port (previously opened with |
|
|
Command that was initially used to add the items that are now being displayed.
Valid values: Most simulation setup commands. The commands that are supported include |
|
Value Returned
|
Returns |
Example
ocnDisplay( ’optimizeGoal )
=> t
Displays all the optimizeGoal information.
ocnDisplay( ’analysis ’tran )
=> t
Displays only transient analyses.
ocnDisplay( ’save )
=> t
ocnDisplay( ?output myPort ’analyis )
=> t
Displays and writes all the analyses to the port named myPort.
ocnDspfFile
ocnDspfFile(t_dspfFile[t_dspfFile1…t_dspfFileN] )=>t_dspfFile(s)/ nil
Description
Sets the parasitic (dspf, spf) files to be used in a Spectre OCEAN session. You can use this command to specify a list of parasitic files to be included in the control file. You can use ocnDisplay(’dspfFile) to view the currently active parasitic (dspf, spf) files in an OCEAN session.
Arguments
|
|
||
Value Returned
|
Returns |
||
Example
ocnDspfFile("/tmp/file1.dspf" "/tmp/file2.dspf")
=> ("/tmp/file1.dspf" "/tmp/file2.dspf")
Displays the /tmp/file1.dspf and /tmp/file2.dspf parasitic files to be used for current Spectre OCEAN session.
ocnSpefFile
ocnSpefFile(t_SpefFile[t_SpefFile1…t_SpefFileN] )=>t_SpecFile(s)/ nil
Description
Sets the parasitic (spef) files to be used in a Spectre OCEAN session. You can use this command to specify a list of parasitic files to be included in the control file. You can use ocnDisplay(’SpefFile) to view the currently active parasitic (spef) files in an OCEAN session.
Arguments
|
|
||
Value Returned
|
Returns |
||
Example
ocnSpefFile("/tmp/file1.spef" "/tmp/file2.spef")
=> ("/tmp/file1.spef" "/tmp/file2.spef")
Displays the /tmp/file1.spef and /tmp/file2.spef parasitic files to be used for current Spectre OCEAN session.
ocnPspiceFile
ocnPspiceFile(t_PSpiceFile[t_PSpiceFile1…t_PSpiceFileN] )=>t_PSpiceFile(s)/ nil
Description
Sets the PSpice files to be used in a Spectre OCEAN session. Use this command to specify a list of PSpice files to be included in the control file.
Arguments
Value Returned
|
Returns |
||
Example
ocnPspiceFile("/tmp/file1.sp" "/tmp/file2.sp")
=> ("/tmp/file1.sp" "/tmp/file2.sp")
Returns the /tmp/file1.sp and /tmp/file2.sp PSpice files to be used for the current Spectre OCEAN session.
ocnGetAdjustedPath
ocnGetAdjustedPath(t_libName t_cellName t_viewName t_netName) =>t_adjustedPath /nil
Description
Reduces the given hierarchical net path to the shortest hierarchical name that is equivalent to this net.
Arguments
|
A single concatenated string for the instance hierarchy with "/" as the hierarchy separator in the string. |
Value Returned
|
The reduced net name. If the net is local to this cell view only, the reduced net name is the same as the provided net name. |
|
|
Returns |
Example
ocnGetAdjustedPath( "mylib" "test" "schematic" "I7/I3/gnd")
=> "/gnd"
The return value is "/gnd" because the gnd net is connected from this point up to the top level of hierarchy.
ocnGetInstancesModelName
ocnGetInstancesModelName( [l_instance] ) =>l_instance/ nil
Description
This function returns the model name used by the instance in opened simulation results.
Arguments
|
Name of the instance in the simulation result or the schematic. |
Value Returned
Examples
ocnGetInstancesModelName()
=> (("/I8/Q4" "trpnp")
("/I8/Q3" "trpnp")
("/I8/Q2" "trpnp")
("/I8/Q1" "trnpn")
("/I8/Q0" "trnpn")
("/I8/C0" "capacitor")
("/I2" "isource")
("/I8/M1" "trpmos")
("/I8/M3" "trpmos")
("/I8/M2" "trnmos")
("/I8/M5" "trnmos")
("/R1" "resistor")
("/R0" "resistor")
("/I8/R0" "resistor")
("/V2" "vsource")
("/I1/V2" "vsource")
("/I1/V0" "vsource")
)
ocnGetInstancesModelName("/R1")
=> ("/R1" "resistor")
ocnGetInstancesModelName(list("/R1" "/I8/Q1"))
=> (("/R1" "resistor") ("/I8/Q1" "trnpn") )
off
off(s_command[g_commandArg1] [g_commandArg2] ) => t / nil
Description
Turns off the specified information.
This command is currently available only for the analysis and restore commands. The first argument specifies the command whose information you want to turn off. If you include only this first argument, all the information for the command is turned off. If you supply subsequent arguments, only those particular pieces of information are turned off as opposed to turning off all the information for that command. The information is not deleted and can be used again.
Arguments
|
Command that was initially used to add the items that are now being turned off. |
|
Value Returned
|
Returns |
Example
off( ’restore )
=> t
Turns off the restore command.
off( restore ’tran )
=> t
Turns off the transient restore command.
option
option( [?categs_categ]s_option1g_value1[s_option2g_value2] … ) => undefined / nil
Description
Specifies the values for built-in simulator options. You can specify values for as many options as you want.
Arguments
|
Valid values: |
|
Value Returned
|
Returns |
Example
option( ’abstol 1e-10 )
Sets the abstol option to 1e-10.
option( ’delmax 50n )
Sets the delmax option to 50n.
option()
Returns the category list for simulation options, including analog, digital, and mixed.
option(?categ ’analog)
Returns all the simulator options for the analog simulator currently set. For example, if the set simulator is spectre, it returns the valid simulator options for spectre.
restore
restore(
s_analysisType
t_filename
)
=> undefined / nil
Description
Tells the simulator to restore the state previously saved to a file with a store command.
This command is not available for the Spectre® circuit simulator, with which you can use the store/restore options: readns, readforce, write, or writefinal.
Arguments
Value Returned
|
Returns |
Example
restore( ’dc "./storeFile" )
=> ./storeFile
Initializes the simulator to the state saved in the storeFile file.
restore( ’tran "./tranStoreFile" )
=>./tranStoreFile
Initializes the simulator to the state of a transient analysis saved in the tranStoreFile file.
resultsDir
resultsDir(
t_dirName
)
=> undefined / nil
Description
Specifies the directory where the PSF files (results) are stored.
If you do not specify a directory with this command, the PSF files are placed in ../psf to the netlist directory.
resultsDir has no effect. You might use this command when you want to run several simulations using the same design and want to store each set of results in a different location. If this command is not used, the results of an analysis are overwritten with each simulation run.Arguments
Value Returned
|
Returns |
Example
resultsDir("~/simulation/ckt/spectre/schematic/psf")=>
"~/simulation/ckt/spectre/schematic/psf"
Specifies the psf directory as the directory in which to store the PSF files.
resultsDir() => "~/simulation/ckt/spectre/schematic/psf"
Returns the results directory.
run
run( [?jobNamet_jobName] [ ?drmsCmdt_drmsCmd]) =>s_jobName/ nil
run( [analysisList] [?jobNamet_jobName] [?hostt_hostName] [?queuet_queueName] [?startTimet_startTime] [?termTimet_termTime] [?dependentOnt_dependentOn] [t_mailingList] [?blocks_block] [?notifys_notifyFlag] [?lsfResourceStrs_lsfResourceStr] ) =>s_jobName/ nil
run(
)
=> t_dirName / nil
run( s_analysisType1-s_analysisTypeN) =>t_dirName/ nil
Description
Starts the simulation or specifies a time after which an analysis should start. If distributed processing is not available on the system or is not enabled, the arguments specific to distributed processing (see Arguments section below for list of arguments specific to distributed processing) are ignored and the simulation runs locally. If distributed processing is available and is enabled, the environment default values are used if not specified in the run command arguments. The environmental default values are stored in the .cdsenv file.
Do not use the run command to start the parametric analysis. Instead, use the command that is specific to the analysis.
| To start | Use this command |
|---|---|
Arguments
The following arguments apply only when the distributed processing mode is enabled:
|
If the name given is not unique, an integer is appended to create a unique job name. |
|
|
Name of the host on which to run the analysis. If no host is specified, the system assigns the job to an available host. |
|
|
Name of the queue. If no queue is defined, the analysis is placed in the default queue. |
|
|
Desired start time for the job. If dependencies are specified, the job does not start until all dependencies are satisfied. |
|
|
Termination time for job. If the job has not completed by the specified termination time, the job is aborted. |
|
|
List of jobs on which the specified job is dependent. The job is not started until dependent jobs are completed. |
|
|
When s_block is not set to |
|
|
When not set to |
|
|
An LSF Resource Requirement string to submit a job. It is effective only in the LSF mode. |
|
|
Requirements for hardware resources for the job to be run in the SGE mode. |
|
|
Requirements for software resources for the job to be run in the SGE mode. |
|
|
Name of the parallel environment to be used in the SGE mode. |
|
|
A DRMS (Distributed Resource Management System) command, such as a bsub command for LSF or a qsub command for SGE (Sun Grid Engine) used to submit a job. When this argument is used, all other arguments, except ?jobName will be ignored. Moreover, it will not be possible to call the OCEAN function wait on the jobs submitted using this argument. To know more about the command option, refer to the section Submitting a Job in the chapter Using the Distributed Processing Option in the Analog Design Environment of the Virtuoso Analog Distributed Processing OptionUser Guide. |
Value Returned
Example
run(?jobName “job1” ?drmsCmd “bsub -q lnx32”)
=> s_jobName/nil
where lnx32 is the name of the queue to which the job is submitted.
run( )
=> t
run(’tran, ’ac)
Runs only the tran and ac analyses.
run(’dc)
run( ?jobName ?block “nil”)
=> ’reconFilter
Returns a job name of reconFilter for the specified job and runs that job if distributed processing is enabled. The job is submitted nonblocking. The job name is returned.
run( ?queue "fast" )
Submits the current design and enabled analyses as a job on the fast queue, assuming that distributed processing is available and enabled.
run( ?jobName "job1" ?queue "fast" ?host "menaka" ?startTime "22:59"
?termTime "23:25" ?mail "preampGroup")
Submits the current design and enabled analyses as a jobName job1 on the fast queue host menaka with the job start time as 22:59 and termination time as 23:25. A mail will be sent to preampGroup after the job ends.
run( ?jobName "job1" ?queue "fast" ?host "menaka" ?lsfResourceStr "mem>500")
Submits the current design and enabled analyses as a jobName job1 on the fast queue host menaka, if the host has at least 500 MB of RAM memory.
save
save( [?categs_categ]s_saveType[t_saveName1] … [t_saveNameN] ) =>undefined/nil
Description
Specifies the outputs to be saved and printed during simulation.
When specifying particular outputs with saveName, you can include as many outputs as you want. If you want to turn off the default of save, ’allv, use the delete( ’save ) command.
Arguments
Value Returned
|
Returns |
Example
save( ’v "net34" "net45" )
Saves the outputs for net34 and net45.
save( ’i "R1" "/Q1/b" )
Saves the currents for R1 and Q1/b.
save( ’all )
Saves all the nets and currents.
save( ’i "q1:b" "r1:p" "mn1:d" )
For the spectre simulator, saves the current through the specified devices.
save( ?categ ’analog ’v "/vin" "/vout" )
Saves the output for vin and vout.
save( ’i "i(q1,b)" "i(r1)" "i(mn1,d)" )
For the Cadence-SPICE circuit simulator, saves the current through the same devices.
saveOpPoint
saveOpPoint(t_instName[?operatingPointsl_operatingPoints] ) =>t / nil
Description
Specifies the operating point parameters to be saved for a given instance.
Arguments
|
Name of the instance for which the parameters are to be saved. |
|
Values Returned
Example
saveOpPoint( "/I8/Q3" ?operatingPoints "vbe isub betaac gm re" )
This example saves the operating point parameters, vbe isub betaac gm re, for the instance /I8/Q3.
saveOption
saveOption( [s_option1g_optionValue1]…[s_optionNg_optionValueN] ) => undefined / nil
Description
Specifies save options to be used by the simulator.
You can include as many save options as you want. To include a save option, replace s_option1 with the name of the desired save option and include another argument to specify the value for the option.
When you use the saveOption command without specifying any arguments, the command returns a list of option and value pairs.
Save options vary, depending on the simulator and interface that you are using. If you are using the Spectre® circuit simulator, for example, you can type the following at an OCEAN prompt to see which options you can set with the saveOption command:
simulator(’spectre)
ocnHelp(’saveOption)
See the Virtuoso Spectre Circuit Simulator User Guide for more information on these options.
saveOption command does not work with socket simulators. If you are using a socket simulator, you must instead specify save options with the save command described in “save”.Arguments
Value Returned
Example
saveOption( ’save "lvl" ’nestlvl 10 ’currents "selected" ’useprobes "yes" ’subcktprobelvl 2 ?saveahdlvars "all")
simulator
simulator(s_simulator) =>s_simulator/ nil
Description
Starts an OCEAN session and sets the simulator name for that session. The previous session (if any) is closed and all session information is cleared.
Arguments
Value Returned
Example
simulator( ’spectre )
=> spectre
Specifies that the Spectre® circuit simulator be used for the session.
simulator()
=> spectre
Returns the simulator that you set for the session. If a simulator was not specified, it returns nil.
solver
solver(s_solver) =>s_solver/ nil
Description
Sets a solver for a given AMS OCEAN session. The valid values for solver are Spectre and UltraSim. You select Spectre if you want to use an accurate AMS-Spectre analog engine. You select UltraSim if you want to use the AMS-Ultrasim or FastSPICE(UltraSim) solver for a given AMS simulation.
Arguments
Value Returned
Example
solver( ’spectre )
=> spectre
Specifies AMS-Spectre as the solver to be used for the current AMS session.
solver( ’ultraSim )
=> ultraSim
Specifies AMS-UltraSim (UltraSim FastSPICE) as the solver to be used for the current AMS session.
stimulusFile
stimulusFile(t_fileName[t_fileName2…t_fileNameN] [?xlateg_xlate] ) =>l_fileNames/nil
Description
Specifies stimulus files to be used by the simulator.
When the g_xlate variable is set to t, the schematic net expressions [#net] and instance name expression [$instance] in the stimulus file are mapped into simulator names before including. When a netlist is specified as the design, this option must be set to nil.
Arguments
|
If set to |
|
Value Returned
|
A list of the stimulus file names is the output if the command is successful |
|
Example
stimulusFile( "tran.stimulus rf.stimulus" ?xlatenil)
=> ("tran.stimulus rf.stimulus")
Includes tran.stimulus and rf.stimulus in the simulator input file. No net and instance expressions are translated.
stimulusFile()
=> ("tran.stimulus" "rf.stimulus")
Returns the stimulusFile, if one was set earlier. Otherwise, it returns nil.
store
store(s_analysisTypet_filename) =>t_filename/ nil
Description
Requests that the simulator store its node voltages to a file.
You can restore this file in a subsequent simulation to help with convergence or to specify a certain starting point. This command is not available for the Spectre® circuit simulator, with which you can use the store/restore options: readns, readforce, write, or writefinal.
Arguments
|
Name of the file in which to store the simulator’s node voltages. |
Value Returned
|
Returns |
Example
store( ’dc "./storeFile" )
=>./storefile
Stores the simulator’s node voltages in a file named storeFile in the current directory.
store( ’tran "./tranStoreFile" )
=>./transtorefile
Stores the node voltages for a transient analysis in a file named tranStoreFile in the netlist (design) directory unless a full path is specified.
temp
temp(f_tempValue) =>s_tempValue/ nil
Description
Specifies the circuit temperature.
Arguments
Value Returned
|
Returns |
Example
temp( 125 )
=> ?125?
atof(temp( 125 ))
=> 125.0
Sets the circuit temperature to 125.
temp()
=> 125
Gets the value you had set for the circuit temperature. If you have not set a value for the temperature, it returns the default value.
tran
tran(g_fromValue g_toValue g_byValue) =>g_byValue/ nil
tran(g_toValue) =>undefined/ nil
Description
Specifies a transient analysis with limited options. If other analysis options are needed, use the analysis command.
To know more about this analysis, see the simulator-specific user guide.
Arguments
Value Returned
|
Returns |
Example
tran( 1u)
=> “1e-06”
Specifies a transient analysis to 1u for the Spectre® circuit simulator
tran( 0 1u 1n )
=> “1e-09”
Specifies a transient analysis from 0 to 1u by increments of 1n.
vcdFile
vcdFile(t_vcdFileName) =>t_vcdFileName/ nil
Description
Sets a VCD file for a given AMS or UltraSim OCEAN session. You also need to specify a VCD info file while using this command. You can specify only one VCD file for a session. You may use ocnDisplay(’vcdFile) to view the currently active VCD file.
Arguments
Value Returned
|
The VCD file name is the output if the command is successful. |
|
Example
vcdFile(“/tmp/vcdFile.dat”)
=> “/tmp/vcdFile.dat”
Specifies /tmp/vcdFile.dat as the VCD file to be used for current AMS-UltraSim OCEAN session.
vcdInfoFile
vcdInfoFile(t_vcdInfoFileName) =>t_vcdInfoFileName/ nil
Description
Sets a VCD info file for a given AMS or UltraSim OCEAN session when you have set UltraSim as the solver. You also need to specify a VCD file while using this command. You can specify only one VCD info file for a session. You may use ocnDisplay(’vcdInfoFile) to view the currently active VCD info file.
Arguments
Value Returned
|
The VCD info file name is the output if the command is successful. |
|
Example
vcdInfoFile(“/tmp/vcdInfoFile.dat”)
=> “/tmp/vcdInfoFile.dat”
Specifies /tmp/vcdInfoFile.dat as the VCD file to be used for current AMS-UltraSim OCEAN session.
vecFile
vecFile(t_vecFile[t_vecFile1…t_vecFileN] ) =>t_vecFile(s)/ nil
Description
Sets the vector files to be used in an AMS or UltraSim OCEAN session. You use the vecFile command to specify a list of vector files which go to control file. You may use ocnDisplay(’vecFile) to view the currently active vector files in an OCEAN session.
Arguments
Value Returned
|
The names of the vector file(s) are listed if the command is successful. |
|
Example
vecFile(“/tmp/vec.dat” “/tmp/vec2.dat”)
=> ("/tmp/vec1.dat" "/tmp/vec2.dat")
Specifies/tmp/vec.datand/tmp/vec.dat2as the vector files to be used for the current AMS-UltraSim OCEAN session.
hlcheck
hlcheck(
t_value
)
=> t / nil
Description
Sets or gets the value of the hlcheck option used in the vec_include statement in a netlist. You may use the ocnDisplay(’hlcheck) command to view the current value of hlcheck in an OCEAN session associated with vector files.
Arguments
|
Value to be set for the |
Value Returned
|
Returns |
|
Example
hlcheck( "1" )
=> t
Sets the value of the hlcheck option as 1 in the vec_include statement
hlcheck()
=> "1"
Returns the value of the hlcheck option
ocnAmsSetUnlNetlister
ocnAmsSetUnlNetlister( ) => t / nil
Description
Sets the netlister mode to AMS Unified Netlister for a given ams OCEAN session.
Arguments
Value Returned
Example
ocnAmsSetUnlNetlister()
t
Sets the netlister mode to AMS Unified Netlister for the current ams simulator session.
Return to top