Skip navigation
All Places > Keysight Blogs > EEsof EDA > Blog > Author: rtinti

EEsof EDA

2 Posts authored by: rtinti Employee

Abstract

The IC-CAP native data format, MDM is very comprehensive. All supported Inputs and Outputs data and related information are included in the saved file so that when importing the file back into IC-CAP, the Setup Inputs / Outputs page is completely defined, including all the necessary sweep data that are necessary for simulation and measurements. Over the years, more features have been added to MDM so that it is also possible to import and export variables and transform’s data results. However, many IC-CAP users have asked us to provide the ability to import data from a more standard table-like format, like CSV. While a CSV file only includes the data portion, it is useful to be able to import table-like data generated by other measurement software or export data in CSV format to be used by other tools. In this article, we will introduce a simple generic import/export CSV tool developed in Python. We will see that while exporting Inputs/Outputs information to a CSV file is relatively straight forward and can easily be generalized, the importing portion needs to be specialized. The CSV IO Python library and MDL example are attached and can work with the current version of IC-CAP 2020 Update 2.0. In the future, we are planning to integrate this in the next release so it can work out-of-the-box.


Introduction

Let’s consider a simple .csv file which stores data for a classic Ids vs. Vgs, Vds graphic of a MOS device. Fig. 1 shows the first portion of the file, note the first row representing the column headers. All numbers are separated by commas; however, other separators may be used.

 

Figure 1: Header portion of a typical CSV file.

 

First, observe that it is not possible to distinguish Inputs (or stimulus) from Outputs just by looking at the file, of course in this case the ids column represents the only Output, but a typical CSV file may have several output columns. In our module, the user will need to define all possible inputs and outputs columns in dictionaries. This is part of the initial setup.

Second, each row of data in the table represents a completely independent bias point. In this case, by inspecting the data, we observe that VDS is the second-order sweep, VGS is the first-order sweep and VBS is constant and set to 0. In other cases, VBS could be a third order sweep. Each sweep could be linear, log, or an arbitrary list of values. Furthermore, there is no guarantee that each second-order curve has the same number of points, i.e. data could be non-rectangular.

Based on the above observations, the safest and easiest options is to define table-like Inputs/Outputs by using the LIST/LSYNC Inputs.

Starting with IC-CAP 2020 Update 2.0, LSYNC is now enabled for Inputs of mode Voltage and Current so the importing script can directly define LIST/LSYNC Inputs to mimic the structure in the CSV file.

Note that if the file includes columns representing instance parameters such as L, W, NF, or Temperature, these need to be translated into Parameter sweeps so the importer will need to be further enhanced to be able to handle these. In the same way, if the CSV file includes frequency and S-parameters, the complexity further increases. In this example, we want to keep things simple by design so that we can learn how things work and provide some foundations for further development. The importer can then be further enhanced to support a custom CSV file or a more complex s2p file.

 

Installing the CSV IO Module In IC-CAP 2020 Update 2.0 and prior versions

The attached package provides the following files

 

  • csvio.py – This is the main python module to be imported. It includes the API functions that can be called within an IC-CAP Python transform to Import or Export from/to a CSV file.
  • ic_ioutils.py – A utility module used by csvio.py. Includes utility functions that can be used by other importers, such as a function to read a CSV file into a NumPy ndarray or functions to delete Inputs and Outputs in a setup.
  • csv_io_example.mdl – A simple example file that shows how to import or export from/to .csv files.
  • idvg.csv, idvd.csv – data files used by the above example.

 

Exit IC-CAP before installing the modules.

 

In the following, we will assume that all the py files are saved in the installation directory. $ICCAP_ROOT/iccap/lib/python. 

 

Alternatively, if you can’t modify the IC-CAP installation, you can define the environment variable ICCAP_USER_PYTHON_PATH to point to a local directory where you have edit permission and save csvio.py and ic_iutils.py in that directory.

 

Importing CSV files

Next, save the example data files in a local directory. Once the files are installed, start IC-CAP and load the .mdl file.

 

The model file named nmos_bsim includes a simple BSIM3 model card for demonstration purposes. Select the transform DC_dut/idvg/import_csv. Before you execute it, make sure to modify the file path to reflect the actual location of the idvg.csv file to be loaded. You may also delete all the Inputs and Outputs in the Measure /Simulate page to create a clean initial state (the script will delete existing Inputs/Outputs anyway before creating new ones).

 

Figure 2: The import_csv function

 

Note that all the program complexity is in the python module (we’ll review the Python script later) so it is straightforward for the user to import the data. Go ahead and execute the function. Switch to the Measure / Simulate Tab to see the newly created Inputs and Output. Display the plot to see the data. In the Plot definition, it is important to set Curve Data to the second-order sweep, Vds so that the curves are correctly displayed.

 

 

Figure 3: Inputs / Outputs page and Plot after importing idvg.csv

 

Data are imported in the current Setup by using a combination of LIST and LSYNC Inputs.  IC-CAP does not directly support an Input sweep of type ‘TABLE’ however, table-like simulations can be achieved by using LIST and LSYNC. Since Vbs is constant throughout the table, instead of using an additional LSYNC Input, the algorithm converted Vbs to an Input of Sweep Type CONST.

In the same setup, find the transform import_csv_1. This function will also import the idvg.csv file, however, it uses a different module function called csv_file_import_create_noprompt() which receives the name of the destination setup as its first argument in addition to the name of the input file. You may call this function from other transforms or macros to automate data import across several setups.

Finally, note that since the Input nodes are correctly defined during the import, and are consistent with the current model card, the setup can be directly simulated. We’ll see how this is achieved by correctly defining the Inputs and Output dictionaries in the csvio.py module.

Now switch to the idvd Setup and use the transforms import_csv and import_csv_1 to import the sample data. The plot should look like Fig. 4. Note that this time we used the plot_vs() function in the Plot definition. The plot_vs() is very important with table-like data since it clearly defines how to draw the data by specifying the first, second, and higher-order sweeps.

 

 

Figure 4: Ids vs. Vds, Vgs plot after importing measured data.

 

One final note on the Import is that the imported data are always imported in the Measured portion of the Output arrays.

 

Before providing more details on the csvio.py module, let’s discuss how to export to CSV files.

 

Exporting to CSV files

 

Exporting to CSV is executed by the export_csv transform located in both idvd and idvg setups.

Figure 5: export_csv transform in the idg setup

 

The function has two arguments, the name of the file and an optional list of arguments. In this release of the library, only the supported options to select the type of data to be exported to the CSV file are ‘M’ and ‘S’.

 

Edit the path and the name of the file and run the transform to save the current setup data.

 

Like the import case, the transform export_csv_1 uses the csvio.py module function csv_file_export_noprompt(), which has an additional argument to enable saving to a different setup.

 

Data to be exported to a CSV file do not need to be organized using LIST and LSYNC. Data related to different types of Inputs or Outputs are still organized in arrays (or columns) in the underlying IC-CAP data structure. For example, when viewing data of a linear sweep, the data are stored as an array. LINEAR, CONST, LIST sweeps can easily be exported to CSV by using this Python module. However, Outputs of type S-parameters or in general Outputs storing complex data are not supported since the current csvio.py module does not support splitting complex data into two or more columns such as the case of 2-port S-parameters, where each frequency point would need to be split into 8 columns.

 

The CSV IO Python module

 

Let’s now take a closer look at the Python module. Before you can use the module to import your CSV files, you will need to add your input and output definitions. This is done in the first lines of the file, in the “Constant and Settings” section. Find the INPUTS_DEF and OUTPUT_DEF dictionaries. You will need to add your columns headers to these. Restart IC-CAP after you have edited and saved the file to allow the IC-CAP Python interpreter to compile the modified file py file.

 

Figure 6: INPUTS_DEFS dictionary

 

Add a new entry in the dictionary for each of your column headers. The key is the column name found in the CSV file (e.g. 'VDS') the value is a tuple that has three elements: the desired name of the Input in IC-CAP (e.g. 'Vds') the Input Mode (‘V’ or ‘I’) and the Input Node. The Input Name, Mode, and the Node can be changed later once the data are imported but it may cause loss of data if the renaming is not done in the correct sequence since LSYNC Inputs are linked to the master LIST sweep by name. I recommend defining these entries here so that Inputs do not need to be edited later in IC-CAP.

 

Figure 7: OUTPUTS_DEFS dictionary

 

Similarly, add Output entries to the OUTPUTS_DEF dictionary. Modes can be current (I), voltage (V), capacitance (C), etc. Keep in mind that only real Outputs are supported (e.g. S-parameters are not supported)

 

The USE_CONSTANT_INPUTS flag is set to True by default, change it to False if you prefer all the Inputs in LIST/LSYNC format, even if their values are the same at each row.

 

The function load_cvs_file_internal() is the main function executing the importing. First, it calls the function read_data() to read the file. This function is defined in ic_utils and can read table-like data with different delimiters (comma, white spaces, tab, etc.) so this importer will work even if the comma is not used as a delimiter.  Read_data returns a 2D array of data and the column header.

 

Next, the 2D data array is transposed so that each array is a column. This way it is easier to map the data to each Input or Output.

 

After deleting the existing Inputs, the function create_input_csv() creates all the new Inputs and fills them with data. The first column in the file will become the master sweep of type LIST, the other columns will be LSYNC. Note that the LIST Input will be assigned a sweep order equals to 1, however, LIST/LSYNC Inputs are tied together in a table-like format so for simulation purposes the order is not used. For plotting, any column can be used as the first-order sweep as long as the desired order is specified in the plot_vs() function.

 

Finally, Output are created by the create_output_csv() function. The create_output() function in the ic_ioutils module will do the heavy-lifting by creating the various Outputs and filling them with data.

 

The export is executed by the export_csv_file_internal() function and it is fairly straight forward. After collecting the Input and Output names, these are passed to the get_data_array() function which collects the data from the Inputs and Outputs objects and creates the 2D arrays to be passed to the save_to_file() function.

 

Note that by using NumPy array, we can conveniently use the np.savetxt() function to directly write the file.

 

Coding becomes more complicated if you need to support frequency and complex outputs such as S-parameters since frequency needs to be defined as a LIST of sweep order 1 to be able to simulate correctly with LSYNC Inputs. S-parameters are likely saved using 8 columns and need to be compacted into a single 2x2 data array point in IC-CAP. In the same way, export to CSV becomes more complex as each S-parameter data point needs to be split into several columns.

 

Summary

I have introduced a simple Python module to enable importing and exporting CSV files within IC-CAP. With a simple initial setting, it can be used to import basic DC and CV files. The module and the examples are attached below. The module could be improved to include import for columns representing parameters (e.g. L, W, NF) and temperature. Also, to improve the simulation speed, the module could analyze and recognize sweeps to be implemented using LINEAR or LOG Sweep Types. Finally, as a further improvement, the module could be enhanced to support complex data such as S-parameters vs. frequency, although a dedicated importer for s2p or sNp files would be preferred. 

 

Note: the installation instructions and the downloads have been updated after initial publication to work with IC-CAP 2020 Update 2.0 (current release at the time of writing this blog). New installation instructions will be provided for the upcoming IC-CAP 2010 Update 2.1 since the structure of the $ICCAP_ROOT/iccap/lib/python directory will be modified. 

Pulsed measured data are key to investigate and model important effects such as thermal, trapping/memory. Due to self-heating, using a Pulsed System is sometimes the only way to measure large RF power devices. Pulsed IV data are often represented by multi-curve data in which each curve has a different number of points and the values of the independent variable (i.e the first-order sweep, typically Vd) may also vary at each curve. This data is often called non-rectangular and stored in a table-like format. Until now, it has been challenging to manage non-rectangular data within IC-CAP and even more so, to simulate it. In this article, I’ll discuss new features released in IC-CAP 2020 Update 2.0 that greatly facilitate importing and simulating table-like data.

A PDF version of this article is attached along with an IC-CAP example project.


Introduction

A classic example of a non-rectangular data structure is obtained when measuring the steady-state (i.e. non-pulsed) Id vs. Vd, Vg characteristics of a FET device using power compliance to avoid damaging the device. In this case, each curve will typically have a different number of points with curves in the high-voltage / low-current regions extending to higher drain voltages than those that intersect the high-power regions. To add complexity, sometimes the Vd points may not be equally spaced to provide more resolution in the low-voltage region.

 

Figure 1: Example of non-rectangular data (DC IV Non-pulsed with power compliance)

 

Figure 2: IC-CAP classic IV Setup storing rectangular data


DC IV data measured with a Pulsed System are similar to the characteristics measured with power compliance.  Each curve could have a different number of points and because of the system losses, the Vd points may not be in a regular grid and their values may change in each curve. Some systems can adjust or tune the bias at each point so that the actual Vd at the device port matches the desired Vd by using a software algorithm. This slows down the measurement, but it results in a more regular plot where all curves share the same Vd values.

 

The traditional IC-CAP Setup for Id vs. Vd, Vg is shown in Fig. 2 and uses Inputs of Sweep Type: “Linear” where Vd and Vg are the first and second-order sweeps, respectively.  This setup creates a regular rectangular grid and does not align with Pulsed IV measured data.  Alternatively, one could use a ‘LIST’ sweep to represent all the Vd values and while this list would allow one to define arbitrary values for each curve since the entire Vd would be a 1st order sweep, all the values in the list would be simulated for each Vg value. This would result in a redundant number of bias points simulated and would require data to be manipulated before they can be displayed.

 

A solution to our non-rectangular data problem is to use a combination of LIST and LSYNC Inputs to represent table-like data to be simulated on a row basis.  In tabular data, each column represents an Input or an Output and each row represents an independent simulated bias point. IC-CAP does not directly support an Input sweep of type ‘TABLE’ however, table-like simulations can be achieved by using LIST and LSYNC.

 

In the latest release, IC-CAP 2020 Update 2.0, LIST/LSYNC Inputs have been enhanced to support direct simulation of I/V table-like data, including temperature and instance parameter information. In this paper, I will first discuss how to import pulsed data into IC-CAP, then I will discuss how to simulate it.

 

Importing and displaying Pulsed Data into IC-CAP

 

IC-CAP 2020 update 2.0 includes a new Python module called ‘pivimport’. This module allows the import of two types of data files:

  • Maury/AMCAD DC/Pulsed measurement data file. (.mes)
  • Maury/AMCAD S-parameter measurement data file (.mps)

I will not discuss the details of the .mes and .mps formats here. Both files include blocks of data, each representing a DC or an S-parameter curve at different Vg (.mes) or different Vg and Vd (.mps) values so the file reader needs to be able to parse the bias information, create LIST and LSYNC Inputs accordingly and finally read the data into the Outputs. If you are curious about the implementation, please see the open-source pivimport.py file.

An example MDL file, PIV_IMPORT_Example_FET.mdl is provided under the directory:

$ICCAP_ROOT\examples\new_features\ICCAP_2020_Update2

 

Figure 3: Example of Python transform importing (.mes) data


In the example project, there are two DUT’s: dev_p and dev_iv. Here, we will consider the dev_iv, which uses the latest improved implementation of LSYNC shipped with IC-CAP 2020 Update 2.0.

To load .mes file, run the transform test_import_mes. 

At the prompt, select the .mes file. Data will be loaded in the current setup. Copy and paste the transform into your project to be able to load data into another project Setup or simply provide a different destination Setup (dest_setup in line 7 above) as first argument.

 

Figure 4: Input / Output page after importing a .mes file (DC IV pulsed data)

 

In the transform, note that the new Python module pivimport is imported on line 1. After loading, the Inputs / Outputs page should look like Fig. 4.

Note how the combined use of LIST and LSYNC Inputs creates a table-like structure. The vd_pulse Input is of type LIST. Think of it as the master column or the first column of the table. Inputs of type LSYNC are ‘linked’ to the master vd_pulse and represent the other columns in the table. You can have many LSYNC (additional columns in the table) but there is only one master LIST. LSYNC may be of type V/I or P (Parameter). Type P may represent entries like temperature, width, length, etc. If necessary, Inputs of type ‘CONST’ are also allowed and they represent columns in the table in which each cell has a constant value.

 

 

Figure 5: Using Curve Data and switching the legend on and showing the marker information

 

Each curve populates a section of the table. In this case, rows representing a single curve will have the same values for vg_pulse (this is how IC-CAP knows how to correctly display the curves). In fact, there are a couple of ways to display the plot.  In the first method shown on the left in figure 5, we use “Curve Data”. By setting Curve Data to vg_pulse, we tell IC-CAP that vg_pulse is to be used as a 2nd order sweep.  When its value changes, the IC-CAP graphic engine knows that it needs to start a new curve. Note also how both legend and the marker info display work well.

The second method is somewhat more powerful, especially if you have more than two LSYNC and a third-order sweep (i.e. several columns in the table).  This method uses the new plot_vs() function. See Figure 6 and note the definition of ‘Y data 0’.

 

Figure 6: Using plot_vs() to define the trace

 

Importing S-parameter data follows a similar procedure. Maury’s .mps files are essentially touchstone files that include bias information in the header of each frequency block. Since the tabular format only refers to the bias points, the IC-CAP importer requires each frequency block to have the same number and values of frequency points.

 

Figure 7: Typical S-parameter Setup imported from .mps files

 

In the example file, use the transform in the setup dev_iv/piv_iv_spar_mps to import .mps file. After importing the setup should look like Fig. 7.

The frequency is the first order sweep and is a LIST Input since frequency may not be a linear sweep in the file. The bias is implemented as tabular data using the LIST/LSYNC. At simulation time, the frequency sweep is executed for each row of the tabular data, representing a single bias point.

 

As mentioned earlier, the new pivimport.py module is installed into the $ICCAP_ROOT/lib/iccap/python/icutils directory. It is open-source and can be easily viewed to see how the import algorithm is implemented and to use as a starting example to import other types of table-like file formats. To support the tabular nature of the data, simulations are run row-by-row.

 

Simulating Tabular and Pulsed Data in IC-CAP

 

Once LIST/LSYNC Inputs have been created as explained in the previous section, IC-CAP 2020 Update 2.0 can correctly simulate the data. At this time, the new LSYNC I/V/S feature is supported with ADS (including spmodeads and hspicemodeads netlist syntax modes) and ELDO.

If the tabular data were measured under steady-state conditions (e.g. power compliance measurements, Maury/AMCAD DC IV characteristics, etc.) then no further considerations are necessary when the model self-heating model is turned on. Providing that RTH has been extracted, the simulation will automatically consider the effect of self-heating.

On the other hand, if the measured data are from Pulsed IV or Pulsed S-parameters measurements, then further considerations are necessary. Let’s discuss the Pulsed IV case first. We will assume that data are quasi-isothermal, i.e. were measured using narrow pulses (e.g. 500ns or less) and that the temperature increase is negligible during the pulse. Also, the pulse period is long enough so that there is no significant temperature change over time. Typically, this condition is satisfied if the duty cycle is 1/1000.

If the device does not show any trapping/memory effects or the quiescent bias point is Vg=Vd=0 (no trapping effects are excited at quiescent) then a simple way to simulate is to turn off self-heating. This can easily be achieved by setting RTH=0 in the Model Parameter Table and executing a classic DC simulation.

If the device has memory effects, like modern GaN devices, modeling engineers will typically perform Pulsed IV measurements at different quiescent points to study the effect of traps and extract the related model parameters. In this case, we cannot use standard DC simulations, but rather we need to extract the Pulsed IV characteristics from transient simulations, just like in a real Pulsed System. For each bias point, a pulsed transient simulation is run, and one value is sampled within the id pulse. The sampled current values are then combined to re-construct the IV characteristics. This type of simulation is not natively supported by ADS and since it comprises of many transient simulations, it is more time-consuming than a regular DC simulation.

This is where the power and flexibility of IC-CAP can greatly help.

The DUT Circuit is shown in Fig. 8. A 4-terminal GaN device is defined at the Model circuit level using an ASM-HEMT model card (not shown here). At the DUT level, we define a sub-circuit that includes voltage sources at the drain and gate terminals. These sources use the erf_pulse() function in ADS which defines a pulse waveform in the transient simulation. The parameters governing the pulse (e.g. quiescent and pulse levels, pulse delay and width) are defined as parameters of the sub-circuit

 

 Figure 8: DUT Circuit for Pulsed IV simulation in the time domain

 

The Measure / Simulate page tab is shown in Figure 9. The Input time which defines the transient simulation and the time interval. The constant Inputs vg_qu and vd_qu define the Vg and Vd quiescent point (-3.3, 28) and the LIST/LSYNC Inputs define the Vg and Vd pulse levels. These are typically imported from measured data.

Running this simulation is only the first step required to obtain the Pulsed IV characteristics. In fact, this simulation Setup will output as many ig and id waveforms as the number of bias points (243 in the example). Fig. 10 shows the id.s waveform as a function of time. Just as in a real Pulse Measurement System, to create the IV characteristics, we need to sample each waveform at a specific time delay; not too early so that the current level is not affected by the turn-on transient, but also not too late otherwise, self-heating may start to affect the current level. It is important to observe that the waveform measured by the system may look different due to the presence of additional parasitics (e.g. cables, connectors, etc.)Note the two auxiliary Inputs vg_aux and vd_aux. They define two voltage sources and have no effect; however, they are necessary so that IC-CAP can read the current flowing through the G and D nodes. The Outputs id and ig monitor the currents and finally, if the model supports self-heating, one can read the temperature node. If you turn on self-heating, make sure that you have a reasonable value for CTH, otherwise, the transistor will heat-up instantaneously during the short pulse and follow the instantaneous dissipated power.

 

Figure 9: Inputs / Outputs configuration to simulate Pulsed IV characteristics


If no trapping is present, i.e. the quiescent bias point is (0,0) one can use pulsed data to extract CTH by comparing measured and simulated data of different pulse widths and sampling points.  In a typical III-V device, the slope of the current along the pulse can be used to determine the thermal capacitance and resistance. In Figure 10, note the slight negative slope during the pulse at high currents due to self-heating.

 

Figure 10: Simulation of Pulsed IV Characteristics

 

If the RTH and CTH have been previously extracted, and you are investigating trapping, then use the same simulation time delay as used in the measurement.

In the Extract / Optimize page, the transforms id_vs_vd and ig_vs_vd sample the waveforms and return the current dataset to be used for display purposes as shown in Figure 11. These are relatively simple to implement and are provided in the attached example project.

 

Figure 11: Simulation of Pulsed IV Characteristics

 

If the model includes trapping, you will obtain different Pulsed IV characteristics depending on the quiescent point and can use these curves to extract the related model parameters. At the time of this writing, investigation on the trapping model used in this example, the CMC standard ASM-HEMT model for GaN devices, is still under undergoing.  Therefore, we are currently not able to display pulsed IV curves showing different trapping states.

 

Finally, a word on simulating Pulsed S-parameters. Unfortunately, a full simulation of Pulsed S-parameters using a combination of time-domain and S-parameters is not possible since no commercial simulator supports this analysis combination. Typically, Pulsed S-parameter measured data are compared to S-parameter simulation with no self-heating. If the device has memory effects, use only data measured at (0,0) quiescent point to minimize trapping effects.

 

To study the effect of trapping on RF behavior and validate the model, one should compare results from large-signal Harmonic Balance (HB) simulations to waveforms from active load-pull measurements such as those measured by the Keysight Nonlinear Vector Analyzer.

 

Note: The attached example requires IC-CAP 2020 Update 2.1 scheduled to be released in May 2020 due to a change in the python library directory structure.

If you are running IC-CAP 2020 Update 2, simply replace the line:

from icutil import pivimport

with:

import pivimport

in the Python transform used to import .mes and .mps file.