8
Plotting and Printing Commands
This chapter contains information on the following plotting and printing commands:
- addSubwindow
- addSubwindowTitle
- addTitle
- addWaveLabel
- addWindowLabel
- clearAll
- clearSubwindow
- currentSubwindow
- currentWindow
- dbCompressionPlot
- dcmatchSummary
- deleteSubwindow
- deleteWaveform
- displayMode
- getAsciiWave
- graphicsOff
- graphicsOn
- hardCopy
- hardCopyOptions
- ip3Plot
- newWindow
- noiseSummary
- ocnGenNoiseSummary
- ocnPrint
- ocnPrintTMIReliabilityResults
- ocnPrintTMIResultTypeList
- ocnSetAttrib
- ocnWriteLsspToFile
- ocnYvsYplot
- plot
- plotStyle
- printGraph
- pzFrequencyAndRealFilter
- pzPlot
- pzSummary
- removeLabel
- report
- saveGraphImage
- xLimit
- yLimit
This chapter also includes a topic, Pl.
addSubwindow
addSubwindow() =>x_subwindowID/nil
Description
Adds a subwindow to the current Waveform window and returns the number for the new subwindow, which is found in the upper right corner.
Arguments
Value Returned
|
Returns |
Example
addSubwindow()
=>3
Adds a new subwindow to the Waveform window.
addSubwindowTitle
addSubwindowTitle(
x_windowtitle
)
=> t / nil
Description
Adds a title to the current subwindow in the active window. The current subwindow is defined using the currentSubwindow command.
Arguments
Value Returned
Example
addSubwindowTitle( "waveform 2")
=> t
Adds the title waveform 2 to the selected subwindow.
addTitle
addTitle(
x_windowtitle
)
=> t / nil
Description
Adds a title to the current active OCEAN window. The current window is defined using the currentWindow command.
Arguments
Value Returned
Example
addTitle( “waveform 1” )
=> t
Adds the title waveform 1 to the selected window.
addWaveLabel
addWaveLabel(x_waveIndexl_locationt_label[?textOffsetg_textOffset] [?colorx_color] [?justifyt_justify] [?fontStylet_fontStyle] [?heightx_height] [?orientt_orient] [?draftingg_drafting] [?overBarg_overbar]) =>s_labelId/ nil
Description
Attaches a label to the specified waveform curve in the current subwindow.
Arguments
Value Returned
Examples
addWaveLabel( 1 list( 0 0.5 ) "R5 = " )
Attaches the "R5 = " label to the specified coordinates on waveform curve 1.
addWaveLabel( 2 list( 0 0.5 ) "R_6 = " ?textOffset 0:20 ?justify "lowerCenter" ?fontStyle "roman" ?height 10 ?orient "R20" ?drafting t ?overbar t)
Attaches the label "R6 = " to the specified coordinates on waveform curve. The label specifications are as follows: Justification – lowerCenter, Font Style – roman, Font Height – 10, and Orientation – R20.
The label will be displayed in a readable form. The underscore in the label will be displayed as an overbar.
Additional Information
- The valid label location ranges between absolute co-ordinates (0, 0) on X-axis and (1,1) on Y-axis (upper and lower bound inclusive).
- The valid marker location ranges between data co-ordinates defined by X-axis and Y-axis limits (upper and lower bound inclusive).
addWaveLabel(1 list( -0.5 -0.5 ) "Label 1" ?textOffset nil)
The following error message appears when the specified label location (-0.5 0.5) is outside of the defined boundary limits of label.
The location specified for placing a label on the graph is invalid. Specify a valid label location that ranges between absolute coordinates (0,0) on X-axis and (1,1) on Y-axis (upper and lower bounds inclusive).
addWaveLabel(1 list( 80MHz -0.5) "Marker 1" ?textOffset t)
The following error message appears when the specified marker location (80MHz -0.5) is outside of the X- and Y-axis limits of the graph to be plotted.
The location specified for placing a marker on the graph is invalid. Specify a valid marker location that ranges between data coordinates '(0,-1)' on X-axis and '(10000,1)' on Y-axis (upper and lower bounds inclusive).
addWindowLabel
addWindowLabel(l_locationt_label) =>s_labelId/ nil
Description
Displays a label in the current subwindow. The location for the label is specified with a list of two numbers between 0 and 1.
Arguments
|
List of two waveform coordinates that describe the location for the label. |
|
Value Returned
Example
label = addWindowLabel( list( 0.75 0.75 ) "test" )
Adds the test label to the current subwindow at the specified coordinates and stores the label identification number in label.
clearAll
clearAll() => t / nil
Description
Erases the contents of the current Waveform window and deletes the waveforms, title, date stamp, and labels stored in internal memory.
Arguments
Value Returned
|
Returns |
Example
clearAll()
=> t
Erases the contents of the current Waveform window.
clearSubwindow
clearSubwindow() => t / nil
Description
Erases the contents of the current subwindow.
Arguments
Value Returned
Example
clearSubwindow()
=> t
Erases the contents of the current subwindow.
currentSubwindow
currentSubwindow( [ ?x_subwindowx_subwindow] ) => t / nil
Description
Sets x_subwindow as the current subwindow.
Arguments
|
(Optional) Number of the subwindow, found in the upper right corner, that is to become the current subwindow. |
|
Value Returned
|
Returns |
|
Example
currentSubwindow( 2 )
Sets subwindow 2 as the current subwindow.
currentWindow
currentWindow(w_windowId) =>w_windowId/ nil
Description
Specifies w_windowId as the current Waveform window.
Arguments
Value Returned
|
Returns |
Example
currentWindow( window(2) )
This example specifies window 2 as the current Waveform window.
currentWindow()
This example returns the current waveform window. For example, if the current waveform window is 4, this command returns the following:
window:4
dbCompressionPlot
dbCompressionPlot(o_wavex_harmonic x_extrapolationPoint[?compressionx_compression] ) => t / nil
Description
Plots the nth compression point plot. The x_compression argument is optional and defaults to 1 for 1dB compression, if omitted.
This command should be run on the results of the Spectre swept pss analysis.
Arguments
Value Returned
Example
dbCompressionPlot(v("/Pif") 2 -25)
Plots a 1 dB compression point plot for the waveform v("/Pif").
dbCompressionPlot(v("/Pif") 2 -25 ?compression 3)
Plots a 3 dB compression point plot for the waveform v("/Pif").
dcmatchSummary
dcmatchSummary( [?resultsDirt_resultsDir ] [?resultS_resultName ] [?outputt_fileName | p_port ] [?paramValuesln_paramValues ] [?deviceTypels_deviceType ] [?variationsls_variations ] [?includeInstlt_includeInst ] [?excludeInstlt_excludeInst ] [?truncateDatan_truncateData ] [?truncateTypes_truncateType ] [?sortTypels_sortType ] ) =>t_fileName/p_port/ nil
Description
Prints a report showing the mismatch contribution of each component in a circuit. If you specify a directory with resultsDir, it is equivalent to temporarily using the openResults command. The dcmatchSummary command prints the results for that directory and resets the openResults command to its previous setting. If you specify a particular result with resultName, it is equivalent to temporarily using the selectResult command on the specified results. The dcmatchSummary command prints the results and resets the selectResult command to its previous setting.
This command should be run on the results of the Spectre dcmatch analysis.
Arguments
|
Results from an analysis for which you want to print the dcmatchSummary report. |
|
|
File in which to write the information. The dcmatchSummary command opens the file, writes to the file and closes the file. If you specify the filename without a path, the dcmatchSummary command creates the file in the directory pointed to by your SKILL Path. To find out what your SKILL path is, |
|
|
Port (previously opened with |
|
|
List of values for swept parameters at which the dcmatchSummary is to be printed. In case there is just one swept parameter the value can be specified as is. |
|
|
List of device type strings to be included. Valid values are a list of strings or |
|
|
An association list containing the device name and the associated variations to print. You can also specify the value ‘all to print all available variations for a device. Default value is |
|
|
List of instance name strings to definitely include in the dcmatchSummary. |
|
|
List of instance name strings to exclude in the dcmatchSummary. |
|
|
Specifies a number that the truncateType argument uses to define the components for which information is to be printed. |
|
|
Specifies the method that is used to limit the data being included in the report
|
|
|
Specifies how the printed results are to be sorted. The valid values are nil, ’name, ’output. |
Value Returned
|
Returns |
Example
dcmatchSummary( ?result ’dcmatch-mine )
Prints a report for non-swept DC-Mismatch analysis.
dcmatchSummary( ?resultsDir "/usr/simulation/lowpass/spectre/schematic" ?result ’dcmatch)
Prints a report for non-swept DC-Mismatch analysis for the results from a different run (stored in the schematic directory).
dcmatchSummary( ?resultsDir "/usr/simulation/lowpass/spectre/schematic" ?result ’dcmatch ?paramValues ‘(25) )
Prints a report for swept DC-Mismatch analysis at swept parameter value of 25.
dcmatchSummary( ?result dcmatch-mine ?output "./summary.out")
Prints a report for non-swept DC-Mismatch analysis in the output file summary.out.
dcmatchSummary( ?paramValues 25 ?deviceType "bsim3v3" ?variations ’(("bsim3v3" ("sigmaOut "sigmaVth" )))
Prints a report for swept DC-Mismatch analysis at swept parameter value of 25 for bsim3v3 deviceType and sigmaOut and sigmaVth variations.
dcmatchSummary( ?paramValues 25 ?truncateType ’top ?truncateData 1)
Prints a report for swept DC-Mismatch analysis at swept parameter value of 25 printing only the component having the highest contribution.
dcmatchSummary( ?paramValues 25 ?sortType ’name )
Prints a report for swept DC-Mismatch analysis at swept parameter value of 25 sorted on name.
deleteSubwindow
deleteSubwindow() => t / nil
Description
Deletes the current subwindow from the current Waveform window.
Arguments
Value Returned
|
Returns |
Example
deleteSubwindow()
=> t
Deletes the current subwindow from the Waveform window.
deleteWaveform
deleteWaveform(
{ x_index | all_string }
)
=> t / nil
Description
Deletes the specified waveform curve or all the waveform curves from the current subwindow of a Waveform window.
Arguments
|
The string |
Value Returned
|
Returns |
Example
deleteWaveform( ’1 )
=> t
Deletes waveform 1 from the current subwindow.
deleteWaveform( "all" )
=> t
Deletes all the curves from the current subwindow.
displayMode
displayMode(
t_mode
)
=> t / nil
Description
Sets the display mode of the current subwindow.
Arguments
|
String representing the display mode for the subwindow. |
Value Returned
|
Returns |
Example
displayMode( "composite" )
=> t
Sets the current subwindow to display in composite mode.
getAsciiWave
getAsciiWave(t_filename x_xColumn x_yColumn[?xskipx_x_skip] [?yskipx_yskip] [?formatFloatg_formatFloat] [?xNamet_xName] [?xUnitst_xUnits] [?yNamet_yName] [?yUnitst_yUnits] ) =>o_wave/nil
Description
Reads in an ASCII file of data and generates a waveform object from the specified data. The X-axis data must be real numbers. The Y-axis data can be real or complex values. Complex values are represented as (real imag) or complex(real imag). This function skips blank lines and comment lines. Comments are defined as lines beginning with a semicolon.
Arguments
|
A boolean when set to |
|
Value Returned
Example
getAsciiWave("~/mydatafile.txt " 1 2 )
=> srrWave:32538648
Reads in an ascii file ~/mydatafile.txt, which has x-axis data in the first column and y-axis data in the second column, and returns a waveform object.
getAsciiWave("~/mydatafile.txt " 1 2 ?xskip 1 ?yskip 2)
=> srrWave:32538656
Reads in an ascii file ~/mydatafile.txt, which has x-axis data in the first column and y-axis data in the second column and skips 1 line in the x_xcolumn and 2 lines in the y_ycolumn, and returns a waveform object.
getAsciiWave("/vout_tran_xy.csv" 1 2 ?xskip 1 ?yskip 1 ?formatFloat nil ?xName "Time" ?xUnits "Secs" ?yName "V(Out)" ?yUnits "V")
Reads in an ascii file, vout_tran_xy.csv, which has x-axis data in the first column and y-axis data in the second column, skips 1 line in the x_xcolumn and 2 lines in the y_ycolumn, x- and y-axis names are Time and V(out), and x-and y-axis units are Secs and V respectively.
graphicsOff
graphicsOff() => t / nil
Description
Disables the redrawing of the current Waveform window.
You might use this command to freeze the Waveform window display, send several plots to the window, and then unfreeze the window to display all the plots at once.
Arguments
Value Returned
|
Returns |
Example
graphicsOff()
=> t
Disables the redrawing of the Waveform window.
graphicsOn
graphicsOn() => t / nil
Description
Enables the redrawing of the current Waveform window.
Arguments
Value Returned
|
Returns |
Example
graphicsOn()
=> t
Enables the redrawing of the current Waveform window.
hardCopy
hardCopy(
w_windowId
)
=> t / nil
Description
Sends a Waveform window plot to a printer or a file. To plot to a printer specify a printer name using the ?hcPrinterName argument of the hardCopyOptions command. To plot to a file, specify a file name using the ?hcOutputFile argument of the hardCopyOptions command.
Arguments
|
The window ID of the waveform window whose plot is to be sent to a printer or a file. The default value is the window ID of the current window. |
Value Returned
Example
hardCopy()
=> t
Sends a waveform plot to the printer or to a file.
w = newWindow()
plot(v("/vout"))
hardCopy(w)
Sends the waveform plot of w to the printer or to a file.
hardCopyOptions
hardCopyOptions( [?hcCopyNumx_hcCopyNum] [?hcOffsetHeightx_hcOffsetHeight] [?hcOffsetWidthx_hcOffsetWidth] [?hcOrientations_hcOrientation] [?hcOutputFileg_hcOutputFile] [?hcPrinterNames_hcPrinterName] [?hcTmpDirt_hcTmpDir] [?hcPaperSizes_hcPaperSize] [?hcMakeExactCopyg_hcMakeExactCopy] [?hcQualityx_hcQuality] [?hcOptimizeForWindowsg_hcOptimizeForWindows] [?hcImageWidthx_hcImageWidth] [?hcImageHeightx_hcImageHeight] [?hcImageSizeUnitss_hcImageSizeUnits] [?hcImageResolutionx_ImageResolution] [?hcResolutionUnitss_hcResolutionUnits] [?hcImageAspectRatiox_hcImageAspectRatio] [?hcUseExistingBackgroundg_hcUseExistingBackground] [?hcDisplayTitleg_hcDisplayTitle] [?hcDisplayLegendg_hcDisplayLegend] [?hcDisplayAxesg_hcDisplayAxes] [?hcDisplayGridsg_hcDisplayGrids] [?hcSaveEachSubwindowSeparatelyg_hcSaveEachSubwindowSeparately] ) =>g_value/ nil
Description
Sets the graph window hardcopy plotting options.
The option takes effect for any graph window or subwindow that is opened after the option is set.
Arguments
Value Returned
Example
hardCopyOptions( ?hcCopyNum 1 )
Plots one copy of the window or subwindow.
hardCopyOptions(?hcCopyNum 3 ?hcOutputFile "myOutFile.bmp")
Plots three copies of the window or subwindow and sends them to the file myOutFile.bmp.
ip3Plot
ip3Plot(o_wave x_sigHarmonic x_refHarmonicx_extrapolationPoint) => t / nil
Description
This command should be run on the results of the Spectre swept pss and pac analysis.
Refer to the “Simulating Mixers” chapter of the Virtuoso Spectre Circuit Simulator RF Analysis User Guide for more information on ip3Plot.
Arguments
Value Returned
Example
ip3Plot(v("/net28") 47 45 -25)
newWindow
newWindow()
=> w_windowID / nil
Description
Creates a new Waveform window and returns the window ID.
Arguments
Value Returned
|
Returns |
Example
newWindow()
=> window:3
Creates a new Waveform window that is numbered 3 in the upper right corner.
noiseSummary
noiseSummary(s_type[?results_resultName[?resultsDirt_resultsDir] ][?frequencyf_frequency] [?weightf_weight] [?outputt_fileName|p_port] [?noiseUnitt_noiseUnit] [?truncateDatax_truncateData] [?truncateTypes_truncateType] [?digitsx_digits] [?percentDecimalsx_percentDecimals] [?fromf_from] [?tof_to] [?deviceTypels_deviceType] [?weightFilet_weightFile] [?paramValuesls_paramValues][ ?hierLevelx_hierLevel][?sortls_sort] [ ?includeInstsls_includeInsts][ ?excludeInsts ls_excludeInsts] [ ?combineIteratedInstsg_combineIteratedInsts][ ?suffixNotation t_suffixNotation][ ?writeRCnet g_writeRCnet] ) =>t/ nil
Description
Prints a report showing the noise contribution of each component in a circuit.
This command should be run on the results of the Spectre noise analysis.
Arguments
|
Type of noise-analysis results for which to print the report.
Valid values: |
|
|
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. |
|
|
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. |
|
|
Waveform representing the function with which the integral is weighted. |
|
|
|
|
Specifies a number that the |
|
|
Specifies the method that is used to limit the data being included in the report.
|
Value Returned
|
Returns |
|
|
Returns |
Example
noiseSummary( ’integrated ?result ’noiseSweep-noise )
Prints a report for an integrated noise analysis.
noiseSummary( ’integrated ?resultsDir
"/usr/simulation/lowpass/spectre/schematic"
?result ’noise)
Prints a report for an integrated noise analysis for the results from a different run (stored in the schematic directory).
noiseSummary( ’spot ?resultsDir
"/usr/simulation/lowpass/spectre/schematic"
?result ’noise ?frequency 100M )
Prints a report for a spot noise analysis at a frequency of 100M.
noiseSummary(’integrated ?truncateType ’none ?digits 10
?weightFile "./weights.dat")
Prints the weighted noise for an integrated noise analysis using information in the weight file weights.dat.
noiseSummary(’integrated ?output "./NoiseSum1" ?noiseUnit "V" ?truncateData 20 ?truncateType ’top ?from 10 ?to 10M ?deviceType list("bjt" "mos" "resistor"))
Prints a report for an integrated noise analysis in the frequency range 10-10M for 20 components with deviceType bjt, mos or resistor.
noiseSummary( ’integrated ?from 1 ?to 100M ?truncateType ’top ?truncateData 20 ?deviceType ’all ?noiseUnit "V^2" ?output "./filename.ns" ?paramValues list(2.47e-9))
Prints a report for an integrated noise analysis at a specific swept value.
ocnGenNoiseSummary
ocnGenNoiseSummary(
x_hierLevel
s_resultName
t_resultsDir
)
=> t / nil
Description
Generates a noise summary report at the end of a simulation run. This report contains a summary of noise contribution of each component for the specified hierarchy level.
Arguments
|
Specifies the level of hierarchy upto which the current data is to be saved for all the components. |
|
|
When specified, this argument will only be used internally and will not alter the current result which was set by the |
|
|
Directory containing the PSF files (results).
When specified, this argument will only be used internally and will not alter the current results directory that is set by the |
Value Returned
Example
ocnGenNoiseSummary(1 ?result 'pnoise)
=> t
Generates a noise summary report for all the components up to the first level of the hierarchy.
ocnPrint
ocnPrint( [?outputt_filename|p_port] [?precisionx_precision] [?numberNotations_numberNotation] [?numSpacesx_numSpaces] [?widthx_width] [?fromx_from] [?tox_to] [?stepx_step] [?linLogt_linLog]o_waveform1[o_waveform2... ] ) => t / nil
Description
Prints the text data of the waveforms specified in the list of waveforms.
If you provide a filename as the ?output argument, the ocnPrint command opens the file and writes the information to it. If you provide a port (the return value of the SKILL outfile command), the ocnPrint command appends the information to the file that is represented by the port. There is a limitation of ocnPrint for precision. It works upto 30 digits for the Solaris port and 18 digits for HP and AIX.
Arguments
|
File in which to write the information. The |
|
|
Port (previously opened with |
|
|
The number of significant digits to print. This value overrides any global precision value set with the
Note: To print the specified significant number of digits, ensure that the value of the |
|
|
The notation for print ed information. This value overrides any global format value set with the
Valid values:
The format for each value is
The value |
|
|
Waveform object representing simulation results that can be displayed as a series of points on a grid. (A waveform object identifier looks like this: |
|
Value Returned
|
Returns |
Example
ocnPrint( v( "/net56" ) )
=> t
Prints the text for the waveform for the voltage of net56.
ocnPrint( vm( "/net56" ) vp( "/net56" ) )
=> t
Prints the text for the waveforms for the magnitude of the voltage of net56 and the phase of the voltage of net56.
ocnPrint( ?output "myFile" v( "net55" ) )
=> t
Prints the text for the specified waveform to a file named myFile.
ocnPrint( ?output "./myOutputFile" v("net1") ?from 0 ?to 0.5n ?step 0.1n )
Prints the text for the specified waveform from 0 to 0.5n on the x axis in the incremental steps of 0.1n.
ocnPrintTMIReliabilityResults
ocnPrintTMIReliabilityResults(t_psfdir[ ?resultTypet_resultType] [ ?thresholdt_threshold] [ ?exportFilet_exportFilePath] [ ?sortRulet_sortRule] )t/ nil
Description
Prints simulation results for reliability analysis run in the OCEAN mode.
Arguments
Value Returned
|
When the results of reliability simulation are successfully printed. |
|
Examples
The following example code prints the reliability results from the given psf directory on the terminal:
psfdir = "./simulation/bertlink/test/maestro/results/maestro/Interactive.0/3/bertlink:osc13:1/psf"
=> "./simulation/bertlink/test/maestro/results/maestro/Interactive.0/3/bertlink:osc13:1/psf"
ocnPrintTMIReliabilityResults(psfdir) => t
The following example code checks the available result types in the reliability results and exports those to a file:
psfdir = "./simulation/bertlink/test/maestro/results/maestro/Interactive.0/3/bertlink:osc13:1/psf"
=> "./simulation/bertlink/test/maestro/results/maestro/Interactive.0/3/bertlink:osc13:1/psf"
ocnPrintTMIResultTypeList(psfdir) => ("DeltaTemp" "didlinBti" "didlinHci" "didlinHciBti" "didsatBti" "didsatHci" "didsatHciBti" "dvtlinBti" "dvtlinHci" "dvtlinHciBti" "lifetimeBti" "lifetimeHci" "lifetimeHciBti" ) ocnPrintTMIReliabilityResults(psfdir ?resultType "DeltaTemp" ?threshold "3" ?exportFile "./TMIresults.csv") ; prints results on the terminal => t
The following example code sorts the results on the basis of column didlinHciBti:
ocnPrintTMIReliabilityResults(psfdir ?sortRule "didlinHciBti" ?exportFile "./1")
Rank InstanceName Model DeltaTemp didsatHciBti didlinHciBti dvtlinHciBti
1 IL6.M1 pch_svt_mac.12 3.68E+01 8.90E+00 4.69E+00 3.34E-02
2 IL5.M1 pch_svt_mac.12 3.81E+01 8.11E+00 4.27E+00 3.04E-02
2 IL4.M1 pch_svt_mac.12 3.81E+01 8.11E+00 4.27E+00 3.04E-02
3 IL7.M1 pch_svt_mac.12 2.18E+01 8.04E+00 4.24E+00 3.02E-02
4 I1.M1 pch_svt_mac.12 1.25E+01 7.16E+00 3.77E+00 2.69E-02
5 IL1.M1 pch_svt_mac.12 3.67E+01 6.49E+00 3.42E+00 2.44E-02
5 IL3.M1 pch_svt_mac.12 3.67E+01 6.49E+00 3.42E+00 2.44E-02
5 IL2.M1 pch_svt_mac.12 3.67E+01 6.49E+00 3.42E+00 2.44E-02
6 I4.M1 pch_svt_mac.12 7.13E+00 6.32E+00 3.33E+00 2.37E-02
7 I9.M1 pch_svt_mac.12 5.45E+00 6.21E+00 3.27E+00 2.33E-02
=> t
;; note the ranking done in the results printed above.
ocnPrintTMIResultTypeList
ocnPrintTMIResultTypeList(t_psfdir[ ?netlistFilePreNamet_prefixOfNetlistFile] )t_resultTypes/ nil
Description
Returns a list of valid result types.
Arguments
Value Returned
Example
The following example code checks the available result types in the reliability results and exports those to a file:
psfdir = "./simulation/bertlink/test/maestro/results/maestro/Interactive.0/3/bertlink:osc13:1/psf"
=> "./simulation/bertlink/test/maestro/results/maestro/Interactive.0/3/bertlink:osc13:1/psf"
ocnPrintTMIResultTypeList(psfdir) => ("DeltaTemp" "didlinBti" "didlinHci" "didlinHciBti" "didsatBti" "didsatHci" "didsatHciBti" "dvtlinBti" "dvtlinHci" "dvtlinHciBti" "lifetimeBti" "lifetimeHci" "lifetimeHciBti" ) ocnPrintTMIReliabilityResults(psfdir ?resultType "DeltaTemp" ?threshold "3" ?exportFile "./TMIresults.csv") => t
ocnSetAttrib
ocnSetAttrib( [?XAxisLabelxLabel] [?YAxisLabelyLabel] [?XScalexscale] [?YScaleyscale ] [?XLimitxlimit] [?YLimitylimit] [?YRangeyrange] [?Originorigin] ) => t / nil
Description
Sets the waveform window plotting attributes.
Arguments
Value Returned
|
Returns |
|
|
Returns |
Example
ocnSetAttrib( ?XAxisLabel ’XMylabel ?YAxisLabel ’YMyLabelt ?stripNumber 2 )
=> t
Sets the X and Y axis labels to XMylabel and YMyLabel, respectively.
ocnSetAttrib(?XScale ’log ?YScale ’linear ?stripNumber 2 )
=> t
Sets the scale of X and Y axis to log and linear, respectively.
ocnSetAttrib(?XScale ’auto ?XLimit ’(3 7) ?YLimit ’auto ?stripNumber 2 )
=> t
Sets the scale of X axis to autoscale. Sets the Y display limits to autoscale.
ocnWriteLsspToFile
ocnWriteLsspToFile( filenamet_filenamenet1input_node_nameterm1input_src_terminalnet2output_node_nameterm2output_src_terminal[ ?formatt_format] [ ?datafmtt_data_format ] [ ?port1port1_name] [ ?port2port2_name] [ ?result1result1_name] [ ?result2result2_name] ) => nil
Description
Writes the large signal S-Parameter results to a file in Touchstone or Spectre format.
Arguments
|
Format of file in which results are to be written. |
|
Value Returned
|
Specifies that the results are written to the specified file successfully. |
|
Example
ocnWriteLsspToFile "lssp.sp2" "/net026" "/PORT1/PLUS" "/RFOUT"
"/PORT2/PLUS" ?format "touchstone" ?datafmt "realimag" ?port1 50 ?port2 50
?result1 "sweeplssp1_lssp1_fd-sweep" ?result2 "sweeplssp2_lssp2_fd-sweep")
ocnYvsYplot
ocnYvsYplot( [ ?wavexo_wavex?waveyo_wavey] [ ?exprxo_exprx?expryo_expry] [ ?titleListl_titleList] [ ?colorListl_colorList] )=>wave/ nil
Description
Plots a wave against another wave or an expression against another expression.
This is currently supported for a family of waveforms generated from simple parametric simulation results data. It is not supported for a family of waveforms generated from parametric simulation with paramset, Corners or MonteCarlo results data.
Arguments
Value Returned
Example
wy = VT("/vout")
wx = VT("/vin")
ex = "VT('/vin')"
ey = "VT('/vout')"
ocnYvsYplot(?wavex wx ?wavey wy ?titleList ’("simpleWave") ?colorList ’(y1))
Plots wave wy against wave wx with the title being simpleWave and the color being y1.
ocnYvsYplot(?exprx ex ?expry ey ?titleList ’("simpleWave") ?colorList ’(y2))
Plots expression ey against expression ex with the title being simpleWave and the color being y2.
plot
plot(o_waveform1[o_waveform2... ] [?exprl_exprList] [?stripx_stripNumber]) => t / nil
Description
Plots waveforms in the current subwindow. If there is no Virtuoso Visualization and Analysis XL window, this command opens one.
plot is implemented as a macro and not as a SKILL function. Therefore, the functions that expect a function name as an argument will not accept plot as a valid argument. For example, the following call to the function apply is not valid:apply(’plot)
Arguments
Value Returned
|
Returns |
Additional Information
Following are the scenarios that show how the plot and displayMode functions work together:
Case 1: When no waveform plot is open and you plot a waveform, w1, and then plot another waveform, w2, both the waveforms are plotted in one strip. Now if you set the displayMode('strip)function, the waveforms are plotted in two different strips.
-
plot(w1) -
plot(w2)
w1andw2are plotted in one strip. -
displayMode('strip)
w1andw2are plotted in two strips. -
plot(w3)
w3is plotted in a new strip. The?stripargument is not required in this case.
Case 2: When no waveform plot is open and you set displayMode('strip):
-
displayMode('strip) -
plot(w1) -
plot(w2)
w2is plotted in a new strip. The explicit?stripargument is not required in this case.
Case 3: When no waveform plot is open:
-
plot(w1) -
plot(w2)
w1andw2are plotted in one strip. -
plot(w3 ?strip 2)
w3is plotted in a new strip because the plot function contains the?strip2argument. -
plot(w4)
w4is plotted in the same strip as in whichw3is plotted.
Case 4:When no waveform plot is open:
-
plot(w1 ?strip 1) -
plot(w2 ?strip 2)
w2is plotted in strip 2. -
plot(w3 ?strip 1)
w3is plotted in strip 1. -
plot(w4 ?strip 2)
w4is plotted in strip 2, which now becomes an active strip. -
displayMode('strip)
This divides the traces contained in strip 2 into individual strips, because strip 2 is the active strip now. Now, if you plot new waveforms in this strip, they are plotted in new strips. However, strip 1continues to have two signals,w1andw3. -
plot(w5)
w5is plotted in a new strip. -
plot(w6)
w6is plotted in a new strip.
Case 5: When no waveform plot is open:
-
window=awvCreatePlotWindow() -
awvSetDisplayMode(window "strip") -
plot(w1) -
plot(w2) -
plot(w3) -
plot(w4)
w1,w2,w3, andw4are plotted in four different strips.
Case 6: Plot digital and analog data and set displayMode(`composite). This combines all analog signals into a single strip. Now, if you set the displayMode (`strip), the analog signals are divided into individual strips. These operations are applicable only on the active strip.
Example
plot(v( "/net56" ) )
Plots the waveform for the voltage of net56.
plot( vm( "/net56" ) vp( "/net56" ) )
Plots the waveforms for the magnitude of the voltage of net56 and the phase of the voltage of net56.
plot( v( "OUT" ) i( "VFB" ) ?expr list( "voltage" "current" ) )
Plots the waveforms, but changes one legend label from v("OUT") to voltage and changes the other legend label from i("VFB") to current.
plot( v( "OUT" ) i( "VFB" ) )
Plots the waveforms v( "OUT" ) and i( "VFB" ) on the Y axes 1 and 2, respectively.
plot(wave1 wave2 wave3 ?strip list(1 2 2))
Plots wave1 to strip 1, and wave2 and wave3 to strip 2.
plotStyle
plotStyle(
S_style
)
=> t / nil
Description
Sets the plotting style for all the waveforms in the current subwindow.
If the plotting style is bar and the display mode is smith, the plotting style is ignored until the display mode is set to strip or composite.
Arguments
|
Plotting style for the subwindow.Valid values: |
| Argument | Description |
|---|---|
|
Vertical bars are drawn at each data point that extend from the point to the bottom of the graph. |
|
|
Each data point is joined to adjacent data points by straight-line segments. |
Value Returned
|
Returns |
Example
plotStyle( ’auto )
=> t
printGraph
printGraph( [?windowx_window] [?printerNames_hcPrinterName] [?horizontalMarginx_horizontalMargin] [?verticalMarginx_verticalMargin] [?numCopyx_numCopy] [?paperSizex_paperSize] [?orientations_orientation] [?fileNames_fileName] [?tempDirs_tempDir] [?matchWindowg_matchWindow] [?numGraphsPerPagex_numGraphsPerPage] [?printMarkerTableg_printMarkerTable] [?markerTableLocations_markerTableLocation] [?enableHeaderg_enableHeader] [?enableFooterg_enableFooter] [?headerLeftTexts_headerLeftText] [?headerCenterTexts_headerCenterText] [?headerRightTexts_headerRightText] [?footerLeftTexts_footerLeftText] [?footerCenterTexts_footerCenterText] [?footerRightTexts_footerRightText] [?printColorg_printColor] [?doubleSidedPrintg_doubleSidedPrint] [?duplexModes_duplexMode] [?pageOrders_pageOrder] ) => t / nil
Description
Prints the graph plotted in the specified window.
Arguments
?window X_window Window ID of the waveform window whose plot is to be sent to a printer or a file. The default value is the window ID of the current window.
?printerName s_printerName
Name of the printer to be used for printing.
Valid values: a string or nilDefault value: nil
?horizontalMargin x_horizontalMargin
Horizontal margin.
Valid values: any positive integer
Default value: 18
?verticalMargin x_verticalMargin
Vertical margin
Valid values: any positive integer
Default value: 18
?numCopy x_numCopy Number of copies to be printed.
Valid values: any positive integer
Default value: 1
?paperSize x_paperSize
Size of paper used for printing.
Valid values: letter, legal, executive, folio, ledger, tabloid, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, b0, b1, b2, b3,b4, b5, b6, b7, b8, b9, b10, c5e, comm10e, and dle.
Default value: letter
?orientation s_orientation
Paper orientation. This option works only when you print a graph window and does not work when you save the window to a graph file.
Valid values: potrait, landscape, and automaticDefault value: landscape
?fileName s_fileName
Name of the output file. The output file can be created in one of the following file formats:
PS – PostScript (.ps)
PDF – Portable Document Format (.pdf)
Valid values: any string value or nilDefault value: nil
?tempDir s_tempDir Name of a temporary directory to be used for scratch space.
Valid values: name of a temporary directory
Default value: "/usr/tmp"
?matchWindow g_matchWindow
Specifies whether the print output is identical to the current graph window. This option is used if you want to print all the subwindows in a PDF file in the same order in which they are arranged in the graph.
Valid values: t or nilDefault value: nil
?numGraphsPerPage x_numGraphsPerPage
Specifies how many graphs are to be printed per page.
Valid values: Integer values 1, 2, 3, 4, 8, 12, 16, 20Default value: 1
?printMarkerTable g_printMarkerTable
Specifies whether the marker table is to be printed.
Valid values: t or nil.
Default value: nil.
?MarkerTableLocation s_MarkerTableLocation
Specifies the location of the marker table on the page to be printed.
Valid values: belowGraph and separatePage.
Default value: belowGraph.
?enableHeader g_enableHeader
Specifies whether the page contains a header.
Valid values: t or nilDefault value: t
?enableFooter g_enableFooter
Specifies whether the page contains a footer.
Valid values: t or nilDefault value: t
?headerLeftText s_headerLeftText
Sets the text to be printed to the left of header.
Valid values: any string value
Default value: " "
?headerCenterText s_headerCenterText
Sets the text to be printed in the center of the header.
Valid values: Any string value and the following macros—$TOTALPAGES, $TITLE, $USERID, $PRINTER, $PAGE, $DATE, $DATETIME, $AUTHOR, $TIME.
Default value: $TITLE
?headerRightText s_headerRightText
Sets the text to be printed to the right of the header.
Valid values: Any string value and the following macros—$TOTALPAGES, $TITLE, $USERID, $PRINTER, $PAGE, $DATE, $DATETIME, $AUTHOR, $TIME.
Default value: $DATETIME
?footerLeftText s_footerLeftText
Sets the text to be printed to the left of footer.
Valid values: Any string value and the following macros—$TOTALPAGES, $TITLE, $USERID, $PRINTER, $PAGE, $DATE, $DATETIME, $AUTHOR, $TIME.
Default value: Printed on $PRINTER by $USERID
?footerCenterText s_footerCenterText
Sets the text to be printed in the center of the footer.
Valid values: Any string value and the following macros—$TOTALPAGES, $TITLE, $USERID, $PRINTER, $PAGE, $DATE, $DATETIME, $AUTHOR, $TIME.
Default value: " "
?footerRightText s_footerRightText
Sets the text to be printed on the right of the footer.
Valid values: Any string value and the following macros—$TOTALPAGES, $TITLE, $USERID, $PRINTER, $PAGE, $DATE, $DATETIME, $AUTHOR, $TIME.
Default value: Page $PAGE of $TOTALPAGES
?printColor g_printColor
Specifies whether the print is to be colored
Valid values: t or nilDefault value: t
?doubleSidedPrint g_doubleSidedPrint
Specifies whether both the sides of paper is used for printing.
Valid values: t or nil
?duplexMode s_duplexMode
Specifies the duplex printing mode.
Valid values: none, auto, shortSide, longSide.
Default value: auto
?pageOrder s_pageOrder
Specifies the order in which pages are printed.
Valid values: collate and reverseDefault value: collate
Value Returned
Examples
Prints the current graph window with the default printing options.
printGraph(?printerName "ind001" ?paperSize "a4" ?orientation 'portrait)
Prints the current graph window by using the printer, ind001, with paper size a4 and orientation portrait.
pzFrequencyAndRealFilter
pzFrequencyAndRealFilter(o_wave[?freqfilterf_fval ][?realfilterf_rval] ) =>o_waveform/ nil
Description
Returns a filtered Pole or Zero waveform from the pole zero simulation data. Filtering is done on the basis of given maximum frequency and minimum real value.
Arguments
Values Returned
Examples
pzFrequencyAndRealFilter(wave ?freqfilter 1e+24 ?realfilter 2e+10)
=> srrWave:175051584
Returns a filtered Pole or Zero waveform, which is filtered on the basis of given maximum frequency and minimum real value.
pzPlot
pzPlot( [?resultsDirt_resultsDir] [?resultS_resultName] [?plotS_toPlot ][?freqfilterf_fval ][?realfilterf_rval]) => t / nil
Description
Plots a report showing the poles and zeros of the network. If you specify a directory with resultsDir, the pzPlot command plots the results for that directory. The S_toPlot option can be used to plot only poles, only zeros or both poles and zeros information.
This command should be run on the results of the Spectre pz (pole-zero) analysis.
Arguments
t_resultsDir Directory containing the results. If you specify a directory with resultsDir, the pzPlot command plots the results for that directory.
S_resultName Pointer to results from the analysis for which you want to plot the report.
S_toPlot Use this option to plot only poles, only zeros or both poles and zeros information.
Valid values: ’poles, ’zeros, ’polesZeros.
f_fval Maximum pole and zero frequency value to filter out poles and zeros that are outside the frequency band of interest (FBOI) and that do not influence the transfer function in the FBOI.
f_rval Real value which is used to filter out poles and zeros whose real value are less than or equal to the value specified.
Value Returned
t Returns t if it plots a report.
Example
pzPlot(?resultsDir "/usr/simulation/lowpass/spectre/schematic" ?result ’pz)
Plots a report for all the poles and zeros for the specified results.
pzPlot(?resultsDir "/usr/simulation/lowpass/spectre/schematic" ?plot ’poles)
Plots a report containing only poles for the specified results.
pzPlot( ?plot ’zeros ?realfilter -1.69e-01)
Plots a report for all those zeros whose real values are greater than the real value specified.
pzPlot( ?plot ’polesZeros ?freqfilter 2.6e-01 )
Plots a report for all those poles and zeros whose frequency is within the frequency band of interest (2.6e-01).
pzSummary
pzSummary( [?resultsDirt_resultsDir] [?resultS_resultName][S_toPrint] [?freqfilterf_fval] [?realfilterf_rval] [ ?outputt_output] ) => t / nil
Description
Prints a report with the poles and zeros of the network. If you specify a directory with resultsDir, the pzSummary command prints the results for that directory. Use the S_toPrint option to print only poles, only zeros or both poles and zeros information.
This command should be run on the results of the Spectre pz (pole-zero) analysis.
Arguments
t_resultsDir Directory containing the results. If you specify a directory with resultsDir, the pzSummary command plots the results for that directory.
S_resultName Pointer to results from the analysis for which you want to print the report.
S_toPlot Use this option to plot only poles, only zeros or both poles and zeros information.
Valid values: ’poles, ’zeros, ’polesZeros.
f_fval Maximum pole and zero frequency value to filter out poles and zeros that are outside the frequency band of interest (FBOI) and that do not influence the transfer function in the FBOI.
f_rval Real value which is used to filter out poles and zeros whose real value are less than or equal to the value specified.
t_output Provides an option to write the output to a file. The possible values can be a file name or a port name.
Value Returned
t Returns t if it prints a report.
Example
pzSummary(?resultsDir "/usr/simulation/lowpass/spectre/schematic" ?result ’pz)
Prints a report for all the poles and zeros for the specified results.
pzSummary(?resultsDir "/usr/simulation/lowpass/spectre/schematic" ?print ’poles)
Prints a report containing only poles for the specified results.
pzSummary( ?print ’zeros ?realfilter -1.69e-01)
Prints a report for all those zeros whose real values are less than or equal to the real value specified.
pzSummary( ?print ’polesZeros ?freqfilter 2.6e-01 )
Prints a report for all those poles and zeros whose frequency is within the frequency band of interest (2.6e-01).
pzSummary( ?output "/tmp/file")
pzSummary( ?output "file")
Prints results in a file located in the current working directory.
pzSummary( ?output oFile)
where, oFile=outfile("/tmp/file")
pzSummary( ?output nil)
pzSummary( ?output t)
pzSummary( ?output 32)
Prints results on the CIW or Ocean command-line.
removeLabel
removeLabel(
l_id
)
=> t / nil
Description
Removes the label, or all the labels identified in a list, from the current subwindow.
Arguments
Value Returned
Example
label = addWindowLabel( list( 0.75 0.75 ) "test" )
Adds the "test" label to the current subwindow at the specified coordinates and stores the label identification number in label.
removeLabel( label )
Removes the label whose identification number is stored in label. In this case, the "test" label is removed.
report
report( [?outputt_filename|p_port] [?typet_type] [?namet_name] [?paramt_param] [?formats_reportStyle] [?reports_reportStyle ] [?maxLineWidthcharsPerLine ] ) => t / nil
Description
Prints a report of the information contained in an analysis previously specified with selectResult.
You can use this command to print operating-point, model, or component information. If you provide a filename as the ?output argument, the report command opens the file and writes the information to it. If you provide a port (the return value of the SKILL outfile command), the report command appends the information to the file that is represented by the port.
dataTypes command to see what types of reports you can choose. For Spectre® circuit simulator operating points, be sure to choose dcOpInfo.Arguments
t_filename File in which to write the information. The report command opens the file, writes to the file, and closes the file. If you specify the filename without a path, the OCEAN environment 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
t_type Type of information to print, such as all bjts.
t_name Name of the node or component.
t_param Name of the parameter to print. It is also a list.
s_reportStyle Specifies the format of the output.
Valid values: spice and paramValPairDefault value: paramValPair
The spice format looks like this:
The paramValPair format looks like this:
Name1
Param1=value Param2=value Param3=value
Name2
Param1=value Param2=value Param3=value
Name3
Param1=value Param2=value Param3=value
charsPerLine Number of characters to be printed per line.
Value Returned
t Returns t if the information is printed.
nil Returns nil and an error message if the information cannot be printed.
Example
The following example shows how to display a report by using the results of an analysis already run. First, run the results() command to get a list of the type of results that exist in the current results directory.
results()
= > ( dcOpInfo tran ac dc)
From the list of result types returned by the previous function, select a particular type of results for which you want to print the report.
selectResult( ’dcOpInfo )
= > t
Use the report function to print the results. The following examples show how to print different details in a report:
report()
= > t
Prints all the operating-point parameters.
report( ?type "bjt" )
= > t
Prints all the bjt operating-point parameters.
report( ?type "bjt" ?param "ib" )
= > t
Prints the ib parameter for all bjts.
report( ?type "bjt" ?name "/Q1" ?param "ib" )
= > t
Prints the ib parameter for the bjt named Q1.
report( ?output "myFile" )
=> t
Prints all the operating-point parameters to a file named myFile.
report( ?output myAlreadyOpenedPort )
=> t
Prints all the operating-point parameters to a port named myAlreadyOpenedPort.
The report() can also be used by providing the set of parameters as a list as follows:Type : bsim3v3
Params : cdg cgb gm ids
report( ?type "bsim3v3" ?param "cdg" )
report( ?type "bsim3v3" ?param ’( "cdg" "cgb" ) )
report( ?type "bsim3v3" ?param ’( "cdg" "cgb" "gm" "ids" ))
report( ?format ’spice ?maxLineWidth 200 )
=> t
Prints the report in spice format wrapping at column 200.
saveGraphImage
saveGraphImage( [?windowx_window] [?fileNamex_fileName] [?exactCopyg_exactCopy] [?qualityx_quality] [?msOptimizeg_msOptimize] [?widthx_width] [?heightx_height] [?unitss_units] [?resolutionx_resolution] [?resolutionUnitss_resolutionUnits] [?aspectRatiog_aspectRatio] [?enableTitleg_enableTitle] [?enableLegendg_enableLegend] [?enableAxesg_enableAxes] [?enableGridsg_enableGrids] [?backgroundColors_backgroundColor] [?saveAllSubwindowsg_saveAllSubwindows ] [?saveEachSubwindowSeparatelyg_saveEachSubwindowSeparately] ) =>x_fileName/ nil
Description
Arguments
|
Window ID of the waveform window whose plot is to be saved in a file. The default value is the window ID of the current window. |
|
|
Name of the output file to be created. The output file can be created in one of the following file formats:
Note: If fileName argument is not specified, the graph image is saved in a |
|
|
Saves the exact copy of all subwindows. Only |
|
|
Modifies the quality of the image. This option works only for the |
|
|
Enables the image to be imported in the Microsoft office application. This option is available when you select the image type as Encapsulated PostScript ( |
|
|
Valid values: Any positive integer value.
Default value: |
|
|
Sets the height of the imageValid values: Any positive integer value.
Default value: |
|
|
Specifies the unit for image size (height and width)Valid values:
Default value: |
|
|
Sets the image resolution. This option works only for the |
|
|
Sets the units for image resolution. This option works only for the |
|
|
Enables the aspect ratio, which is the ratio of the width of the image to its height. |
|
|
Default value:
alid values: All the valid color values are defined at the following location:
For example, |
|
|
Specifies whether to save each subwindow in a separate image file or in the same image file. |
|
Value Returned
Examples
-
saveGraphImage()
Saves the current graph window with the default saving options. -
saveGraphImage(?fileName "ViVA.jpg" ?enableTitle t ?enableLegend nil)
Saves the current graph window in theViVA.jpgfile with only trace legend enabled. -
saveGraphImage(?window currentWindow() ?fileName "ViVA.jpg" ?backgroundColor "light gray")
Saves the current graph window in theViVA.jpgfile with background color as light gray.
Additional Information
Following are the guidelines supported by the saveGraphImage function:
-
Arguments exactCopy, quality, resolution, and resolutionUnits are ignored for
epsfile format. - Only fileName and quality arguments can be used with exactCopy argument. All other arguments are ignored.
-
Argument quality can be used only with
jpegfile format. It is ignored for other formats. -
Arguments resolution and resolutionUnits cannot be set for
eps,pdf, andsvgfile formats. -
Argument msOptimize can be set to
nilonly forepsfile format. -
Argument enableGrids cannot be set to
truewhen enableAxes isnil.
xLimit
xLimit(
l_minMax
)
=> t / nil
Description
Sets the X axis display limits for the current subwindow. This command does not take effect if the display mode is set to smith.
Arguments
Value Returned
|
Returns |
Example
xLimit( list( 1 100 ) )
=> t
Sets the X axis to display between 1 and 100.
yLimit
yLimit(l_minMax[?stripNumberx_stripNumber] ) => t / nil
Description
Sets the Y axis display limits for the waveforms associated with a particular Y axis and strip in the current subwindow.
If you do not specify x_stripNumber, the limits are applied when the subwindow is in composite mode.
Arguments
Value Returned
|
Returns |
Example
yLimit( list( 4.5 7.5 ) )
=> t
Sets Y axis 1 to display from 4.5 to 7.5.
Pl1
You can access SpectreRF functions in OCEAN by using the getData function and then plot or print them in OCEAN using the ocnPrint and plot functions.
To take an example, after performing a spectre sp analysis in the Analog Design Environment, click Results – Direct Plot – Main Form. In the S-Parameter Results form, select the function and other options that you want to plot. Also, select the Add to Outputs option under the Plot button. Then, click OK. The expression will be added to the Outputs pane of the ADE window. When all the desired expressions are created in the Outputs pane, use the ADE – Session – Save Ocean Script command to create the OCEAN script for these plots.
To plot the expression in OCEAN, use the following command:
plot(<expression in Output pane>)
plot(Gmax()) for Gmax in S-parameter analysis
You can print the functions using the ocnPrint command. For example:
ocnPrint( Gmax() Kf() )
After a spectre sp noise analysis, use the following command to access the sp noise data.
selectResult("sp_noise")
A sample OCEAN script to help you print or plot NFmin (minimum noise figure), N F (noise figure), and RN (noise resistance) results follows. Plotting NNR (normalized noise resistance) is similar to plotting RN.
; start ocean with Spectre as the as the simulator.
simulator( ’spectre )
;specify design and model path
design( "/usr1/mnt4/myhome/simulation/myckt/schematic/netlist/myckt.c")
path( "/usr1/mnt4/myhome/models" )
; specify analysis used: sp with noise
analysis(’sp ?start "100M" ?stop "10G" ?donoise "yes"
?oprobe "/PORT1" ?iprobe "/PORT0" )
;set design variables
desVar( "r2" 37 )
desVar( "r1" 150 )
;set temperature
temp( 25 )
;run sp noise analysis with the above desVar list.
run()
printf("\n simulation has finished.")
printf("\n selecting sp noise results")
selectResult("sp_noise")
printf("\n print NFmin and plot NF")
NFmin = getData("NFmin")
NF = getData("NF")
ocnPrint( NFmin )
plot( NF )
printf("\n plot Rn")
Rn = getData("RN" ?result "sp_noise")
plot( Rn ?expr ’( "Rn" ) )
exit
For more information, see the section Periodic Noise Analysis and the appendix Plotting Spectre S-Parameter Simulation Data in the Virtuoso Spectre Circuit Simulator RF Analysis User Guide.
For more information on these functions, click these links: getData, sp, ocnPrint,and plot.
Return to top