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

7


Data Access Commands

The data access commands let you open results and select different types of results to analyze. You can get the names and values of signals and components in the selected results, and you can print different types of reports.

In this chapter, you can find information on the following data access commands

dataTypes

deleteSubckt

displaySubckt

getData

getResult

i

openResults

outputParams

outputs

phaseNoise

pv

resultParam

results

selectResult

sp

sprobeData

sweepNames

sweepValues

sweepVarValues

v

vswr

zm

zref

dataTypes

dataTypes(
) 
=> l_dataTypes / nil

Description

Returns the list of data types that are used in an analysis previously specified with selectResult.

Arguments

None.

Value Returned

l_dataTypes

Returns the list of data types.

nil

Returns nil and an error message if the list of datatypes cannot be returned.

Example

selectResult( ’dcOpInfo )
dataTypes() => ("bjt" "capacitor" "isource" "mos2" "resistor" "vsource")

Returns the data types used in the selected file, in this case, dcOpInfo.

Example 2:

selectResult( ’model )
dataTypes() => ("bjt" "mos2")

Returns the data types used in the selected file, in this case, model.

deleteSubckt

deleteSubckt(
t_name
)
=> t / nil

Description

Deletes the specified subcircuit instance saved using the saveSubckt command.

Arguments

t_name

The name of the subcircuit instance.

Value Returned

t

Returns t if the selected subcircuit instances is deleted.

nil

Returns nil if the name of the specified instance is not correct.

Examples

The following example deletes the subcircuit instance I0.

deleteSubckt("/I0")
=> t

displaySubckt

displaySubckt(
t_args
t_outPort
)
=> t / nil

Description

Prints the subcircuit information to the output file.

Arguments

t_args

The value of this argument should always be nil.

t_outPort

The name of the file to save the subcircuit information. If you do not specify the location with the filename, the file is saved in the current working directory.

Value Returned

t

Returns t if the subcircuit information is printed in the specified output file.

nil

Returns nil if the name of the output file is not specified, or an error occurred.

Examples

The following example prints the subcircuit information in the subckts.txt file:

fptr = outfile("/home/krajiv/subckts.txt")
=> port:"/home/krajiv/subckts.txt"
displaySubckt(nil fptr)
=> t
close(fptr)
=> t

getData

getData(
t_name 
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ] )
=> x_number / o_waveform / nil

Description

Returns the number or waveform for the signal name specified.

The type of value returned depends on how the command is used.

Arguments

t_name

Name of the signal.

s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

x_number

Returns an integer simulation result.

o_waveform

Returns a waveform object. A waveform object represents simulation results that can be displayed as a series of points on a grid. (A waveform object identifier looks like this: srrWave:XXXXX.)

nil

Returns nil and an error message if the value cannot be returned.

Example

getData( "/net6" ) => srrWave:25178234

Returns the number or waveform for net6. In this example, the return value is equivalent to
v( "/net6" ).

getData( "/V1" ?result ’ac ) 
=> srrWave:96879364

Returns the number or waveform for V1. In this example, the return value is equivalent to:
i( "/V1" ?result ’ac ).

selectResult( ’tran ) =>
ocnPrint( getData( "net1" ) ) =>

The getData( "net1" ) command passes a waveform to the ocnPrint command. The ocnPrint command then prints the data for the waveform. In this example, the return value is equivalent to:
(v( "net1" )).

ocnPrint( getData( "net1" ?result ’tran ?resultsDir "./simulation/testcell/spectre/schematic/psf")

Returns a signal on net1 for the tran result stored in the path "./simulation/testcell/spectre/schematic/psf".

To identify the data type of the value returned by the getData command, you can use the type SKILL function. For scalar values, the type function returns the name of data type. For example, integer or flonum. For waveforms, it returns other.
x=getData("/net10")  
type(x)

The example given above returns other.

x=ymax(VT("/net10"))
type(x)

This will return flonum.

getResult

getResult (
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ]
) 
=> o_results / nil

Description

Gets the data object for a specified analysis without overriding the status of any previously executed selectResult() or openResults() commands.

Returns the data object for a particular analysis similar to the selectResult() function does. Unlike the selectResult() function, all subsequent data access commands will not internally use this information.

Arguments

s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

o_results

Returns the object representing the selected results.

nil

Returns nil and an error message if there are problems accessing the analysis.

Example

getResult( ?result ’tran )

i

i( 
t_component
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ] 
) 
=> o_waveform / nil

Description

Returns the current through the specified component.

Arguments

t_component

Name of the component.

s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

o_waveform

Returns a waveform object. A waveform object represents simulation results that can be displayed as a series of points on a grid. (A waveform object identifier looks like this: srrWave:XXXXX.).

nil

Returns an error message and nil if there is a problem.

Example

selectResult( ’tran )
i( "/R1" ) 

Returns the current through the R1 component.

ocnPrint( i( "/R1" ) ) 

Prints the current through the R1 component.

ocnPrint( i( "/R1" ?result ’dc ) ) 

Prints the current through the R1 component with respect to the dc swept component.

ocnPrint( i( "/R1" ?resultsDir "./test2/psf" ?result ’dc ) ) 

Prints the current through the R1 component with respect to dc for the results from a different run (stored in test2/psf).

ocnHelp

ocnHelp( 
[ ?output t_filename | p_port ]
[ s_command ]
) 
=> t / nil

Description

Provides online help for the specified command.

If no command is specified, provides information about how to use help and provides the different categories of information contained in the help library. If you provide a filename as the ?output argument, the ocnHelp command opens the file and writes the information to it. If you provide a port (the return value of the SKILL outfile command), the ocnHelp command appends the information to the file that is represented by the port. If you do not specify ?output, the output goes to standard out (stdout).

Arguments

t_filename

File in which to write the information. The ocnHelp command opens the file, writes to the file, and closes the file. If you specify the filename without a path, the ocnHelp 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 for which you want help.

Value Returned

t

Displays the online help and returns t.

nil

Returns nil and an error message if help cannot be displayed.

Example

ocnHelp() 
=> t

Displays information about using online help.

ocnHelp( ’analysis ) 
=> t

Displays help for the analysis command.

ocnHelp( ?output "helpInfo" ) 
=>
t

Writes information about using online help to a file named helpInfo.

simulator('spectre)
ocnHelp('envOptions)

Displays a list of environment options that can be set for a simulator. First, set the simulator and then run the ocnHelp command.

ocnResetResults

ocnResetResults(
)
=> t

Description

Unsets the results opened by the openResults command. Use this command to return to the state that existed prior to using the openResults command.

Arguments

None.

Value Returned

t

Resets the results and returns t.

Example

getResult( ?result ’tran )

Returns nil when no results have been opened.

openResults( "./psf" )

Makes getResult return valid object.

ocnResetResults()

Resets the results opened by openResults and makes getResult return nil.

openResults

openResults( 
s_jobName | t_dirName 
[ g_enableCalcExpressions ] 
) 
=> t_dirName / nil

Description

Opens simulation results stored in PSF files or opens the results from a specified job, depending on which parameter is called.

When openResults passes a symbol, it interprets the value as a job name and opens the results for the specified job. s_jobName is a job name and is defined when a run command is issued. When openResults passes a text string, it opens simulation results stored in PSF files in the specified directory. The results must have been created by a previous simulation run through OCEAN or the Virtuoso® Analog Design Environment. The directory must contain a file called logFile and might contain a file called runObjFile. When you perform tasks in the design environment, the runObjFile is created. Otherwise, only logFile is created. If you want to find out which results are currently open, you can use openResults with no argument. The directory for the results that are currently open is returned.

Note: If you run a successful simulation with distributed processing disabled, the results are automatically opened for you. Also, a job name is generated by every analysis, even if distributed processing is not enabled.

Arguments

s_jobName

The name of a distributed process job. s_jobName is a job name and is defined when a run command is issued.

t_dirName

The directory containing the PSF files.

g_enableCalcExpressions

An optional argument, which when set to t, allows the evaluation of Calculator expressions. For this argument to work, the directory mentioned in t_dirName must be a psf directory and must contain runObjFile.
The default value for this argument is t.

Value Returned

t_dirName

The directory containing the PSF files.

nil

Returns nil and an error message if there are problems opening the results.

Example

openResults( "./simulation/opamp/spectre/schematic/psf" ) 
=> "./simulation/opamp/spectre/schematic/psf"

Opens the results in the psf directory within the specified path.

openResults( "./psf" ) 
=> psf

Opens the results in the psf directory in the current working directory.

openResults( "./psf" t ) 
=> psf

Opens the results in the psf directory in the current working directory. It also allows the evaluation of the Calculator expression.

outputParams

outputParams(
t_compType 
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ] 
)
=> l_outputParams / nil

Description

Returns the list of output parameters for the specified component.

You can use the dataTypes command to get the list of components for a particular set of results.

You can use any of the parameters in outputParams as the second argument to the pv command.

Arguments

t_compType

Name of a component.

?result s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

?resultsDir t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

l_outputParams

Returns the list of parameters.

nil

Returns nil and an error message if there are no associated parameters or if the specified component (compType) does not exist.

Example

selectResult( ’dcOpInfo ) 
dataTypes() => ("bjt" "capacitor" "isource" "mos2" "resistor" "vsource")
outputParams( "bjt" )

Selects the dcOpInfo results, returns the list of components for these results, and returns the list of output parameters for the bjt component.

outputParams("bjt" ?result ’dcOpInfo ?resultsDir "/VADE615/simulation/ampTest/spectre/schematic/psf")

Returns a list of output parameters for the bjt component for dcOpInfo (dc analysis with save dc operating point) results stored at the location ./psf.

outputs

outputs(
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ] 
[ ?type t_signalType ]
) 
=> l_outputs / nil

Description

Returns the names of the outputs whose results are stored for an analysis. You can plot these outputs or use them in calculations.

Arguments

?result s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

? resultDir t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

?type t_signalType

Data type of the signal.

Value Returned

l_outputs

Returns the list of outputs.

nil

Returns nil and an error message if there are problems returning the names of the stored outputs.

Example

outputs() 
=> ( "net13" "net16" "net18" )

Returns the names of the outputs for the PSF file selected with selectResult.

outputs( ?type "V" ) 

Returns all the signal names that are node voltages. The dataType (signal ) returns the data type of the signal.

outputs(?result "tran" ?resultsDir "./psf") 
=> ( "net11" "net15" "net17")

Returns the names of the outputs for the tran results stored at the location ./psf.

phaseNoise

phaseNoise(
g_harmonic S_signalResultName 
[ ?result s_noiseResultName [ ?resultsDir t_resultsDir ] ]
) 
=> o_waveform / nil

Description

Returns the phase noise waveform which is calculated using information from two PSF data files.

This command should be run on the results of the Spectre pss-pnoise analysis.

Arguments

g_harmonic

List of harmonic frequencies.

?result S_signalResultName

Name of the result that stores the signal waveform. Use the results() command to obtain the list results.

?resultsDir s_noiseResultName

Name of the result that stores the "positive output signal" and "negative output signal" noise waveforms. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the S_noiseResultName argument. Both the S_signalResultName and S_noiseResultName arguments are read from this directory. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

o_waveform

Waveform representing the phase noise.

nil

Returns nil if there is an error.

Example

plot(phaseNoise(0 "pss-fd.pss"))
phaseNoise(1 "pss_fd" ?result "pnoise" ?resultsDir “./PSF")

pv

pv( 
t_name
t_param 
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ] 
) 
=> g_value / nil

Description

Returns the value of the specified component parameter. You can use the outputParams command to get the list of parameters for a particular component.

Arguments

t_name

Name of the node or component.

t_param

Name of the parameter.

?result s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result that was set using the selectResult command. The default is the current result selected using the selectResult command.

To get the correct value of the variables while running parametric analysis, use the designParamVals value for the resultName argument.

?resultsDir t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory that was set using the openResults command. The default is the current results directory set using the openResults command.

Value Returned

g_value

Returns the requested parameter value.

nil

Returns nil and prints an error message.

Example

selectResult( ’dcOpInfo )
pv( "/I0/M1" "vds" )

Returns the value of the vds parameter for the I0/M1 component.

pv( "/I0/M1" "vds" ?resultsDir "/VADE/simulation/ampTest/spectre/schematic/test2/psf" ) 

Returns the value of the vds parameter for the I0/M1 component. These values are read from the results directory, /VADE/simulation/ampTest/spectre/schematic/test2/psf.

pv( "/I0/M1" "vds" ?result "dcOpInfo" ?resultDir "/VADE/simulation/ampTest/spectre/schematic/test1/psf") 

Returns the value of the vds parameter for the I0/M1 component. These values are read from the dcOpInfo results saved in the results directory, /VADE/simulation/ampTest/spectre/schematic/test1/psf.

pv("top-level" "CAP" ?result "designParamVals")

Returns the value of the CAP variable for the top-level hierarchy in the design. These values are read from the default results directory.

resultParam

resultParam( 
S_propertyName 
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ] 
) 
=> L_value / nil

Description

Returns the value of a header property from the selected result data.

Arguments

s_propertyName

Name of the parameter

?result s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

?resultsDir t_resultsDir

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

Value Returned

L_value

Value of the parameter. The data type depends on the data type of the parameter.

nil

Returns nil and an error message if there are problems returning the results.

Example

resultParam("positive output signal" ?result "pnoise.pss")
=> "pif"
resultParam("negative output signal" ?result "pnoise.pss")
=> "0"

Returns the name of the positive and negative output signals from PSS-noise analysis result. In this case, the data type of the returned value is a string.

resultParam("port1.r.value" ?result "sp")
=> 40.0
resultParam("port2.r.value" ?result "sp")
=> 40.0

Returns the reference impedance of the ports in a two-port network from the S-parameter analysis result. In this case, the data type of the returned value is a floating point number.

resultParam("positive output signal" ?result "pnoise.pss" ?resultsDir "./psf")
=> "0"

Returns the names of the positive output signals from the PSS-noise analysis results stored at the location ./psf.

results

results(
[ ?resultsDir t_resultsDir ] 
) 
=> l_results / nil

Description

Returns a list of the type of results that can be selected.

Arguments

?resultsDir t_resultsDir

Directory containing the PSF files (results). When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

l_results

Returns the list of result types.

nil

Returns nil and an error message if there are problems returning the results.

Example

results()
=> ( dc tran ac )

Returns the list of results available.

results( ?resultsDir "./psf" ) 

Returns a list of results stored at the location ./psf.

saveSubckt

saveSubckt(
t_name
[ ?voltage g_voltage ]
[ ?current g_current ]
[ ?power g_power ] 
[ ?vDepth s_vDepth ]
[ ?iDepth s_iDepth ]
[ ?pwrDepth s_pwrDepth ]
[ ?compress g_compress ]
[ ?filterRC g_filterRC ]
[ ?ports g_ports ]
[ ?userOptions g_userOptions ]
)
=> t / nil

Description

Saves and modifies the specified subcircuit instances and signals.

Arguments

t_name

The name of the subcircuit instance.

?voltage g_voltage

Specifies whether you want to save the voltage for the subcircuit.

?current g_current

Specifies whether you want to save the current for the subcircuit.

?power g_power

Specifies whether you want to save the power signals for the subcircuit.

?vDepth s_vDepth

The hierarchy level to which you want to save the voltage signal for the subcircuit. If not specified, voltage for all the levels of hierarchy are saved.

?iDepth s_iDepth

The hierarchy level to which you want to save the current signal for the subcircuit. If not specified, current for all the levels of hierarchy are saved.

?pwrDepth s_pwrDepth

The hierarchy level to which you want to save the power signal for the subcircuit. If not specified, power signals for all the levels of hierarchy are saved.

?compress g_compress

Specifies whether you want to reduce the size of the output file. When enabled, the spectre simulator saves the data for a signal only when the value of that signal changes.

?filterRC g_filterRC

Specifies whether to filter out the nodes that are connected only to parasitic elements from the output signal list.

?ports g_ports

Specifies whether to save the output port information for the specified subcircuit.

?userOptions g_userOptions

Specify the other save options that you want to define for the signal.

Value Returned

t

Returns t if the subcircuit instance is saved.

nil

Returns nil if the name of the specified instance is not correct.

Examples

Example 1

The following example saves the voltage for five levels and current for two levels of hierarchy for the subcircuit I0.

saveSubckt("/I0" ?voltage t ?current t ?vDepth "5" ?iDepth "2")
=> t

Example 2

The following example saves the voltage for two levels and power signals for one level of hierarchy for the subcircuit I1.

saveSubckt("/I1" ?voltage t ?power t ?vDepth "2" ?pwrDepth "1")
=> t

Example 3

The following example saves the voltage for two levels and power signals for one level of hierarchy for the subcircuit I1, along with the port information. The output signals are compressed.

saveSubckt("/I1" ?voltage t ?power t ?vDepth "2" ?pwrDepth "1" ?port t ?compress t)
=> t

selectResult

selectResult(
S_resultsName 
[ n_sweepValue ]
) 
=> o_results / nil

Description

Selects the results from a particular analysis whose data you want to examine.

The argument that you supply to this command is a data type representing the particular type of analysis results you want. All subsequent data access commands use the information specified with selectResult.

Refer to the results command to get the list of analysis results that you can select.

Arguments

s_resultsName

Results from an analysis.

n_sweepValue

The sweep value you wish to select for an analysis.

Value Returned

o_results

Returns the object representing the selected results.

nil

Returns nil and an error message if there are problems selecting the analysis.

Example

selectResult( ’tran )

Selects the results for a transient analysis.

sweepValues(3.0 3.333333 3.666667 4.0 4.333333 4.666667 5.0 )
selectResult("tran" "3.333333")

The sweepValues command prints a list of sweep values.

The selectResult command selects a specific value for a transient analysis.

selectResult( ’tran )

Selects the results for a transient analysis.

paramAnalysis("supply" ?start 3 ?stop 5 ?step 1.0/3)
paramRun("supply")
selectResult(( ’tran car( sweepValues() )

Selects the data corresponding to the first parametric run.

selectResult(’tran) would select the entire family of parametric data.

sp

sp( 
x_iIndex 
x_jIndex 
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ]
) 
=> o_waveform / nil

Description

Returns S-parameters for N port networks.

This command should be run on the results of the Spectre sp (S-parameter) analysis.

Arguments

x_iIndex

The ith index of the coefficient in the scattering matrix.

x_jIndex

The jth index of the coefficient in the scattering matrix.

?result s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

When working with a maestro cellview, you must specify this argument.

?resultsDir t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

o_waveform

Waveform object representing the S-parameter.

nil

Returns nil if there is an error.

Example

For an OCEAN script:

selectResult('sp)
s21 = sp(2 1)
s12 = sp(1 2)
plot(s21 s12)
;Plots S-parameters s21 and s12 for results of S-parameter(sp) analysis stored in
the psf of the last run simulation

For an output expression in a maestro cellview:

sp(1 1 ?result 'sp )
;Returns the S-parameter for results of S-parameter(sp) analysis stored in the
results for each point

sprobeData

sprobeData( 
t_ana 
t_sprobeInst 
[ ?type t_type ] 
[ ?dataDir t_dataDir ] 
) 
=> o_waveform / nil

Description

Returns the waveform for the specified analysis and parameter type of the given sprobe instance.

t_ana

Specifies the type of analysis.

Valid values:

  • 'sp_probe – Returns the waveforms of "S1", "S2", "Z1" or "Z2" as specified by the t_type argument.
  • 'sp_sprobe\-StabIndex – Returns the waveform of stability index (StabIndex)

t_sprobeInst

Specifies the name of the sprobe instance.

?type t_type

One or more strings representing the names of the type.

Valid values:

  • "S1", "S2", "Z1" or "Z2" (Scattering parameters)
  • "StabIndex" (Stability Index)

?dataDir t_dataDir

Directory containing the PSF file. By default, it uses the current results directory that is set by the openResults SKILL command.

Value Returned

o_waveform

Waveform object that displays a series of points on a grid. srrWave:XXXXX is used as the waveform object identifier.

nil

Returns nil if there is an error and a waveform cannot be returned.

Example

The following example gets the waveform of parameter S1 of sprobe instance "I0"

sprobeData('sp_sprobe "I0" ?type "S1")

The following example gets the waveform of parameter StabIndex of sprobe instance "I0"
sprobeData('sp_sprobe\-StabIndex "I0" ?type "StabIndex")

sweepNames

sweepNames( 
[ o_waveForm ] 
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ] ) 
=> l_sweepName / nil

Description

Returns the names of all the sweep variables for either a supplied waveform, a currently selected result (via selectResult()) or a specified result.

Arguments

o_waveForm

Waveform object representing simulation results that can be displayed as a series of points on a grid. (A waveform object identifier looks like this: srrWave:XXXXX). When this argument is used, the t_resultsDir and s_resultName arguments are ignored.

?result s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

?resultsDir t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

l_sweepName

Returns a list of the sweep names.

nil

Returns nil and prints an error message if the sweep names cannot be returned.

Example

selectResult(’tran)
sweepNames() 
=> ( "TEMPDC" "time" )

Returns a list of sweep variables for the selected results. In this case, the return values indicate that the data was swept over temperature and time.

sweepNames(?result ’ac) 
=> ("TEMPDC" "freq")
sweepNames() 
=> ("TEMPDC" "time")
w = VT("/vout")
sweepNames( w )
=> ( "r" "time")

Returns the sweep variables for the waveform w.

sweepNames(?result ’ac ?resultsDir "./test/psf") 
=> ("TEMPDC" "freq")

Returns the sweep variables for the results of the ac analysis stored at the location ./test/psf.

sweepValues

sweepValues( 
[ o_waveForm ]
) 
=> l_sweepValues / nil

Description

Returns the list of sweep values of the outermost sweep variable of either the selected results or the supplied waveform. This command is particularly useful for parametric analyses.

Arguments

o_waveForm

Waveform object representing simulation results that can be displayed as a series of points on a grid. (A waveform object identifier looks like this: srrWave:XXXXX.)

Value Returned

l_sweepValues

Returns the list of sweep values.

nil

Returns nil and an error message if the list of sweep values cannot be returned.

Example

sweepValues() 
=> ( -50 -15 20 55 90.0 )

Returns a list of sweep values for the selected results. In this case, the return values indicate the temperature over which the data was swept.

w = VT("/vout")
sweepNames( w ) 
=> ( "r" "time" )
sweepValues( w ) 
=> ( 2000 4000 6000 )

Returns a list of sweep values for the wave w. In this case, the return values indicate the resistance over which the data was swept.

sweepVarValues

sweepVarValues(
[ t_varName ]
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ]
)
=> l_sweepName / nil

Description

Returns the list of sweep values for a particular swept variable name. This command is particularly useful for parametric analyses.

Arguments

t_varName

Name of the specific variable from which the values are retrieved.

?result s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

?resultsDir t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

l_sweepValues

Returns the list of sweep values.

nil

Returns nil and an error message if the list of sweep values cannot be returned.

Example

selectResult(’tran)
sweepNames() 
=> ("TEMPDC" "Vsupply" "time")
sweepVarValues("TEMPDC") 
=> (0 32)
sweepNames(?result ’ac) 
=> ("TEMPDC" "Vsupply" "freq")
sweepVarValues("Vsupply" ?result ’ac) 
=> (5 12 15)
sweepNames(?result ’ac ?resultsDir "./simResult/psf") 
=> ("TEMPDC" "freq")
sweepVarValues("TEMPDC" ?result ’ac ?resultsDir "./simResult/psf") 
=> (-15 20 55)

v

v( 
t_net
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ] 
) 
=> o_waveform / nil

Description

Returns the voltage of the specified net.

Arguments

t_net

Name of the net.

?result s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

?resultsDir t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

o_waveform

Returns a waveform object. A waveform object represents simulation results that can be displayed as a series of points on a grid. (A waveform object identifier looks like this: srrWave:XXXXX.).

nil

Returns an error message and nil if there is a problem.

Example

selectResult(’tran)
v( "/net56" )

Returns the voltage for net56.

ocnPrint( v( "/net56" ) )

Prints tabular information representing the voltage for net56.

ocnPrint( v( "net5" ?result ’dc ) )

Prints the voltage of net5 with respect to the dc swept component.

ocnPrint( v( "net5" ?resultsDir "./test2/psf" ?result ’dc ) )

Prints the voltage of net5 with respect to dc for the results from a different run (stored in test2/psf).

vswr

vswr(
x_index 
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ] 
) 
=> o_waveform / nil

Description

Computes the voltage standing wave ratio.

This function is a higher level wrapper for the OCEAN expression

(1 + mag( s( x_index x_index ))) / (1 - mag( s( x_index x_index )))

This command should be run on the results of the Spectre sp (S-parameter) analysis.

Arguments

x_index

Index of the port.

?result s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

?resultsDir t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

o_waveform

Waveform object representing the voltage standing wave ratio.

nil

Returns an error message or nil if there is a problem.

Example

plot( vswr(2) )
vswr1 = vswr(1 ?result "sp" ?resultsDir "./simResult/psf")

Returns the voltage standing wave ratio value at port 1 for the results of S-parameter(sp) analysis stored at the location ./simResult/psf.

zm

zm(
x_index 
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ] 
) 
=> o_waveform / nil

Description

Computes the port input impedance.

The zm function is computed in terms of the S-parameters and the reference impedance. This function is a higher level wrapper for the OCEAN expression

(1 + s( x_index x_index )) / (1 - s( x_index x_index )) 
* or( zref( x_index ) 50)

This command should be run on the results of the Spectre sp (S-parameter) analysis.

Arguments

x_index

Index of the port.

?result s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

?resultsDir t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

o_waveform

Waveform object representing the port input impedance.

nil

Returns an error message and nil if there is a problem.

Example

plot(zm(2))
zm1 = zm(1 ?result "sp" ?resultsDir "./simResult/psf")

Returns input impedance at port 1 for results of S-parameter (sp) analysis stored at the location ./simResult/psf.

zref

zref( 
x_portIndex
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ]
) 
=> f_impedance / nil

Description

Returns the reference impedance for an N-port network.

This command should be run on the results of the Spectre sp (S-parameter) analysis.

Arguments

x_portIndex

Index of the port.

?result s_resultName

Results from an analysis. When specified, this argument will only be used internally and will not alter the current result which was set by the selectResult command. The default is the current result selected with the selectResult command.

?resultsDir t_resultsDir

Directory containing the PSF files (results). If you supply this argument, you must also supply the resultName argument. When specified, this argument will only be used internally and will not alter the current results directory which was set by the openResults command. The default is the current results directory set by the openResults command.

Value Returned

f_impedance

Reference impedance.

nil

Returns an error message and nil if there is a problem.

Example

Zref = zref(2)
zref1 = zref(1 ?result "sp" ?resultsDir "./simResult/psf")

Returns the reference impedance at port 1 for the results of S-parameter(sp) analysis stored at the location./simResult/psf.


Return to top
 ⠀
X