Model Interface Routines

Model interface routines accept input parameters from CMI. These input parameters include the following:

For each set of input conditions, the model routines are required to return the following transistor characteristics to CMI:


NOTE: Currently, the Meyer capacitance model is not supported in Star-Hspice.

The transistor biases and output characteristics are transferred between CMI and model interface routines using variable type CMI_VAR, which can be found in the include/CMIdef.h file.

The entries vds, vgs and vbs are used to provide bias conditions, while the rest of the entries carry the results from evaluating the model equations.

/* must be consistent with its counterpart in HSPICE */

typedef struct CMI_var {

 

/* device input formation */

int mode; /* device mode */

int qflag; /* flag for charge/cap computing */

double vds; /* vds bias */

double vgs; /* vgs bias */

double vbs; /* vbs bias */

 

/* device DC information */

double gd; /* drain conductance */

double gs; /* source conductance */

double cgso; /* gate-source overlap capacitance */

double cgdo; /* gate-drain overlap capacitance */

double cgbo; /* gate-bulk overlap capacitance */

double von; /* turn-on voltage */

double vdsat; /* saturation voltage */

double ids; /* drain dc current */

double gds; /* output conductance (dIds/dVds) */

double gm; /* trans-conductance (dIds/dVgs) */

double gmbs; /* substrate trans-conductance (dIds/dVbs)*/

 

/* MOSFET capacitance model selection */

/* capop can have following values

* 13 charge model

* 0 or else Meyer's model


NOTE: Currently, Meyer's model is not supported.

*/

int capop; /* capacitor selector */

 

/* Meyer's capacitances:intrinsic capacitance + overlap capacitance Note: currently, these 3 capacitances are ignored by Hspice. A charge-based model formulation is required. */

double capgs; /* Meyer's gate capacitance (dQg/dVgs + cgso) */

double capgd; /* Meyer's gate capacitance (dQg/dVds + cgdo) */

double capgb; /* Meyer's gate capacitance (dQg/dVbs + cgbo) */

 

/* substrate-junction information */

double ibs; /* substrate source-junction leakage current */

double ibd; /* substrate drain-junction leakage current */

double gbs; /* substrate source junction-conductance */

double gbd; /* substrate drain junction-conductance */

double capbs; /* substrate source-junction capacitance */

double capbd; /* substrate drain-junction capacitance */

double qbs; /* substrate source-junction charge */

double qbd; /* substrate drain-junction charge */

 

/* substrate impact ionization current */

double isub; /* substrate current */

double gbgs; /* substrate trans-conductance (dIsub/dVgs) */

double gbds; /* substrate trans-conductance (dIsub/dVds) */

double gbbs; /* substrate trans-conductance (dIsub/dVbs) */

 

/* charge-based model intrinsic terminal charges */

/* NOTE: these are intrinsic charges ONLY */

double qg; /* gate charge */

double qd; /* drain charge */

double qs; /* source charge */

 

/* charge-based model intrinsic trans-capacitances*/

/* NOTE: these are intrinsic capacitances ONLY */

double cggb;

double cgdb;

double cgsb;

double cbgb;

double cbdb;

double cbsb;

double cdgb;

double cddb;

double cdsb;

 

/* noise parameters */

double nois_irs; /* Source noise current^2 */

double nois_ird; /* Drain noise current^2 */

double nois_idsth;/* channel thermal or shot noise current^2 */

double nois_idsfl; /* 1/f channel noise current^2 */

double freq; /* ac frequency */

 

/* extended model topology */

char *topovar; /* topology variables */

} CMI_VAR;

 

The nominal temperature and device temperature can be found in the global variable CMIenv. The CMIenv structure can be accessed via the global variable pCMIenv (pointer to the global CMIenv struct). The structure for CMIenv is defined in type CMI_ENV, which can be found in the include/CMIdef.h file:

/* environment variables */

typedef struct CMI_env {

double CKTtemp; /* simulation temperature */

double CKTnomTemp; /* nominal temperature */

double CKTgmin; /* GMIN for the circuit *

int CKTtempGiven;/* temp setting flag */

/* following are hspice-specific options */

double aspec;

double spice;

double scalm;

} CMI_ENV;

Star-Hspice Manual - Release 2001.2 - June 2001