Product Documentation
OCEAN Reference
Product Version IC23.1, September 2023

6


Simulation Commands

The following OCEAN simulation commands let you set up and run your simulation.

ac

analysis

converge

connectRules

createFinalNetlist

createNetlist

dc

definitionFile

delete

deleteOpPoint

design

desVar

discipline

displayNetlist

envOption

evcdFile

evcdInfoFile

forcenode

globalSigAlias

globalSignal

ic

includeFile

modelFile

nodeset

noise

ocnCloseSession

ocnDisplay

ocnDspfFile

ocnSpefFile

ocnPspiceFile

ocnGetAdjustedPath

ocnGetInstancesModelName

off

option

restore

resultsDir

run

save

saveOpPoint

saveOption

simulator

solver

stimulusFile

store

temp

hlcheck

ocnAmsSetUnlNetlister

ac

ac(
g_fromValue
g_toValue
g_ptsPerDec
) 
=> undefined / nil
ac(
g_fromValue
g_toValue
t_incType
g_points
) 
=> undefined / nil

Description

Specifies an AC analysis.

To know more about this analysis, see the simulator-specific user guide.

Arguments

g_fromValue

Starting value for the AC analysis.

g_toValue

Ending value

g_ptsPerDec

Points per decade

t_incType

Increment type

Valid values:

For the Spectre® circuit simulator, "Linear", "Logarithmic", or "Automatic". For other simulators, "Linear" or "Logarithmic".

g_points

Specifies the linear or logarithmic value, depending on the value set for t_incType.

Value Returned

undefined

The return value for this function is undefined.

nil

Prints an error message if the analysis is not specified.

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 
[ ?analysisOption1 g_analysisOptionValue1 ]… [ ?analysisOptionN g_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].

Some simplified commands are available for basic SPICE analyses. See the ac, dc, tran, and noise commands. Use the ocnHelp( 'analysis ) command for more information on the analysis types for the simulator you choose.

Arguments

s_analysisType

Type of the analysis. The valid values for this argument depend on the analyses that the simulator contains. The basic SPICE2G-like choices: 'tran, 'dc, 'ac, and 'noise.

?analysisOption1 g_analysisOptionValue1

Analysis option. The analysis options available depend on which simulator you use. (See the documentation for your simulator.) If you are using the Spectre® circuit simulator, see the information about analysis statements in the Virtuoso Spectre Circuit Simulator Reference for analysis options you can use.

?analysisOptionN g_analysisOptionValueN

Any subsequent analysis option. The analysis options that are available depend on which simulator you use. (See the documentation for your simulator.)

Value Returned

undefined

The return value for this function is undefined.

nil

Returns nil and prints an error message if there is a problem specifying the analysis.

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

Analysis Statements

converge

converge( 
s_convName
t_netName1
f_value1 ... [ t_netNameN f_valueN ]
) 
=> undefined / nil

Description

Sets convergence criteria on nets.

Arguments

s_convName

Name of the convergence type. Valid values are nodeset ic and forcenode.

forcenode is not supported for Spectre.

t_netName1

Name of the net to which you want to set convergence criteria.

f_value1

Voltage value for the net.

t_netNameN

Name of the additional net.

f_value

Voltage value for the additional net.

Value Returned

undefined

The return value for this function is undefined.

nil

Prints an error message if the function fails.

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

Helping Simulations to Converge

connectRules

connectRules(
t_ruleName
[ ?lib t_libName ] 
[ ?view t_viewName ] 
[ ?baseRule t_baseRule ]
[ ?moduleInfo l_moduleInfo ] 
[ ?resolutionInfo l_resolutionInfo ] 
[ ?commonParam l_commonParam ]
[ ?userDefined s_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.

This command is applicable only when ams is the selected simulator.

Arguments

t_ruleName

Name of the connect rule that you want to use in the current session.

t_libName

Name of the library that contains a list of user-compiled connect rules. If you do not specify this, the connect rules are assumed to be in the default location.

t_viewName

Name of the view of the selected cell.

t_baseRule

Name of the connect rule that you want to modify.

l_moduleInfo

Arguments that need to be updated for a specified connect rule. The arguments may include s_mode, s_direction1, s_direction2, s_discipline1 and s_discipline2.

Valid values for s_mode are null, split, merged.

s_direction1 and s_direction2 work as a pair. Valid combinations are null, input/output, output/input, inout/inout.

s_discipline1 and s_discipline2 also work as a pair. Either both the arguments must be set to null or they should both have values.

t_resolutionInfo

Names of disciplines that need to be resolved to another discipline. The value specified overwrites the l_resolutionInfo in the base rule or in the existing connect rule.

t_commonParam

One or more parameters that you want to modify for all modules or a set of modules. Although the same result can be achieved by using the l_moduleInfo argument, l_commonParam facilitates updating parameters for all modules in one go.

s_userDefined

Name of the user defined connect rule that you want to use in the current session. Specify 3step as the value of s_userDefined and specify t_ruleName, t_libName and t_viewName to add a user defined connect rule for the AMS UNL flow. Specify irun as the value of s_userDefined and specify t_ruleName, s_fileName or both to add a user defined connect rule for the OSS-based netlister with irun flow. Any other argument specified when adding a user defined connect rule will be ignored.

s_tag

Indicates that no connect rules are to be used for the current session.

Value Returned

t

The specifed connect rules are set.

nil

Prints an error message.

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.

This command works only for socket simulators. For direct simulators, such as Spectre, use createNetlist instead.

Arguments

None

Value Returned

t

The final netlist is created.

nil

Prints an error message.

Examples

Creates the final netlist for the current simulation run.

createFinalNetlist()
=> t

createNetlist

createNetlist(
[ ?recreateAll g_recreateAll ]
[ ?display g_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.

This command does not work with socket simulators.

Arguments

?g_recreateAll g_recreateAll

Specifies if the netlist needs to be recreated or not.

?display g_display

Specifies if the netlist is to be displayed or not.

Value Returned

t_fileName

Returns the name of the simulator input file.

nil

Indicates an error.

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"
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:
ddsRefresh( ?cellview t )
=> t
createNetlist( ?recreateAll t )
=> "/usr/foo/netlist/input.scs"

Related Topics

design

ddsRefresh

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

t_compName

Name of the source or component to be swept by Spectre.

t_compParam

Indicates that the component parameter is to be swept by Spectre.

g_fromValue

Starting value for the DC analysis.

g_toValue

Ending value

g_byValue

The increment at which to step through the analysis.

Value Returned

undefined

The return value for this function is undefined.

nil

Prints an error message if the analysis is not specified.

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.

This command does not work with socket simulators.

Arguments

t_fileName

The name of the definition file that would typically contain functions or parameter statements.

Value Returned

l_fileNames

Returns a list of the specified file names.

nil

Indicates an error.

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

s_command

Command that was initially used to add the items that are now being deleted.

Valid values: analysis, connectRules, discipline, globalSignal, desVar, path, save, ic, forcenode, and nodeset

g_commandArg1

Argument corresponding to the specified command.

g_commandArg2

Additional argument corresponding to the specified command.

Value Returned

t

Indicates that the the information is deleted.

nil

Indicates an error.

Examples

Deletes all the saves.

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
[ @rest l_args ]
)
=> t / nil

Description

Deletes the specified operating point instance.

Arguments

t_instName

Name of the operating point instance to be deleted.

@rest l_args

List of optional arguments that can be passed to this function.

Values Returned

t

The specified operating point instance is deleted.

nil

Indicates an error.

Examples

This example deletes the operating point instance I8/Q3.

deleteOpPoint( "/I8/Q3" )

design

design( 
t_cktFile | t_lib t_cell t_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

t_cktFile

Directory path to the netlist followed by the name of the netlist file. Name of the netlist file must be netlist. The netlistHeader and netlistFooter files must be in the same directory.

Otherwise, cktFile is a pre-existing netlist file from another source.

t_lib

Name of the library that contains the design.

t_cell

Name of the design.

t_view

View of the design (typically schematic).

t_mode

The mode in which the design should be opened. The value can be r, w or a, representing read, write, and append, respectively. The default mode is append. Read-only designs can be netlisted only by direct netlisters, and not socket. The w mode should not be used as it overwrites the design.

Value Returned

t_cktFile

Returns the name of the design.

l_(lib cell view)

Returns the name of the maestro view.

nil

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_desVar1 f_value1 … [ t_desVarN f_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

t_desVar1

Name of the design variable.

f_value1

Value for the design variable.

t_desVarN

Name of an additional design variable.

f_valueN

Value for the additional design variable.

Value Returned

undefined

The return value for this command or function is undefined.

nil

Prints an error message if the assignments fail.

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" )

Sets a to 1k/2 or 500.

evalstring is necessary because desVar returns a string.
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.

This command is applicable only for AMS simulator.

Arguments

g_discipline1

Name of the discrete discipline to be added.

g_discipline2

Names of additional discrete disciplines to be added.

Value Returned

t

The discrete disciplines are added.

nil

Prints an error message.

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.

This command is applicable only for AMS simulator.

Arguments

None

Value Returned

t

The concatenated design information file is displayed.

nil

Prints an error message.

Examples

Displays the concatenated design information file.

displayNetlist()
=> t

envOption

envOption( 
s_envOption1 g_value1 … [ s_envOptionN g_valueN ] 
) 
=> undefined / nil

Description

Sets environment options.

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)
To specify an include file, use the includeFile command instead of the envOption command. Similarly, to set a model path, use the path command instead of the envOption command.

Arguments

s_envOption1

Name of the first environment option to set.

g_value1

Value for the environment option to be set.

s_envOptionN

Name of an additional environment option to set.

g_valueN

Value for the additional environment option to be set.

Value Returned

undefined

The return value for this command or function is undefined.

nil

Indicates an error.

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.

This command is applicable for the UltraSim simulators.

Arguments

t_evcdFileName

The name of the EVCD file to be used for session.

Value Returned

t_evcdFileName

Path to the EVCD information file is returned.

nil

Indicates an error

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.

This command is applicable only for the UltraSim simulator.

Arguments

t_evcdInfoFileName

The name of the EVCD information file to be included.

Value Returned

t_evcdInfoFileName

Path to the EVCD information file is returned.

nil

Indicates an error.

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_netName1 f_value1 … [ t_netNameN f_valueN ] 
) 
=> undefined / nil

Description

Holds a node at a specified value.

This command is not available for Spectre. Refer to the documentation for your simulator to see if this feature is available for your simulator.

Arguments

t_netName1

Name of the net.

f_value1

Voltage value for the net.

t_netNameN

Name of an additional net.

f_valueN

Voltage value for the net.

Value Returned

undefined

The return value for this command or function is undefined.

nil

Prints an error message.

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.

This command is applicable only when AMS is the simulator.

Arguments

g_signalList(n)

A list of signals that are to be marked as aliases of each other.

Value Returned

t

The previous signal aliases are removed successfully and new aliases are created according to the specified signal lists.

nil

Prints an error message.

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

globalSignal( 
[ ?name t_signalName ] 
[ ?lang t_langName ] 
[ ?wireType t_wireType ] 
[ ?discipline t_discipline ]
[ ?ground t_ground ]
@Rest args
) 
=> 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.

This command is applicable only when AMS is the simulator.

Arguments

?name t_signalName

The name of the global signal to be added.

?lang t_langName

The namespace within which the signal is entered. It is used to map the signal name to Verilog-AMS.

Valid Values: CDBA, Spectre, Spice, and Verilog-AMS

Default Value: CDBA

?wireType t_wireType

Indicates the Verilog type of the signal declaration.

Valid Values: wire, supply0, supply1, tri, tri0, tri1, triand, trior, trireg, wand, wor, and wreal

Default Value: wire

?discipline t_discipline

A string value to indicate the discipline of the signal.

?ground t_ground

Valid Values: YES, NO

Default Value: NO

@Rest args

List of optional arguments that can be passed to this function.

Value Returned

t

The specified global signal is added or modified successfully.

nil

Prints an error message.

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_netName1 f_value1 … [ t_netNameN f_valueN ] 
) 
=> undefined / nil

Description

Sets initial conditions on nets in a transient analysis.

Arguments

t_netName1

Name of the net.

f_value1

Voltage value for the net.

t_netNameN

Name of an additional net.

f_valueN

Voltage value for the net.

Value Returned

undefined

The return value for this command or function is undefined.

nil

Prints an error message.

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.

Notes:

  1. This command is not available for the direct simulator. Use the modelFile or stimulusFile command instead.
  2. 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 .c or .C suffix), and manually add the include file.

Arguments

t_fileName

Name of the file to include in the final netlist.

Value Returned

t_fileName

Returns the name of the file if successful.

nil

Returns nil and prints an error message otherwise.

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

g_modelFile1

This argument can be a string to specify the name of the model file.

g_modelfile2

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

l_modelfile

A list of all the model file/section pairs.

nil

Returned when no file section pairs have been specified with the current call or a previous call of this command. The nil value is also returned when an error has been encountered.

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_netName1 f_value1 … [ t_netNameN f_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

t_netName1

Name of the net.

f_value1

Voltage value for the net.

t_netNameN

Name of an additional net.

f_valueN

Voltage value for the net.

Value Returned

undefined

The return value for this command/function is undefined.

nil

Returns nil and prints an error message otherwise.

Example

nodeset( "net1" 5 "net34" 2 )

Sets the initial estimates of "net1" to 5 and "net34" to 2.

noise

noise( 
t_output 
t_source
)
=> undefined / nil

Description

Specifies a noise analysis.

This command cannot be used with the spectre simulator.

Arguments

t_output

Output node

t_source

Input source

Value Returned

undefined

The return value for this command/function is undefined.

nil

Returns nil and prints an error message If there is a problem specifying the analysis.

Example

noise( "n1" "v1" )

Specifies a noise analysis.

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

t

Returns t when the current session is successfully closed.

nil

Returns nil if there is a problem closing the active session.

Example

ocnCloseSession() 
=> t

Closes the current OCEAN session.

ocnDisplay

ocnDisplay(
[ ?output t_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

?output t_filename

File in which to write the information. The ocnDisplay command opens the file, writes to the file, then closes the file. If you specify the filename without a path, the ocnDisplay command creates the file in the directory pointed to by your SKILL Path. To find out what your SKILL path is, type getSkillPath() at the OCEAN prompt.

p_port

Port (previously opened with outfile) through which to append the information to a file. You are responsible for closing the port. See the outfile command for more information.

s_command

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 design, analysis, tran, ac, dc, noise, resultsDir, temp, option, desVar, path, includeFile, modelFile, stimulusFile, definitionFile, saveOption, envOption, save, converge, ic, forcenode, nodeset, simulator, setup, restore, saveSubckt

g_commandArg1

Argument corresponding to the specified command.

g_commandArg2

Additional argument corresponding to the specified command.

Value Returned

t

Displays the information and returns t.

nil

Returns nil and prints an error message if there are problems displaying the information.

Example

ocnDisplay( ’optimizeGoal ) 
=> t

Displays all the optimizeGoal information.

ocnDisplay( ’analysis ’tran ) 
=> t

Displays only transient analyses.

ocnDisplay( ’save ) 
=> t

Displays all the keeps.

ocnDisplay( ?output myPort ’analyis ) 
=> t

Displays and writes all the analyses to the port named myPort.

ocnDspfFile

ocnDspfFile( 
t_dspfFile [ t_dspfFile1t_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.

This command is applicable for Spectre simulator. For AMS, it works only when Spectre is selected as the solver.

Arguments

t_dspfFile

The name of the parasitic (dspf, spf) file to be included.

t_dspfFile1…t_dspfFileN

The name of the additional parasitic (dspf, spf) files to be included.

Value Returned

t_dspfFile

Lists the names of the parasitic (dspf, spf) files.

nil

Returns nil if there are problems displaying the information.

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_SpefFile1t_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.

This command is applicable for Spectre simulator. For AMS, it works only when Spectre is selected as the solver.

Arguments

t_SpefFile

The name of the parasitic (spef) file to be included.

t_SpefFile1…t_SpefFileN

The name of the additional parasitic (spef) files to be included.

Value Returned

t_SpefFile

Lists the names of the parasitic (spef) files.

nil

Returns nil if there are problems displaying the information.

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_PSpiceFile1t_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.

This command is applicable for the Spectre simulator. For AMS, it works only when Spectre is selected as the solver.

Arguments

t_PSpiceFile

The name of the PSpice file to be included.

t_PSpiceFile1…t_PSpiceFileN

The name of the additional PSpice files to be included.

Value Returned

t_PSpiceFile

Lists the names of the PSpice files.

nil

Returns nil if there are problems displaying the information.

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

t_libName

Library name of the top cellview of the design.

t_cellName

Cell name of the top cellview of the design.

t_viewName

View name of the top cellview of the design.

t_netName

A single concatenated string for the instance hierarchy with "/" as the hierarchy separator in the string.

Value Returned

t_adjustedPath

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.

nil

Returns nil if there is a problem returning the adjusted path.

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

l_instance

Name of the instance in the simulation result or the schematic.

Value Returned

l_instance

The list of instance names and models used by instance.

nil

Returns nil if no result is open.

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

s_command

Command that was initially used to add the items that are now being turned off.

Valid value: restore

g_commandArg1

Argument corresponding to the specified command.

g_commandArg2

Additional argument corresponding to the specified command.

Value Returned

t

Returns t if the information is turned off.

nil

Returns nil and prints an error message if there are problems turning off the information.

Example

off( ’restore ) 
=> t

Turns off the restore command.

off( restore ’tran ) 
=> t

Turns off the transient restore command.

option

option( 
[ ?categ s_categ ]
s_option1 g_value1 [ s_option2 g_value2 ] … ) 
=> undefined / nil

Description

Specifies the values for built-in simulator options. You can specify values for as many options as you want.

Arguments

s_categ

Type of simulator to be used.

Valid values: analog if the options are for an analog simulator, digital for a digital simulator, or mixed for a mixed-signal simulator

Default value: analog

s_option1

Name of the simulator option.

g_value1

Value for the option.

s_option2

Name of an additional simulator option.

g_value2

Value for the option.

Value Returned

undefined

The return value for this command/function is undefined.

nil

Returns nil and prints an error message if there are problems setting the option.

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.

Restore is available for the cdsSpice and hspiceS simulators.

Arguments

s_analysisType

Type of the analysis.

Valid values: dc or tran

t_filename

Name of the file containing the saved state.

Value Returned

undefined

The return value for this command/function is undefined.

nil

Returns nil and prints an error message if there are problems restoring the information.

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.

The directory you specify with resultsDir is also where the simulator.out file is created.
Some simulators are designed to always put their results in a specific location. For these simulators, 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

t_dirName

Directory where the PSF files are to be stored.

Value Returned

undefined

The return value for this command/function is undefined.

nil

Returns nil and prints an error message if there is a problem with that directory.

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(
[ ?jobName t_jobName ] 
[ ?drmsCmd t_drmsCmd ])
=> s_jobName / nil
run( 
[ analysisList ]
[ ?jobName t_jobName ]
[ ?host t_hostName ] 
[ ?queue t_queueName ]
[ ?startTime t_startTime ]
[ ?termTime t_termTime ] 
[ ?dependentOn t_dependentOn ]
[ ?mail t_mailingList ] 
[ ?block s_block ]
[ ?notify s_notifyFlag ] 
[ ?lsfResourceStr s_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

parametric analyses

paramRun

Arguments

analysisList

List of analyses to be run with the run command.

s_analysisType1

Name of a prespecified analysis to be simulated.

s_analysisTypeN

Name of another prespecified analysis to be simulated.

The following arguments apply only when the distributed processing mode is enabled:

t_jobName

If the name given is not unique, an integer is appended to create a unique job name.

t_hostName

Name of the host on which to run the analysis. If no host is specified, the system assigns the job to an available host.

t_queueName

Name of the queue. If no queue is defined, the analysis is placed in the default queue.

t_startTime

Desired start time for the job. If dependencies are specified, the job does not start until all dependencies are satisfied.

t_termTime

Termination time for job. If the job has not completed by the specified termination time, the job is aborted.

t_dependentOn

List of jobs on which the specified job is dependent. The job is not started until dependent jobs are completed.

t_mailingList

List of users to be notified when the analysis is complete.

s_block

When s_block is not set to nil, the OCEAN script halts until the job is complete.

Default value: nil

s_notifyFlag

When not set to nil, the job completion message is echoed to the OCEAN interactive window.

Default value: t

s_lsfResourceStr

An LSF Resource Requirement string to submit a job. It is effective only in the LSF mode.

sgeHardResourceStr

Requirements for hardware resources for the job to be run in the SGE mode.

sgeSoftResourceStr

Requirements for software resources for the job to be run in the SGE mode.

sgePriority

Priority for the job being submitted in the SGE mode.

sgeNoOfProcessors

Number of processors to be used in the SGE mode.

sgeParallelEnvName

Name of the parallel environment to be used in the SGE mode.

t_drmsCmd

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

s_jobName

Returns the job name of the job submitted. The job name is based on the jobName argument. If the job name submitted is not unique, a unique identifier is appended to the job name. This value is returned for nonblocking distributed mode.

t_dirName

Returns the name of the directory in which the results are stored. This value is returned for local and blocking distributed modes.

nil

Returns nil and prints an error message if there is an error in the simulation. In this case, look at the yourSimulator.out file for more information. (This file is typically located in the psf directory.)

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

Starts the simulation.

run(’tran, ’ac)

Runs only the tran and ac analyses.

run(’dc)

Runs only the dc analysis.

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(
[ ?categ s_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

s_categ

Type of simulator to be used.

Valid values: analog, digital

Default value: analog

Note: digital is not available.

s_saveType

Type of outputs to be saved.

Valid values:

v: Specifies that a list of subsequent net names be saved.

i:Specifies that a list of subsequent currents be saved.

all: Specifies that all nets and all currents are to be saved.

allv: Specifies that all voltages are to be saved.

alli: Specifies that all currents are to be saved.

Default value: allv

t_saveName1

Name of the net, device, or other object.

t_saveNameN

Name of another net, device, or object.

Value Returned

undefined

The return value for this command/function is undefined.

nil

Returns nil and prints an error message if there is a problem saving the outputs.

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
[ ?operatingPoints l_operatingPoints ]
)
=> t / nil

Description

Specifies the operating point parameters to be saved for a given instance.

Arguments

t_instName

Name of the instance for which the parameters are to be saved.

?operatingPoints l_operatingPoints

List of the operating point parameters.

Values Returned

t

Returns t when the function runs successfully.

nil

Returns nil if there is an error.

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_option1 g_optionValue1 ]…[ s_optionN g_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.

The 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

s_option1

Save option. The save options that are available depend on which simulator you use. (See the documentation for your simulator.)

g_optionValue1

Value for the save option.

s_optionN

Any subsequent save option. The save options that are available depend on which simulator you use. (See the documentation for your simulator.)

g_optionValueN

Value for the save option.

Value Returned

undefined

The return value for this command/function is undefined.

nil

Returns nil if there are problems specifying options.

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

s_simulator

Name of the simulator.

Value Returned

s_simulator

Returns the name of the simulator.

nil

Returns nil and prints an error message if the simulator is not registered with the Virtuoso® Analog Design Environment through OASIS. If the simulator is not registered, the simulator from the preceding session is retained.

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.

This command is applicable only when ams is the simulator.

Arguments

s_solver

Name of the solver.

Value Returned

s_solver

Returns the name of the solver.

nil

Returns nil and prints an error message if the specified solver is not registered with the Virtuoso® Analog Design Environment through OASIS. If the solver is not registered, the solver from the preceding session is retained.

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_fileName2t_fileNameN ]
[ ?xlate g_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.

This command does not work with socket simulators.

Arguments

t_fileName

The name of the stimulus file to be included.

t_fileName2…t_fileNameN

The names of the additional stimulus files to be included.

g_xlate

If set to t, net and instance expressions are translated to simulator names. The default value of the g_xlate variable is t.

Value Returned

l_fileNames

A list of the stimulus file names is the output if the command is successful

nil

Otherwise nil is returned

Example

stimulusFile( "tran.stimulus rf.stimulus" ?xlate nil) 
=> ("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_analysisType 
t_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.

store is available for the cdsSpice and hspiceS simulators.

Arguments

s_analysisType

Type of the analysis.

Valid values: dc or tran

t_filename

Name of the file in which to store the simulator’s node voltages.

Value Returned

t_filename

Returns the filename.

nil

Returns nil and prints an error message if there are problems storing the information to a file.

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

f_tempValue

Temperature for the circuit.

Value Returned

s_tempValue

Returns the temperature specified.

nil

Returns nil and prints an error message if there are problems setting the temperature.

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.

The second instance of the tran command is valid only with the spectre simulator.

Arguments

g_fromValue

Starting time for the analysis

g_toValue

Ending time

g_byValue

Increment at which to step through the analysis

Value Returned

undefined

The return value for this command/function is undefined.

nil

Returns nil and prints an error message if the analysis is not specified.

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.

This command is applicable for AMS and UltraSim simulators. For AMS, it works only when UltraSim is the solver.

Arguments

t_vcdFileName

The name of the VCD file to be used for session.

Value Returned

t_vcdFileName

The VCD file name is the output if the command is successful.

nil

Otherwise, nil is returned.

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.

This command is applicable for AMS and UltraSim simulators. For AMS, it works only when UltraSim is the solver.

Arguments

t_vcdInfoFileName

The name of the VCD info file to be included.

Value Returned

t_vcdInfoFileName

The VCD info file name is the output if the command is successful.

nil

Otherwise, nil is returned.

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_vecFile1t_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.

This command is applicable for AMS and UltraSim simulators. For AMS, it works only when UltraSim is the solver.

Arguments

t_vecFile

The name of the vector file to be included.

t_vecFile1…t_vecFileN

The names of the additional vector files to be included.

Value Returned

t_vecFile

The names of the vector file(s) are listed if the command is successful.

nil

Otherwise, nil is returned.

Example

vecFile(“/tmp/vec.dat” “/tmp/vec2.dat”)
=> ("/tmp/vec1.dat" "/tmp/vec2.dat")
Specifies /tmp/vec.dat and /tmp/vec.dat2 as 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.

This command is applicable only when one or more vector files are specified in a given ’spectre’ OCEAN session.

Arguments

t_value

Value to be set for the hlcheck option. Possible values include "off", "0", and "1". The value "off" disables the hlcheck option in the vec_include statement.

Value Returned

t

Returns t if the hlcheck option is set with the value supplied as argument

nil

Otherwise, returns nil and an error message is displayed

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

None.

Value Returned

t

Returns t if successful

nil

Returns nil otherwise

Example

ocnAmsSetUnlNetlister()
t

Sets the netlister mode to AMS Unified Netlister for the current ams simulator session.


Return to top
 ⠀
X