Browse Source

added "dtemp" parameter.

pre-master-46
pnenzi 23 years ago
parent
commit
951fb233d8
  1. 1
      src/spicelib/devices/mos3/mos3.c
  2. 4
      src/spicelib/devices/mos3/mos3acld.c
  3. 11
      src/spicelib/devices/mos3/mos3ask.c
  4. 4
      src/spicelib/devices/mos3/mos3conv.c
  5. 7
      src/spicelib/devices/mos3/mos3defs.h
  6. 5
      src/spicelib/devices/mos3/mos3del.c
  7. 3
      src/spicelib/devices/mos3/mos3dest.c
  8. 6
      src/spicelib/devices/mos3/mos3dist.c
  9. 4
      src/spicelib/devices/mos3/mos3dset.c
  10. 26
      src/spicelib/devices/mos3/mos3ext.h
  11. 4
      src/spicelib/devices/mos3/mos3ic.c
  12. 6
      src/spicelib/devices/mos3/mos3mask.c
  13. 5
      src/spicelib/devices/mos3/mos3mdel.c
  14. 5
      src/spicelib/devices/mos3/mos3mpar.c
  15. 9
      src/spicelib/devices/mos3/mos3noi.c
  16. 10
      src/spicelib/devices/mos3/mos3par.c
  17. 5
      src/spicelib/devices/mos3/mos3pzld.c
  18. 6
      src/spicelib/devices/mos3/mos3sacl.c
  19. 12
      src/spicelib/devices/mos3/mos3set.c
  20. 6
      src/spicelib/devices/mos3/mos3sld.c
  21. 6
      src/spicelib/devices/mos3/mos3sprt.c
  22. 6
      src/spicelib/devices/mos3/mos3sset.c
  23. 6
      src/spicelib/devices/mos3/mos3supd.c
  24. 10
      src/spicelib/devices/mos3/mos3temp.c
  25. 5
      src/spicelib/devices/mos3/mos3trun.c

1
src/spicelib/devices/mos3/mos3.c

@ -37,6 +37,7 @@ IFparm MOS3pTable[] = { /* parameters */
IOPAU("icvbs", MOS3_IC_VBS, IF_REAL , "Initial B-S voltage"),
IOPU("ic", MOS3_IC, IF_REALVEC, "Vector of D-S, G-S, B-S voltages"),
IOPU("temp", MOS3_TEMP, IF_REAL , "Instance operating temperature"),
IOPU("dtemp", MOS3_DTEMP, IF_REAL , "Instance temperature difference"),
IP("sens_l", MOS3_L_SENS, IF_FLAG, "flag to request sensitivity WRT length"),
IP("sens_w", MOS3_W_SENS, IF_FLAG, "flag to request sensitivity WRT width"),
OPU("dnode", MOS3_DNODE, IF_INTEGER, "Number of drain node"),

4
src/spicelib/devices/mos3/mos3acld.c

@ -14,9 +14,7 @@ Modified: 2000 AlansFixes
int
MOS3acLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS3acLoad(GENmodel *inModel, CKTcircuit *ckt)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance *here;

11
src/spicelib/devices/mos3/mos3ask.c

@ -15,12 +15,8 @@ Modified: 2000 AlansFixes
/*ARGSUSED*/
int
MOS3ask(ckt,inst,which,value,select)
CKTcircuit *ckt;
GENinstance *inst;
int which;
IFvalue *value;
IFvalue *select;
MOS3ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
IFvalue *select)
{
MOS3instance *here = (MOS3instance *)inst;
double vr;
@ -33,6 +29,9 @@ MOS3ask(ckt,inst,which,value,select)
case MOS3_TEMP:
value->rValue = here->MOS3temp-CONSTCtoK;
return(OK);
case MOS3_DTEMP:
value->rValue = here->MOS3dtemp;
return(OK);
case MOS3_CGS:
value->rValue = 2* *(ckt->CKTstate0 + here->MOS3capgs);
return(OK);

4
src/spicelib/devices/mos3/mos3conv.c

@ -10,9 +10,7 @@ Author: 1985 Thomas L. Quarles
#include "suffix.h"
int
MOS3convTest(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS3convTest(GENmodel *inModel, CKTcircuit *ckt)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance *here;

7
src/spicelib/devices/mos3/mos3defs.h

@ -43,6 +43,7 @@ typedef struct sMOS3instance {
double MOS3sourceConductance; /*conductance of source(or 0):set in setup*/
double MOS3drainConductance; /*conductance of drain(or 0):set in setup*/
double MOS3temp; /* operating temperature of this instance */
double MOS3dtemp; /* temperature difference for this instance */
double MOS3tTransconductance; /* temperature corrected transconductance*/
double MOS3tSurfMob; /* temperature corrected surface mobility */
@ -91,7 +92,8 @@ typedef struct sMOS3instance {
unsigned MOS3off :1;/* non-zero to indicate device is off for dc analysis*/
unsigned MOS3tempGiven :1; /* instance temperature specified */
unsigned MOS3mGiven :1;
unsigned MOS3dtempGiven :1; /* instance temperature difference specified */
unsigned MOS3mGiven :1;
unsigned MOS3lGiven :1;
unsigned MOS3wGiven :1;
unsigned MOS3drainAreaGiven :1;
@ -496,7 +498,8 @@ typedef struct sMOS3model { /* model structure for a resistor */
#define MOS3_TEMP 77
#define MOS3_SOURCERESIST 78
#define MOS3_DRAINRESIST 79
#define MOS3_M 80
#define MOS3_M 80
#define MOS3_DTEMP 81
/* model parameters */
#define MOS3_MOD_VTO 101

5
src/spicelib/devices/mos3/mos3del.c

@ -12,10 +12,7 @@ Author: 1985 Thomas L. Quarles
int
MOS3delete(inModel,name,inst)
GENmodel *inModel;
IFuid name;
GENinstance **inst;
MOS3delete(GENmodel *inModel, IFuid name, GENinstance **inst)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance **fast = (MOS3instance **)inst;

3
src/spicelib/devices/mos3/mos3dest.c

@ -11,8 +11,7 @@ Author: 1985 Thomas L. Quarles
void
MOS3destroy(inModel)
GENmodel **inModel;
MOS3destroy(GENmodel **inModel)
{
MOS3model **model = (MOS3model **)inModel;
MOS3instance *here;

6
src/spicelib/devices/mos3/mos3dist.c

@ -11,11 +11,7 @@ Author: 1988 Jaijeet S Roychowdhury
#include "suffix.h"
int
MOS3disto(mode,genmodel,ckt)
GENmodel *genmodel;
CKTcircuit *ckt;
int mode;
MOS3disto(int mode, GENmodel *genmodel, CKTcircuit *ckt)
/* assuming here that ckt->CKTomega has been initialised to
* the correct value
*/

4
src/spicelib/devices/mos3/mos3dset.c

@ -15,9 +15,7 @@ Modified: 2000 AlansFixes
#include "suffix.h"
int
MOS3dSetup(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS3dSetup(GENmodel *inModel, CKTcircuit *ckt)
/* actually load the current value into the
* sparse matrix previously provided
*/

26
src/spicelib/devices/mos3/mos3ext.h

@ -4,7 +4,6 @@ Author: 1985 Thomas L. Quarles
Modified: 2000 AlansFixes
**********/
#ifdef __STDC__
extern int MOS3acLoad(GENmodel*,CKTcircuit*);
extern int MOS3ask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*);
extern int MOS3convTest(GENmodel *,CKTcircuit *);
@ -29,28 +28,3 @@ extern int MOS3trunc(GENmodel*,CKTcircuit*,double*);
extern int MOS3disto(int,GENmodel*,CKTcircuit*);
extern int MOS3noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int MOS3dSetup(GENmodel*,CKTcircuit*);
#else /* stdc */
extern int MOS3acLoad();
extern int MOS3ask();
extern int MOS3convTest();
extern int MOS3delete();
extern void MOS3destroy();
extern int MOS3getic();
extern int MOS3load();
extern int MOS3mAsk();
extern int MOS3mDelete();
extern int MOS3mParam();
extern int MOS3param();
extern int MOS3pzLoad();
extern int MOS3sAcLoad();
extern int MOS3sLoad();
extern void MOS3sPrint();
extern int MOS3sSetup();
extern int MOS3sUpdate();
extern int MOS3setup();
extern int MOS3unsetup();
extern int MOS3temp();
extern int MOS3trunc();
extern int MOS3disto();
extern int MOS3noise();
#endif /* stdc */

4
src/spicelib/devices/mos3/mos3ic.c

@ -13,9 +13,7 @@ Author: 1985 Thomas L. Quarles
int
MOS3getic(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS3getic(GENmodel *inModel, CKTcircuit *ckt)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance *here;

6
src/spicelib/devices/mos3/mos3mask.c

@ -18,11 +18,7 @@ Modified: 2000 AlansFixes
/*ARGSUSED*/
int
MOS3mAsk(ckt,inst,which,value)
CKTcircuit *ckt;
GENmodel *inst;
int which;
IFvalue *value;
MOS3mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value)
{
MOS3model *here = (MOS3model *)inst;
switch(which) {

5
src/spicelib/devices/mos3/mos3mdel.c

@ -12,10 +12,7 @@ Author: 1985 Thomas L. Quarles
int
MOS3mDelete(inModel,modname,kill)
GENmodel **inModel;
IFuid modname;
GENmodel *kill;
MOS3mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
{
MOS3model **model = (MOS3model **)inModel;
MOS3model *modfast = (MOS3model *)kill;

5
src/spicelib/devices/mos3/mos3mpar.c

@ -15,10 +15,7 @@ Modified: 2000 AlansFixes
int
MOS3mParam(param,value,inModel)
int param;
IFvalue *value;
GENmodel *inModel;
MOS3mParam(int param, IFvalue *value, GENmodel *inModel)
{
MOS3model *model = (MOS3model *)inModel;
switch(param) {

9
src/spicelib/devices/mos3/mos3noi.c

@ -24,13 +24,8 @@ extern void NevalSrc();
extern double Nintegrate();
int
MOS3noise (mode, operation, genmodel, ckt, data, OnDens)
int mode;
int operation;
GENmodel *genmodel;
CKTcircuit *ckt;
Ndata *data;
double *OnDens;
MOS3noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
Ndata *data, double *OnDens)
{
MOS3model *firstModel = (MOS3model *) genmodel;
MOS3model *model;

10
src/spicelib/devices/mos3/mos3par.c

@ -16,11 +16,7 @@ Modified: 2000 AlansFixes
/* ARGSUSED */
int
MOS3param(param,value,inst,select)
int param;
IFvalue *value;
GENinstance *inst;
IFvalue *select;
MOS3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{
MOS3instance *here = (MOS3instance *)inst;
switch(param) {
@ -80,6 +76,10 @@ MOS3param(param,value,inst,select)
here->MOS3temp = value->rValue+CONSTCtoK;
here->MOS3tempGiven = TRUE;
break;
case MOS3_DTEMP:
here->MOS3dtemp = value->rValue;
here->MOS3dtempGiven = TRUE;
break;
case MOS3_IC:
switch(value->v.numValue){
case 3:

5
src/spicelib/devices/mos3/mos3pzld.c

@ -15,10 +15,7 @@ Modified: 2000 AlansFixes
int
MOS3pzLoad(inModel,ckt,s)
GENmodel *inModel;
CKTcircuit *ckt;
SPcomplex *s;
MOS3pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance *here;

6
src/spicelib/devices/mos3/mos3sacl.c

@ -1,6 +1,8 @@
/**********
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
This function is obsolete (was used by an old sensitivity analysis)
**********/
/* actually load the current ac sensitivity
@ -16,9 +18,7 @@ Author: 1985 Thomas L. Quarles
#include "suffix.h"
int
MOS3sAcLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS3sAcLoad(GENmodel *inModel, CKTcircuit *ckt)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance *here;

12
src/spicelib/devices/mos3/mos3set.c

@ -1,6 +1,6 @@
/**********
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarlesù
Author: 1985 Thomas L. Quarlesù
Modified: 2000 AlansFixes
**********/
@ -16,11 +16,7 @@ Modified: 2000 AlansFixes
#define EPSSIL (11.7 * 8.854214871e-12)
int
MOS3setup(matrix,inModel,ckt,states)
SMPmatrix *matrix;
GENmodel *inModel;
CKTcircuit *ckt;
int *states;
MOS3setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
/* load the MOS3 device structure with those pointers needed later
* for fast matrix loading
*/
@ -264,9 +260,7 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
}
int
MOS3unsetup(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS3unsetup(GENmodel *inModel, CKTcircuit *ckt)
{
MOS3model *model;
MOS3instance *here;

6
src/spicelib/devices/mos3/mos3sld.c

@ -2,6 +2,8 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
Modified: 2000 AlansFixes
This function is obsolete (was used by an old sensitivity analysis)
**********/
/* actually load the current sensitivity
@ -16,9 +18,7 @@ Modified: 2000 AlansFixes
#include "suffix.h"
int
MOS3sLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS3sLoad(GENmodel *inModel, CKTcircuit *ckt)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance *here;

6
src/spicelib/devices/mos3/mos3sprt.c

@ -2,6 +2,8 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
Modified: 2000 AlansFixes
This function is obsolete (was used by an old sensitivity analysis)
**********/
/* Pretty print the sensitivity info for all the MOS3
@ -16,9 +18,7 @@ Modified: 2000 AlansFixes
#include "suffix.h"
void
MOS3sPrint(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS3sPrint(GENmodel *inModel, CKTcircuit *ckt)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance *here;

6
src/spicelib/devices/mos3/mos3sset.c

@ -1,6 +1,8 @@
/**********
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
This function is obsolete (was used by an old sensitivity analysis)
**********/
/* loop through all the devices and
@ -15,9 +17,7 @@ Author: 1985 Thomas L. Quarles
#include "suffix.h"
int
MOS3sSetup(info,inModel)
SENstruct *info;
GENmodel *inModel;
MOS3sSetup(SENstruct *info, GENmodel *inModel)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance *here;

6
src/spicelib/devices/mos3/mos3supd.c

@ -1,6 +1,8 @@
/**********
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
This function is obsolete (was used by an old sensitivity analysis)
**********/
#include "ngspice.h"
@ -11,9 +13,7 @@ Author: 1985 Thomas L. Quarles
#include "suffix.h"
int
MOS3sUpdate(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS3sUpdate(GENmodel *inModel, CKTcircuit *ckt)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance *here;

10
src/spicelib/devices/mos3/mos3temp.c

@ -15,9 +15,7 @@ Modified: 2000 AlansFixes
#define EPSSIL (11.7 * 8.854214871e-12)
int
MOS3temp(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS3temp(GENmodel *inModel, CKTcircuit *ckt)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance *here;
@ -126,8 +124,12 @@ MOS3temp(inModel,ckt)
/* perform the parameter defaulting */
if(!here->MOS3dtempGiven) {
here->MOS3dtemp = 0.0;
}
if(!here->MOS3tempGiven) {
here->MOS3temp = ckt->CKTtemp;
here->MOS3temp = ckt->CKTtemp + here->MOS3dtemp;
}
vt = here->MOS3temp * CONSTKoverQ;
ratio = here->MOS3temp/model->MOS3tnom;

5
src/spicelib/devices/mos3/mos3trun.c

@ -10,10 +10,7 @@ Author: 1985 Thomas L. Quarles
#include "suffix.h"
int
MOS3trunc(inModel,ckt,timeStep)
GENmodel *inModel;
CKTcircuit *ckt;
double *timeStep;
MOS3trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
MOS3model *model = (MOS3model *)inModel;
MOS3instance *here;

Loading…
Cancel
Save