Main Content

sw0Reader

Converts DC analysis simulation results from Synopsys to CSV file or MATLAB table

Since R2023b

Description

sw0Reader converts the DC analysis simulation results from the FINESIM and HSPICE Synopsys® simulator to a CSV file or a MATLAB® table, as defined by OutputType. If you define the OutputType as mat, the function creates a MATLAB table and saves it to a .mat file.

Synopsys saves the DC analysis simulation results in a sw0 file. The function only supports binary sw0 files.

If you do not define the location of the sw0 file, the function looks for them in the present working directory. If you do not define the location of the output file to be saved, the function saves them in the present working directory.

sw0Reader(inputFileName, Name=Value) converts the DC analysis simulation results using one or more name-value pair arguments in addition to the input argument in the previous syntax. Unspecified arguments take default values.

Input Arguments

collapse all

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: sw0Reader('DC.sw0',OutputType='mat',OutputFileName='DCSim') converts the simulation results contained in the DC.sw0 file to a MATLAB table named DCSim.

Name of the sw0 file to be converted to a CSV or MAT file, specified as a string.

Note

You must provide a filename for the function to read.

Data Types: string

Location of the sw0 file that needs to be converted, specified as a string. The default location is the present working directory.

Data Types: string

Type of the output file, specified as either csv or mat.

If you define the OutputType as mat, the function creates a MATLAB table and saves it to a .mat file.

Data Types: string

Location of the converted output file that needs to be saved, specified as a string. The default location is the present working directory.

Data Types: string

Name of the converted output file, specified as a string.

Note

If you include the character * in the file name, the function replaces the * with _A_B. A represents the simulation run number and B represents the part number when a single run is too big to fit into just one file. If there is only one run in the original data set, the function omits A. If the entire run fits into one file, the function omits B.

Data Types: string

Version History

Introduced in R2023b

expand all