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

5


OCEAN Environment Commands

This topic lists the OCEAN environment commands that let you start, control, and quit the OCEAN environment.

appendPath

path

prependPath

setup

history

ocnSetSilentMode

appendPath

appendPath(
t_dirName1 ... [ t_dirNameN ]
)
=> t_dirNameN / nil

Description

Appends a new path to the end of the search path list. You can append as many paths as you want with this command.

Arguments

t_dirName1

Directory path

t_dirNameN

Additional directory paths.

Value Returned

t_dirNameN

Returns the last path specified.

nil

Prints an error message if the paths cannot be appended.

Examples

Adds /usr/mnt/user/processA/models to the end of the current search path.

appendPath( "/usr/mnt/user/processA/models" ) 
=> "/usr/mnt/user/processA/models"

Adds /usr/mnt/user/processA/models and /usr/mnt/user/processA/models1 to the end of the current search path.

appendPath( "/usr/mnt/user/processA/models" "/usr/mnt/user/processA/models1") 
=> "/usr/mnt/user/processA/models"

path

path(
t_dirName1 ... [ t_dirNameN ]
) 
=> l_pathList / nil

Description

Sets the search path for included files.

This command overrides the path set earlier using any of the following commands:

Using this command is comparable to setting the Include Path for the direct simulator, or the modelPath for socket simulators in the Virtuoso® Analog Design Environment user interface. You can add as many paths as you want with this command.

Arguments

t_dirName1

Directory path

t_dirNameN

Additional directory path.

Value Returned

l_pathList

Returns the entire list of search paths specified.

nil

Prints an error message if the paths cannot be set.

Examples

Specifies that the search path includes /models followed by /tmp/models.

path( "~/models" "/tmp/models" ) 
=> "~/models" "/tmp/models"

Returns the search path last set.

path() 
=> "~/models" "/tmp/models"

Related Topics

appendPath

prependPath

prependPath

prependPath(
t_dirName1 ... [ t_dirNameN ]
)
=> undefined / nil

Description

Adds a new path to the beginning of the search path list. You can add as many paths as you want with this command.

Arguments

t_dirName1

Directory path

t_dirNameN

Additional directory path.

Value Returned

undefined

The return value for this command/function is undefined.

nil

Prints an error message if the paths cannot be added.

Examples

Adds /usr/mnt/user/processB/models to the beginning of the search path list.

prependPath( "/usr/mnt/user/processB/models" ) 
=> "/usr/mnt/user/processB/models"

Adds /usr/mnt/user/processB/models and /usr/mnt/user/processB/models2 to the beginning of the search path list.

prependPath( "/usr/mnt/user/processB/models" "/usr/mnt/user/processB/models2") 
=> "/usr/mnt/user/processB/models"

Returns the search path last set.

prependPath() 
=> "/usr/mnt/user/processB/models" "~/models" "/tmp/models"

Related Topics

path

appendPath

setup

setup(
[ ?numberNotation s_numberNotation ]
[ ?precision x_precision ]
[ ?reportStyle s_reportStyle ]
[ ?charsPerLine x_charsPerLine ] 
[ ?messageOn g_messageOn ] 
) 
=> t / nil

Description

Specifies default values for parameters.

Arguments

?numberNotation s_numberNotation

Specifies the notation for printed information.

Valid values: 'suffix, 'engineering, 'scientific, 'none

Default value: 'suffix

The format for each value is 'suffix: 1m, 1u, 1n, etc.; 'engineering: 1e-3, 1e-6, 1e-9, etc.; 'scientific: 1.0e-2, 1.768e-5, etc.; 'none.

The value 'none is provided so that you can turn off formatting and therefore greatly speed up printing for large data files.

?precision x_precision

Specifies the number of significant digits that are printed.
Valid values: 1 through 16

Default value: 6

?reportStyle s_reportStyle

Specifies the format of the output of the report command.
Valid values: spice, paramValPair

Default value: paramValPair

The spice format is:

...............Param1... Param2.... Param3

Name1.....value.........value..........value

Name2.....value.........value..........value

Name3.....value.........value..........value

The paramValPair format is:

Name1

Param1=value Param2=value Param3=value

Name2

Param1=value Param2=value Param3=value

Name3

Param1=value Param2=value Param3=value

?charsPerLine x_charsPerLine

Specifies the number of characters per line output to the display.

Default value: 80

?messageOn g_messageOn

Specifies whether error messages are turned on.     Valid values: t, nil

Default value: t, which specifies that messages are turned on.

Value Returned

t

The value is assigned to the parameter.

nil

Indicates an error.

Examples

Specifies that any printed information is to be in engineering mode by default.

setup( ?numberNotation 'engineering ) 
=> t

Specifies that 5 significant digits are to be printed.

setup( ?precision 5 ) 
=> t

Sets up number notation to suffix format, characters per line to 40, reporting style to Spice, and error message to ON.

setup(?numberNotation 'suffix ?charsPerLine 40 ?reportStyle 'spice ?messageOn t)

history

history(
[ x_number ] 
) 
=> t

Description

Displays the command history. By default, it the last twenty commands are listed from the current session and the most recently terminated session. More commands can be printed by giving a number as an argument.

Arguments

x_number

The number of previously entered commands to be listed. Default value: 20

Value Returned

t

Indicates that the commands from history have been listed.

Examples

history
1 simulator('spectre)
2 design( "tests" "simple" "schematic")
3 analysis( 'tran ?start 0 ?stop 1u ?step 10n )
4 run()
=> t

Displays the most recently used commands. To reuse any of these commands, use the following methods at the ocean prompt:

For example:

ocnSetSilentMode

ocnSetSilentMode(
g_silentMode
) 
=> t

Description

Filters out OCEAN warning and information messages and allows only error messages to be written. This functionality is useful while running the OCEAN scripts when you might want to skip all OCEAN messages except errors.

Arguments

g_silentMode

Accepts boolean values t or nil.

Set to t to suppress the OCEAN warning and information messages.

Set to nil to allow all OCEAN messages to be displayed.

Value Returned

t

Returns t to indicate the successful assignment of the passed argument.

Examples

Suppresses the ocean warning messages.

ocnSetSilentMode(t)
=> t

Displays the ocean warning messages

ocnSetSilentMode(nil)
=> t


Return to top
 ⠀
X