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

awvSaveToCSV

awvSaveToCSV(
l_waveforms
t_fileName
[ ?from x_from ]
[ ?to x_to ]
[ ?precision x_precision ]
[ ?step x_step ]
[ ?linLog t_linLog ]
[ ?exprList l_expressionList ]
[ ?mergeXAxis g_mergeXAxis ]
)
=> t / nil

Description

Saves waveform data to the specified CSV file.

Arguments

l_waveforms

Waveform or a list of waveforms whose data is to be saved in the CSV file.

t_fileName

Name of the CSV file to which you want to save waveform data.

?from x_from

x-axis value after which you want to save waveform data.

?to x_to

x-axis value upto which you want to save waveform data.

?precision x_precision

Precision value to be used.

?step x_step

Step value to be used.

?linLog t_linLog

Specifies whether to save waveform data in logarithmic format.

Valid values are:

  • linear: Waveform data is saved in linear format.
  • log: Waveform data is saved in logarithmic format.

Default value is linear.

?exprList l_expressionList

List of expression names to be printed in the CSV file.

?mergeXAxis g_mergeXAxis

Specifies whether to merge the x-axis values for all waveforms into a single column in the CSV file.

Valid values are:

  • t: Merges x-axis values in a single column.
  • nil: X-axis values are printed in separate columns.

Value Returned

t

Waveform data is saved to the CSV file.

nil

Waveform data cannot be saved 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 results directory ampsim.raw.

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

The following example returns ID of the waveform of the signal out, which is available in the tran-tran result of the results directory ampsim.raw.

w1=v("out" ?result "tran-tran")
=> srrWave:0x36368020

The following example returns ID of the waveform that is obtained after applying the flip function to the signal out, which is available in the tran-tran result of the results directory ampsim.raw.

w2=flip(v("out" ?result "tran-tran"))
=> srrWave:0x36368040

The following example passes waveform objects w1 and w2 into a list named waves.

waves=list(w1 w2)
=> (srrWave:0x36368020 srrWave:0x36368040)

The following example saves waveform data for both waveforms w1 and w2 available in the list waves to a CSV file, WaveData.csv. The CSV file is saved under the /home/user/ directory.

awvSaveToCSV(waves "/home/user/WaveData")
=> t

If you do not specify the path to the CSV file, the file is saved in the current working directory.

The following example saves waveform data for w1 from 50ns to 200ns with a step value 10.

Waveform data is saved in logarithmic format. The dataLog.csv file is saved in the current working directory.

awvSaveToCSV(w1 "dataLog" ?from 50ns ?to 200ns ?step 10 ?linLog "log")
=> t

The following example saves waveform data for w1 from 50ns to 200ns with a step value 10.

Waveform data is saved in linear format. The dataLinear.csv file is saved in the /home/user/ directory.

awvSaveToCSV(w1 "/home/user/dataLinear" ?from 50ns ?to 200ns ?step 10 ?linLog "linear")
=> t

The following examples create two waveform objects w3 and w4

w3=drCreateWaveform(drCreateVec('double list(1 2 3 4 5 6)) drCreateVec('double list(10 20 30 40 50 60)))
=> srrWave:0x36368050
w4=drCreateWaveform(drCreateVec('double list(1 2 3 4 5 6)) drCreateVec('double list(5 10 15 20 25 30)))
=> srrWave:0x36368060

The following example passes waveform objects w3 and w4 into a list named waveList.

waveList=list(w3 w4)
=> (srrWave:0x36368050 srrWave:0x36368060)

The following example saves waveform data for the waveforms w3 and w4 contained in the list waveList to a CSV file, myData.csv. You can also specify expressions for these waveforms that you want print in the header of the CSV file.

awvSaveToCSV(waveList "myData" ?exprList list("FILTER_RESPONSE1" "FILTER_RESPONSE2"))
=> t

The following example saves waveform data for the waveforms w3 and w4 contained in the list waveList to a CSV file, xMergedData.csv. Note that x-vector values for both waveforms are merged in a single column in the CSV file.

awvSaveToCSV(waveList "xMergedData" ?exprList list("FILTER_RESPONSE1" "FILTER_RESPONSE2") ?mergeXAxis t)
=> t


Return to top
 ⠀
X