diff --git a/src/include/bdrydefs.h b/src/include/bdrydefs.h new file mode 100644 index 000000000..73fb8cb8b --- /dev/null +++ b/src/include/bdrydefs.h @@ -0,0 +1,64 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors : 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + + +#ifndef BDRY_H +#define BDRY_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sBDRYcard { + struct sBDRYcard *BDRYnextCard; + double BDRYxLow; + double BDRYxHigh; + double BDRYyLow; + double BDRYyHigh; + double BDRYqf; + double BDRYsn; + double BDRYsp; + double BDRYlayer; + int BDRYixLow; + int BDRYixHigh; + int BDRYiyLow; + int BDRYiyHigh; + int BDRYdomain; + int BDRYneighbor; + unsigned int BDRYxLowGiven : 1; + unsigned int BDRYxHighGiven : 1; + unsigned int BDRYyLowGiven : 1; + unsigned int BDRYyHighGiven : 1; + unsigned int BDRYqfGiven : 1; + unsigned int BDRYsnGiven : 1; + unsigned int BDRYspGiven : 1; + unsigned int BDRYlayerGiven : 1; + unsigned int BDRYixLowGiven : 1; + unsigned int BDRYixHighGiven : 1; + unsigned int BDRYiyLowGiven : 1; + unsigned int BDRYiyHighGiven : 1; + unsigned int BDRYdomainGiven : 1; + unsigned int BDRYneighborGiven : 1; +} BDRYcard; + +/* BDRY parameters */ +#define BDRY_X_LOW 1 +#define BDRY_X_HIGH 2 +#define BDRY_Y_LOW 3 +#define BDRY_Y_HIGH 4 +#define BDRY_IX_LOW 5 +#define BDRY_IX_HIGH 6 +#define BDRY_IY_LOW 7 +#define BDRY_IY_HIGH 8 +#define BDRY_DOMAIN 9 +#define BDRY_NEIGHBOR 10 +#define BDRY_QF 11 +#define BDRY_SN 12 +#define BDRY_SP 13 +#define BDRY_LAYER 14 + +#endif /* BDRY_H */ diff --git a/src/include/carddefs.h b/src/include/carddefs.h new file mode 100644 index 000000000..d17cca2ea --- /dev/null +++ b/src/include/carddefs.h @@ -0,0 +1,27 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors : 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef CARDDEFS_H +#define CARDDEFS_H + +/* Data Structures and Definitions for Device Simulation Cards */ +#include "bdrydefs.h" +#include "contdefs.h" +#include "domndefs.h" +#include "dopdefs.h" +#include "elctdefs.h" +#include "meshdefs.h" +#include "methdefs.h" +#include "matldefs.h" +#include "mobdefs.h" +#include "modldefs.h" +#include "optndefs.h" +#include "outpdefs.h" + +#endif /* CARDDEFS_H */ diff --git a/src/include/ciderinp.h b/src/include/ciderinp.h new file mode 100644 index 000000000..d40ed7ba7 --- /dev/null +++ b/src/include/ciderinp.h @@ -0,0 +1,60 @@ +/* + * ciderinp.h + * + * CIDER input library header + */ + +#ifndef _CIDERINP_H +#define _CIDERINP_H + + +/* externals for bdryset.c */ +extern int BDRYcheck(BDRYcard *, DOMNdomain *); +extern int BDRYsetup(BDRYcard *, MESHcoord *, MESHcoord *, DOMNdomain *); + +/* externals for contset.c */ +extern int CONTcheck(CONTcard *); +extern int CONTsetup(CONTcard *, ELCTelectrode *); + +/* externals for domnset.c */ +extern int DOMNcheck(DOMNcard *, MaterialInfo *); +extern int DOMNsetup(DOMNcard *,DOMNdomain **, MESHcoord *, MESHcoord *, + MaterialInfo *); + +/* externals for dopset.c */ +extern int DOPcheck(DOPcard *, MESHcoord *, MESHcoord *); +extern int DOPsetup(DOPcard *, DOPprofile **, DOPtable **, + MESHcoord *, MESHcoord *); + +/* externals for elctset.c */ +extern int ELCTcheck(ELCTcard *); +extern int ELCTsetup(ELCTcard *, ELCTelectrode **, MESHcoord *, + MESHcoord *); + +/* externals for matlset.c */ +extern int MATLcheck(MATLcard *); +extern int MATLsetup(MATLcard *, MaterialInfo **); + +/* externals for meshset.c */ +extern double *MESHmkArray(MESHcoord *, int); +extern void MESHiBounds(MESHcoord *, int *, int *); +extern void MESHlBounds(MESHcoord *, double *, double *); +extern int MESHlocate(MESHcoord *, double); +extern int MESHcheck(char, MESHcard *); +extern int MESHsetup(char, MESHcard *, MESHcoord **, int *); + +/* externals for mobset.c */ +extern int MOBcheck(MOBcard *, MaterialInfo *); +extern int MOBsetup(MOBcard *, MaterialInfo *); + +/* externals for modlset.c */ +extern int MODLcheck(MODLcard *); +extern int MODLsetup(MODLcard *); + +/* externals for outpset.c */ +extern int OUTPcheck(OUTPcard *); +extern int OUTPsetup(OUTPcard *); + + + +#endif diff --git a/src/include/cidersupt.h b/src/include/cidersupt.h new file mode 100644 index 000000000..fa9a5ac17 --- /dev/null +++ b/src/include/cidersupt.h @@ -0,0 +1,86 @@ +/* + * cidersupt.h + * + * CIDER support library header + */ + +#ifndef _CIDERSUPT_H +#define _CIDERSUPT_H + + +/* externals for database.c */ +extern struct plot* DBread( char *); +extern double *DBgetData( struct plot *, char *, int ); +extern void DBfree( struct plot *); + +/* externals for devprint.c */ +extern void printVoltages(FILE *, char *, char *, int, + int, double, double, double, + double, double, double ); + +/* externals for geominfo.c */ +extern void printCoordInfo(CoordInfo *); +extern void killCoordInfo(CoordInfo *); +extern void ONEprintDomainInfo(DomainInfo *); +extern void TWOprintDomainInfo(DomainInfo *); +extern void killDomainInfo(DomainInfo *); +extern void ONEprintBoundaryInfo(BoundaryInfo *); +extern void TWOprintBoundaryInfo(BoundaryInfo *); +extern void killBoundaryInfo(BoundaryInfo *); +extern void TWOprintElectrodeInfo(ElectrodeInfo *); +extern void killElectrodeInfo(ElectrodeInfo *); + +/* externals for globals.c */ +extern void GLOBcomputeGlobals(GLOBvalues *, double); +extern void GLOBputGlobals(GLOBvalues *); +extern void GLOBgetGlobals(GLOBvalues *); +extern void GLOBprnGlobals(FILE *, GLOBvalues *); + +/* externals for integset.c */ +extern void computeIntegCoeff(int, int, double *, double *); +extern void computePredCoeff(int, int, double *, double *); + +/* externals for integuse.c */ +extern double integrate(double **, TranInfo *, int ); +extern double predict(double **, TranInfo *, int ); +extern double computeLTECoeff( TranInfo * ); +extern double integrateLin(double **, TranInfo *, int ); + +/* externals for logfile.c */ +extern void LOGmakeEntry(char *, char * ); + +/* externals for mater.c */ +extern void MATLdefaults(MaterialInfo * ); +extern void MATLtempDep(MaterialInfo *, double ); +extern void printMaterialInfo(MaterialInfo * ); + +/* externals for mobil.c */ +extern void MOBdefaults(MaterialInfo *, int, int, int, int ); +extern void MOBtempDep (MaterialInfo *, double ); +extern void MOBconcDep (MaterialInfo *, double, double *, double *); +extern void MOBfieldDep (MaterialInfo *, int, double, double *, double * ); + +/* externals for recomb.c */ +extern void recomb (double, double, double, double, double, double, + double, double *, double *, double * ); + +/* externals for suprem.c */ +extern void readAsciiData( char *, int, DOPtable ** ); +extern void readSupremData( char *, int, int, DOPtable ** ); + +/* externals for suprmitf.c */ +extern void SUPbinRead( char *, float *, float *, int *, int * ); +extern void SUPascRead( char *, float *, float *, int *, int * ); + + + + +/* externals for misc.c */ +extern double guessNewConc(double , double ); +extern double lookup(double **, double ); +extern BOOLEAN hasSORConverged(double *, double *, int); +extern BOOLEAN foundError(int ); + + + +#endif diff --git a/src/include/contdefs.h b/src/include/contdefs.h new file mode 100644 index 000000000..da6e3b686 --- /dev/null +++ b/src/include/contdefs.h @@ -0,0 +1,33 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors : 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef CONT_H +#define CONT_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sCONTcard { + struct sCONTcard *CONTnextCard; + double CONTworkfun; + int CONTtype; + int CONTnumber; + unsigned int CONTworkfunGiven : 1; + unsigned int CONTtypeGiven : 1; + unsigned int CONTnumberGiven : 1; +} CONTcard; + +/* CONT parameters */ +#define CONT_NEUTRAL 1 +#define CONT_ALUMINUM 2 +#define CONT_P_POLY 3 +#define CONT_N_POLY 4 +#define CONT_WORKFUN 5 +#define CONT_NUMBER 6 + +#endif /* CONT_H */ diff --git a/src/include/domndefs.h b/src/include/domndefs.h new file mode 100644 index 000000000..e8d0540fe --- /dev/null +++ b/src/include/domndefs.h @@ -0,0 +1,52 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors : 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef DOMN_H +#define DOMN_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sDOMNcard { + struct sDOMNcard *DOMNnextCard; /* pointer to next domain */ + double DOMNxLow; + double DOMNxHigh; + double DOMNyLow; + double DOMNyHigh; + int DOMNixLow; + int DOMNixHigh; + int DOMNiyLow; + int DOMNiyHigh; + int DOMNmaterial; + int DOMNnumber; + unsigned int DOMNxLowGiven : 1; + unsigned int DOMNxHighGiven : 1; + unsigned int DOMNyLowGiven : 1; + unsigned int DOMNyHighGiven : 1; + unsigned int DOMNixLowGiven : 1; + unsigned int DOMNixHighGiven : 1; + unsigned int DOMNiyLowGiven : 1; + unsigned int DOMNiyHighGiven : 1; + unsigned int DOMNmaterialGiven : 1; + unsigned int DOMNnumberGiven : 1; +} DOMNcard; + +/* DOMN parameters */ +#define DOMN_X_LOW 1 +#define DOMN_X_HIGH 2 +#define DOMN_Y_LOW 3 +#define DOMN_Y_HIGH 4 +#define DOMN_IX_LOW 5 +#define DOMN_IX_HIGH 6 +#define DOMN_IY_LOW 7 +#define DOMN_IY_HIGH 8 +#define DOMN_NUMBER 9 +#define DOMN_MATERIAL 10 + + +#endif /* DOMN_H */ diff --git a/src/include/dopdefs.h b/src/include/dopdefs.h new file mode 100644 index 000000000..559c3acde --- /dev/null +++ b/src/include/dopdefs.h @@ -0,0 +1,84 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors : 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef DOP_H +#define DOP_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sDOPcard { + struct sDOPcard *DOPnextCard; + double DOPxLow; + double DOPxHigh; + double DOPyLow; + double DOPyHigh; + double DOPconc; + double DOPlocation; + double DOPcharLen; + double DOPratioLat; + int DOPprofileType; + int DOPlatProfileType; + int DOProtateLat; + int DOPimpurityType; + int DOPaxisType; + int DOPnumDomains; + int *DOPdomains; + char *DOPinFile; + unsigned int DOPxLowGiven : 1; + unsigned int DOPxHighGiven : 1; + unsigned int DOPyLowGiven : 1; + unsigned int DOPyHighGiven : 1; + unsigned int DOPconcGiven : 1; + unsigned int DOPlocationGiven : 1; + unsigned int DOPcharLenGiven : 1; + unsigned int DOPratioLatGiven : 1; + unsigned int DOPprofileTypeGiven : 1; + unsigned int DOPlatProfileTypeGiven : 1; + unsigned int DOProtateLatGiven : 1; + unsigned int DOPimpurityTypeGiven : 1; + unsigned int DOPaxisTypeGiven : 1; + unsigned int DOPdomainsGiven : 1; + unsigned int DOPinFileGiven : 1; +} DOPcard; + +/* DOP parameters */ +#define DOP_UNIF 1 +#define DOP_LINEAR 2 +#define DOP_GAUSS 3 +#define DOP_ERFC 4 +#define DOP_EXP 5 +#define DOP_SUPREM3 6 +#define DOP_ASCII 7 +#define DOP_SUPASCII 8 +#define DOP_INFILE 9 +#define DOP_BORON 10 +#define DOP_PHOSP 11 +#define DOP_ARSEN 12 +#define DOP_ANTIM 13 +#define DOP_P_TYPE 14 +#define DOP_N_TYPE 15 +#define DOP_X_AXIS 16 +#define DOP_Y_AXIS 17 +#define DOP_X_LOW 18 +#define DOP_X_HIGH 19 +#define DOP_Y_LOW 20 +#define DOP_Y_HIGH 21 +#define DOP_CONC 22 +#define DOP_LOCATION 23 +#define DOP_CHAR_LEN 24 +#define DOP_RATIO_LAT 25 +#define DOP_ROTATE_LAT 26 +#define DOP_UNIF_LAT 27 +#define DOP_LINEAR_LAT 28 +#define DOP_GAUSS_LAT 29 +#define DOP_ERFC_LAT 30 +#define DOP_EXP_LAT 31 +#define DOP_DOMAIN 32 + +#endif /* DOP_H */ diff --git a/src/include/elctdefs.h b/src/include/elctdefs.h new file mode 100644 index 000000000..534670f2d --- /dev/null +++ b/src/include/elctdefs.h @@ -0,0 +1,48 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors : 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef ELCT_H +#define ELCT_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sELCTcard { + struct sELCTcard *ELCTnextCard; + double ELCTxLow; + double ELCTxHigh; + double ELCTyLow; + double ELCTyHigh; + int ELCTixLow; + int ELCTixHigh; + int ELCTiyLow; + int ELCTiyHigh; + int ELCTnumber; + unsigned int ELCTxLowGiven : 1; + unsigned int ELCTxHighGiven : 1; + unsigned int ELCTyLowGiven : 1; + unsigned int ELCTyHighGiven : 1; + unsigned int ELCTixLowGiven : 1; + unsigned int ELCTixHighGiven : 1; + unsigned int ELCTiyLowGiven : 1; + unsigned int ELCTiyHighGiven : 1; + unsigned int ELCTnumberGiven : 1; +} ELCTcard; + +/* ELCT parameters */ +#define ELCT_X_LOW 1 +#define ELCT_X_HIGH 2 +#define ELCT_Y_LOW 3 +#define ELCT_Y_HIGH 4 +#define ELCT_IX_LOW 5 +#define ELCT_IX_HIGH 6 +#define ELCT_IY_LOW 7 +#define ELCT_IY_HIGH 8 +#define ELCT_NUMBER 9 + +#endif /* ELCT_H */ diff --git a/src/include/gendev.h b/src/include/gendev.h new file mode 100644 index 000000000..12ad9e722 --- /dev/null +++ b/src/include/gendev.h @@ -0,0 +1,122 @@ +/********** +Copyright 1992 Regents of the University of California. All rights reserved. +Authors: 1992 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef GENDEV_H +#define GENDEV_H + +#include "numenum.h" + +typedef struct sStatInfo +{ + double setupTime[NUM_STATTYPES]; + double loadTime[NUM_STATTYPES]; + double orderTime[NUM_STATTYPES]; + double factorTime[NUM_STATTYPES]; + double solveTime[NUM_STATTYPES]; + double updateTime[NUM_STATTYPES]; + double checkTime[NUM_STATTYPES]; + double miscTime[NUM_STATTYPES]; + double totalTime[NUM_STATTYPES]; + double lteTime; + int numIters[NUM_STATTYPES]; +} StatInfo; +typedef struct sStatInfo ONEstats; +typedef struct sStatInfo TWOstats; +typedef struct sStatInfo STATstats; + +/* Transient analysis information transferred via this structure. */ +typedef struct sTranInfo { + int method; /* integration method */ + int order; /* integration order */ + int maxOrder; /* maximum order to be used */ + double lteCoeff; /* coefficient for calculating LTE */ + double intCoeff[7]; /* array of integration coefficients */ + double predCoeff[7]; /* array of predicted coefficients */ + double *delta; /* array of the time deltas */ +} TranInfo; +typedef struct sTranInfo ONEtranInfo; +typedef struct sTranInfo TWOtranInfo; + +/* Mesh coordinates transferred via this structure */ +typedef struct sCoordInfo { + struct sCoordInfo *next; /* pointer to next mesh info */ + int number; /* number/position in list of coordinates */ + double location; /* location of node */ +} CoordInfo; +typedef struct sCoordInfo ONEcoord; +typedef struct sCoordInfo TWOcoord; +typedef struct sCoordInfo MESHcoord; + +/* Generic vertex structure */ +typedef struct sVertexInfo { + struct sVertexInfo *next; /* pointer to next vertex */ + int ix; /* the x coordinate */ + int iy; /* the y coordinate */ +} VertexInfo; +typedef struct sVertexInfo ONEvertex; +typedef struct sVertexInfo TWOvertex; + +/* Generic box structure that other box-shaped things are derived from */ +typedef struct sBoxInfo { + struct sBoxInfo *next; /* pointer to next box */ + int ixLo; /* the low x coordinate */ + int iyLo; /* the low y coordinate */ + int ixHi; /* the high x coordinate */ + int iyHi; /* the high y coordinate */ +} BoxInfo; +typedef struct sBoxInfo ONEbox; +typedef struct sBoxInfo TWObox; + +/* Structure for domains */ +typedef struct sDomainInfo { + struct sDomainInfo *next; /* pointer to next domain */ + int ixLo; /* the low x coordinate */ + int iyLo; /* the low y coordinate */ + int ixHi; /* the high x coordinate */ + int iyHi; /* the high y coordinate */ + int id; /* ID number of domain */ + int material; /* ID of material used by domain */ +} DomainInfo; +typedef struct sDomainInfo ONEdomain; +typedef struct sDomainInfo TWOdomain; +typedef struct sDomainInfo DOMNdomain; + +/* Structure used for electrodes */ +typedef struct sElectrodeInfo { + struct sElectrodeInfo *next; /* pointer to next electrode */ + int ixLo; /* the low x coordinate */ + int iyLo; /* the low y coordinate */ + int ixHi; /* the high x coordinate */ + int iyHi; /* the high y coordinate */ + int id; /* ID number */ + double workf; /* electrode work function */ +} ElectrodeInfo; +typedef struct sElectrodeInfo ONEelectrode; +typedef struct sElectrodeInfo TWOelectrode; +typedef struct sElectrodeInfo ELCTelectrode; + +/* Structure used for boundaries and interfaces */ +typedef struct sBoundaryInfo { + struct sBoundaryInfo *next; /* pointer to next boundary */ + int ixLo; /* the low x coordinate */ + int iyLo; /* the low y coordinate */ + int ixHi; /* the high x coordinate */ + int iyHi; /* the high y coordinate */ + int domain; /* ID of primary domain */ + int neighbor; /* ID of neighbor domain */ + double qf; /* fixed charge density */ + double sn; /* elec surface recomb velocity */ + double sp; /* hole surface recomb velocity */ + double layer; /* surface layer width */ +} BoundaryInfo; +typedef struct sBoundaryInfo ONEboundary; +typedef struct sBoundaryInfo TWOboundary; +typedef struct sBoundaryInfo BDRYboundary; + +#endif /* GENDEV_H */ diff --git a/src/include/lsort.h b/src/include/lsort.h new file mode 100644 index 000000000..bc7bbbfbb --- /dev/null +++ b/src/include/lsort.h @@ -0,0 +1,124 @@ +/* + * 'Generic' linked-list sorting 'package' + * + * Use: + * #define TYPE the linked-list type (usually a struct) + * #define NEXT 'next' field name in the linked-list structure + * #define SORT sorting routine (see below) + * + * Optional: + * #define DECL_SORT 'static' or undefined + * #define DECL_SORT1 'static' or undefined + * #define SORT1 sorting routine (see below) + * #define FIELD select a subfield of the structure for the + * compare function (default is to pass + * a pointer to the structure) + * #include "lsort.h" + * + * This defines up to two routines: + * SORT1(TYPE *list, int (*compare)(TYPE *x, TYPE *y)) + * sort the linked list 'list' according to the compare function + * 'compare' + * + * SORT(TYPE *list, int (*compare)(TYPE *x, TYPE *y), int length) + * sort the linked list 'list' according to the compare function + * 'compare'. length is the length of the linked list. + * + * Both routines gracefully handle length == 0 (in which case, list == 0 + * is also allowed). + * + * By default, both routines are declared 'static'. This can be changed + * using '#define DECL_SORT' or '#define DECL_SORT1'. + * + * If field is used, then a pointer to the particular field is passed + * to the comparison function (rather than a TYPE *). + */ + +/* This file was originally part of Cider 1b1 and has been moved to + * the ngspice misc directory since macros will probably be converted + * into real functions. + * (Paolo Nenzi 2001) + */ + + + +#ifndef DECL_SORT1 +#define DECL_SORT1 static +#endif + +#ifndef DECL_SORT +#define DECL_SORT static +#endif + +DECL_SORT TYPE *SORT(); + + +#ifdef SORT1 + +DECL_SORT1 TYPE *SORT1(list_in, compare) +TYPE *list_in; +int (*compare)(); +{ + register long cnt; + register TYPE *p; + + /* Find the length of the list */ + for(p = list_in, cnt = 0; p != 0; p = p->NEXT, cnt++) + ; + return SORT(list_in, compare, cnt); +} + +#endif + + +DECL_SORT TYPE *SORT(list_in, compare, cnt) +TYPE *list_in; +int (*compare)(); +long cnt; +{ + register TYPE *p, **plast, *list1, *list2; + register long i; + + if (cnt > 1) { + /* break the list in half */ + for(p = list_in, i = cnt/2-1; i > 0; p = p->NEXT, i--) + ; + list1 = list_in; + list2 = p->NEXT; + p->NEXT = 0; + + /* Recursively sort the sub-lists (unless only 1 element) */ + if ((i = cnt/2) > 1) { + list1 = SORT(list1, compare, i); + } + if ((i = cnt - i) > 1) { + list2 = SORT(list2, compare, i); + } + + /* Merge the two sorted sub-lists */ + plast = &list_in; + for(;;) { +#ifdef FIELD + if ((*compare)(&list1->FIELD, &list2->FIELD) <= 0) { +#else + if ((*compare)(list1, list2) <= 0) { +#endif + *plast = list1; + plast = &(list1->NEXT); + if ((list1 = list1->NEXT) == 0) { + *plast = list2; + break; + } + } else { + *plast = list2; + plast = &(list2->NEXT); + if ((list2 = list2->NEXT) == 0) { + *plast = list1; + break; + } + } + } + } + + return list_in; +} diff --git a/src/include/material.h b/src/include/material.h new file mode 100644 index 000000000..20c63bcf7 --- /dev/null +++ b/src/include/material.h @@ -0,0 +1,82 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors : 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef MATERIAL_H +#define MATERIAL_H + +#ifndef NUM_CARRIERS +#include "numenum.h" +#endif + +/* Information needed by the various physical models */ + +typedef struct sMaterialInfo +{ + int id; /* Unique identification number */ + int material; /* Oxide, Nitride, Silicon, Aluminum */ + int type; /* Insulator, Semiconductor, Metal */ + double tnom; /* Parameter Measurement Temp. */ + +/* Intrinsic-Concentration-Related Parameters */ + double eps; /* Dielectric Permittivity */ + double affin; /* Electron Affinity */ + double refPsi; /* Reference Potential of Intrinsic */ + double ni0; /* Reference Intrinsic Concentration */ + double nc0; /* Conduction Band Num States */ + double nv0; /* Valence Band Num States */ + double mass[NUM_CARRIERS]; /* Conduction Masses */ + double eg0; /* Band Gap */ + double dEgDt; /* Temp-Dep Band Gap Narrowing */ + double trefBGN; /* Ref. Temp for BGN */ + double dEgDn[NUM_CARRIERS]; /* Conc-Dep BGN Constants */ + double nrefBGN[NUM_CARRIERS]; /* Ref. Conc's for BGN */ + +/* Generation-Recombination Parameters */ + double tau0[NUM_CARRIERS]; /* Low-Conc. SRH Lifetimes */ + double nrefSRH[NUM_CARRIERS]; /* Ref. Conc.'s for Lifetime */ + double cAug[NUM_CARRIERS]; /* Auger Constants */ + double aii[NUM_CARRIERS]; /* Avalanche Factors */ + double bii[NUM_CARRIERS]; /* Aval. Critical Fields */ + +/* Incomplete Ionization Parameters */ + double eDon; /* Donor Energy Level */ + double eAcc; /* Acceptor Energy Level */ + double gDon; /* Donor Degeneracy Factor */ + double gAcc; /* Acceptor Degeneracy Factor */ + +/* Carrier-Velocity Related Parameters */ + double aRich[NUM_CARRIERS]; /* Effective Richardson Constants */ + double vRich[NUM_CARRIERS]; /* Effective Recombination Velocities */ + +/* Mobility Concentration and Temperature Dependence */ + int concModel; + int tempModel; + double muMax[NUM_CARRIERS][NUM_CARRTYPES]; + double muMin[NUM_CARRIERS][NUM_CARRTYPES]; + double ntRef[NUM_CARRIERS][NUM_CARRTYPES]; + double ntExp[NUM_CARRIERS][NUM_CARRTYPES]; + +/* Mobility Hot Carrier Dependence */ + int fieldModel; + double vSat[NUM_CARRIERS]; + double vWarm[NUM_CARRIERS]; + +/* Inversion-Layer Mobility */ + int surfModel; + double mus[NUM_CARRIERS]; + double thetaA[NUM_CARRIERS]; + double thetaB[NUM_CARRIERS]; + + struct sMaterialInfo *next; +} MaterialInfo; +typedef struct sMaterialInfo ONEmaterial; +typedef struct sMaterialInfo TWOmaterial; +typedef struct sMaterialInfo MATLmaterial; + +#endif /* MATERIAL_H */ diff --git a/src/include/matldefs.h b/src/include/matldefs.h new file mode 100644 index 000000000..0e56b617c --- /dev/null +++ b/src/include/matldefs.h @@ -0,0 +1,93 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors : 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef MATL_H +#define MATL_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sMATLcard { + struct sMATLcard *MATLnextCard; + int MATLnumber; + int MATLmaterial; + double MATLpermittivity; + double MATLaffinity; + double MATLnc0; + double MATLnv0; + double MATLeg0; + double MATLdEgdT; + double MATLtrefEg; + double MATLdEgdN; + double MATLnrefEg; + double MATLdEgdP; + double MATLprefEg; + double MATLtaun0; + double MATLtaup0; + double MATLnrefSRHn; + double MATLnrefSRHp; + double MATLcnAug; + double MATLcpAug; + double MATLaRichN; + double MATLaRichP; + unsigned int MATLnumberGiven : 1; + unsigned int MATLmaterialGiven : 1; + unsigned int MATLpermittivityGiven : 1; + unsigned int MATLaffinityGiven : 1; + unsigned int MATLnc0Given : 1; + unsigned int MATLnv0Given : 1; + unsigned int MATLeg0Given : 1; + unsigned int MATLdEgdTGiven : 1; + unsigned int MATLtrefEgGiven : 1; + unsigned int MATLdEgdNGiven : 1; + unsigned int MATLnrefEgGiven : 1; + unsigned int MATLdEgdPGiven : 1; + unsigned int MATLprefEgGiven : 1; + unsigned int MATLtaun0Given : 1; + unsigned int MATLtaup0Given : 1; + unsigned int MATLnrefSRHnGiven : 1; + unsigned int MATLnrefSRHpGiven : 1; + unsigned int MATLcnAugGiven : 1; + unsigned int MATLcpAugGiven : 1; + unsigned int MATLaRichNGiven : 1; + unsigned int MATLaRichPGiven : 1; + unsigned int MATLtnomGiven : 1; +} MATLcard; + +/* MATL parameters */ +#define MATL_NC0 1 +#define MATL_NV0 2 +#define MATL_EG0 3 +#define MATL_DEGDT 4 +#define MATL_TREF_EG 5 +#define MATL_DEGDN 6 +#define MATL_NREF_EG 7 +#define MATL_DEGDP 8 +#define MATL_PREF_EG 9 +#define MATL_AFFIN 10 +#define MATL_PERMIT 11 +#define MATL_TAUN0 12 +#define MATL_TAUP0 13 +#define MATL_NSRHN 14 +#define MATL_NSRHP 15 +#define MATL_CNAUG 16 +#define MATL_CPAUG 17 +#define MATL_ARICHN 18 +#define MATL_ARICHP 19 +#define MATL_INSULATOR 20 +#define MATL_OXIDE 21 +#define MATL_NITRIDE 22 +#define MATL_SEMICON 23 +#define MATL_SILICON 24 +#define MATL_POLYSIL 25 +#define MATL_GAAS 26 +#define MATL_NUMBER 27 +#define MATL_DEGDC 28 +#define MATL_CREF_EG 29 + +#endif /* MATL_H */ diff --git a/src/include/meshdefs.h b/src/include/meshdefs.h new file mode 100644 index 000000000..30e042d49 --- /dev/null +++ b/src/include/meshdefs.h @@ -0,0 +1,44 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Author: 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef MESH_H +#define MESH_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sMESHcard { + struct sMESHcard *MESHnextCard; + double MESHlocation; + double MESHwidth; + double MESHlocStart; + double MESHlocEnd; + double MESHhStart; + double MESHhEnd; + double MESHhMax; + double MESHratio; + int MESHnumber; + unsigned int MESHlocationGiven : 1; + unsigned int MESHwidthGiven : 1; + unsigned int MESHhStartGiven : 1; + unsigned int MESHhEndGiven : 1; + unsigned int MESHhMaxGiven : 1; + unsigned int MESHratioGiven : 1; + unsigned int MESHnumberGiven : 1; +} MESHcard; + +/* MESH parameters */ +#define MESH_NUMBER 1 +#define MESH_LOCATION 2 +#define MESH_WIDTH 3 +#define MESH_H_START 4 +#define MESH_H_END 5 +#define MESH_H_MAX 6 +#define MESH_RATIO 7 + +#endif /* MESH_H */ diff --git a/src/include/meshext.h b/src/include/meshext.h new file mode 100644 index 000000000..1918c2a2d --- /dev/null +++ b/src/include/meshext.h @@ -0,0 +1,27 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Author: 1991 David A. Gates, U. C. Berkeley CAD Group +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +/********** + Mesh Definitions and Declarations. +**********/ +#ifndef MESHEXT_H +#define MESHEXT_H + +#include "meshdefs.h" +#include "gendev.h" + + +extern double *MESHmkArray( MESHcoord *, int ); +extern void MESHiBounds( MESHcoord *, int *, int * ); +extern void MESHlBounds( MESHcoord *, double *, double * ); +extern int MESHlocate( MESHcoord *, double ); +extern int MESHcheck( char, MESHcard * ); +extern int MESHsetup( char, MESHcard *, MESHcoord **, int * ); + +#endif /* MESHEXT_H */ diff --git a/src/include/methdefs.h b/src/include/methdefs.h new file mode 100644 index 000000000..5fe82343e --- /dev/null +++ b/src/include/methdefs.h @@ -0,0 +1,45 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors : 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef METH_H +#define METH_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sMETHcard { + struct sMETHcard *METHnextCard; + double METHdabstol; + double METHdreltol; + double METHomega; + int METHoneCarrier; + int METHacAnalysisMethod; + int METHmobDeriv; + int METHitLim; + int METHvoltPred; + unsigned int METHdabstolGiven : 1; + unsigned int METHdreltolGiven : 1; + unsigned int METHomegaGiven : 1; + unsigned int METHoneCarrierGiven : 1; + unsigned int METHacAnalysisMethodGiven : 1; + unsigned int METHmobDerivGiven : 1; + unsigned int METHitLimGiven : 1; + unsigned int METHvoltPredGiven : 1; +} METHcard; + +/* METH parameters */ +#define METH_DABSTOL 1 +#define METH_DRELTOL 2 +#define METH_OMEGA 3 +#define METH_ONEC 4 +#define METH_ACANAL 5 +#define METH_NOMOBDERIV 6 +#define METH_ITLIM 7 +#define METH_VOLTPRED 8 + +#endif /* METH_H */ diff --git a/src/include/mobdefs.h b/src/include/mobdefs.h new file mode 100644 index 000000000..03c0e06c3 --- /dev/null +++ b/src/include/mobdefs.h @@ -0,0 +1,68 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors : 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef MOB_H +#define MOB_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sMOBcard { + struct sMOBcard *MOBnextCard; + int MOBmaterial; + int MOBcarrier; + int MOBcarrType; + double MOBmuMax; + double MOBmuMin; + double MOBntRef; + double MOBntExp; + double MOBvSat; + double MOBvWarm; + double MOBmus; + double MOBecA; + double MOBecB; + int MOBconcModel; + int MOBfieldModel; + int MOBinit; + unsigned MOBmaterialGiven : 1; + unsigned MOBcarrierGiven : 1; + unsigned MOBcarrTypeGiven : 1; + unsigned MOBmuMaxGiven : 1; + unsigned MOBmuMinGiven : 1; + unsigned MOBntRefGiven : 1; + unsigned MOBntExpGiven : 1; + unsigned MOBvSatGiven : 1; + unsigned MOBvWarmGiven : 1; + unsigned MOBmusGiven : 1; + unsigned MOBecAGiven : 1; + unsigned MOBecBGiven : 1; + unsigned MOBconcModelGiven : 1; + unsigned MOBfieldModelGiven : 1; + unsigned MOBinitGiven : 1; +} MOBcard; + +/* MOB parameters */ +#define MOB_ELEC 1 +#define MOB_HOLE 2 +#define MOB_MAJOR 3 +#define MOB_MINOR 4 +#define MOB_MUMAX 5 +#define MOB_MUMIN 6 +#define MOB_NTREF 7 +#define MOB_NTEXP 8 +#define MOB_VSAT 9 +#define MOB_VWARM 10 +#define MOB_MUS 11 +#define MOB_EC_A 12 +#define MOB_EC_B 13 +#define MOB_CONC_MOD 14 +#define MOB_FIELD_MOD 15 +#define MOB_MATERIAL 16 +#define MOB_INIT 17 + +#endif /* MOB_H */ diff --git a/src/include/modldefs.h b/src/include/modldefs.h new file mode 100644 index 000000000..36892a38b --- /dev/null +++ b/src/include/modldefs.h @@ -0,0 +1,54 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors : 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef MODL_H +#define MODL_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sMODLcard { + struct sMODLcard *MODLnextCard; + int MODLbandGapNarrowing; + int MODLtempDepMobility; + int MODLconcDepMobility; + int MODLfieldDepMobility; + int MODLtransDepMobility; + int MODLsurfaceMobility; + int MODLmatchingMobility; + int MODLsrh; + int MODLconcDepLifetime; + int MODLauger; + int MODLavalancheGen; + unsigned int MODLbandGapNarrowingGiven : 1; + unsigned int MODLtempDepMobilityGiven : 1; + unsigned int MODLconcDepMobilityGiven : 1; + unsigned int MODLfieldDepMobilityGiven : 1; + unsigned int MODLtransDepMobilityGiven : 1; + unsigned int MODLsurfaceMobilityGiven : 1; + unsigned int MODLmatchingMobilityGiven : 1; + unsigned int MODLsrhGiven : 1; + unsigned int MODLconcDepLifetimeGiven : 1; + unsigned int MODLaugerGiven : 1; + unsigned int MODLavalancheGenGiven : 1; +} MODLcard; + +/* MODL parameters */ +#define MODL_BGNW 1 +#define MODL_TEMPMOB 2 +#define MODL_CONCMOB 3 +#define MODL_FIELDMOB 4 +#define MODL_TRANSMOB 5 +#define MODL_SURFMOB 6 +#define MODL_MATCHMOB 7 +#define MODL_SRH 8 +#define MODL_CONCTAU 9 +#define MODL_AUGER 10 +#define MODL_AVAL 11 + +#endif /* MODL_H */ diff --git a/src/include/numcards.h b/src/include/numcards.h new file mode 100644 index 000000000..3577b0080 --- /dev/null +++ b/src/include/numcards.h @@ -0,0 +1,50 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors: 1991 David Gates +**********/ +/* + * Structures for parsing numerical-device input cards + */ + + /* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef NUMCARDS_H +#define NUMCARDS_H + +#include "ifsim.h" + +/* + * Generic header for a linked list of cards + */ + +typedef struct sGENcard { + struct sGENcard *GENnextCard; /* pointer to next card of this type */ +} GENcard; + +/* + * Structure: IFcardInfo + * + * This structure is a generic description of an input card to + * the program. It can be used in situations where input parameters + * need to be grouped together under a single heading. + */ + + +typedef struct sIFcardInfo { + char *name; /* name of the card */ + char *description; /* description of its purpose */ + + int numParms; /* number of parameter descriptors */ + IFparm *cardParms; /* array of parameter descriptors */ + + int (*newCard)(void**,void*); + /* routine to add a new card to a numerical device model */ + int (*setCardParm)(int,IFvalue*,void*); + /* routine to input a parameter to a card instance */ + int (*askCardQuest)(int,IFvalue*,void*); + /* routine to find out about a card's details */ +} IFcardInfo; + +#endif /* NUMCARDS_H */ diff --git a/src/include/numconst.h b/src/include/numconst.h new file mode 100644 index 000000000..924b4d1d1 --- /dev/null +++ b/src/include/numconst.h @@ -0,0 +1,231 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors: 1987 Karti Mayaram, 1991 David Gates +**********/ +/* + * Constants used by the numerical simulation routines + */ + + /* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef NUMCONST_H +#define NUMCONST_H + +/* Mathematical Constants */ +#ifdef PI +#undef PI +#endif +#define PI 3.14159265358973923846264338327950288419716939937511 +#define TWO_PI (2.0 * PI) +#define ROOT_TWO 1.41421356237309504880168872420969807856967187537694 + +/* Basic Physical Constants */ +#ifdef CHARGE +#undef CHARGE +#endif +#define CHARGE 1.602191770e-19 /* C */ +#define BOLTZMANN_CONSTANT 1.38062259e-23 /* J/oK */ +#define VELOCITY_OF_LIGHT 2.997924562e8 /* CM/S */ +#define ELECTRON_MASS 9.10955854e-31 /* kG */ +#define ZERO_DEGREES_CELSIUS 273.15 /* oK */ +#define EPS0 8.854e-14 /* F/CM */ + + +/* Physical Constants of Silicon, GaAs, SiO2, Si3N4 */ +#define EPS_REL_SI 11.7 /* ~EPS0 */ +#define EPS_SI EPS0 * EPS_REL_SI /* F/CM */ +#define EPS_REL_GA 10.9 /* ~EPS0 */ +#define EPS_GA EPS0 * EPS_REL_GA /* F/CM */ +#define EPS_REL_OX 3.9 /* ~EPS0 */ +#define EPS_OX EPS0 * EPS_REL_OX /* F/CM */ +#define EPS_REL_NI 7.5 /* ~EPS0 */ +#define EPS_NI EPS0 * EPS_REL_NI /* F/CM */ + +/* Work Function, Affinity, Band & Bandgap Parameters */ +#define AFFIN_SI 4.05 /* eV */ +#define AFFIN_GA 4.07 /* eV */ +#define AFFIN_OX 0.95 /* eV */ +#define AFFIN_NI 3.10 /* eV */ +#define PHI_METAL 4.10 /* eV */ +#define PHI_ALUM 4.10 /* eV */ +#define PHI_GOLD 4.75 /* eV */ + +#define EGAP300_SI 1.1245 /* eV */ +#define EGAP300_GA 1.43 /* eV */ +#define EGAP300_OX 9.00 /* eV */ +#define EGAP300_NI 4.70 /* eV */ +#define DGAPDT_SI 4.73e-4 /* eV/oK */ +#define DGAPDT_GA 5.405e-4 /* eV/oK */ +#define TREF_EG_SI 636.0 /* oK */ +#define TREF_EG_GA 204.0 /* oK */ + +#define NCV_NOM 2.509e19 /* CM^-3 */ +#define M_N_SI 1.447 /* ~ELECTRON_MASS */ +#define M_P_SI 1.08 /* ~ELECTRON_MASS */ +#define M_N_GA 7.05e-2 /* ~ELECTRON_MASS */ +#define M_P_GA 0.427 /* ~ELECTRON_MASS */ + +/* Physical Model Parameters for Silicon and GaAs*/ +/* N = electrons, P = holes */ + +/* Effective Richardson Constants (ref. PISCES) */ +#define A_RICH_N_SI 110.0 /* A/CM^2/oK^2 */ +#define A_RICH_P_SI 30.0 /* A/CM^2/oK^2 */ +#define A_RICH_N_GA 6.2857 /* A/CM^2/oK^2 */ +#define A_RICH_P_GA 105.0 /* A/CM^2/oK^2 */ + +/* Auger Recombination (ref. PISCES, SOLL90) */ +#define C_AUG_N_SI 1.8e-31 /* CM^6/S */ +#define C_AUG_P_SI 8.3e-32 /* CM^6/S */ +#define C_AUG_N_GA 2.8e-31 /* CM^6/S */ +#define C_AUG_P_GA 9.9e-32 /* CM^6/S */ + +/* SRH Recombination (ref. SOLL90) */ +#define TAU0_N_SI 3.0e-5 /* S */ +#define NSRH_N_SI 1.0e17 /* CM^-3 */ +#define S_N_SI 1.0e4 /* CM/S */ +#define TAU0_P_SI 1.0e-5 /* S */ +#define NSRH_P_SI 1.0e17 /* CM^-3 */ +#define S_P_SI 1.0e4 /* CM/S */ +#define TAU0_N_GA 1.0e-7 /* S */ +#define NSRH_N_GA 5.0e16 /* CM^-3 */ +#define S_N_GA 1.0e4 /* CM/S */ +#define TAU0_P_GA 1.0e-7 /* S */ +#define NSRH_P_GA 5.0e16 /* CM^-3 */ +#define S_P_GA 1.0e4 /* CM/S */ + +/* Bandgap Narrowing (ref. SOLL90) */ +#define DGAPDN_N 1.2e-2 /* V */ +#define NBGN_N 1.0e18 /* CM^-3 */ +#define DGAPDN_P 9.7e-3 /* V */ +#define NBGN_P 1.0e17 /* CM^-3 */ + +/* Mobility Models : */ +/* Scharfetter-Gummel (SG) mobility (ref. SCHA69) */ +#define SG_MUMAX_N 1400.0 +#define SG_MUMIN_N 75.0 +#define SG_NTREF_N 3.0e16 +#define SG_NTEXP_N 0.5 +#define SG_VSAT_N 1.036e7 +#define SG_VWARM_N 4.9e6 +#define SG_FIT_N 8.8 +#define SG_MUMAX_P 480.0 +#define SG_MUMIN_P 53.0 +#define SG_NTREF_P 4.0e16 +#define SG_NTEXP_P 0.5 +#define SG_VSAT_P 1.2e7 +#define SG_VWARM_P 2.928e6 +#define SG_FIT_P 1.6 + +/* Caughey-Thomas (CT) mobility (ref. CAUG67) */ +#define CT_MUMAX_N 1360.0 +#define CT_MUMIN_N 92.0 +#define CT_NTREF_N 1.3e17 +#define CT_NTEXP_N 0.91 +#define CT_VSAT_N 1.1e7 +#define CT_MUMAX_P 520.0 +#define CT_MUMIN_P 65.0 +#define CT_NTREF_P 2.4e17 +#define CT_NTEXP_P 0.61 +#define CT_VSAT_P 9.5e6 + +/* Arora (AR) mobility (ref. AROR82) */ +#define AR_MUMAX_N 1340.0 +#define AR_MUMIN_N 88.0 +#define AR_NTREF_N 1.26e17 +#define AR_NTEXP_N 0.88 +#define AR_VSAT_N 1.38e7 +#define AR_MUMAX_P 461.3 +#define AR_MUMIN_P 54.3 +#define AR_NTREF_P 2.35e17 +#define AR_NTEXP_P 0.88 +#define AR_VSAT_P 9.0e6 + +/* Minority Carrier mobility (ref. SOLL90) */ +/* + * These parameters are flawed in that they don't match the majority + * carrier mobility when the concentration drops to zero. + * Carrier heating effects must be handled by a different model. + */ +#define UF_MUMAX_N 1412.0 +#define UF_MUMIN_N 232.0 +#define UF_NTREF_N 8.0e16 +#define UF_NTEXP_N 0.9 +#define UF_MUMAX_P 500.0 +#define UF_MUMIN_P 130.0 +#define UF_NTREF_P 8.0e17 +#define UF_NTEXP_P 1.25 + +/* Temperature-Dependence of Arora mobility */ +/* Applicable to all above models, but not necessarily accurate. */ +#define TD_TREFVS_N 175.0 +#define TD_TREFVS_P 312.0 +#define TD_EXPMUMAX_N -2.33 +#define TD_EXPMUMAX_P -2.23 +#define TD_EXPMUMIN_N -0.57 +#define TD_EXPMUMIN_P -0.57 +#define TD_EXPNTREF_N 2.4 +#define TD_EXPNTREF_P 2.4 +#define TD_EXPNTEXP_N -0.146 +#define TD_EXPNTEXP_P -0.146 + +/* + * Inversion-layers are handled differently. They don't fit into the nice + * pattern established above for bulk mobility. + */ +/* Surface mobility (ref. GATE90) */ +#define MUS_N 991.0 /* CM^2/VS */ +#define THETAA_N 2.67e-6 /* CM/V */ +#define THETAB_N 4.18e-14 /* CM^2/V^2 */ +#define SALPHA_N 1.0 / 2.0 /* --- */ +#define SBETA_N 1.0 / 2.0 /* --- */ +#define MUS_P 240.0 /* CM^2/VS */ +#define THETAA_P 3.07e-6 /* CM/V */ +#define THETAB_P 0.0 /* CM^2/V^2 */ +#define SALPHA_P 2.0 / 3.0 /* --- */ +#define SBETA_P 1.0 / 3.0 /* --- */ + +/* Gallium-Arsenide (GA) mobility (ref. PISCES) */ +#define GA_MUMAX_N 5000.0 +#define GA_MUMIN_N 50.0 +#define GA_NTREF_N 1.0e17 +#define GA_NTEXP_N 1.0 +#define GA_VSAT_N 7.7e6 +#define GA_VWARM_N 2.31e7 +#define GA_MUMAX_P 400.0 +#define GA_MUMIN_P 40.0 +#define GA_NTREF_P 1.0e17 +#define GA_NTEXP_P 1.0 +#define GA_VSAT_P 7.7e6 +#define GA_VWARM_P 2.31e7 + +/* END OF MOBILITY MODELS */ + +/* Freeze Out / Incomplete Ionization Parameters */ +#define E_ARS_SI 0.049 /* eV (Arsenic) */ +#define E_DON_SI 0.044 /* eV (Phosphorus) */ +#define E_ACC_SI 0.045 /* eV (Boron) */ +#define G_DON_SI 2.0 /* --- */ +#define G_ACC_SI 4.0 /* --- */ +#define E_DON_GA 0.005 /* eV */ +#define E_ACC_GA 0.005 /* eV */ +#define G_DON_GA 2.0 /* --- */ +#define G_ACC_GA 2.0 /* --- */ + +/* Impact Ionization / Avalanche Generation Parameters */ +/* These are for Silicon. Need better GaAs parameters. */ +#define AII_N 7.03e5 +#define BII_N 1.231e6 +#define AII_P 1.582e6 +#define BII_P 2.036e6 + +/* Default Surface-State / Fixed-Charge Density */ +#define NSS 0.0 /* CM^-2 */ + +/* Default abstol for Poisson and Current-Continuity Equations */ +#define DABSTOL1D 1.0e-12 /* --- */ +#define DABSTOL2D 1.0e-8 /* --- */ + +#endif /* NUMCONST_H */ diff --git a/src/include/numenum.h b/src/include/numenum.h new file mode 100644 index 000000000..3160e9211 --- /dev/null +++ b/src/include/numenum.h @@ -0,0 +1,93 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors: 1991 David Gates +**********/ +/* + * Enumerations used by the numerical simulation routines + */ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + + +#ifndef NUMENUM_H +#define NUMENUM_H + +/* Doping Profiles */ +#define UNIF 101 +#define LIN 102 +#define GAUSS 103 +#define EXP 104 +#define ERRFC 105 +#define LOOKUP 106 +#define X 107 +#define Y 108 + +/* AC-Analysis Method */ +#define SOR 201 +#define DIRECT 202 +#define SOR_ONLY 203 + +/* One-Carrier-Simulation Types */ +#define N_TYPE 301 +#define P_TYPE 302 + +/* Element, Node, and Edge Types */ +#define SEMICON 401 +#define INSULATOR 402 +#define METAL 403 +#define INTERFACE 404 +#define CONTACT 405 +#define SCHOTTKY 406 +#define HETERO 407 + +/* Material Types */ +#define OXIDE 1 +#define NITRIDE 2 +#define SILICON 3 +#define POLYSILICON 4 +#define GAAS 5 + +/* Time-Integration Method */ +#ifndef TRAPEZOIDAL +#define TRAPEZOIDAL 1 +#define BDF 2 +#define GEAR 2 +#endif + +/* Mobility Models */ +#define SG 1 /* Scharfetter-Gummel Model */ +#define CT 2 /* Caughey-Thomas Model */ +#define AR 3 /* Arora Model */ +#define UF 4 /* Univ. of Florida Model */ +#define GA 5 /* Gallium-Arsenide Model */ +#define TD 6 /* Temperature Dependent */ +#define CCS 7 /* Carrier-Carrier Scattering */ + +/* Carrier Classification */ +#define NUM_CARRIERS 2 +#define ELEC 0 +#define HOLE 1 +#define NUM_CARRTYPES 2 +#define MAJOR 0 +#define MINOR 1 + +/* Solvers */ +#define SLV_NONE 0 +#define SLV_EQUIL 1 +#define SLV_BIAS 2 +#define SLV_SMSIG 3 + +/* Output Data Formats */ +#define RAWFILE 0 +#define HDF 1 + +/* Time and Memory Statistics Types */ +#define NUM_STATTYPES 4 +#define STAT_SETUP 0 +#define STAT_DC 1 +#define STAT_TRAN 2 +#define STAT_AC 3 + +#endif /* NUMENUM_H */ diff --git a/src/include/numgen.h b/src/include/numgen.h new file mode 100644 index 000000000..a6c496765 --- /dev/null +++ b/src/include/numgen.h @@ -0,0 +1,42 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors: 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +/* + * Generic Numerical Model Structure + */ +#ifndef NUMGEN_H +#define NUMGEN_H + +#include "ifsim.h" +#include "cktdefs.h" +#include "gendefs.h" +#include "carddefs.h" + +typedef struct sGENnumModel { /* model structure for a numerical device */ + int GENmodType; /* type index of this device type */ + struct sGENnumModel *GENnextModel; /* pointer to next model in list */ + GENinstance *GENinstances; /* pointer to list of instances */ + IFuid GENmodName; /* pointer to string naming this model */ +/* Everything below here is numerical-device-specific */ + MESHcard *GENxMeshes; /* list of xmesh cards */ + MESHcard *GENyMeshes; /* list of ymesh cards */ + DOMNcard *GENdomains; /* list of domain cards */ + BDRYcard *GENboundaries; /* list of boundary cards */ + DOPcard *GENdopings; /* list of doping cards */ + ELCTcard *GENelectrodes; /* list of electrode cards */ + CONTcard *GENcontacts; /* list of contact cards */ + MODLcard *GENmodels; /* list of model cards */ + MATLcard *GENmaterials; /* list of material cards */ + MOBcard *GENmobility; /* list of mobility cards */ + METHcard *GENmethods; /* list of method cards */ + OPTNcard *GENoptions; /* list of option cards */ + OUTPcard *GENoutputs; /* list of output cards */ +} GENnumModel; + +#endif /* NUMGEN_H */ diff --git a/src/include/numglobs.h b/src/include/numglobs.h new file mode 100644 index 000000000..a827974c6 --- /dev/null +++ b/src/include/numglobs.h @@ -0,0 +1,59 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors: 1987 Karti Mayaram, 1991 David Gates +**********/ + +/* Define various flags, constants, and indices */ +/* These variables are defined in support/globals.c */ + +#ifndef NUMGLOBS_H +#define NUMGLOBS_H + +extern int BandGapNarrowing; +extern int TempDepMobility; +extern int ConcDepMobility; +extern int FieldDepMobility; +extern int TransDepMobility; +extern int SurfaceMobility; +extern int MatchingMobility; +extern int MobDeriv; +extern int CCScattering; +extern int Srh; +extern int Auger; +extern int ConcDepLifetime; +extern int AvalancheGen; +extern int FreezeOut; +extern int OneCarrier; +extern int MaxIterations; +extern int AcAnalysisMethod; + +extern double Temp; +extern double RelTemp; +extern double Vt; +extern double RefPsi; +extern double EpsNorm; +extern double VNorm; +extern double NNorm; +extern double LNorm; +extern double TNorm; +extern double JNorm; +extern double GNorm; +extern double ENorm; + +typedef struct sGLOBvalues +{ + double Temp; + double RelTemp; + double Vt; + double RefPsi; + double EpsNorm; + double VNorm; + double NNorm; + double LNorm; + double TNorm; + double JNorm; + double GNorm; + double ENorm; +} GLOBvalues; + +#endif /* NUMGLOBS_H */ diff --git a/src/include/onedev.h b/src/include/onedev.h new file mode 100644 index 000000000..49958542d --- /dev/null +++ b/src/include/onedev.h @@ -0,0 +1,72 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors: 1987 Karti Mayaram, 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +/* + * One Dimensional Numerical Device Data Structures + */ + +#ifndef ONEDEV_H +#define ONEDEV_H + +#include "gendev.h" + +typedef struct sONEdevice +{ + double *dcSolution; /* solution vector for device */ + double *dcDeltaSolution; /* delta solution vector */ + double *copiedSolution; /* copy of the solution vector */ + double *rhs; /* rhs vector */ + double *rhsImag; /* imaginary part of rhs vector */ + char *matrix; /* matrix for device equations */ + int solverType; /* type of equations matrix can solve */ + int dimEquil; /* dimension in equilibrium */ + int numOrigEquil; /* orig number of nz's in equilibrium */ + int numFillEquil; /* fill number of nz's in equilibrium */ + int dimBias; /* dimension under bias */ + int numOrigBias; /* orig number of nz's under bias */ + int numFillBias; /* fill number of nz's under bias */ + int numEqns; /* number of equations */ + int poissonOnly; /* flag for Poisson eqn solution */ + struct sONEelem **elemArray; /* array of elements */ + double **devStates; /* device states */ + int numNodes; /* total number of nodes */ + struct sONEcontact *pFirstContact; /* first contact */ + struct sONEcontact *pLastContact; /* last contact */ + struct sMaterialInfo *pMaterials; /* temp-dep material information */ + struct sStatInfo *pStats; /* run-time statistics */ + int converged; /* flag for device convergence */ + int iterationNumber; /* device iteration counter */ + int baseIndex; /* index for base contact in BJTs */ + double baseLength; /* length of base contact in BJTs */ + double area; /* area of device in CM^2 */ + double rhsNorm; /* norm of rhs vector */ + double abstol; /* absolute tolerance for device */ + double reltol; /* relative tolerance for device */ + char *name; /* name of device */ +} ONEdevice; + +#define devState0 devStates[0] +#define devState1 devStates[1] +#define devState2 devStates[2] +#define devState3 devStates[3] +#define devState4 devStates[4] +#define devState5 devStates[5] +#define devState6 devStates[6] +#define devState7 devStates[7] + +typedef struct sONEcontact +{ + struct sONEcontact *next; /* pointer to next contact */ + struct sONEnode **pNodes; /* pointer to the contact nodes */ + int numNodes; /* number of nodes in contact */ + int id; /* unique contact identifier */ + double workf; /* metal work function */ +} ONEcontact; + +#endif /* ONEDEV_H */ diff --git a/src/include/onemesh.h b/src/include/onemesh.h new file mode 100644 index 000000000..21240c650 --- /dev/null +++ b/src/include/onemesh.h @@ -0,0 +1,130 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors: 1987 Karti Mayaram, 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +/* + * One-Dimensional Element-based Simulation-Mesh Data Structures + */ + +#ifndef ONEMESH_H +#define ONEMESH_H + +#include "material.h" + +typedef struct sONEelem { + struct sONEelem *pElems[2]; /* array to store neighbor elements */ + struct sONEnode *pNodes[2]; /* array to store the element nodes */ + struct sONEedge *pEdge; /* the edge */ + double dx; /* the x length */ + double rDx; /* 1 / dx */ + int domain; /* domain to which this elem belongs */ + int elemType; /* material type of element */ + ONEmaterial *matlInfo; /* material information */ + double epsRel; /* epsilon of material rel to Semicon */ + int evalNodes[2]; /* nodes to be evaluated in elem */ +} ONEelem; + +#define pLeftElem pElems[0] +#define pRightElem pElems[1] + +#define pLeftNode pNodes[0] +#define pRightNode pNodes[1] + +typedef struct sONEedge { + double mun; /* electron mobility */ + double mup; /* hole mobility */ + double dPsi; /* deltaPsi */ + double jn; /* electron current */ + double jp; /* hole current */ + double jd; /* displacement current */ + double dJnDpsiP1; /* dJn/dPsi(+1) */ + double dJnDn; /* dJnx/dN */ + double dJnDnP1; /* dJn/dN(+1) */ + double dJpDpsiP1; /* dJpx/dPsi(+1) */ + double dJpDp; /* dJpx/dP */ + double dJpDpP1; /* dJpxDp(+1) */ + double dCBand; /* effective delta conduction band */ + double dVBand; /* effective delta valence band */ + int edgeState; /* pointer to state vector */ + unsigned evaluated : 1; /* flag to indicated evaluated */ +} ONEedge; + +typedef struct sONEnode { + double x; /* x location */ + int nodeI; /* node x-index */ + int poiEqn; /* equation number for equil poisson */ + int psiEqn; /* equation number for bias poisson */ + int nEqn; /* equation number for n continuity */ + int pEqn; /* equation number for p continuity */ + int nodeType; /* type of node */ + int baseType; /* baseType n or p or none */ + double vbe; /* base emitter voltage for BJTs */ + struct sONEelem *pElems[2]; /* array of elements */ + double psi0; /* equilibrium potential */ + double psi; /* electrostatic potential */ + double nConc; /* electron conc. */ + double pConc; /* hole conc. */ + double nie; /* effective intrinsic carrier conc. */ + double eg; /* energy gap */ + double eaff; /* electron affinity; work phi for metal*/ + double tn; /* electron lifetime */ + double tp; /* hole lifetime */ + double netConc; /* net conc. */ + double totalConc; /* total conc. */ + double na; /* acceptor conc. */ + double nd; /* donor conc. */ + double qf; /* fixed charge density */ + double nPred; /* predicted electron conc. */ + double pPred; /* predicted hole conc. */ + double uNet; /* net recombination rate */ + double dUdN; /* dU / dN */ + double dUdP; /* dU / dP */ + double dNdT; /* dN / dT value */ + double dPdT; /* dN / dT value */ + int nodeState; /* pointer to the state vector */ + unsigned evaluated : 1; /* flag to indicated evaluated */ + /* sparse matrix pointers. pointers to doubles */ + double *fPsiPsiiM1; + double *fPsiPsi; + double *fPsiPsiiP1; + double *fPsiN; + double *fPsiP; + double *fNPsiiM1; + double *fNPsi; + double *fNPsiiP1; + double *fNNiM1; + double *fNN; + double *fNNiP1; + double *fNPiM1; + double *fNP; + double *fNPiP1; + double *fPPsiiM1; + double *fPPsi; + double *fPPsiiP1; + double *fPPiM1; + double *fPP; + double *fPPiP1; + double *fPNiM1; + double *fPN; + double *fPNiP1; +} ONEnode; + + +#define pLeftElem pElems[0] +#define pRightElem pElems[1] + +#define nodePsi nodeState +#define nodeN nodeState+1 +#define nodeP nodeState+3 + +#define edgeDpsi edgeState + +#define ONEnumNodeStates 5 +#define ONEnumEdgeStates 2 + +#endif /* ONEMESH */ diff --git a/src/include/optndefs.h b/src/include/optndefs.h new file mode 100644 index 000000000..bdb5c358d --- /dev/null +++ b/src/include/optndefs.h @@ -0,0 +1,60 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors: 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +#ifndef OPTN_H +#define OPTN_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sOPTNcard { + struct sOPTNcard *OPTNnextCard; + char *OPTNicFile; + int OPTNunique; + int OPTNdeviceType; + double OPTNdefa; + double OPTNdefw; + double OPTNdefl; + double OPTNbaseArea; + double OPTNbaseLength; + double OPTNbaseDepth; + double OPTNtnom; + unsigned int OPTNicFileGiven : 1; + unsigned int OPTNuniqueGiven : 1; + unsigned int OPTNdeviceTypeGiven : 1; + unsigned int OPTNdefaGiven : 1; + unsigned int OPTNdefwGiven : 1; + unsigned int OPTNdeflGiven : 1; + unsigned int OPTNbaseAreaGiven : 1; + unsigned int OPTNbaseLengthGiven : 1; + unsigned int OPTNbaseDepthGiven : 1; + unsigned int OPTNtnomGiven : 1; +} OPTNcard; + +/* OPTN parameters */ +#define OPTN_RESISTOR 1 +#define OPTN_CAPACITOR 2 +#define OPTN_DIODE 3 +#define OPTN_BIPOLAR 4 +#define OPTN_SOIBJT 5 +#define OPTN_MOSCAP 6 +#define OPTN_MOSFET 7 +#define OPTN_SOIMOS 8 +#define OPTN_JFET 9 +#define OPTN_MESFET 10 +#define OPTN_DEFA 11 +#define OPTN_DEFW 12 +#define OPTN_DEFL 13 +#define OPTN_BASE_AREA 14 +#define OPTN_BASE_LENGTH 15 +#define OPTN_BASE_DEPTH 16 +#define OPTN_TNOM 17 +#define OPTN_IC_FILE 18 +#define OPTN_UNIQUE 19 + +#endif /* OPTN_H */ diff --git a/src/include/outpdefs.h b/src/include/outpdefs.h new file mode 100644 index 000000000..6d6becfd6 --- /dev/null +++ b/src/include/outpdefs.h @@ -0,0 +1,107 @@ +/********** +Copyright 1992 Regents of the University of California. All rights reserved. +Authors: 1992 David Gates +**********/ + +#ifndef OUTP_H +#define OUTP_H + +/* Data Structures and Definitions for Device Simulation Cards */ + +typedef struct sOUTPcard { + struct sOUTPcard *OUTPnextCard; + char *OUTProotFile; + int OUTPnumVars; + int OUTPdcDebug; + int OUTPtranDebug; + int OUTPacDebug; + int OUTPgeom; + int OUTPmesh; + int OUTPmaterial; + int OUTPglobals; + int OUTPstats; + int OUTPfileType; + int OUTPdoping; + int OUTPpsi; + int OUTPequPsi; + int OUTPvacPsi; + int OUTPnConc; + int OUTPpConc; + int OUTPphin; + int OUTPphip; + int OUTPphic; + int OUTPphiv; + int OUTPeField; + int OUTPjc; + int OUTPjd; + int OUTPjn; + int OUTPjp; + int OUTPjt; + int OUTPuNet; + int OUTPmun; + int OUTPmup; + unsigned int OUTProotFileGiven : 1; + unsigned int OUTPdcDebugGiven : 1; + unsigned int OUTPtranDebugGiven : 1; + unsigned int OUTPacDebugGiven : 1; + unsigned int OUTPgeomGiven : 1; + unsigned int OUTPmeshGiven : 1; + unsigned int OUTPmaterialGiven : 1; + unsigned int OUTPglobalsGiven : 1; + unsigned int OUTPstatsGiven : 1; + unsigned int OUTPfileTypeGiven : 1; + unsigned int OUTPdopingGiven : 1; + unsigned int OUTPpsiGiven : 1; + unsigned int OUTPequPsiGiven : 1; + unsigned int OUTPvacPsiGiven : 1; + unsigned int OUTPnConcGiven : 1; + unsigned int OUTPpConcGiven : 1; + unsigned int OUTPphinGiven : 1; + unsigned int OUTPphipGiven : 1; + unsigned int OUTPphicGiven : 1; + unsigned int OUTPphivGiven : 1; + unsigned int OUTPeFieldGiven : 1; + unsigned int OUTPjcGiven : 1; + unsigned int OUTPjdGiven : 1; + unsigned int OUTPjnGiven : 1; + unsigned int OUTPjpGiven : 1; + unsigned int OUTPjtGiven : 1; + unsigned int OUTPuNetGiven : 1; + unsigned int OUTPmunGiven : 1; + unsigned int OUTPmupGiven : 1; +} OUTPcard; + +/* OUTP parameters */ +#define OUTP_ALL_DEBUG 1 +#define OUTP_DC_DEBUG 2 +#define OUTP_TRAN_DEBUG 3 +#define OUTP_AC_DEBUG 4 +#define OUTP_GEOM 5 +#define OUTP_MESH 6 +#define OUTP_MATERIAL 7 +#define OUTP_GLOBALS 8 +#define OUTP_STATS 9 +#define OUTP_ROOTFILE 10 +#define OUTP_RAWFILE 11 +#define OUTP_HDF 12 +#define OUTP_DOPING 13 +#define OUTP_PSI 14 +#define OUTP_EQU_PSI 15 +#define OUTP_VAC_PSI 16 +#define OUTP_N_CONC 17 +#define OUTP_P_CONC 18 +#define OUTP_PHIN 19 +#define OUTP_PHIP 20 +#define OUTP_PHIC 21 +#define OUTP_PHIV 22 +#define OUTP_E_FIELD 23 +#define OUTP_J_C 24 +#define OUTP_J_D 25 +#define OUTP_J_N 26 +#define OUTP_J_P 27 +#define OUTP_J_T 28 +#define OUTP_U_NET 29 +#define OUTP_MUN 30 +#define OUTP_MUP 31 + +#endif /* OUTP_H */ diff --git a/src/include/profile.h b/src/include/profile.h new file mode 100644 index 000000000..fa7103be5 --- /dev/null +++ b/src/include/profile.h @@ -0,0 +1,59 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors: 1987 Karti Mayaram, 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +/* + * Doping Profile Data Structures + */ +#ifndef PROFILE_H +#define PROFILE_H + +typedef struct sDOPprofile { + int type; /* Primary profile type UNIF, EXP, etc */ + int latType; /* Lateral profile type UNIF, EXP, etc */ + int rotate; /* Is lat prof rotation of primary? */ + int numDomains; /* Size of vector of domains to dope */ + int *domains; /* Vector of domains to dope */ + double param[10]; + struct sDOPprofile *next; +} DOPprofile; + +#define BEGIN ??? +#define END ??? +#define LENGTH ??? +#define FORWARD ??? + +#define CONC param[1] +#define PEAK_CONC param[1] +#define IMPID param[1] +#define X_LOW param[2] +#define X_HIGH param[3] +#define Y_LOW param[4] +#define Y_HIGH param[5] +#define RANGE param[6] +#define LOCATION param[6] +#define CHAR_LENGTH param[7] +#define DIRECTION param[8] +#define LAT_RATIO param[9] + +/* Structure for holding lookup tables of concentrations */ +typedef struct sDOPtable { + int impId; /* id of impurity */ + double **dopData; /* Array of doping values */ + struct sDOPtable *next; /* Pointer to next table in list */ +} DOPtable; + +/* define impurity types */ +#define IMP_BORON 1 +#define IMP_PHOSPHORUS 2 +#define IMP_ARSENIC 3 +#define IMP_ANTIMONY 4 +#define IMP_N_TYPE 5 +#define IMP_P_TYPE 6 + +#endif /* PROFILE_H */ diff --git a/src/include/twodev.h b/src/include/twodev.h new file mode 100644 index 000000000..9ec7a1bb6 --- /dev/null +++ b/src/include/twodev.h @@ -0,0 +1,106 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors: 1987 Karti Mayaram, 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +/* + * Two-Dimensional Numerical Device Data Structures + */ + +#ifndef TWODEV_H +#define TWODEV_H + +#include "gendev.h" + +typedef struct sTWOdevice +{ + double *dcSolution; /* solution vector for device */ + double *dcDeltaSolution; /* delta solution vector */ + double *copiedSolution; /* copy of the solution vector */ + double *rhs; /* rhs vector */ + double *rhsImag; /* imaginary part of rhs vector */ + char *matrix; /* matrix for device equations */ + int solverType; /* what is matrix set up to do */ + int dimEquil; /* dimension in equilibrium */ + int numOrigEquil; /* orig number of nz's in equilibrium */ + int numFillEquil; /* fill number of nz's in equilibrium */ + int dimBias; /* dimension under bias */ + int numOrigBias; /* orig number of nz's under bias */ + int numFillBias; /* fill number of nz's under bias */ + int numEqns; /* number of equations */ + int poissonOnly; /* flag for Poisson eqn solution */ + struct sTWOelem **elements; /* 1D list of elements */ + struct sTWOelem ***elemArray; /* 2D list of elements for printing */ + double **devStates; /* device states */ + double *xScale; /* array of X node locations */ + double *yScale; /* array of Y node locations */ + int numXNodes; /* number of X nodes */ + int numYNodes; /* number of Y nodes */ + int numNodes; /* total number of nodes */ + int numEdges; /* total number of edges */ + int numElems; /* total number of elements */ + struct sTWOcontact *pFirstContact; /* first contact */ + struct sTWOcontact *pLastContact; /* last contact */ + struct sTWOchannel *pChannel; /* surface mobility channel */ + struct sMaterialInfo *pMaterials; /* temp-dep material information */ + struct sStatInfo *pStats; /* run-time statistics */ + int converged; /* flag for device convergence */ + int iterationNumber; /* device iteration counter */ + double width; /* device width in CM */ + double rhsNorm; /* norm of rhs vector */ + double abstol; /* absolute tolerance for device */ + double reltol; /* relative tolerance for device */ + char *name; /* name of device */ +} TWOdevice; + +#define devState0 devStates[0] +#define devState1 devStates[1] +#define devState2 devStates[2] +#define devState3 devStates[3] +#define devState4 devStates[4] +#define devState5 devStates[5] +#define devState6 devStates[6] +#define devState7 devStates[7] + +typedef struct sTWOcontact +{ + struct sTWOcontact *next; /* pointer to next contact */ + struct sTWOnode **pNodes; /* pointer to the contact nodes */ + int numNodes; /* number of nodes in contact */ + int id; /* unique contact identifier */ + double workf; /* metal work function */ +} TWOcontact; + +/* Structure for channels. + * A channel is divided into 'columns' that are perpendicular to the + * channel's insulator/semiconductor interface. Each column begins + * at its 'seed', the closest semiconductor element to the interface. + * It is assumed that the current flows parallel to the interface. + */ +typedef struct sTWOchannel +{ + struct sTWOchannel *next; /* pointer to next channel */ + struct sTWOelem *pSeed; /* pointer to the seed element */ + struct sTWOelem *pNElem; /* pointer to the insulator element */ + int id; /* unique channel identifier */ + int type; /* ID of direction to interface */ +} TWOchannel; + +struct mosConductances +{ + double dIdDVdb; + double dIdDVsb; + double dIdDVgb; + double dIsDVdb; + double dIsDVsb; + double dIsDVgb; + double dIgDVdb; + double dIgDVsb; + double dIgDVgb; +}; + +#endif /* TWODEV_H */ diff --git a/src/include/twomesh.h b/src/include/twomesh.h new file mode 100644 index 000000000..0681c01cc --- /dev/null +++ b/src/include/twomesh.h @@ -0,0 +1,212 @@ +/********** +Copyright 1991 Regents of the University of California. All rights reserved. +Authors: 1987 Karti Mayaram, 1991 David Gates +**********/ + +/* Member of CIDER device simulator + * Version: 1b1 + */ + +/* + * Two-Dimensional Element-based Simulation-Mesh Data Structures + */ + +#ifndef TWOMESH_H +#define TWOMESH_H + +#include "material.h" + +typedef struct sTWOelem +{ + struct sTWOelem *pElems[4]; /* array to store the element neighbors */ + struct sTWOnode *pNodes[4]; /* array to store the element nodes */ + struct sTWOedge *pEdges[4]; /* array to store the edges */ + double dx; /* the x length */ + double dy; /* the y length */ + double dxOverDy; /* dX / dY */ + double dyOverDx; /* dY / dX */ + int domain; /* device domain owning element */ + int elemType; /* material type of element */ + TWOmaterial *matlInfo; /* material information */ + double epsRel; /* relative epsilon */ +/* Values needed to calc. mobility and its derivatives at element center */ + double mun0, mup0; /* temp. and doping-dep. mobilities */ + double mun, mup; /* field and carrier-dep. mobilities */ + double dMunDEs, dMupDEs; /* Mob Deriv surf EFIELD Comp */ + double dMunDEx, dMupDEx; /* Mob Deriv x EFIELD Comp */ + double dMunDEy, dMupDEy; /* Mob Deriv y EFIELD Comp */ + double dMunDWx, dMupDWx; /* Mob Deriv x WDF Comp */ + double dMunDWy, dMupDWy; /* Mob Deriv y WDF Comp */ + double dMunDN, dMupDN; /* Mob Deriv nConc Comp */ + double dMunDP, dMupDP; /* Mob Deriv pConc Comp */ + unsigned surface : 1; /* flag to indicate surface elem */ + int channel; /* id of channel elem is in, 0 is none */ + int direction; /* direction of flow for channels */ + int evalNodes[4]; /* nodes to be evaluated in elem */ + int evalEdges[4]; /* edges to be evaluated in elem */ +} TWOelem; + +#define pTopElem pElems[0] +#define pRightElem pElems[1] +#define pBotElem pElems[2] +#define pLeftElem pElems[3] + +#define pTLNode pNodes[0] +#define pTRNode pNodes[1] +#define pBRNode pNodes[2] +#define pBLNode pNodes[3] + +#define pTopEdge pEdges[0] +#define pRightEdge pEdges[1] +#define pBotEdge pEdges[2] +#define pLeftEdge pEdges[3] + +typedef struct sTWOedge +{ + int edgeType; /* boundary type of edge */ + double dPsi; /* deltaPsi */ + double jn; /* electron current */ + double jp; /* hole current */ + double jd; /* displacement current */ + double dJnDpsiP1; /* dJn/dPsi(+1) */ + double dJnDn; /* dJnx/dN */ + double dJnDnP1; /* dJn/dN(+1) */ + double dJpDpsiP1; /* dJpx/dPsi(+1) */ + double dJpDp; /* dJpx/dP */ + double dJpDpP1; /* dJpxDp(+1) */ + double dCBand; /* effective delta conduction band */ + double dVBand; /* effective delta valence band */ + double qf; /* fixed charge density */ + /* Terms to find weighted carrier driving force and its derivatives */ + double wdfn; /* N weighted driving force */ + double wdfp; /* P weighted driving force */ + double dWnDpsiP1; /* dWn/dPsi(+1) */ + double dWnDn; /* dWn/dN */ + double dWnDnP1; /* dWn/dN(+1) */ + double dWpDpsiP1; /* dWp/dPsi(+1) */ + double dWpDp; /* dWp/dP */ + double dWpDpP1; /* dWp/dP(+1) */ + /* Coefficients for weighting mobility on sides of edges */ + double kNeg; /* Spline for negative side of edge */ + double kPos; /* Spline for positive side of edge */ + + int edgeState; /* pointer to state vector */ + unsigned evaluated : 1; /* flag to indicated evaluated */ +} TWOedge; + +typedef struct sTWOnode { + int nodeType; /* type of node */ + int nodeI; /* node x-index */ + int nodeJ; /* node y-index */ + int poiEqn; /* equation number for equilib poisson */ + int psiEqn; /* equation number for bias poisson */ + int nEqn; /* equation number for n continuity */ + int pEqn; /* equation number for p continuity */ + struct sTWOelem *pElems[4]; /* array of elements */ + double psi0; /* equilibrium potential */ + double psi; /* electrostatic potential */ + double nConc; /* electron conc. */ + double pConc; /* hole conc. */ + double nie; /* effective intrinsic carrier conc. */ + double eg; /* energy gap */ + double eaff; /* electron affinity; work phi for metal*/ + double tn; /* electron lifetime */ + double tp; /* hole lifetime */ + double netConc; /* net doping conc. */ + double totalConc; /* total doping conc. */ + double na; /* acceptor conc. */ + double nd; /* donor conc. */ + double nPred; /* predicted electron conc. */ + double pPred; /* predicted hole conc. */ + double uNet; /* net recombination rate */ + double dUdN; /* dU / dN */ + double dUdP; /* dU / dP */ + double dNdT; /* dN / dT */ + double dPdT; /* dP / dT */ + int nodeState; /* pointer to the state vector */ + unsigned evaluated : 1; /* flag to indicated evaluated */ + /* sparse matrix pointers. pointers to doubles */ + /* DAG: diagonal pointers fXXiX1jX1 */ + double *fPsiPsiiM1; + double *fPsiPsi; + double *fPsiPsiiP1; + double *fPsiPsijM1; + double *fPsiPsijP1; + double *fPsiN; + double *fPsiP; + double *fNPsiiM1; + double *fNPsi; + double *fNPsiiP1; + double *fNPsijM1; + double *fNPsijP1; + double *fNPsiiM1jM1; + double *fNPsiiM1jP1; + double *fNPsiiP1jM1; + double *fNPsiiP1jP1; + double *fNNiM1; + double *fNN; + double *fNNiP1; + double *fNNjM1; + double *fNNjP1; + double *fNNiM1jM1; + double *fNNiM1jP1; + double *fNNiP1jM1; + double *fNNiP1jP1; + double *fNP; + double *fPPsiiM1; + double *fPPsi; + double *fPPsiiP1; + double *fPPsijM1; + double *fPPsijP1; + double *fPPsiiM1jM1; + double *fPPsiiM1jP1; + double *fPPsiiP1jM1; + double *fPPsiiP1jP1; + double *fPPiM1; + double *fPP; + double *fPPiP1; + double *fPPjM1; + double *fPPjP1; + double *fPPiM1jM1; + double *fPPiM1jP1; + double *fPPiP1jM1; + double *fPPiP1jP1; + double *fPN; + /* DAG: Pointers for Surface-Field-Dependent Terms */ + /* For Oxide/Insulator on Silicon/Semiconductor: + Ox + OxM1 + ----- + ----- + OxP1 OXIDE + | | | + | | | + - InM1 + ----- + ----- + InP1 --- INTERFACE + In + */ + double *fNPsiInM1; + double *fNPsiIn; + double *fNPsiInP1; + double *fNPsiOxM1; + double *fNPsiOx; + double *fNPsiOxP1; + double *fPPsiInM1; + double *fPPsiIn; + double *fPPsiInP1; + double *fPPsiOxM1; + double *fPPsiOx; + double *fPPsiOxP1; +} TWOnode; + +#define pTLElem pElems[0] +#define pTRElem pElems[1] +#define pBRElem pElems[2] +#define pBLElem pElems[3] + +#define nodePsi nodeState +#define nodeN nodeState+1 +#define nodeP nodeState+3 + +#define edgeDpsi edgeState + +#define TWOnumNodeStates 5 +#define TWOnumEdgeStates 2 + +#endif /* TWOMESH_H */