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:
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 */
int qflag; /* flag for charge/cap computing */
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
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 qs; /* source charge */
/* charge-based model intrinsic trans-capacitances*/
/* NOTE: these are intrinsic capacitances ONLY */
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 */
char *topovar; /* topology variables */
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:
double CKTtemp; /* simulation temperature */
double CKTnomTemp; /* nominal temperature */
double CKTgmin; /* GMIN for the circuit *
int CKTtempGiven;/* temp setting flag */
/* following are hspice-specific options */
Star-Hspice Manual - Release 2001.2 - June 2001