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

8


Plotting and Printing Commands

This chapter contains information on the following plotting and printing commands:

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

None.

Value Returned

x_subwindowID

Returns the window ID of the new subwindow.

nil

Returns nil and an error message if there is no current Waveform window.

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

x_windowtitle

User-defined title for the subwindow.

Value Returned

t

The user-supplied name of the current subwindow.

nil

Returns nil if the title is not created.

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

x_windowtitle

User-defined title for the window.

Value Returned

t

The user-supplied name of the current window.

nil

Returns nil if the title is not created.

Example

addTitle( “waveform 1” ) 
=> t

Adds the title waveform 1 to the selected window.

addWaveLabel

addWaveLabel( 
x_waveIndex 
l_location 
t_label 
[ ?textOffset g_textOffset ] 
[ ?color x_color ]
[ ?justify t_justify ] 
[ ?fontStyle t_fontStyle ] 
[ ?height x_height ] 
[ ?orient t_orient ]
[ ?drafting g_drafting ] 
[ ?overBar g_overbar ]) 
=> s_labelId / nil

Description

Attaches a label to the specified waveform curve in the current subwindow.

Arguments

x_waveIndex

Integer identifying the waveform curve.

l_location

List of two waveform coordinates that describe the location for the label.

t_label

Label for the waveform.

g_textOffset

Boolean that specifies whether to place a marker or label. If set to t, a marker is placed. If set to nil, a label is placed.
Default value: nil.

x_color

Label color specified as an index in the technology file.
Default value: 10

t_justify

Justification, which is specified as "upperLeft", "centerLeft",  "lowerLeft", "upperCenter", "centerCenter", "lowerCenter",  "upperRight", "centerRight", or "lowerRight".
Default value: "lowerLeft"

t_fontStyle

Font style, which is specified as "euroStyle", "gothic", "math",  "roman", "script", "stick", "fixed", "swedish", "raster", or "milSpec".
Default value: the font style of the current subwindow

x_height

Height of the font.
Default value: the font height of the current subwindow

t_orient

Orientation of the text, specified as either "R0" or "R90".
Default value: "R0"

g_drafting

Boolean that specifies whether the label stays backwards or upside-down. If set to t, a backwards or upside-down label is displayed in a readable form. If set to nil, a backwards or upside-down label stays the way it is.
Default value: t

g_overbar

Boolean that specifies whether underscores in labels are displayed as overbars. If set to t, underscores in labels are displayed as overbars. If set to nil, underbars are displayed as underbars.
Default value: nil

Value Returned

s_labelId

Returns an identification number for the waveform label.

nil

Returns nil if there is an error.

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

Note the following points:

Case1:

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

Case 2:

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_location 
t_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

l_location

List of two waveform coordinates that describe the location for the label.

Valid values: 0 through 1

t_label

Label for the waveform.

Value Returned

s_labelId

Returns an identification number for the subwindow label.

nil

Returns nil if there is an error.

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

None.

Value Returned

t

Returns t if the waveform information is deleted.

nil

Returns nil and an error message if there is no current Waveform window.

Example

clearAll() 
=> t

Erases the contents of the current Waveform window.

clearSubwindow

clearSubwindow() 
=> t / nil

Description

Erases the contents of the current subwindow.

Arguments

None.

Value Returned

t

Returns t if the contents of the subwindow are erased.

nil

Returns nil and an error message otherwise.

Example

clearSubwindow() 
=> t

Erases the contents of the current subwindow.

currentSubwindow

currentSubwindow( 
[ ?x_subwindow x_subwindow ]
) 
=> t / nil

Description

Sets x_subwindow as the current subwindow.

Arguments

?x_subwindow x_subwindow

(Optional) Number of the subwindow, found in the upper right corner, that is to become the current subwindow.

Value Returned

t

Returns t when the subwindow is set to x_subwindow. If you do not specify any argument in this function, it returns the current subwindow number.

nil

If no subwindow exists.

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

w_windowId

Waveform window ID.

Value Returned

w_windowId

Returns the current Waveform window ID.

nil

Returns nil and an error if the current window cannot be set.

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_wave 
x_harmonic
x_extrapolationPoint 
[ ?compression x_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

o_wave

The waveform for which to plot the compression.

x_harmonic

Harmonic frequency index.

x_extrapolationPoint

The extrapolation point.

?compression x_compression

The amount of dB compression.

Default value: 1

Value Returned

t

Returns t if the point is plotted

nil

returns nil if there was an error

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(
[ ?resultsDir t_resultsDir ]
[ ?result S_resultName ] 
[ ?output t_fileName | p_port ] 
[ ?paramValues ln_paramValues ] 
[ ?deviceType ls_deviceType ]
[ ?variations ls_variations ] 
[ ?includeInst lt_includeInst ] 
[ ?excludeInst lt_excludeInst ] 
[ ?truncateData n_truncateData ]
[ ?truncateType s_truncateType ] 
[ ?sortType ls_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

?resultsDir t_resultsDir

The directory containing the dcmatch-analysis results.

?results S_resultName

Results from an analysis for which you want to print the dcmatchSummary report.

?output t_fileName

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, type getSkillPath() at the OCEAN prompt.

?output 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.

?paramValues ln_paramValues

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.

?deviceType ls_deviceType

List of device type strings to be included. Valid values are a list of strings or ’all or a single device name. Default value is ’all.

?variations ls_variations

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 ‘all. For Example: ’( (“bsim3v3” (“sigmaOut” “sigmaVth”)) (“resistor” (“sigmaOut”))

?includeInst lt_includeInst

List of instance name strings to definitely include in the dcmatchSummary.

?excludeInst lt_excludeInst

List of instance name strings to exclude in the dcmatchSummary.

?truncateData x_truncateData

Specifies a number that the truncateType argument uses to define the components for which information is to be printed.

?truncateType s_truncateType

Specifies the method that is used to limit the data being included in the report

Valid values:

  • ’top - Saves information for the number of components specified with truncateData. The components with the highest contributions are saved. Sample value for truncateData: 10
  • ’relative - Saves information for all components that have a higher contribution than truncateData * maximum. Where maximum is the maximum contribution among all the devices of a given type. Sample value for truncateData: 1.9n
  • ‘absolute - Saves information for all the components in the selected set whose contribution are more than truncateData. Sample value for truncateData: 0.1
  • ‘none - Saves information for all the components. Sample value for truncateData: Not required

?sortType ls_sortType

Specifies how the printed results are to be sorted. The valid values are nil, ’name, ’output.

Value Returned

t_fileName

Returns the name of the port.

p_port

Returns the name of the file.

nil

Returns nil and an error message if the summary cannot be printed.

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

None.

Value Returned

t

Returns t if the current subwindow is deleted.

nil

Returns nil and an error message if there is no current subwindow.

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

x_index

Integer identifying a particular waveform curve.

all_string

The string "all" specifying that all waveform curves are to be deleted.

Value Returned

t

Returns t if the curves are deleted.

nil

Returns nil and an error message if the curves are not deleted.

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

t_mode

String representing the display mode for the subwindow.

Valid values: strip, composite, or smith.

Note: This also works if a plot is not open.

Value Returned

t

Returns t when the display mode of the subwindow is set.

nil

Returns nil and an error message if the display mode cannot be set.

Example

displayMode( "composite" ) 
=> t

Sets the current subwindow to display in composite mode.

getAsciiWave

getAsciiWave( 
t_filename
x_xColumn 
x_yColumn 
[ ?xskip x_x_skip ]
[ ?yskip x_yskip ]
[ ?formatFloat g_formatFloat ]
[ ?xName t_xName ]
[ ?xUnits t_xUnits ]
[ ?yName t_yName ]
[ ?yUnits t_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

t_filename

The name of the Ascii file to be read in.

x_xColumn

The column in the data file that contains the X-axis data.

x_yColumn

The column in the data file that contains the Y-axis data.

?xskip x_xskip

The number of lines to skip in the X column.

?yskip x_yskip

The number of lines to skip in the Y column.

?formatFloat g_formatFloat

A boolean when set to t converts the integer data into float values. Default value: nil.

?xName t_xName

The name of the X-axis.

?xUnits t_xUnits

The units for the X-axis.

?yName t_yName

The name of the Y-axis.

?yUnits t_yUnits

The units for the Y-axis.

Value Returned

o_wave

The waveform object.

nil

Returns nil if the function fails.

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

None.

Value Returned

t

Returns t if redrawing is disabled.

nil

Returns nil if there is an error, such as there is no current Waveform window.

Example

graphicsOff() 
=> t

Disables the redrawing of the Waveform window.

graphicsOn

graphicsOn() 
=> t / nil

Description

Enables the redrawing of the current Waveform window.

Arguments

None.

Value Returned

t

Returns t if redrawing is enabled.

nil

Returns nil if there is an error, such as there is no current Waveform window.

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.

You must first set any plotting options with the hardCopyOptions command.

Arguments

w_windowId

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

t

Returns t if successful.

nil

Returns nil if there is an error.

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( 
[ ?hcCopyNum x_hcCopyNum ]
[ ?hcOffsetHeight x_hcOffsetHeight ] 
[ ?hcOffsetWidth x_hcOffsetWidth ]
[ ?hcOrientation s_hcOrientation ]
[ ?hcOutputFile g_hcOutputFile ]
[ ?hcPrinterName s_hcPrinterName ] 
[ ?hcTmpDir t_hcTmpDir ]
[ ?hcPaperSize s_hcPaperSize ]
[ ?hcMakeExactCopy g_hcMakeExactCopy ]
[ ?hcQuality x_hcQuality ]
[ ?hcOptimizeForWindows g_hcOptimizeForWindows ]
[ ?hcImageWidth x_hcImageWidth ]
[ ?hcImageHeight x_hcImageHeight ]
[ ?hcImageSizeUnits s_hcImageSizeUnits ]
[ ?hcImageResolution x_ImageResolution ]
[ ?hcResolutionUnits s_hcResolutionUnits ]
[ ?hcImageAspectRatio x_hcImageAspectRatio ]
[ ?hcUseExistingBackground g_hcUseExistingBackground ]
[ ?hcDisplayTitle g_hcDisplayTitle ]
[ ?hcDisplayLegend g_hcDisplayLegend ]
[ ?hcDisplayAxes g_hcDisplayAxes ]
[ ?hcDisplayGrids g_hcDisplayGrids ]
[ ?hcSaveEachSubwindowSeparately g_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

?hcCopyNum x_hcCopyNum

The number of copies to plot.

Valid values: any positive integer

Default value: 1

?hcOffsetHeight x_hcOffsetHeight

The vertical margin.

Valid values: any positive integer

Default value: 0

?hcOffsetWidth x_hcOffsetWidth

The horizontal margin.

Valid values: any positive integer

Default value: 0

?hcOrientation s_hcOrientation

The plot 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: ’portrait, ’landscape, ’automatic

Default value: ’automatic

?hcOutputFile g_hcOutputFile

Name of the output file. The output file can be created in one of the following file formats:

  • BMP – Windows Device Independent Bitmap (.bmp)
  • PNG – Portable Network Graphics(.png)
  • PS – PostScript (.ps)
  • TIFF – Tagged Image File Format (.tif)
  • TIFF – Tagged Image File Format (.tif)
  • EPS – Encapsulated Post Script (.eps)
  • PDF – Portable Document Format (.pdf)
  • PPM – Portable PixMap File (.ppm)
  • JPG – Joint Photographic Experts Group (.jpg)
  • SVG – Scalable Vector Graphics (.svg)
  • XPM – X PixMap (.xpm)

Valid values: a string or nil

Default value: nil

?hcPrinterName s_hcPrinterName

The name of the printer.

Valid values: a string or nil

Default value: nil

?hcTmpDir t_hcTmpDir

The name of a temporary directory to be used for scratch space.

Valid values: name of a temporary directory

Default value: "/usr/tmp"

?hcPaperSize s_hcPaperSize

The paper size. The available paper sizes are—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, dle.

Default value: a4

?hcMakeExactCopy g_hcMakeExactCopy

Saves the exact copy of all subwindows. Only ?hcQuality and ?hcOutputFile arguments work with this option. This option does not work for the eps file format.

Valid values: t or nil

Default value: nil

?hcQuality x_hcQuality

Modifies the quality of the image. This option works only for the .jpeg file format. This option does not work for the eps file format.

Valid values: 20 to 100%

Default value: 85

?hcOptimizeForWindows g_hcOptimizeForWindows

Enables the image to be imported in the Microsoft office application. This option is available when you select the image type as Encapsulated PostScript (*.eps). This option simplifies the image output so that it can be ready by Microsoft Office 2003 and 2007 applications

Valid values: t or nil

Default value: t

?hcImageWidth x_hcImageWidth

Sets the width of the image.

Valid values: Any positive integer value.

Default value: 800 pixels

?hcImageHeight x_hcImageHeight

Sets the height of the image

Valid values: Any positive integer value.

Default value: 600 pixels

?hcImageSizeUnits s_hcImageSizeUnits

Specifies the unit for image size (height and width)

Valid values: inch, cm, mm, picas, pixels, and points

Default value: pixels

?hcImageResolution x_hcImageResolution

Sets the image resolution. This option works only for the bmp, jpeg, png, ppm, tif, and xpm file formats. It does not work for eps, pdf, and svg file formats.

Valid values: Any positive integer value.

Default value: 96

?hcResolutioUnits s_hcResolutionUnits

Sets the units for image resolution. This option works only for the bmp, jpeg, png, ppm, tif, and xpm file formats. It does not work for eps, pdf, and svg file formats.

Valid values: pixels/cm and pixels/in

Default value: pixels/in

?hcImageAspectRatio g_hcImageAspectRatio

Enables the aspect ratio, which is the ratio of the width of the image to its height.

Valid values: t or nil

Default value: nil

?hcUseExistingBackground g_hcUseExistingBackground

Enables to use the existing background in the graph image.

Valid values: t or nil

Default value: nil

?hcDisplayTitle g_hcDisplayTitle

Displays the trace title in the graph image.

Valid values: t or nil

Default value: t

?hcDisplayLegend g_hcDisplayLegend

Displays the trace legend in the graph image.

Valid values: t or nil

Default value: t

?hcDisplayAxes g_hcDisplayAxes

Displays the axes in the graph image.

Valid values: t or nil

Default value: t

?hcDisplayGrids g_hcDisplayGrids

Displays the grids in the graph image.

Valid values: t or nil

Default value: t

?hcSaveEachSubWindowSeperately g_hcSaveEachSubwindowSeparately

Saves all subwindows in a graph to a single file or multiple files.

Valid values: t (multiple files) or nil (single file)

Default value: t

Value Returned

g_value

Returns the new value of the option.

nil

Returns nil if there is an error.

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_refHarmonic 
x_extrapolationPoint 
) 
=> t / nil

Description

Plots the IP3 curves.

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

o_wave

Waveform for which to plot the ip3.

x_sigHarmonic

Index of the third order harmonic.

x_refHarmonic

Index of the first order (fundamental) harmonic.

x_extrapolationPoint

Extrapolation point.

Value Returned

t

Returns t if the curves are plotted.

nil

Returns nil if there is an error.

Example

ip3Plot(v("/net28") 47 45 -25)

newWindow

newWindow() 
=> w_windowID / nil

Description

Creates a new Waveform window and returns the window ID.

Arguments

None.

Value Returned

w_windowId

Returns the window ID of the new Waveform window.

nil

Returns nil and an error message if the new Waveform window cannot be created.

Example

newWindow() 
=> window:3

Creates a new Waveform window that is numbered 3 in the upper right corner.

noiseSummary

noiseSummary(
s_type 
[ ?result s_resultName [ ?resultsDir t_resultsDir ] ] 
[ ?frequency f_frequency ] 
[ ?weight f_weight ]
[ ?output t_fileName | p_port ]
[ ?noiseUnit t_noiseUnit ]
[ ?truncateData x_truncateData ]
[ ?truncateType s_truncateType ] 
[ ?digits x_digits ] 
[ ?percentDecimals x_percentDecimals ]
[ ?from f_from ]
[ ?to f_to ] 
[ ?deviceType ls_deviceType ] 
[ ?weightFile t_weightFile ] 
[ ?paramValues ls_paramValues ]
[ ?hierLevel x_hierLevel ]
[ ?sort ls_sort ]
[ ?includeInsts ls_includeInsts ]
[ ?excludeInsts ls_excludeInsts ]
[ ?combineIteratedInsts g_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

s_type

Type of noise-analysis results for which to print the report.

Valid values: spot, to specify noise at a particular frequency, or integrated, to specify noise integrated over a frequency range.

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

While trying to get the noise summary output for multiple datasets, in case the current dataset is not a noise dataset, an error message is displayed. To avoid this, specify the ?result s_resultName argument explicitly while using this function.

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

?frequency f_frequency

Frequency value of interest.

?weight f_weight

Waveform representing the function with which the integral is weighted.

Default value: 1.0

?output t_fileName | p_port

The type of output:

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

?noiseUnit t_noiseUnit

Specifies the type of noise unit to be saved.

Valid values:

  • "V^2" for V^2 or "V" for V
  • "A^2" for A^2 or "A" for A

?truncateData x_truncateData

Specifies a number that the truncateType argument uses to define the components for which information is to be printed.

?truncateType s_truncateType

Specifies the method that is used to limit the data being included in the report.

Valid values:

  • ’top - Saves information for the number of components specified with truncateData. The components with the highest contributions are saved. Sample value: 10
  • ’level - Prints components which have noise contribution higher than that specified by ?truncateData. Sample value: 10u
  • ’relative - Prints components which have noise contribution (percent) higher than that specified by ?truncateData. Sample value: .1
  • ’none - Saves information for all the components.

?digits x_digits

Number of significant digits with which the contributors are printed.

?percentDecimals x_percentDecimals

Number of decimals printed for any relative contribution.

?from f_from

For integrated noise, the start value for frequency.

?to f_to

For integrated noise, the end value for frequency.

?deviceType ls_deviceType

List of device type strings to be included.

Valid values: a list of strings or ’all

?weightFile t_weightFile

Absolute or relative path of the file that contains information about weights. This data is used to compute weighted noise. If the values are provided for both parameters, weight and weightFile, the value for weight gets precedence.

?paramValues ls_paramValues

List of values where each value co-relates to a specific sweep variable name. This field must be used when the data is parametric. The order of this list must coincide with the list returned by the sweepNames function excluding the frequency variable.

?hierLevel x_hierlevel

Specifies the hierarchy level up to which the noise summary needs to be computed.

?sort ls_sort

Determines the order of the report according to the specified symbol categories. Valid values:

  • 'individual: Sorts the report from the largest noise contributor to the smallest.
  • 'composite: Sorts the report by the total noise contribution of each device. Each device entry contains the percentage of the noise contribution from this device and the noise contribution from each of its contributors.
  • 'name: Produces the same format as composite noise but sorts it alphabetically by device instance name.

?includeInsts ls_includeInsts

List of strings containing instances to be included.

Valid values: a list of strings or 'all.

?excludeInsts ls_excludeInsts

List of strings containing instances to be excluded.

Valid values: a list of strings or 'none.

?combineIteratedInsts g_combineIteratedInsts

Combines the noise contributions of iterated instances to one contributor.

Valid values: t or nil

Default value: nil

?suffixNotation t_suffixNotation

Changes the notation of the noise contribution value for the data output to the specified value. For example, 3.36916e-05, is shown as 33.6916u.

Default value: nil

?writeRCnet t_writeRCnet

Prints the information about parasitic resistors and their values for each physical wire net in the noise summary results. This provides users the information to diagnose the noise contribution issues with abnormal wire nets.

Default value: nil

Value Returned

t

Returns t if noise summary is successfully printed to the file or port.

nil

Returns nil and an error message is shown if the summary cannot be printed.

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

x_hierLevel

Specifies the level of hierarchy upto which the current data is to be saved for all the components.

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

When specified, this argument will only be used internally and will not alter the current results directory that is set by the openResults command. The default is the current results directory set by the openResults command.

If you specify this argument, you must also specify the s_resultName argument.

Value Returned

t

Creates a noise summary file within the results directory.

nil

Returns nil otherwise.

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( 
[ ?output t_filename | p_port ]
[ ?precision x_precision ] 
[ ?numberNotation s_numberNotation ] 
[ ?numSpaces x_numSpaces ] 
[ ?width x_width ] 
[ ?from x_from ] 
[ ?to x_to ] 
[ ?step x_step ]
[ ?linLog t_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.

ocnPrint() prints z-state as “HiZ” for digital signals.

Arguments

?output t_filename

File in which to write the information. The ocnPrint 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.

?output 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.

?precision x_precision

The number of significant digits to print. This value overrides any global precision value set with the setup command.

Valid values: 1 through 16

Default value: 6

Note: To print the specified significant number of digits, ensure that the value of the x_width argument is the same or greater than the value of the x_precision argument.

?numberNotation s_numberNotation

The notation for print ed information. This value overrides any global format value set with the setup command.

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. For the fastest printing, use the none value and set the ?output argument to a filename or a port, so that output does not go to the CIW.

?numSpace x_numSpaces

The number of spaces between columns.

Valid values: 1 or greater

Default value: 4

?width x_width

The width of each column.

Valid values: 4 or greater

Default value: 14

?from x_from

The start value at x axis for the waveform to be printed.

?to x_to

The end value at x axis for the waveform to be printed.

?step x_step

The step by which text data to be printed is incremented.

?linLog t_linLog

The scale to be used for printing.

Valid values: Linear, Log

Default value: Linear

o_waveform1

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

o_waveform2

Additional waveform object.

Value Returned

t

Returns t if the text for the waveforms is printed.

nil

Returns nil and an error message if the text for the waveforms cannot be printed.

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 
[ ?resultType t_resultType ]
[ ?threshold t_threshold ]
[ ?exportFile t_exportFilePath ]
[ ?sortRule  t_sortRule ]
) t / nil

Description

Prints simulation results for reliability analysis run in the OCEAN mode.

Arguments

t_psfdir

Path to the PSF directory in which simulation results of reliability analysis for the test are saved.

?resultType t_resultType

Name of the result type for which you need to view results.

Default value: nil

?threshold t_threshold

Threshold value. A result value greater than this threshold will be printed. Other values are ignored.

Default value: nil

?exportFile t_exportFilePath

Path to the file where you need to export the printed results in CSV format. If you do not specify this path, the results are displayed on the terminal.

Default value: nil

?sortRule t_sortRule

Rule to identify the column to be used for ranking of data.

Default value: nil

Value Returned

t

When the results of reliability simulation are successfully printed.

nil

Returns nil otherwise.

Examples

Example 1

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

Example 2

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

Example 3

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 
[ ?netlistFilePreName t_prefixOfNetlistFile ]
) t_resultTypes / nil

Description

Returns a list of valid result types.

Arguments

t_psfdir

Path to the PSF directory in which simulation results of reliability analysis for the test are saved.

?netlistFilePreName t_prefixOfNetlistFile

Prefix of the name of the netlist file. The function uses this prefix to search for the relevant mapping file saved by simulator.

For example, if the specified prefix is "input", the netlist name is "input.scs", and the name of mapping file is ".input_tmi_deg.mapping". If the prefix is "amsControlSpectre", the netlist file is "amsControlSpectre.scs", and the name of mapping file is ".amsControlSpectre_tmi_deg.mapping".

Default value: "input"

Value Returned

l_resultTypes

List of result types in the simulation results.

nil

Returns nil otherwise.

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( 
[ ?XAxisLabel xLabel ] 
[ ?YAxisLabel yLabel ] 
[ ?XScale xscale ] 
[ ?YScale yscale ] 
[ ?XLimit xlimit ] 
[ ?YLimit ylimit ]
[ ?YRange yrange ]
[ ?Origin origin ] 
)
=> t / nil

Description

Sets the waveform window plotting attributes.

Arguments

?XAxisLabel xLabel

Label (symbol or string) for the X axis in the waveform window.

?YAxisLabel yLabel

Label (symbol or string) for the Y axis associated with the stripNumber in the waveform window.

?XScale xScale

Scale of the X axis in the waveform window.

Valid values (symbols): ’auto, ’log, and ’linear

?YScale yScale

Scale of the Y axis associated with the stripNumber in the waveform window.

Valid values (symbols): ’log and ’linear

?XLimit xLimit

Displays limits of the X axis in the waveform window.

Valid values: List of two numbers or ’auto (symbol).

The first number in the list indicates the minimum limit and the second indicates the maximum limit.

’auto sets the limit to autoscale.

?YLimit yLimit

Displays limits of the Y axis associated with the stripNumber in the waveform window.

Valid values: List of two numbers or ’auto (symbol).

The first number in the list indicates the minimum limit and the second indicates the maximum limit.

’auto sets the limit to autoscale.

?YRange yRange

Y range (integer) of the waveforms associated with the stripNumber in the waveform window.

?Origin origin

Axes origin of the waveform window.

Valid values: List of two numbers.

The valid range for stripNumber is 1-20.

Value Returned

t

Returns t if the valus of all arguments are set successfully.

nil

Returns nil if one or more arguments fail to set as specified.

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(
filename t_filename
net1 input_node_name 
term1 input_src_terminal
net2 output_node_name
term2 output_src_terminal
[ ?format t_format ]
[ ?datafmt t_data_format ]
[ ?port1 port1_name ]
[ ?port2 port2_name ]
[ ?result1 result1_name ]
[ ?result2 result2_name ]
)
=> nil

Description

Writes the large signal S-Parameter results to a file in Touchstone or Spectre format.

Arguments

t_filename

Name of the file in which results are to be written.

input_node_name

Name of the input node.

input_src_terminal

Name of the input source terminal.

output_node_name

Name of the output node.

output_src_terminal

Name of the output source terminal.

?format t_format

Format of file in which results are to be written.

Possible values: touchstone, spectre

Default value: 'touchstone

?data_fmt t_data_format

Format of data being written.

Possible values: magphase, dbphase, realimag

Default value: realimag

?port1 port1_name

Name of the first port.

Default value: 50

?port2 port2_name

Name of the second port.

Default value: 50

?result1 result1_name

Name of the first pss result.

Default value: sweeplssp1_lssp1_fd-sweep

?result2 result2_name

Name of the second pss result.

Default value: sweeplssp2_lssp2_fd-sweep

Value Returned

t

Specifies that the results are written to the specified file successfully.

nil

Returns nil if the results are not written.

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(
[ ?wavex o_wavex ?wavey o_wavey ]
[ ?exprx o_exprx ?expry o_expry ]
[ ?titleList l_titleList ]
[ ?colorList l_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

?wavex o_wavex

Reference wave against which the wave provided needs to be plotted.

?wavey o_wavey

Wave to be plotted against the reference wave.

?exprx o_exprx

Reference expression against which the expression provided needs to be plotted.

?expry o_expry

Expression to be plotted against the reference expression.

?titleList l_titleList

List of waveform titles. If the waveform is simple, only one label will be required. If the waveform is param, a list of labels needs to be provided.

?colorList l_colorList

List specifying the colors for the waveforms. If you do not supply this argument, the default colors are used. The colors that are available are defined in your technology file.

Valid Values: "y1" through "y66".

Value Returned

wave

Returns the waveform specified.

nil

Returns nil if the plot could not be generated.

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 ... ] 
[ ?expr l_exprList ]
[ ?strip x_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

o_waveform1

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

o_waveform2

Additional waveform object.

?expr l_exprList

List of strings used to give names to the waveform objects.

?strip x_stripNumber

An integer using which you can plot waveforms selectively on different strips and subwindows. If you specify an integer, it is used as the strip for all waveforms. To use the strip option for multiple waveforms, you can specify a list of strip numbers..

Value Returned

t

Returns t if the waveforms are plotted.

nil

Returns nil and an error message if the waveforms cannot be plotted.

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.

  1. plot(w1)
  2. plot(w2)
    w1 and w2 are plotted in one strip.
  3. displayMode('strip)
    w1 and w2 are plotted in two strips.
  4. plot(w3)
    w3 is plotted in a new strip. The ?strip argument is not required in this case.

Case 2: When no waveform plot is open and you set displayMode('strip):

  1. displayMode('strip)
  2. plot(w1)
  3. plot(w2)
    w2 is plotted in a new strip. The explicit ?strip argument is not required in this case.

Case 3: When no waveform plot is open:

  1. plot(w1)
  2. plot(w2)
    w1 and w2 are plotted in one strip.
  3. plot(w3 ?strip 2)
    w3 is plotted in a new strip because the plot function contains the ?strip 2 argument.
  4. plot(w4)
    w4 is plotted in the same strip as in which w3 is plotted.

Case 4:When no waveform plot is open:

  1. plot(w1 ?strip 1)
  2. plot(w2 ?strip 2)
    w2 is plotted in strip 2.
  3. plot(w3 ?strip 1)
    w3 is plotted in strip 1.
  4. plot(w4 ?strip 2)
    w4 is plotted in strip 2, which now becomes an active strip.
  5. 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, w1 and w3.
  6. plot(w5)
    w5 is plotted in a new strip.
  7. plot(w6)
    w6 is plotted in a new strip.

Case 5: When no waveform plot is open:

  1. window=awvCreatePlotWindow()
  2. awvSetDisplayMode(window "strip")
  3. plot(w1)
  4. plot(w2)
  5. plot(w3)
  6. plot(w4)
    w1, w2, w3, and w4 are 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

S_style

Plotting style for the subwindow.Valid values: auto, scatterplot, bar, joined

Argument Description

auto

The appropriate plotting style is automatically chosen.

scatterplot

Data points are not joined.

bar

Vertical bars are drawn at each data point that extend from the point to the bottom of the graph.

joined

Each data point is joined to adjacent data points by straight-line segments.

Value Returned

t

Returns t if the plotting style is set.

nil

Returns nil and an error message if the plotting style is not set.

Example

plotStyle( ’auto ) 
=> t

Sets the plot style to auto.

printGraph

printGraph( 
[ ?window x_window ]
[ ?printerName s_hcPrinterName ]
[ ?horizontalMargin x_horizontalMargin ]
[ ?verticalMargin x_verticalMargin ]
[ ?numCopy x_numCopy ]
[ ?paperSize x_paperSize ]
[ ?orientation s_orientation ]
[ ?fileName s_fileName ]
[ ?tempDir s_tempDir ]
[ ?matchWindow g_matchWindow ]
[ ?numGraphsPerPage x_numGraphsPerPage ]
[ ?printMarkerTable g_printMarkerTable ]
[ ?markerTableLocation s_markerTableLocation ]
[ ?enableHeader g_enableHeader ]
[ ?enableFooter g_enableFooter ]
[ ?headerLeftText s_headerLeftText ]
[ ?headerCenterText s_headerCenterText ]
[ ?headerRightText s_headerRightText ]
[ ?footerLeftText s_footerLeftText ]
[ ?footerCenterText s_footerCenterText ]
[ ?footerRightText s_footerRightText ]
[ ?printColor g_printColor ]
[ ?doubleSidedPrint g_doubleSidedPrint ]
[ ?duplexMode s_duplexMode ]
[ ?pageOrder s_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 nil
Default 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 automatic
Default 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 nil
Default 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 nil
Default 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, 20
Default 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 nil
Default value: t

?enableFooter g_enableFooter
Specifies whether the page contains a footer.
Valid values: t or nil
Default 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 nil
Default 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 reverse
Default value: collate

Value Returned

t

Returns t if the function runs successfully.

nil

Returns nil if there is an error.

Examples

printGraph()

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 
[ ?freqfilter f_fval ]
[ ?realfilter f_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.

This command also works for the parametric or sweep data.

Arguments

o_wave

Input Pole or Zero waveform (complex points) from the simulation data of PZ analysis.

?freqfFilter f_val

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.

?realFilter f_rval

Minimum real value which is used to filter out poles and zeros whose real value are less than or equal to the value specified.

Values Returned

o_waveform

Returns a Pole or Zero waveform.

nil

Returns nil if there is an error.

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( 
[ ?resultsDir t_resultsDir ] 
[ ?result S_resultName ] 
[ ?plot S_toPlot ]
[ ?freqfilter f_fval ] 
[ ?realfilter f_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.

This command also works for the parametric or sweep data.

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.

nil Returns nil otherwise.

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( 
[ ?resultsDir t_resultsDir ] 
[ ?result S_resultName ] 
[ ?print S_toPrint ] 
[ ?freqfilter f_fval ] 
[ ?realfilter f_rval ] 
[ ?output t_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.

This command also works for the parametric or sweep data.

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.

nil Returns nil otherwise.

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

Prints results in the file.

pzSummary( ?output "file") 

Prints results in a file located in the current working directory.

pzSummary( ?output oFile)
where, oFile=outfile("/tmp/file")

Prints to the opened 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

l_id

List of labels to remove.

Value Returned

t

Returns t when the label or labels are removed.

nil

Returns nil if there is an error.

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(
[ ?output t_filename | p_port ] 
[ ?type t_type ]
[ ?name t_name ] 
[ ?param t_param ]
[ ?format s_reportStyle ]
[ ?report s_reportStyle ]
[ ?maxLineWidth charsPerLine ]
) 
=> 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.

You can use the 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 outfile command for more information.

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 paramValPair
Default value: paramValPair

The spice format looks like this:

Param1

Param2

Param3

Name1

value  

value

value

Name2

value  

value

value

Name3

value

value

value

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( 
[ ?window x_window ]
[ ?fileName x_fileName ]
[ ?exactCopy g_exactCopy ]
[ ?quality x_quality ]
[ ?msOptimize g_msOptimize ]
[ ?width x_width ]
[ ?height x_height ]
[ ?units s_units ]
[ ?resolution x_resolution ]
[ ?resolutionUnits s_resolutionUnits ]
[ ?aspectRatio g_aspectRatio ]
[ ?enableTitle g_enableTitle ]
[ ?enableLegend g_enableLegend ]
[ ?enableAxes g_enableAxes ]
[ ?enableGrids g_enableGrids ]
[ ?backgroundColor s_backgroundColor ]
[ ?saveAllSubwindows g_saveAllSubwindows ]
[ ?saveEachSubwindowSeparately g_saveEachSubwindowSeparately ]
)
=> x_fileName / nil

Description

Saves the graph as an image.

Arguments

?window x_window

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.

?fileName x_fileName

Name of the output file to be created. The output file can be created in one of the following file formats:

  • BMP – Windows Device Independent Bitmap (.bmp)
  • PNG – Portable Network Graphics(.png)
  • TIFF – Tagged Image File Format (.tiff)
  • EPS – Encapsulated Post Script (.eps)
  • PDF – Portable Document Format (.pdf)
  • PPM – Portable PixMap File (.ppm)
  • JPG – Joint Photographic Experts Group (.jpg)
  • SVG – Scalable Vector Graphics (.svg)
  • XPM – X PixMap (.xpm)Valid values: any string value or nil

Default value: nil.

Note: If fileName argument is not specified, the graph image is saved in a image.png file.

?exactCopy g_exactCopy

Saves the exact copy of all subwindows. Only ?quality and ?fileName arguments work with this option. This option does not work for the eps file format.

Valid values: t or nil

Default value: nil

?quality x_quality

Modifies the quality of the image. This option works only for the .jpeg file format. This option does not work for the eps file format.

Valid values: 20 to 100%

Default value: 85%

?msOptimize g_msOptimize

Enables the image to be imported in the Microsoft office application. This option is available when you select the image type as Encapsulated PostScript (*.eps). This option simplifies the image output so that it can be ready by Microsoft Office 2003 and 2007 applications

Valid values: t or nil

Default value: t

?width x_width

Sets the width of the image.

Valid values: Any positive integer value.

Default value: 800 pixels for bmp, png, tiff, ppm and xpm file formats and 8.33 inches for pdf, svg and eps file formats.

?height x_height

Sets the height of the imageValid values: Any positive integer value.

Default value: 600 pixels for bmp, png, tiff, ppm and xpm file formats and 6.25 inches for pdf, svg and eps file formats.

?units s_units

Specifies the unit for image size (height and width)Valid values: inch, cm, mm, picas, pixels, and points

Default value: pixels for bmp, png, tiff, ppm file formats and xpm and inch for pdf, svg and eps file formats.

?resolution x_resolution

Sets the image resolution. This option works only for the bmp, jpeg, png, ppm, tiff, and xpm file formats. It does not work for eps, pdf, and svg file formats.

Valid values: Any positive integer value.

Default value: 96

?resolutionUnits s_resolutionUnits

Sets the units for image resolution. This option works only for the bmp, jpeg, png, ppm, tif, and xpm file formats. It does not work for eps, pdf, and svg file formats.

Valid values: pixels/cm and pixels/in

Default value: pixels/in

?aspectRatio g_aspectRatio

Enables the aspect ratio, which is the ratio of the width of the image to its height.

Valid values: t or nil

Default value: nil

?enableTitle g_enableTitle

Displays the trace title in the graph image.

Valid values: t or nil

Default value: t

?enableLegend g_enableLegend

Displays the trace legend in the graph image.

Valid values: t or nil

Default value: t

?enableAxes g_enableAxes

Displays the axes in the graph image.

Valid values: t or nil

Default value: t

?enableGrids g_enableGrids

Displays the grids in the graph image.

Valid values: t or nil

Default value: t

You cannot set this argument to t if ?enableAxes is set to nil. If you want to display the grids in the graph image, ensure that ?enableAxes is set to t.

?backgroundColor g_backgroundColor

Specify the background color.

Default value: nil, which means graph image is saved with the current background colorV

alid values: All the valid color values are defined at the following location: http://www.w3.org/TR/SVG/types.html#ColorKeywords

For example, red, blue, green, black, white, gray, cyan, magenta, yellow, and so on.

?saveAllSubwindows g_saveAllSubwindows

Saves all subwindows or the current subwindow.

Default value: t

Valid values:

  • t: All subwindows are saved.
  • nil: Only the current subwindow is saved.

?saveEachSubwindowSeparately g_saveEachSubwindowSeparately

Specifies whether to save each subwindow in a separate image file or in the same image file.

Valid values: t or nil

Default value: t

Value Returned

x_fileName

Returns the name of the output file.

nil

Returns nil if there is an error.

Examples

Additional Information

Following are the guidelines supported by the saveGraphImage function:

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

l_minMax

List of two numbers in waveform coordinates that describe the limits for the display. The first number is the minimum and the second is the maximum. If this argument is set to nil, the limit is set to auto.

Value Returned

t

Returns t when the X axis display limits are set.

nil

Returns nil and an error message if the X axis display limits are not set.

Example

xLimit( list( 1 100 ) ) 
=> t

Sets the X axis to display between 1 and 100.

yLimit

yLimit(
l_minMax
[ ?stripNumber x_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

l_minMax

List of two numbers in waveform coordinates that describe the limits for the display. The first number is the minimum and the second is the maximum. If this argument is set to nil, the limit is set to auto.

?stripNumber x_stripNumber

Specifies the strip in which the y display is to be limited in the range specified by l_minMax.

Valid values: 1 through 20

Value Returned

t

Returns t if the Y axis display limits are set.

nil

Returns nil and an error message if the Y axis display limits cannot be set.

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

For example,

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
 ⠀
X