Working with Data Files

Data files are ASCII text representations of circuit responses based on various settings of independent variables. For instance the S-parameter response of an amplifier can be captured against frequency and power variations in a .p2d data file. Some ADS components, such as the AmplifierP2D_Setup and AmplifierS2D_Setup help create data files. Other sources for data files are measurement instruments or other simulation tools which output circuit responses in text form. Thus data files enable you to take data from sources outside of Advanced Design System or RF Design Environment and apply it to projects within these design environments.

The common purpose of all the various applications which require the use of data files, is to generate the behavior of a specific component or a circuit based on simulated or measured data points. Thus, data files allow the transfer of realistic parameter values to simple components and also enable the modeling of components with complex behavior such as black box and gray box models. Some examples of the use of data files are:

  • Using S-parameters to define the behavior of a linear black-box component representing an attenuator, a filter, or a small-signal transistor. The S-parameters, which are saved in a file, are used in conjunction with a component like the S2P. This permits the creation of a realistic and customized 2-port network during an ADS simulation.
  • Storing sets of transistor model parameters in separate files, and accessing them automatically through the course of a simulation to define the behavior of the transistor.
  • Defining the behavior of a complex nonlinear amplifier by using the gray-box AmplifierS2D component and data saved in an S2D file. The small and large signal S-parameters as well as noise parameters contained within the file can be used to define the behavior of the amplifier during a simulation.

Besides data-file driven components, there are other user-defined models such as using SDDs, FDDs, equation-based components, or the Model Builder which are discussed elsewhere. This section focuses on how to use the various types of data files to define the behavior of components and circuits in addition to providing a comprehensive understanding of the classification and formats associated with the various types of data files used by various components.

A data file is simply data in an ASCII text file, but there are several formats to choose from depending on the application. When determining the type of data file to choose please note:

  • The format you choose may depend on the type of data you have and where you want to use the data. The table below lists supported file formats and examples of where they are used.
  • The DataAccessComponent may be used to access the data from any data file regardless of format and to use it with any component that accepts file-based parameters. In this case, you need to make sure there is a logical relationship between the data and how you intend to use it. For more information, see Using Data Files, Datasets, and Data Access Components.

Supported Data Formats

The following table lists the supported data formats with a brief description and a reference to detailed information:

Available File Format Types
Format Description Usage Details
Touchstone Format
SnP †,†† (.snp) Small signal S, H, Y, Z, or G-parameters. May also include optional noise data (2 port data only). Where n is the number of ports from 1 to 99. n-port S-parameter file (S n P) components in the Data Items Library. Touchstone SnP Format
MDIF Formats
Discrete (.dscr) Discrete (indexed) tabular and possibly statistical density data. Components that accept file-based parameters, link via the DAC. Discrete Format
Model MDIF Nonlinear model parameters. EE_BJT2_Model, JFET_Model, etc. Model MDIF Files
PDF ‡‡‡ (.pdf) User defined, piece-wise linear probability density function data for arbitrary distributions that are not correlated. With expressions in the Statistics tab. PDF Format
S2PMDIF (.s2p) Multi-dimensional 2-port, S, Y, Z, H, G signal and optional 2-port noise parameter (Fmin, Gopt, Rn) data. With S2PMDIF, DAC, and components represented by black box statistical characterization. S2PMDIF Format
P2D †,†† (.p2d) Large-signal, power-dependent, 2-port S, H, Y, Z, or G -parameters. AmplifierP2D in the System - Amps & Mixers library. P2D Format
S2D †,†† (.s2d) 2-port S, H, Y, Z, or G-parameters with forward gain compression and optional noise and intermodulation data. Amplifier2 and AmpSingleCarrier in the System-Amps & Mixers library, AmplifierS2D in the System-Data Models library. S2D Format
IMT †† (.imt) Intermodulation product table of mixer intermodulation products between the LO and signal that relates the mixer IM output level to signal input level. MixerIMT in the System - Amps & Mixers library. MixerIMT Data in the System-Data Models library. IMT Format
SPW †† (.ascsig text ) (.sig binary ) Time-domain voltage data file in Cadence Alta Group SPW text and binary formats. TimeFile item in Timed Sources and OutFile item in the Sinks library. SPW Format
TIM †† (.tim) Time-domain data. TimeFile item in Timed Sources and OutFile item in Sinks library. TIM Format
SDF ††,††† (.sdf) Time-domain voltage data file in 89600 file format. TimeFile item in Timed Sources and OutFile item in Sinks library. See software documentation for the Agilent 89600.
GCOMP †† Gain compression data Amplifier and Mixer items in the System - Amps & Mixers library. Understanding GCOMP Data
Generic MDIF (.mdif) Generalized multi-dimensional tables unifying other MDIF formats. Use in place of any specific MDIF. AmplifierS2D, AmplifierP2D, or any other MDIF example listed above. Link via the DAC. Generic MDIF
CITIfile Format
CITIfile ††† A general data format supported by network analyzers. Capable of storing multiple packages of multi- dimensional data. n-port S-parameter file (S n P) components in the Data Items Library. CITIfile Data Format
Agilent IC-CAP Formats
DUT, MDL, SET ‡,‡‡ Device under test (DUT), model (MDL), and setup (SET) files from the Agilent IC-CAP program. These files can contain Measured, Simulated, and/or Transformed data. Once the data is read into a dataset, it can be used with any component (for example, a VtDataset source) that can read data from a dataset. See Agilent IC-CAP documentation.
When writing data from a dataset to a file, the variable names are limited to S,H,Y,Z or G, for example, S[1,1], S[1,2], G[1,1], G[1,2]. The variable name is used to determine the type of data.
†† The first set of data in the dataset that matches the data type (name) will be output. It is not possible to arbitrarily select which data will be output.
††† There are some specific problems with the current version in writing and/or reading this data format. On the Agilent EEsof web site, refer to the Release Notes in Product Documentation and to Technical Support for more information and workarounds (www.agilent.com/find/eesof).
The Data File Tool can only read IC-CAP data.
‡‡ Only simple, scaled expressions with numbers or variables and one operator (either +, -, *, or /) are supported for start, stop, step, and number of points parameters, for example, start= 1 GHZ or stop=icmax/10.
‡‡‡ This format is not yet fully supported.
The COD, FIR, LAS, and SPE formats were obsolete when ADS 1.0 was introduced and are not used by the application. The LIST2 and T2D formats are also obsolete.

For information about a particular component, refer to the manuals for Analog/RF or Signal Processing components, or click Help when editing component parameters.

Making a Data File

You can create a data file using these methods:

  • Manually type the data into a text file using any text editor, being sure to follow the formatting guidelines for the type of data file that you want.
  • Use the Data File Tool. The Data File Tool enables you to transfer data between datasets and files that are in the following file formats: Touchstone, Measurement data interchange format (MDIF), CITIfile, and IC-CAP. For learn about the Data File Tool, see Reading and Writing Data Files.
  • Perform a P2D controller-based simulation using AmplifierP2D_Setup or AmplifierS2D_Setup. The results of these simulations are saved to files in P2D and S2D formats respectively, which can then be used with the AmplifierP2D or AmplifierS2D. For more information on the P2D controller itself, see P2D Simulation.

Saving a Data File

When saving a data file, save it as an ASCII text file.

  • A data file does not require a particular extension, but you may want to use the extension recommended for each format for identification purposes. These extensions are given in the details describing each format. If you choose a different extension, you must provide this information to the component you intend to use through the File parameter of the component.

You can save the data file:

  • In the project where it is used under the <prj>/data directory. This is the default location if no path is provided to the component using the file.
  • Any location, if you provide the full file path to the component. You provide this information using the File parameter of the component.

For more information about the File parameter, place the component of interest on a schematic, double-click to edit it, and click the Help button at the bottom of the dialog box.

Using Data Files, Datasets, and Data Access Components

Both data files and datasets can contain data that you want to use with a component. You can use either one, depending on your situation:

  • You may want the S-parameters from a simulated design. In this case, use the dataset and a DAC to link the data to the component you want to use.
  • You may have S-parameter specifications from a component sheet. In this case, type them into a data file.

You also want to consider the method of linking your data with the component of interest:

  • You have a data file, such as an .s2d, and you want to use it with a component that can read such a file, such as the AmplifierS2D. No DAC is needed.
  • You have a dataset or data file, but the component you want to use doesn't read the data directly. Use a DataAccessComponent to link the data file and component. The component you choose must have the file-based option under the Parameter Entry Mode or the parameter AllParams. For example, the BJTM1 model has the parameter AllParams; the R component has the Parameter Entry Mode. For instructions on how to use a DAC, see DataAccessComponent (Data Access Component) or Schematic Capture and Layout.

Reading and Writing Data Files

Use the Data File Tool to import and export data between datasets and text files that are in the following file formats:

  • Touchstone
  • Measurement data interchange format (MDIF)
  • CITIfile
  • IC-CAP

You can transfer data from a file into a dataset, or vice versa. One application is to transfer data from a dataset to an MDIF file, for use with a specific type of component. For example, a file in P2D format (P2D is one of several MDIF formats) containing S-parameters can then be used by the P2D amplifier. Using the Data File Tool, you can write S-parameters from a dataset to a file in P2D format. Another application is reading Agilent IC-CAP data into a dataset to be used in conjunction with a component, such as a source, that can read data from a dataset.

See the table above in Supported Data Formats for a list of the available file types, a description of the file contents, and the component that uses the data. Be sure to review the notes at the end of the table. The details about each file format are described later in this topic.

Starting and Exiting the Data File Tool

You can start the Data File Tool from a Schematic window or a Data Display Window.

  • From a Schematic window, choose Tools > Data File Tool. Or, click the Data File Tool icon.
  • From a Data Display window, choose Tools > Data File Tool. Or, click the Data File Tool icon.

To exit the Data File Tool, choose File > Exit from the menu bar.

Parts of the Data File Tool

The following illustration shows the default appearance of the Data File Tool user interface for a UNIX-based system when the Data File Tool is started.

The layout of the interface and names of the various elements vary with the task being performed (read or write) and can also vary with the file format selected. Examples of this variation in the appearance of the Data File Tool user interface is shown in the two following figures.


Data File Tool in read mode



Data File Tool in write mode

These are the more frequently used elements of the interface:

  • The Menu bar displays the menus that are available in the Data File Tool window.
  • The Dataset field lists the datasets in the current project. The selected dataset or the name of a new dataset is displayed in the Dataset name field.

Reading a File

To read the contents of a file into a dataset:

  1. From an open Data File Tool window, click Read data file into dataset.
  2. Under File format to read, select one of the following file formats:
    • Touchstone
    • MDIF
    • Citifile
    • ICCAP
  3. For the MDIF format, choose the appropriate sub-format from MDIF sub type.
  4. Under Input file name, type in the file name if the file is in the project. If it is not, click Browse to locate and select the file.
  5. The data from the selected file will be written to a dataset. Enter a name in the Dataset name field or select from the existing datasets in the Datasets list. If you choose a dataset from the list, any data that is already stored in the dataset will not be saved and will be overwritten with new data.
  6. Click Read File to send the file contents to the dataset.
    Note
    The source file must not use any ADS reserved variables or non-ASCII characters. Use of such a file can produce misleading results.

Writing to a File


To write data to a file:

  1. From an open Data File Tool window, click Write data file from dataset.
  2. Under File format to write, select one of the following file formats:
    • Touchstone
    • MDIF
    • Citifile
  3. For the Touchstone and MDIF formats, choose the appropriate sub-format from Touchstone data type, or MDIF sub type.
  4. Under Output file name, type in the file name you want to write to. It will be saved in the project directory. If you want to save the file in a different location, click Browse to select a location.
  5. Under Complex data format, select the complex data format to be used in the file.
  6. For Touchstone and MDIF files, under Frequency units, select the frequency units to be used in the file.
  7. Under Data notation format, select the data notation format to be used in the file.
  8. Under Max resolution, select the maximum resolution to be used in the file.
  9. The source of the data can be any project dataset. It should contain data matching the file format selected. Select an existing dataset from the Datasets list. Click View Dataset to view the contents of the selected dataset.
  10. Click Write to File to send the data to the file.
    Note
    If a dataset has just been created by reading a file, it might be necessary to click Update Dataset List to see it appear in the list.

Examples

You can find designs that use different data files in the Examples directory under Data_comp_prj and DataAccess_prj.

Instructions for using a particular type of file with a component that is designed to read the file (like an . snp file and SnP component) can be found in the remaining reference sections.

Touchstone SnP Format

These files contain small-signal G-, H-, S-, Y-, or Z-network parameters described by frequency-dependent linear network parameters for 1- to 99-port components. The 2-port component files can also contain frequency-dependent noise parameters. This data file format is also known as Touchstone format.

An .snp file can be used with an SnP component to model the behavior of a linear model using S-parameters. The file contains the S-parameters, the component is placed within the schematic.

This section describes:

  • Choosing an .snp file for use with an SnP component
  • An overview of the SnP file
  • The basic SnP format
  • Adding noise to a 2-port Snp file
  • The basic SnP format applied to G-, H-, S-, Y-, and Z-parameters, plus examples of each

Linking an .snp File to an SnP Component

To link a file to the component:

  1. Add an SnP component to your schematic. It can be found in the Data Items library.
  2. Select the File parameter. Ensure that the Parameter Entry Mode is set to Network Parameter File Name .
  3. In the File Name field, enter the name of the file you want to use:
    • You can type the name directly in the field.
    • Click Data files list to locate a file in the current project (or any files located based on the setting of the DATAFILES variable in de_sim.cfg).
    • Click Browse to locate a file outside the current project.
    • Click Copy template to select an example file that you can customize.
  4. After you select a file, click Edit if you want to view the file or change its contents.

For instructions on how to set the remaining parameters, click Help in the open component dialog box.

Overview

SnP data files are ASCII text files in which data appears line by line, one line per data point, in increasing order of frequency. Each line of data consists of a frequency value and one or more pairs of values for the magnitude and phase of each S-parameter at that frequency. Values are separated by one or more spaces, tabs or commands. Comments are preceded by an exclamation mark (!). Comments can appear on separate lines, or after the data on any line or lines. Extra spaces are ignored. Recommendations for filenames are:

1-port: filename.s1p

2-port: filename.s2p

Up to 99 ports can be defined.

You can specify the following parameters in an .snp file:

S = Scattering parameters
Y = Admittance parameters
Z = Impedance parameters
H = Hybrid-h parameters
G = Hybrid-g parameters

Note
The mismatched port impedance is not supported by the ADS simulator. If a Touchstone file has the input/output mismatch information in the header, it is ignored by the DAC and the SnP components, and a default matching 50 ohm port impedance is used.
The following sections discuss the content and format of network parameter files as input for circuit analysis.

Basic SnP File Format

The following example shows the general format for component data files. It consists of:

  • An option line
  • Data lines
  • Comments

The Option Line

The option line, specifying the frequency units and the normalizing impedance, precedes the data lines.
# (freq_units parameter format R n)
<data line>
...
<data line>
where:

# = The delimiter that tells the program you are specifying these parameters
freq_units = Sets the units. Options are GHz, MHz, KHz, or Hz.
parameter = Sets the desired parameter. Options are:
format = The format desired. Options are:
R n = The reference resistance in ohms, where n is a positive number of ohms; which is the real impedance to which the parameters are normalized.


In summary, the option line should read:

For .s1p files: # [HZ/KHZ/MHZ/GHZ] [S/Y/Z] [MA/DB/RI] [R n]
For .s2p files: # [HZ/KHZ/MHZ/GHZ] [S/Y/Z/G/H] [MA/DB/RI] [R n]
For .s3p/.s4p files: # [HZ/KHZ/MHZ/GHZ] [S] [MA/DB/RI] [R n]

where square brackets [...] indicate optional information; .../.../.../ indicates that you select one of the choices; and, n is replaced by a positive number.

Default Option Line

The default option line for component data files is:
# GHZ S MA R 50

Option Line Examples

Frequency in GHz, S-parameters in real-imaginary format, normalized 100 ohms:
# GHz S RI R 100
Frequency in KHz, Y-parameters in real-imaginary format, normalized 100 ohms:
# KHz Y RI R 100
Frequency in Hz, Z-parameters in magnitude-degree format, normalized to 1 ohm:
# Hz Z MA R 1
Frequency in KHz, H-parameters in real-imaginary format normalized to 1 ohm:
# KHz H RI R 1
Frequency in Hz, G-parameters in magnitude-degree, format normalized to 1 ohm:
# Hz G MA R 1

Data Lines

Data lines contain the data of interest. A special format is used for 2-port data files where all of the network parameter data for a single frequency is listed on one line. The order of the network parameters is:

N11, N21, N12, N22

For 3-port or higher data files, the network parameters appear in the file in a matrix form, each row starting on a separate line. A maximum of four network parameters (with 2 real numbers for each) appear on any line. The remaining network parameters are continued on as many additional lines as are needed.

The following sections describe the data-line format for single and multi-port components.

Data-line Formats

When you type the data below the option line, the columns need not line up precisely like those shown. The syntax for entering data is as follows:

1-port Component
Magnitude-Angle format:

(Columns: f Mag Ang)
  f |S11|

2-port Component
Magnitude-Angle format:

f |S11|

Real-Imaginary format:

f Re{S11} Im{S11} Re{S21} Im{S21} Re{S12} Im{S12} Re{S22} Im{S22}
dB-Angle format:
f 20log10|x11|

where

x = S/Y/Z/H/G
f = Frequency

3-port Component
Magnitude-Angle format:

( Columns : f Mag Ang Mag Ang Mag Ang)
  f |S11| <S11 |S12| <S12 |S13| <S13
    |S21| <S21 |S22| <S22 |S23| <S23
    |S31| <S31 |S32| <S32 |S33| <S33

4-port Component
Magnitude-Angle format:

( Columns : f Mag Ang Mag Ang Mag Ang Mag Ang)
  f |S11| <S11 |S12| <S12 |S13| <S13 |S14| <S14
    |S21| <S21 |S22| <S22 |S23| <S23 |S24| <S24
    |S31| <S31 |S32| <S32 |S33| <S33 |S34| <S34
    |S41| <S41 |S42| <S42 |S43| <S43 |S44| <S44

where:

f = Frequency
Mag = Magnitude of S-parameter Sij
Ang = Angle of S-parameter Sij

Adding Comments to Data Files

You can document your data files by preceding a comment with the exclamation mark (!) on any line. A comment can be the only entry on a line or can follow the data on any line.

Adding Noise Parameters to an SnP File

Noise parameters can be included in SnP 2-port data files. Noise data can follow G-, H-, S-, Y-, or Z-parameters described for each frequency. The x values are data.

Each line of a noise parameter has the following five entries:

x1 x2 x3 x4 x5

where:

x1 = Frequency in units. The first point of noise data must have a frequency less than the frequency of the last S-parameter frequency
x2 = Minimum noise figure in dB
x3 = Source reflection coefficient to realize minimum noise figure (MA)
x4 = Phase in degrees of the reflection coefficient (MA)
x5 = Normalized effective noise resistance. The system simulator requires this parameter to meet physical requirements. If the user-supplied x5 value is less than allowed for this requirement, then the system simulator will force this x5 value to the lowest physical limit.

Sopt noise data in an SnP file must be expressed in a Magnitude/Angle (MA) format. The simulator assumes that the Sopt noise data in an SnP file is specified in a MA format. This is the only supported format for Sopt data in an SnP file. The complex format type specified in the format line does not apply to the Sopt data specified in the Noise block.

The data file reader cannot determine if the numbers representing the Sopt data in the SnP data file are expressed in MA format and not in dB or Real/Imag formats. It reads in whatever numbers appear on the data line and processes them as if they are MA, without issuing an error or warning message. If the Sopt data in the SnP data file is expressed in a format other than MA, this can produce simulation data that look incorrect.

Note
The frequencies for noise parameters and network parameters need not match. The only requirement is that the lowest noise-parameter frequency be less than or equal to the highest network-parameter frequency. This allows the file processor to determine where network parameters end and noise parameters begin.

The source reflection coefficient and effective noise resistance are normalized to the same resistance as specified for the network parameters.

Example File Containing Noise Data

This is an example of a data file with noise data:

! NEC710
# GHZ S MA R 50
 2    .95    -26    3.57    157    .04    76    .66    -14
22    .60    -144   1.30     40    .14    40    .56    -85
! NOISE PARAMETERS
 4    .7      .64     69    .38
18     2.7    .46    -33    .40

Applying the SnP Format, and Examples

In this section are formatting references and examples for:

  • G-parameter files
  • H-parameter files
  • S-parameter files
  • Y- and Z-parameter files

Guidelines

  • The optimum source reflection coefficient and the normalized effective noise resistance are assumed to be with respect to the normalizing resistance value (appearing after the R keyword) on the header line.
  • The frequencies for noise parameters and G-, H-, S-, Y-, or Z-parameters (network parameters) do not have to match. The only requirement is that the lowest noise parameter frequency be less than or equal to the highest network parameter frequency. This allows the file processor to determine where G-, H-, S-, Y-, or Z-parameters end and noise parameters begin.

G-Parameter Files


G-parameter files (Hybrid-g parameters) use MA or RI format. They are strictly 2-port files. G-parameter measurements are:

G11 input admittance (port 2 open)
G22 output impedance (port 1 shorted)
G21 forward voltage gain (port 2 open)
G12 reverse current gain (port 1 shorted)

G-Parameter MA and RI File Formats

#         frequency_unit         G         MA         R     impedance
freq    magG11    angG11    magG21    angG21    magG12    angG12    magG22    angG22
#         frequency_unit         G         RI         R     impedance
freq    reG11    imG11    reG21    imG21    reG12    imG12    reG22    imG22

G-Parameter File Example

! symbol freq-unit parameter-type data-format keyword impedance-ohms
#      KHZ      G      MA      R      1
! freq    magG11    angG11    magG21    angG21    magG12    angG12    magG22    angG22
   2      .95       -26       3.57       157      .04       76        .66       -14
   3      .93       -40       3.53       147      .05       69        .65       -20
   4      .89       -52       3.23       136      .06       62        .63       -26

H-Parameter Files


H-parameter files (Hybrid-h parameters) use MA or RI format. They are strictly 2-port files. H-parameter measurements are:

H11 input impedance (port 2 shorted)
H22 output admittance (port 1 open)
H21 forward current gain (port 2 shorted)
H12 reverse voltage gain (port 1 open)

H-Parameter File Example

! symbol    freq-unit    parameter-type    data-format    keyword    impedance-ohms
#   KHZ      H       MA      R      1
!  freq    magH11    angH11    magH21    angH21    magH12    angH12    magH22    angH22
   2       .95       -26       3.57      157       .04       76        .66       -14
   3       .93       -40       3.53      147       .05       69        .65       -20
   4       .89       -52       3.23      136       .06       62        .63       -26

S-Parameter Files

S-parameter files (scattering parameters) can have MA, RI, or DB format for files with 1 to 99 ports.

S-Parameter 1-Port MA, RI, and DB File Formats

#      frequency_unit      S      MA      R      impedance
freq      magS11      angS11
#      frequency_unit      S      RI      R      impedance
freq      reS11      imS11
#      frequency_unit      S      DB      R      impedance
freq      dbS11      angS11

S-Parameter 2-Port MA, RI, and DB File Formats

#      frequency_unit      S      MA      R      impedance
freq     magS11     angS11     magS21     angS21     magS12     angS12     magS22     angS22
#      frequency_unit      S      RI      R      impedance
freq     reS11      imS11      reS21      imS21      reS12      imS12      reS22      imS22
#      frequency_unit      S      DB      R      impedance
freq     dbS11      angS11      dbS21     angS21     dbS12      angS12      dbS22      angS22

S-Parameter 3-Port MA, RI, and DB File Formats

#      frequency_unit      S      MA      R      impedance
freq      magS11     angS11     magS12     angS12     magS13     angS13 ! 1st row
          magS21     angS21     magS22     angS22     magS23     angS23 ! 2nd row
          magS31     angS31     magS32     angS32     magS33     angS33 ! 3rd row
#      frequency_unit      S      RI      R      impedance
freq      reS11      imS11      reS12      imS12      reS13      imS13 ! 1st row
          reS21      imS21      reS22      imS22      reS23      imS23 ! 2nd row
          reS31      imS31      reS32      imS32      reS33      imS33 ! 3rd row
#      frequency_unit      S      DB      R      impedance
freq      dbS11      angS11     dbS12      angS12     dbS13      angS13 ! 1st row
          dbS21      angS21     dbS22      angS22     dbS23      angS23 ! 2nd row
          dbS31      angS31     dbS32      angS32     dbS33      angS33 ! 3rd row

S-Parameter 4-Port MA, RI, and DB File Formats

#   frequency_unit      S      MA      R      impedance
! 1st row
freq   magS11    angS11    magS12    angS12    magS13    angS13    magS14    angS14
       magS21    angS21    magS22    angS22    magS23    angS23    magS24    angS24 ! 2nd row
       magS31    angS31    magS32    angS32    magS33    angS33    magS34    angS34 ! 3rd row
       magS41    angS41    magS42    angS42    magS43    angS43    magS44    angS44 ! 4th row
#   frequency_unit      S      RI      R      impedance
freq  reS11    imS11    reS12    imS12    reS13    imS13    reS14    imS14 ! 1st row
      reS21    imS21    reS22    imS22    reS23    imS23    reS24    imS24 ! 2nd row
      reS31    imS31    reS32    imS32    reS33    imS33    reS34    imS34 ! 3rd row
      reS41    imS41    reS42    imS42    reS43    imS43    reS44    imS44 ! 4th row
#   frequency_unit      S      DB      R      impedance
freq  dbS11    angS11    dbS12    angS12    dbS13    angS13    dbS14    angS14 ! 1st row
      dbS21    angS21    dbS22    angS22    dbS23    angS23    dbS24    angS24 ! 2nd row
      dbS31    angS31    dbS32    angS32    dbS33    angS33    dbS34    angS34 ! 3rd row
      dbS41    angS41    dbS42    angS42    dbS43    angS43    dbS44    angS44 ! 4th row

S-Parameter 1-Port File Example

! symbol  freq-unit  parameter-type  data-format  keyword  impedance-ohms
#    MHZ   S    MA    R     50
! freq  magS11  angS11  (commented header line)
    2.000    0.894    -12.136
    3.000    0.893    -18.179
    4.000    0.891    -24.193

S-Parameter 5- to 99-Port File Formats

These file formats appear in a matrix form similar to the 3- and 4-port files, except that only four S-parameters (with 2 real numbers for each) can appear on a given line. Therefore, the remaining S-parameters in that row of the S-matrix continue on the next line of the file.

Each row of the S-matrix must begin on a new line of the file. The first line of the first row of the S-matrix begins with the frequency value.

S-Parameter 10-Port File Example (at One Frequency)

#      frequency_unit      S      MA      R      impedance
freq magS11 angS11 magS12 angS12 magS13 angS13 magS14 angS14 ! 1st row
magS15 angS15 magS16 angS16 magS17 angS17 magS18 angS18
magS19 angS19 magS1,10 angS1,10
magS21 angS21 magS22 angS22 magS23 angS23 magS24 angS24 ! 2nd row
magS25 angS25 magS26 angS26 magS27 angS27 magS28 angS28
magS29 angS29 magS2,10 angS2,10
magS31 angS31 magS32 angS32 magS33 angS33 magS34 angS34 ! 3rd row
magS35 angS35 magS36 angS36 magS37 angS37 magS38 angS38
magS39 angS39 magS3,10 angS3,10
magS41 angS41 magS42 angS42 magS43 angS43 magS44 angS44 ! 4th row
magS45 angS45 magS46 angS46 magS47 angS47 magS48 angS48
magS49 angS49 magS4,10 angS4,10
magS51 angS51 magS52 angS52 magS53 angS53 magS54 angS54 ! 5th row
magS55 angS55 magS56 angS56 magS57 angS57 magS58 angS58
magS59 angS59 magS5,10 angS5,10
magS61 angS61 magS62 angS62 magS63 angS63 magS64 angS64 ! 6th row
magS65 angS65 magS66 angS66 magS67 angS67 magS68 angS68
magS69 angS69 magS6,10 angS6,10
magS71 angS71 magS72 angS72 magS73 angS73 magS74 angS74 ! 7th row
magS75 angS75 magS76 angS76 magS77 angS77 magS78 angS78
magS79 angS79 magS7,10 angS7,10
magS81 angS81 magS82 angS82 magS83 angS83 magS84 angS84 ! 8th row
magS85 angS85 magS86 angS86 magS87 angS87 magS88 angS88
magS89 angS89 magS8,10 angS8,10
magS91 angS91 magS92 angS92 magS93 angS93 magS94 angS94 ! 9th row
magS95 angS95 magS96 angS96 magS97 angS97 magS98 angS98
magS99 angS99 magS9,10 angS9,10
!10th row
magS10,1 angS10,1 magS10,2 angS10,2 magS10,3 angS10,3 magS10,4 angS10,4
magS10,5 angS10,5 magS10,6 angS10,6 magS10,7 angS10,7 magS10,8 angS10,8
magS10,9 angS10,9 magS10,10 angS10,10

Linear 1-Port (.s1p) File Example

# GHZ      S      RI      R      50.0
        1.00000000        0.9488        -0.2017
        1.50000000        0.9077        -0.3125
        2.00000000        0.8539        -0.4165
        2.50000000        0.7884        -0.5120
        3.00000000        0.7124        -0.5978
        3.50000000        0.6321        -0.6546
        4.00000000        0.5479        -0.7013
        4.50000000        0.4701        -0.7380
        5.00000000        0.3904        -0.7663
        5.50000000        0.3302        -0.7778
        6.00000000        0.2702        -0.7848
        6.50000000        0.2041        -0.7890
        7.00000000        0.1389        -0.7878
        7.50000000        0.0894        -0.7849
        8.00000000        0.0408        -0.7789
        8.50000000        0.0134        -0.7649
        9.50000000        0.0654        -0.7471
        9.00000000        0.1094        -0.7319
        10.0000000        0.1518        -0.7140

Linear 2-Port (.s2p) File Example

# GHZ       S      RI      R      50.0
1.0000    0.3926    -0.1211    -0.0003    -0.0021    -0.0003    -0.0021    0.3926    -0.1211
2.0000    0.3517    -0.3054    -0.0096    -0.0298    -0.0096    -0.0298    0.3517    -0.3054
10.000    0.3419      0.3336    -0.0134      0.0379    -0.0134      0.0379    0.3419      0.3336
!Noise params
 1.0000    2.0000    -0.1211    -0.0003    .4
 2.0000    2.5000    -0.3054    -0.0096    .45
 3.0000    3.0000    -0.6916    -0.6933    .5
 4.0000    3.5000    -0.3756     0.4617    .55
 5.0000    4.0000     0.3880     0.6848    .6
 6.0000    4.5000     0.0343     0.0383    .65
 7.0000    5.0000     0.6916     0.6933    .7
 8.0000    5.5000     0.5659     0.1000    .75
 9.0000    6.0000     0.4145     0.0307    .8
10.0000    6.5000     0.3336     0.0134    .85

Linear 3-Port (.s3p) File Example

#  GHZ    S    MA    R    50.0
!  POWER DIVIDER, 3-PORT
5.00000    0.24254    136.711     0.68599    -43.3139    0.68599    -43.3139
           0.68599    -43.3139    0.08081     66.1846    0.28009    -59.1165
           0.68599    -43.3139    0.28009    -59.1165    0.08081     66.1846
6.00000    0.20347    127.652     0.69232    -52.3816    0.69232    -52.3816
           0.69232    -52.3816    0.05057     52.0604    0.22159    -65.1817
           0.69232    -52.3816    0.22159    -65.1817    0.05057     52.0604
7.00000    0.15848    118.436     0.69817    -61.6117    0.69817    -61.6117
           0.69817    -61.6117    0.02804     38.6500    0.16581    -71.2358
           0.69817    -61.6117    0.16581    -71.2358    0.02804     38.6500

Linear 4-Port (.s4p) File Example

#  GHZ    S    MA    R    50

5.00000  0.60262    161.240    0.40611  -42.2029   0.42918  -66.5876  0.53640  -79.3473
         0.40611    -42.2029   0.60262  161.240    0.53640  -79.3473  0.42918  -66.5876
         0.42918    -66.5876   0.53640  -79.3473   0.60262  161.240   0.40611  -42.2029
         0.53640    -79.3473   0.42918  -66.5876   0.40611  -42.2029  0.60262  161.240
6.00000  0.57701    150.379    0.40942  -44.3428   0.41011  -81.2449  0.57554  -95.7731
         0.40942    -44.3428   0.57701  150.379    0.57554  -95.7731  0.41011  -81.2449
         0.41011    -81.2449   0.57554  -95.7731   0.57701  150.379   0.40942  -44.3428
         0.57554    -95.7731   0.41011  -81.2449   0.40942  -44.3428  0.57701  150.379
7.00000  0.50641    136.693    0.45378  -46.4151   0.37845  -99.0918  0.62802  -114.196
         0.45378    -46.4151   0.50641  136.693    0.62802  -114.196  0.37845  -99.0918
         0.37845    -99.0918   0.62802  -114.196   0.50641  136.693   0.45378  -46.4151
         0.62802    -114.196   0.37845  -99.0918   0.45378  -46.4151  0.50641  136.693

Y- and Z-Parameter Files

Immittance parameters are specified in MA or RI format, where the # line has Y for admittance and Z for impedance. Both are normalized to the reference resistance.

Y- (Z-) Parameter 1-Port MA and RI File Formats

#     frequency_unit      Y      MA      R      impedance
freq    magY11    angY11
#      frequency_unit      Y      RI      R      impedance
freq    reY11    imY11

Y- (Z-) Parameter 2-Port MA and RI File Formats

#      frequency_unit      Y      MA      R      impedance
freq    magY11    angY11    magY21    angY21    magY12    angY12    magY22    angY22
#      frequency_unit      Y      RI      R      impedance
freq    reY11    imY11    reY21    imY21    reY12    imY12    reY22    imY22

Y- (Z-) Parameter 3-Port MA and RI File Formats

freq     magY11   angY11    magY12    angY12    magY13    angY13 ! 1st row
         magY21   angY21    magY22    angY22    magY23    angY23 ! 2nd row
         magY31   angY31    magY32    angY32    magY33    angY33 ! 3rd row
#    frequency_unit    Y    RI    R    impedance
freq     reY11    imY11    reY12    imY12    reY13    imY13 ! 1st row
         reY21    imY21    reY22    imY22    reY23    imY23 ! 2nd row
         reY31    imY31    reY32    imY32    reY33    imY33 ! 3rd row

Y- (Z-) Parameter 4-Port MA and RI File Formats

#    frequency_unit    Y    MA    R    impedance
freq  magY11  angY11    magY12    angY12    magY13    angY13    magY14    angY14 ! 1st row
      magY21  angY21    magY22    angY22    magY23    angY23    magY24    angY24 ! 2nd row
      magY31  angY31    magY32    angY32    magY33    angY33    magY34    angY34 ! 3rd row
      magY41  angY41    magY42    angY42    magY43    angY43    magY44    angY44 ! 4th row
#    frequency_unit    Y    RI    R    impedance
freq    reY11    imY11    reY12    imY12    reY13    imY13    reY14    imY14 ! 1st row
        reY21    imY21    reY22    imY22    reY23    imY23    reY24    imY24 ! 2nd row
        reY31    imY31    reY32    imY32    reY33    imY33    reY34    imY34 ! 3rd row
        reY41    imY41    reY42    imY42    reY43    imY43    reY44    imY44 ! 4th row

Y- (Z-) Parameter 3-Port File Example

! symbol    freq-unit    parameter-type    data-format    keyword    impedance-ohms
        #          GHz          Y          MA          R           1
! freq    magY11    angY11    magY12    angY12    magY13    angY13    ! 1st line
!         magY21    angY21    magY22    angY22    magY23    angY23    ! 2nd line
!         magY31    angY31    magY32    angY32    magY33    angY33    ! 3rd line
  4      0.008       83.122      8.5e-04      -86.740       0.007        -98.037
         0.046      -12.740      0.005         36.580       0.049        171.554
         0.046      177.588      0.004        -152.638      0.050          0.134
  8      0.016       79.068      0.002         -84.015      0.014       -102.924
         0.049      -23.015      0.006          52.828      0.051        164.123
         0.048      175.827      0.005        -139.640      0.052         -0.004
 12      0.025       73.501      0.003         -81.736      0.023       -109.374
         0.058      -36.736      0.009          58.596      0.058        152.007
         0.055      169.129      0.007        -136.047      0.059         -5.349
 18      0.036       65.138      0.004         -71.761      0.033       -119.900
         0.059      -54.761      0.013          72.274      0.052        137.118
         0.052      162.979      0.010        -121.976      0.055         -6.677

Y- (Z-) Parameter 5- to 99-Port File Formats

These file formats appear in a matrix form similar to 3- and 4-port files. Only four Y-, or Z-parameters (with 2 real numbers for each) can appear on a given line; therefore, the remaining parameters in that row of the matrix continue on the next line of the file. Each row of the Y-matrix must begin on a new line of the file. The first line of the first row of the Y-matrix begins with the frequency value. The actual Y- (Z-) parameter value is obtained by dividing (multiplying) the file entry with the reference resistance.

Y- (Z-) Parameter 10-Port File Example (at One Frequency)

#      frequency_unit      Y      MA      R      impedance
freq  magY11  angY11  magY12  angY12  magY13  angY13  magY14  angY14 ! 1st row
magY15  angY15  magY16  angY16  magY17  angY17  magY18  angY18
magY19  angY19  magY1,10  ngY1,10
magY21  angY21  magY22  angY22  magY23  angY23  magY24  angY24 ! 2nd row
magY25  angY25  magY26  angY26  magY27  angY27  magY28  angY28
magY29  angY29  magY2,10  angY2,10
magY31  angY31  magY32  angY32  magY33  angY33  magY34  angY34 ! 3rd row
magY35  angY35  magY36  angY36  magY37  angY37  magY38  angY38
magY39  angY39  magY3,10  angY3,10
magY41  angY41  magY42  angY42  magY43  angY43  magY44  angY44 ! 4th row
magY45  angY45  magY46  angY46  magY47  angY47  magY48  angY48
magY49  angY49  magY4,10  angY4,10
magY51  angY51  magY52  angY52  magY53  angY53  magY54  angY54 ! 5th row
magY55  angY55  magY56  angY56  magY57  angY57  magY58  angY58
magY59  angY59  magY5,10  angY5,10
magY61  angY61  magY62  angY62  magY63  angY63  magY64  angY64 ! 6th row
magY65  angY65  magY66  angY66  magY67  angY67  magY68  angY68
magY69  angY69  magY6,10  angY6,10
magY71  angY71  magY72  angY72  magY73  angY73  magY74  angY74 ! 7th row
magY75  angY75  magY76  angY76  magY77  angY77  magY78  angY78
magY79  angY79  magY7,10  angY7,10
magY81  angY81  magY82  angY82  magY83  angY83  magY84  angY84 ! 8th row
magY85  angY85  magY86  angY86  magY87  angY87  magY88  angY88
magY89  angY89  magY8,10  angY8,10
magY91  angY91  magY92  angY92  magY93  angY93  magY94  angY94 ! 9th row
magY95  angY95  magY96  angY96  magY97  angY97  magY98  angY98
magY99  angY99  magY9,10  angY9,10
!10th row
magY10,1  angY10,1  magY10,2  angY10,2  magY10,3  angY10,3  magY10,4  angY10,4
magY10,5  angY10,5  magY10,6  angY10,6  magY10,7  angY10,7  magY10,8  angY10,8
magY10,9  angY10,9  magY10,10  angY10,10

Discrete Format

The discrete data file consists of an array of data arranged in rows and columns. The values available for each parameter are arranged in columns. Following the BEGIN DSCRDATA line is the % format line which specifies the names of dependent variables. The first column is always treated as a string; other columns are real, integer or string, depending on the first row of data.

The first column, under the heading Index in the example below, contains entries used to identify each row in the file. These entries can be either an integer or an alphanumeric identifier, and can be thought of as a list of specification numbers (or part numbers). For example, the data file data/stdvalues15.dscr is arranged as follows:

REM     stdvalues15.dscr
BEGIN DSCRDATA
%  INDEX      A12      A13
     1        1000      1000
     2        1000      1200
     3        1000      2200
     4        1200      1000
     5        1200      1200
     6        1200      2200
END DSCRDATA

Selecting a Row

A row of data can be selected by specifying its row index (starting from 0). In this example, the file lists two columns of values labeled A12 and A13. By specifying 2 as the row number, the values 1000 and 2200 are selected for A12 and A13, respectively.

Using the File with a DAC

To use the data within the file, you must link the file to the component of interest. You reference a discrete data file in this way by using a DAC:

  1. Place a DataAccessComponent data item in your design. The DAC is located in the Data Items palette. Double-click the DAC to edit it.
  2. On the File tab, in the File Name field, specify the name of the discrete data file, and accept the default setting for File Type , which is Discrete .
  3. On the Interpolation tab, accept the defaults for Interpolation Method ( Index Lookup ) and for Interpolation Domain ( Rectangular ).
  4. On the Independent Variable tab, set the names and values for the independent variables. This is necessary since data in a discrete data file can be accessed only by using an index lookup value. This means looking up data by row number.
    To set up an independent variable, enter the name in the Variable Name field. For a discrete data file, the innermost independent variable is the dimension number which should be used as the name. Next, enter the row number in the Value field, which can be a variable assigned a value on the schematic. Then click Add to insert the name and value in the table at the left. Repeat this process for each independent variable in the data file.
    Values entered for Variable Name are treated as strings, and quotation marks are inserted with these values automatically when added to the table's Name column. However, the innermost independent variable of a discrete data file must be specified as a cardinal integer instead of a string name. Assuming you are working with a one-dimensional data file, enter @1 to enter the integer (@ suppresses the quotation marks). For example, here is a portion of a one-dimensional discrete data file:

    Begin dscrdata
    % index mydata
    0 12
    1 34
    2 56
    .....
    end

    If you define a variable called MyIndex in a schematic whose value represents the index of the row of data to be accessed, the table of independent variables should be constructed this way to read the one-dimensional file:

    Name Value
    1 MyIndex

    The value assigned to MyIndex in the schematic determines which row of data is read. So if MyIndex = 0 , the first row is read.

  5. Place the component whose parameter values should come from the data file. Double-click the component.
  6. Under Pa rameter Entry Mode, select File Based.
  7. Under Data Access Component Instance , enter the ID of the desired DAC data item.
  8. Under Dependent Parameter Name , enter the name of a dependent variable in the discrete data file (In the sample above, the dependent variable names are A12 and A13.).

Example

For an example of using a discrete data file, refer to amp1.dsn in the Examples directory, under Tutorials/DataAccess_prj .

Model MDIF Files

Nonlinear devices obtain their model parameters either from a model item or a file. For those devices that use a file, such as the EE_BJT2_Model , this section discusses the appropriate format for a model file, and how to read the file.

Model files are text files that contain model parameter names and values. A sample model file for the EE_BJT2_Model is shown below. Comments can be placed in the file by starting the line with REM . The model parameters are placed between BEGIN BDTA and END BDTA . One or more parameter names are placed on a line beginning with the percent symbol (%); corresponding values are placed in the same order on the next line. Parameter names can be in any order and are not case sensitive. Any parameters that are not present in the file take on their documented default values. Parameter names for each device are listed in the documentation for that device.

REM any line that starts with REM is ignored
BEGIN BDTA
%  Rb              Rc                Re              Tamb           Ibir              Nbr
   0.637326        5.17646           0.695           25             3.72528e-15       1.0537
%  Isc             Nc                Ibif            Nbf            Ise               Ne
   0               2                 5.70565e-17     1.10843        4.63077e-14       1.83578
%  Var             Nr                Isr             Ikr            Vaf               Nf
   1.1858          1.02201           1.12936e-14     100            54.9731           0.977768
%  Isf             Ikf               Cjc             Vjc            Mjc               Cje
   5.37696e-16     0.857731          5.87976e-13     0.313492       0.0650757         9.81026e-13
%  Vje             Mje               Tf              Tr             Fc
   1.05535         0.475724          2.09636e-12     0              0.9
%  Xtf             Vtf               Itf
   10              4.32912           1e-09
END BDTA

The following figure shows how to obtain parameter values from a model MDIF file using a DataAccessComponent. The DAC refers to the model file by name. In this example, the file name is bfqtm1.txt . Additionally, Type is set to MDIFmodel and ExtrapMode set to InterpolationMode . On the device model component, the AllParams parameter is set to the name of the DAC, which is DAC_BJT .


Reading a Model MDIF file using a DataAccessComponent

PDF Format

This format is for user-specified Probability Density Functions (PDF). PDF is used for arbitrary distributions that are not correlated. The two methods available accommodate:

  • Situations where the spread of statistical data is proportional to the nominal value (as in a percent tolerance).
  • Situations where the spread is independent of the nominal value (an absolute tolerance).

Probability density functions are represented as vertices of piecewise linear segments. These value/ordinate pairs are stored in a textual data file in a prescribed format. The nominal value is also stored.

User-specified probability density files have an extension .pdf and use an MDIF file format. Only a single distribution definition is allowed in each .pdf file.

Guidelines for .pdf

  • In addition to the nominal value, there must be a minimum of three value/ordinate data pairs.
  • For tolerance representation, all value data and the nominal value must have the same algebraic sign.
  • The ordinate data associated with the most negative and most positive value data must be zero.
  • All ordinate data must be non-negative.
  • At least one non-end ordinate data must be non-zero.

Example PDF File

The following example shows how to create a user-defined PDF file. The technique involves the use of a discrete file which contains the nominal value and the statistical data (in piece-wise linear form.) In this example, the first block contains the allowable nominal values, and the second block contains the statistical information. The VALUE/ORDINATE pairs describe the user-defined PDF.

BEGIN DSCRDATA
% INDEX my_index
1               50
2               60
3               70
4               100
END DSCRDATA
REM
REM  VAR INDEX value below must correlate with the row in the above data
REM  block, as selected by the iVal1 parameter of the DAC.
REM  For example, if iVal1=3, the 4th row of data from above is chosen
REM (INDEX=4), and VAR INDEX = 4 must be specified below
REM
REM  By experiment, the NOMINAL value does not have to correlate with the
REM  row number in the DSCRDATA block.
REM
VAR INDEX = 4
VAR PARNAME = my_index
BEGIN TOLERANCE
%NOMINAL
100
%VALUE ORDINATE
90      0.0
95      1.0
98      0.0
100     0.0
102     0.0
105     1.0
110     0.0
END TOLERANCE

Note
The total area under your PDF does not have to equal one as in the strict definition of a PDF-the simulator will automatically scale your PDF to meet this condition.

Interpretation of PDF data

Interpretation of user-supplied PDF data is piece-wise linear with respect to value/ordinate pairs. The data preparation previously described enables the program to supply a properly qualified variate.

To realize a statistical variable which obeys the user-supplied PDF, a uniform variate on the interval 0 to 1 is used as an input to a function which is the inverse of the cumulative distribution function (CDF). The CDF is formed by integrating the PDF from its most negative value to its most positive value, with the following conditions:

  • Fx (−∞), the CDF at minus infinity = 0
  • Fx (∞), the CDF at infinity = 1

Applying this uniform [0,1] variate to the inverse of the CDF results in a statistical variable having the user-specified probability density function.

PDFs may be used with:

  • Yield analysis, with or without post-production tuning
  • Yield optimization (design centering)

S2PMDIF Format

The S2PMDIF data format file (. s2p ) can contain multiple two-port small-signal measurement data and associated noise measurement data in a single file. S2P indicates that the data used is typically S-parameters, though other small-signal parameters (Y, Z, H, G) are supported. These files are a natural extension of two-port S-parameter Touchstone files. For information about Touchstone files, see Touchstone SnP Format. MDIF refers to the fact that these files use the format and syntax rules associated with the Measurement Data Interchange Format (MDIF).

The most typical application of the S2PMDIF format is the creation of a file-based statistical representation for one or more devices in the fabrication process. Due to process variations, S-parameters for the same device will vary naturally. Using the S2PMDIF format, which captures all S-parameter data, in conjunction with statistical and yield analysis tools, which can randomly select a part, statistical characterization of a device (known as a truthmodel ) for yield analysis is achieved.

General File Structure

The file structure can repeat for as many small-signal data/noise data pairs as needed. Noise data is optional and the file structure shown here may only have ACDATA blocks if desired.

! Comment Line
VAR <_Your_variable_name#1_> = <Your_Value>_
VAR <_Your_variable_name#2_> = <Your_Value>_
VAR <_Your_variable_name#n_> = <Your_Value>_
BEGIN ACDATA
! Option line
% F n11x n11y n21x n21y n12x n12y ! signal format line
! < Your small data consistent with above format line >
END
BEGIN NDATA
! Option line
% F nfmin n11x n11y rn ! noise format line
! < Your noise data >
END
! Repeat entire ACDATA and NDATA blocks above if necessary
! preceded by different VAR values to distinguish measurements.

Guidelines

The details presented in this section are demonstrated in Example S2PMDIF File. You are encouraged to review the example, then refer back to these guidelines for the detailed information.

VAR items VAR items are used to declare variables that distinguish different small signal/noise parameter pairs. The format is,

VAR <name> = <value>

Examples:

VAR Part_XYZ_sample = 1
VAR SAMPLE = 0

Note
VAR is a reserved keyword for the MDIF file. SAMPLE is a reserved variable for statistical analysis applications.

General information S2PMDIF supports

multiple small-signal and/or noise data pairs
or
one small-signal and/or noise data pair.

If the latter is used, no VAR declaration is required.

Comments Comments in the S2PMDIF are supported using ! or the REM statement. The ! may appear at the beginning of a line, or as a trailing comment at the end of a line. REM, however, may only serve as a leading comment on the beginning of a line. Examples:

REM VAR Lot = 1
! VAR Lot = 1
VAR Lot = 1 ! This is the wafer lot number

S2PMDIF data blocks  S2PMDIF contains two main data blocks framed by BEGIN and END statements:

ACDATA Lists small-signal parameters vs. frequency.
Framed by BEGIN ACDATA ... END.
The ACDATA block is required in the S2PMDIF file.
NDATA Lists noise parameters vs. frequency.
Framed by BEGIN NDATA ... END.
The NDATA block is optional in the S2PMDIF file.

Supported small-signal parameters The ACDATA (small-signal parameter) block supports the small-signal parameter types S, Y, Z, H, or G.

Supported noise data The NDATA (noise data) block supports parameters NFMIN (minimum noise figure), Gamma Opt (optimal source reflection coefficient), and RN (noise resistance). This is supported for use with all small-signal parameter types.

Option line The option line declares data contained in the SFC m2PMDIF file. These are

  • The frequency units
  • The type of small-signal parameter
  • The format used to express the small signal parameters (ACDATA block) or optimum source reflection (NDATA) (Magnitude & Angle, Real & Imaginary, dB & Angle).

There are two option line formats:

#AC (freq_unit SS_ParmType SS_Parm_Format R Scaling/system impedance)
# freq_unit SS_ParmType SS_Parm_Format R Scaling/system

where:

freq_unit = Sets frequency units.
Options are Hz, KHz, MHz, or GHz.
SS_ParmType = Sets small-signal parameter type.
Options are: S, Y, Z, H, or G (default is S).
SS_Parm_format = Small signal parameter format.
Options are RI, MA, or DB (default is RI), where:
RI declares Real Imaginary Format
MA declares Magnitude Angle
DB is 20*Log(Parameter_Magnitude) Angle format
R Scaling/system = Declares scaling/system impedance
(default is 50 ohms)

Important Option Line Information

  • While both option line formats are supported, #AC(... ) is recommended.
  • Option lines are required in the file. If any are omitted, unpredictable results will occur.
  • Option lines may have different frequency units, small-signal parameter formats (e.g., MA, RI, and DB), and system/scaling impedance values in the same S2PMDIF file. However, the small-signal parameter type (e.g., S, Y, Z, H, G) must be the same for all option lines in the S2PMDIF file. Agilent recommends that the same option line be used throughout the same S2PMDIF file except where scaling differences require changes (e.g., noise data is not scaled, whereas S-parameter data has a normalizing system impedance).
  • If default SS_ParamType, SS_Param_format, and R Scaling/System are used, at a minimum, the freq_unit must appear in the option line. For example:
    #AC ( GHz ) - preferred format
    # GHz - alternative format (Touchstone based)
  • Option line syntax is case insensitive.
  • When entering parameters other than S-parameter data, typically R 1 is used, since some users who are accustomed to using S-parameters make the common mistake of entering R 50 Z-parameters. In that event, the Z-parameters would be scaled to an undesirable level.
  • If an option line is not specified within a data block in the file, the following default option line is used for that data: # hz R ri R 50 .

Signal Format Line The syntax for the signal format line is
% F n11x n11y n21x n21y n12x n12y n22x n22y

The signal format line comprises nine columns of data in the ACDATA block. The first column is frequency, the remaining columns pertain to small-signal parameters. In S2PMDIF, each two-port small-signal parameter is represented in two parts. The format being either Magnitude(x) and Angle(y), or Real(x) and Imaginary(y), or dB(x) and Angle(y). (See guideline for Option line above.) Given this, the small signal parameters are entered as eight columns of data. The format line has the following meaning where n is S, Y, Z, H, or G:

F = Frequency in Hz, kHz, MHz, or GHz.
n11x = Magnitude, real part, or dB value (depending which option is used) for small signal parameter n11.
n11y = Angle, or imaginary part (depending which option is used) for small signal parameter n11.
n21x = Magnitude, real part, or dB value (depending which option is used) for small signal parameter n21.
n21y = Angle, or imaginary part (depending which option is used) for small signal parameter n21.
n12x = Magnitude, real part, or dB value (depending which option is used) for small signal parameter n12.
n12y = Angle, or imaginary part (depending which option is used) for small signal parameter n12.
n22x = Magnitude, real part, or dB value (depending which option is used) for small signal parameter n22.
n22y = Angle, or imaginary part (depending which option is used) for small signal parameter n22.

When the small-signal parameter format is declared (Magnitude Angle, Real Imaginary, or dB Angle), all small-signal parameters assume that format. For example, if Magnitude Angle is declared, all small signal parameters assume magnitude and angle format. If Real Imaginary is declared, all parameters assume real and imaginary format. If MA, RI, or DB are not specified at all, the default format is RI.

Noise Format Line The syntax for the noise format line is

% F nfmin n11x n11y rn

The noise format line comprises five columns of data in the NDATA block.

F = Frequency in Hz, kHz, MHz, or GHz.
nfmin = Minimum noise figure.
n11x
n11y
= The third and forth columns are optimum source reflection coefficient described as either Magnitude (n11x) and Angle (n11y), Real (n11x) and Imaginary (n11y), or DB (n11x) and Angle (n11y). (See guideline for Option line above.)
rn = Equivalent normalized noise resistance.

In the option line, when MA, RI, or DB is declared, it only pertains to the optimum source reflection coefficient data. If MA, RI, or DB are not specified at all, the default format is RI.

Example S2PMDIF File

The following example is annotated using single small signal, noise parameter data pair.

! File using #AC ( ... ) Optionline
! Created Mon Jan 26 15:02:05 2004
VAR Wafer_Lot = 0
BEGIN ACDATA
#AC( hz S ma R 50 )
! Choice of units:  Hz, KHz, MHz, or GHz
! Optional Selection:  S,Z,Y,H,or G {default S}
! Optional Selection:  MA, DB, RI   {default RI}
!                      DB = 20*log(mag(value))
! Optional Selection:  R XY; where XY=reference res {default R 50}
% F n11x n11y n21x n21y n12x n12y n22x n22y
!F      Mag_S11  Ang_S11    Mag_S21  Ang_S21    Mag_S12  Ang_S12    Mag_S22  Ang_S22
1e9    0.2416    -89.666    0.9138    -22.252    0.9138    -22.252    0.2366  -107.202
2e9    0.4456   -108.425    0.8336    -43.447    0.8336    -43.447    0.4394  -143.149
3e9    0.6068   -121.516    0.7234    -62.672    0.7234    -62.672    0.6044  -171.881
4e9    0.7203   -131.748    0.6068    -79.382    0.6068    -79.382    0.7259  -164.03
5e9    0.7945   -139.741    0.5001    -93.494    0.5001    -93.494    0.8097   143.997
END
BEGIN NDATA
! Noise Data block optional
#AC( hz S ma R 50 )
! Choice of units:  Hz, KHz, MHz, or GHz
! Optional Selection:  S,Z,Y,H,or G {default S}
! Optional Selection:  MA, DB, RI   {default RI}
!        MA, DB, RI pertai