Product Documentation
Virtuoso Visualization and Analysis XL SKILL Reference
Product Version IC23.1, November 2023

awvSimplePlotExpression

awvSimplePlotExpression(
w_windowID
t_expr
l_context
g_replace
[ ?expr l_exprList ]
[ ?color l_colorList ]
[ ?lineType l_lineTypeList ]
[ ?lineStyle l_lineStyleList ]
[ ?lineThickness l_lineThicknessList ]
[ ?showSymbols l_showList ]
[ ?dataSymbol l_symbolList ]
[ ?subwindow x_subwindow ]
)
=> t / nil

Description

Evaluates the t_expr expression and plots the resulting waveforms in a subwindow of the specified Waveform window.

Arguments

w_windowID

Waveform window ID.

t_expr

String containing an expression that is evaluated when the command is issued and reevaluated at the completion of each simulation in auto-update mode.

l_context

Data context for a particular simulation. If evaluating the expressions requires data generated during a simulation, you must specify this argument. Otherwise, specify nil.

g_replace

Specifies whether to overwrite the existing waveforms in the subwindow.

Valid values are:

  • t: Existing waveforms are replaced by the resulting waveform evaluated by the expression t_expr.
  • nil: Existing waveforms are retained and the resulting waveform evaluated by the expression t_expr is appended in the subwindow.

?expr l_exprList

List of waveform names to be displayed in the trace legend.

If you do not specify this argument the expression is displayed instead of waveform names.

?color l_colorList

List of colors for the waveforms. Available colors are defined in your technology file. Valid values are from y1 through y66.

If you do not specify this argument, default colors are used.

?lineType l_lineTypeList

List specifying the type of line to be used for the waveforms.

Valid values are line, bar, scatterPlot, poleZero.

If you do not specify this argument, default value line is used.

?lineStyle l_lineStyleList

List specifying the line style to used for the waveforms.

Valid values are solid, dash, dot, dashDot, and dashDotDot.

If you do not specify this argument, default value solid is used.

?lineThickness l_lineThicknessList

List specifying the line thickness of the waveforms.

Valid values are fine, medium, thick, and extraThick.

If you do not specify this argument, default value fine is used.

?showSymbols l_showList

List of flags that specify whether to show the symbols on the waveforms. Valid values are t and nil.

The default value is nil, which means that symbols are not displayed on the waveforms.

The number of flags in the l_showList must match the number of symbols in the l_symbolList.

?dataSymbol l_symbolList

List of symbols to be displayed for data points on the waveforms.

To use a symbol, specify an integer or a single character corresponding to the symbol.

?subwindow x_subwindow

Identification number of the subwindow, which is found in the top-right corner of the subwindow.

If you do not specify this argument, the current subwindow is used.

Value Returned

t

Expression t_expr is evaluated successfully and the resulting waveform is plotted in the subwindow of the specified Waveform window.

nil

Expression cannot be evaluated because of an error.

Examples

The following example creates a Waveform window and returns the ID of the Waveform window.

awvCreatePlotWindow()
=> window:3

The following example opens simulation results stored in the specified directory amsim.raw.

openResults("/servers/user/design/ampsim.raw")
=> "/servers/user/design/ampsim.raw"

The following examples evaluate expressions flip and lshift applied on the signal out, which is available in the tran-tran result of the results directory ampsim.raw.

awvPlotSimpleExpression("flip(v(\"out\" ?result \"tran-tran\"))" ?plotStyle "Append" ?graphType "Rectangular" ?graphModifier "Magnitude")
=> t
awvPlotSimpleExpression("lshift(v(\"out\" ?result \"tran-tran\") 50ns )" ?plotStyle "Append" ?graphType "Rectangular" ?graphModifier "Magnitude")
=> t

The resulting waveforms evaluated from the expressions are plotted in append mode in the Waveform window created by the function awvCreatePlotWindow.

The following example returns the index numbers and names of the waveforms plotted in the current Waveform window.

awvGetWaveNameList(awvGetCurrentWindow())
=> 
((1 2) 
    ("flip(v(\"out\" ?result \"tran-tran\"))" "lshift(v(\"out\" ?result \"tran-tran\") 50ns )")
)

Note that waveforms are assigned with the lowest available index numbers 1 and 2.

Now, plot an expression using awvSimplePlotExpression. Specify the name of the resulting waveform as waveform1 using the ?expr argument. Note that waveform1 is plotted in the current Waveform window and existing waveforms are not overwritten because g_replace argument is set to nil.

awvSimplePlotExpression(awvGetCurrentWindow() "v(\"net10\" ?result \"tran-tran\")-v(\"in_p\" ?result \"tran-tran\")" nil nil ?expr list("waveform1") ?color list("y12") ?lineType list("line") ?lineStyle list("dash") ?lineThickness list("fine") ?showSymbols list(t) ?dataSymbol list("X"))
=> t

The following example returns the index numbers and names of the waveforms plotted in the current Waveform window. Note that waveform1 is assigned with the next available index number, which is 3.

awvGetWaveNameList(awvGetCurrentWindow())
=>
((1 2 3) 
    ("flip(v(\"out\" ?result \"tran-tran\"))" "lshift(v(\"out\" ?result \"tran-tran\") 50ns )" "waveform1")
)

Now, plot another expression using awvSimplePlotExpression. Specify the name of the resulting waveform as waveform2 using the ?expr argument. Note that waveform2 is plotted in the current Waveform window and existing waveforms are overwritten because g_replace argument is set to t.

awvSimplePlotExpression(awvGetCurrentWindow() "v(\"net10\" ?result \"tran-tran\")+v(\"in_p\" ?result \"tran-tran\")" nil t ?expr list("waveform2") ?color list("y6") ?lineType list("line") ?lineStyle list("dash") ?lineThickness list("fine") ?showSymbols list(t) ?dataSymbol list("X"))
=> t

The following example returns the index numbers and names of the waveforms plotted in the current Waveform window. Note that waveform2 is assigned with the next available index number, which is 4.

awvGetWaveNameList(awvGetCurrentWindow())
=>
((4) 
    ("waveform2")
)

Return to top
 ⠀
X