Page tree
Skip to end of metadata
Go to start of metadata

Administrative Tasks for HSPICE Compatibility

This page covers the topics of Configuring PDKs for HSPICE Simulation in ADS, and how to Encrypt HSPICE files for use in ADS.

Configuring PDKs for HSPICE Simulation in ADS

Currently there is no automated way of configuring an HSPICE PDK for usage within ADS. In order to use individual components contained within an HSPICE library file, you must manually create your symbols, and have them reference the appropriate subcircuit or model within your HSPICE library file. These ADS elements should then be placed into an ADS design kit, which can be redistributed with the HSPICE library file. For more information on how to create an ADS design kit, see Design Kit Development. This remainder of this section will cover specialized items related to HSPICE compatibility.

Using the Netlist File Include for a PDK model file

The NetlistInclude component has been updated so it recognizes HSPICE library files. When the NetlistInclude is used with a PDK library file, you need to specify the location of the file, as well as the library section. During netlisting, a block in the following form is output

simulator lang=spice
.lib '<file>' section
simulator lang=ads

You can use the same file or multiple files in one NetlistInclude component, with as many sections as you like.

Creating a Process Include for a PDK model file

For an HSPICE PDK, the process component generation is similar to what is described in Example Process Component with Forms and Formsets. In the case of the HSPICE component, the only difference is in how the netlist callback function must output the file names and sections. For HSPICE, pre-processor directives for definitions and a #include should not be used. Instead, the appropriate .lib statement should be output.

defun mykit_process_netlist_cb(cbP, cbData, instH)
{
 decl libSection;
 decl netStrg;
 decl parmH, parmName, parmFormName;
 // Output a guard #ifdef so that the .lib statement
 // is only processed once
 netStrg = "#ifndef MYKIT_PROCESS\n#define MYKIT_PROCESS\n";
 netStrg = "simulator lang=spice\n"
 //--- corner case/resistance ------------------------------*/

 parmH = db_first_parm(instH);
 // This while loop will process all of the parameters
 // for the include component.  This example only has 
 // one parameter, so it is for illustrative purposes here.
 while (parmH != NULL)
 {
  parmName = db_get_parm_attribute(parmH, PARM_NAME);
  if (parmName == "CornerCase")
  {
   netStrg = strcat(netStrg, "; corners\n");
   parmFormName = db_get_parm_attribute(parmH, PARM_FORM_NAME);
   if (parmFormName == "mykit_form_process_best")
    libSection="MYKIT_BEST_SECTION"
   else if (parmFormName == "mykit_form_process_worst")
    libSection="MYKIT_WORST_SECTION";
   else
    libSection="MYKIT_NOMINAL_SECTION";
   netStrg=strcat(netStrg, sprintf(".lib '%s/circuit/models/mykit_models.hsp' %s\n",
                       MYKIT_PATH, libSection)
  }
  parmH = db_next_parm(parmH);
 }

 // Reset to ADS netlist parsing mode
 netStrg = strcat(netStrg, "simulator lang=ads\n");
 // Close the guarding #ifdef
 netStrg = strcat(netStrg, "#endif\n");

 // Return the output to the calling function
 return(netStrg);

}

The key differences in this output function are the bracketing simulator lang=spice/simulator lang=ads, and the use of the .lib statement. If your file is not a library file, you can still include the file using the .include syntax, and omit a section. It is still recommended to use the guard #ifdef/#endif with the file to avoid conflicts with parameters if a file is included multiple times.

Configuring the item definitions for your ADS elements

HSPICE compatibility does not differentiate between ADS and HSPICE subcircuits or models after flattening. If you have an instance of an element netlisted in ADS format, it can reference an HSPICE subcircuit or model that is contained within an HSPICE library file. The convention that should be used is to make the ADS element netlist as the name of the HSPICE subcircuit or model you wish to use. This allows you to use the standard ADS percent strings for netlisting, as opposed to needing to create a custom netlisting function.

For example, if your library file has the following:

.LIB mySampleLib
.subckt sampleCircuit1 1 2 ...
.
.
.
.ends sampleCircuit1

You would ideally create an ADS component named sampleCircuit1. In the item definition field for the netlist string, you would use ComponentNetlistFmt. This would give you an instance netlist line that looks like this:

sampleCircuit1:I1 _net1 _net2 ...

Note that all parameters that are defined for the library elements will utilize ADS equation syntax on the instances placed in ADS.

  • No labels