Browse Source

Added dtemp parameter.

pre-master-46
pnenzi 23 years ago
parent
commit
7e5ff8abf7
  1. 3
      src/spicelib/devices/mos2/mos2.c
  2. 4
      src/spicelib/devices/mos2/mos2acld.c
  3. 11
      src/spicelib/devices/mos2/mos2ask.c
  4. 4
      src/spicelib/devices/mos2/mos2conv.c
  5. 11
      src/spicelib/devices/mos2/mos2defs.h
  6. 5
      src/spicelib/devices/mos2/mos2del.c
  7. 3
      src/spicelib/devices/mos2/mos2dest.c
  8. 6
      src/spicelib/devices/mos2/mos2dist.c
  9. 4
      src/spicelib/devices/mos2/mos2dset.c
  10. 27
      src/spicelib/devices/mos2/mos2ext.h
  11. 4
      src/spicelib/devices/mos2/mos2ic.c
  12. 4
      src/spicelib/devices/mos2/mos2load.c
  13. 7
      src/spicelib/devices/mos2/mos2mask.c
  14. 5
      src/spicelib/devices/mos2/mos2mdel.c
  15. 5
      src/spicelib/devices/mos2/mos2mpar.c
  16. 9
      src/spicelib/devices/mos2/mos2noi.c
  17. 11
      src/spicelib/devices/mos2/mos2par.c
  18. 5
      src/spicelib/devices/mos2/mos2pzld.c
  19. 6
      src/spicelib/devices/mos2/mos2sacl.c
  20. 10
      src/spicelib/devices/mos2/mos2set.c
  21. 6
      src/spicelib/devices/mos2/mos2sld.c
  22. 6
      src/spicelib/devices/mos2/mos2sprt.c
  23. 6
      src/spicelib/devices/mos2/mos2sset.c
  24. 6
      src/spicelib/devices/mos2/mos2supd.c
  25. 10
      src/spicelib/devices/mos2/mos2temp.c
  26. 5
      src/spicelib/devices/mos2/mos2trun.c

3
src/spicelib/devices/mos2/mos2.c

@ -35,7 +35,8 @@ IFparm MOS2pTable[] = { /* parameters */
IOPAU("icvds", MOS2_IC_VDS,IF_REAL , "Initial D-S voltage"),
IOPAU("icvgs", MOS2_IC_VGS,IF_REAL , "Initial G-S voltage"),
IOPAU("icvbs", MOS2_IC_VBS,IF_REAL , "Initial B-S voltage"),
IOPU("temp", MOS2_TEMP, IF_REAL , "Instance operating temperature"),
IOPU("temp", MOS2_TEMP, IF_REAL ,"Instance operating temperature"),
IOPU("dtemp", MOS2_DTEMP, IF_REAL , "Instance temperature difference"),
IP( "ic", MOS2_IC, IF_REALVEC, "Vector of D-S, G-S, B-S voltages"),
IP( "sens_l", MOS2_L_SENS,IF_FLAG, "flag to request sensitivity WRT length"),
IP( "sens_w", MOS2_W_SENS,IF_FLAG, "flag to request sensitivity WRT width"),

4
src/spicelib/devices/mos2/mos2acld.c

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

11
src/spicelib/devices/mos2/mos2ask.c

@ -15,12 +15,8 @@ Modified: 2000 AlansFixes
/*ARGSUSED*/
int
MOS2ask(ckt,inst,which,value,select)
CKTcircuit *ckt;
GENinstance *inst;
int which;
IFvalue *value;
IFvalue *select;
MOS2ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
IFvalue *select)
{
MOS2instance *here = (MOS2instance *)inst;
double vr;
@ -33,6 +29,9 @@ MOS2ask(ckt,inst,which,value,select)
case MOS2_TEMP:
value->rValue = here->MOS2temp-CONSTCtoK;
return(OK);
case MOS2_DTEMP:
value->rValue = here->MOS2dtemp;
return(OK);
case MOS2_CGS:
value->rValue = 2* *(ckt->CKTstate0 + here->MOS2capgs);
return(OK);

4
src/spicelib/devices/mos2/mos2conv.c

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

11
src/spicelib/devices/mos2/mos2defs.h

@ -53,6 +53,7 @@ typedef struct sMOS2instance {
unsigned MOS2vonGiven :1;
unsigned MOS2vdsatGiven :1;
unsigned MOS2tempGiven :1; /* per-instance temperature specified? */
unsigned MOS2dtempGiven :1; /* per-instance temperature difference specified? */
unsigned MOS2sens_l :1; /* field which indicates whether
length of the mosfet is a design
parameter or not */
@ -139,6 +140,7 @@ typedef struct sMOS2instance {
#define MOS2dphibd_dw MOS2sens + 69
double MOS2temp; /* temperature at which this instance operates */
double MOS2dtemp; /* difference of instance temperature from circuit temperature */
double MOS2tTransconductance; /* temperature corrected transconductance*/
double MOS2tSurfMob; /* temperature corrected surface mobility */
double MOS2tPhi; /* temperature corrected Phi */
@ -491,10 +493,11 @@ typedef struct sMOS2model { /* model structure for a resistor */
#define MOS2_L_SENS_CPLX 74
#define MOS2_L_SENS_DC 75
#define MOS2_W_SENS_DC 76
#define MOS2_TEMP 77
#define MOS2_SOURCERESIST 78
#define MOS2_DRAINRESIST 79
#define MOS2_M 80
#define MOS2_TEMP 77
#define MOS2_SOURCERESIST 78
#define MOS2_DRAINRESIST 79
#define MOS2_M 80
#define MOS2_DTEMP 81
/* model paramerers */
#define MOS2_MOD_VTO 101

5
src/spicelib/devices/mos2/mos2del.c

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

3
src/spicelib/devices/mos2/mos2dest.c

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

6
src/spicelib/devices/mos2/mos2dist.c

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

4
src/spicelib/devices/mos2/mos2dset.c

@ -21,9 +21,7 @@ static double sig1[4] = {1.0, -1.0, 1.0, -1.0};
static double sig2[4] = {1.0, 1.0,-1.0, -1.0};
int
MOS2dSetup(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS2dSetup(GENmodel *inModel, CKTcircuit *ckt)
/* actually load the current value into the
* sparse matrix previously provided
*/

27
src/spicelib/devices/mos2/mos2ext.h

@ -4,7 +4,6 @@ Author: 1985 Thomas L. Quarles
Modified: 2000 AlansFixes
**********/
#ifdef __STDC__
extern int MOS2acLoad(GENmodel*,CKTcircuit*);
extern int MOS2ask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*);
extern int MOS2mAsk(CKTcircuit*,GENmodel*,int,IFvalue*);
@ -30,29 +29,3 @@ extern int MOS2disto(int,GENmodel*,CKTcircuit*);
extern int MOS2noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int MOS2dSetup(GENmodel*,CKTcircuit*);
#else /* stdc */
extern int MOS2acLoad();
extern int MOS2ask();
extern int MOS2mAsk();
extern int MOS2convTest();
extern int MOS2delete();
extern void MOS2destroy();
extern int MOS2getic();
extern int MOS2load();
extern int MOS2mDelete();
extern int MOS2mParam();
extern int MOS2param();
extern int MOS2pzLoad();
extern int MOS2sAcLoad();
extern int MOS2sLoad();
extern void MOS2sPrint();
extern int MOS2sSetup();
extern int MOS2sUpdate();
extern int MOS2setup();
extern int MOS2unsetup();
extern int MOS2temp();
extern int MOS2trunc();
extern int MOS2disto();
extern int MOS2noise();
#endif /* stdc */

4
src/spicelib/devices/mos2/mos2ic.c

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

4
src/spicelib/devices/mos2/mos2load.c

@ -20,9 +20,7 @@ static double sig1[4] = {1.0, -1.0, 1.0, -1.0};
static double sig2[4] = {1.0, 1.0,-1.0, -1.0};
int
MOS2load(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS2load(GENmodel *inModel, CKTcircuit *ckt)
/* actually load the current value into the
* sparse matrix previously provided
*/

7
src/spicelib/devices/mos2/mos2mask.c

@ -11,11 +11,8 @@ Author: 1985 Thomas L. Quarles
#include "suffix.h"
int
MOS2mAsk(ckt,inModel,param,value)
CKTcircuit *ckt;
GENmodel *inModel;
int param;
IFvalue *value;
MOS2mAsk(CKTcircuit *ckt, GENmodel *inModel, int param,
IFvalue *value)
{
MOS2model *model = (MOS2model *)inModel;
switch(param) {

5
src/spicelib/devices/mos2/mos2mdel.c

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

5
src/spicelib/devices/mos2/mos2mpar.c

@ -14,10 +14,7 @@ Author: 1985 Thomas L. Quarles
int
MOS2mParam(param,value,inModel)
int param;
IFvalue *value;
GENmodel *inModel;
MOS2mParam(int param, IFvalue *value, GENmodel *inModel)
{
MOS2model *model = (MOS2model *)inModel;
switch(param) {

9
src/spicelib/devices/mos2/mos2noi.c

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

11
src/spicelib/devices/mos2/mos2par.c

@ -16,11 +16,8 @@ Modified: 2000 AlansFixes
/* ARGSUSED */
int
MOS2param(param,value,inst,select)
int param;
IFvalue *value;
GENinstance *inst;
IFvalue *select;
MOS2param(int param, IFvalue *value, GENinstance *inst,
IFvalue *select)
{
MOS2instance *here = (MOS2instance *)inst;
switch(param) {
@ -28,6 +25,10 @@ MOS2param(param,value,inst,select)
here->MOS2temp = value->rValue+CONSTCtoK;
here->MOS2tempGiven = TRUE;
break;
case MOS2_DTEMP:
here->MOS2dtemp = value->rValue;
here->MOS2dtempGiven = TRUE;
break;
case MOS2_M:
here->MOS2m = value->rValue;
here->MOS2mGiven = TRUE;

5
src/spicelib/devices/mos2/mos2pzld.c

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

6
src/spicelib/devices/mos2/mos2sacl.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
MOS2sAcLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS2sAcLoad(GENmodel *inModel, CKTcircuit *ckt)
{
MOS2model *model = (MOS2model *)inModel;
MOS2instance *here;

10
src/spicelib/devices/mos2/mos2set.c

@ -13,11 +13,7 @@ Modified: 2000 AlansFixes
#include "suffix.h"
int
MOS2setup(matrix,inModel,ckt,states)
SMPmatrix *matrix;
GENmodel *inModel;
CKTcircuit *ckt;
int *states;
MOS2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
/* load the MOS2 device structure with those pointers needed later
* for fast matrix loading
*/
@ -238,9 +234,7 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
}
int
MOS2unsetup(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS2unsetup(GENmodel *inModel, CKTcircuit *ckt)
{
MOS2model *model;
MOS2instance *here;

6
src/spicelib/devices/mos2/mos2sld.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 sensitivity
@ -15,9 +17,7 @@ Author: 1985 Thomas L. Quarles
#include "suffix.h"
int
MOS2sLoad(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS2sLoad(GENmodel *inModel, CKTcircuit *ckt)
{
MOS2model *model = (MOS2model *)inModel;
MOS2instance *here;

6
src/spicelib/devices/mos2/mos2sprt.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)
**********/
#include "ngspice.h"
@ -12,9 +14,7 @@ Modified: 2000 AlansFixes
#include "suffix.h"
void
MOS2sPrint(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS2sPrint(GENmodel *inModel, CKTcircuit *ckt)
/* Pretty print the sensitivity info for all the MOS2
* devices in the circuit.
*/

6
src/spicelib/devices/mos2/mos2sset.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
MOS2sSetup(info,inModel)
SENstruct *info;
GENmodel *inModel;
MOS2sSetup(SENstruct *info, GENmodel *inModel)
/* loop through all the devices and
* allocate parameter #s to design parameters
*/

6
src/spicelib/devices/mos2/mos2supd.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)
**********/
/* update the charge sensitivities and their derivatives */
@ -13,9 +15,7 @@ Author: 1985 Thomas L. Quarles
#include "suffix.h"
int
MOS2sUpdate(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS2sUpdate(GENmodel *inModel, CKTcircuit *ckt)
{
MOS2model *model = (MOS2model *)inModel;
MOS2instance *here;

10
src/spicelib/devices/mos2/mos2temp.c

@ -15,9 +15,7 @@ Modified: 2000 AlansFixes
#define EPSSIL (11.7 * 8.854214871e-12)
int
MOS2temp(inModel,ckt)
GENmodel *inModel;
CKTcircuit *ckt;
MOS2temp(GENmodel *inModel, CKTcircuit *ckt)
{
MOS2model *model = (MOS2model *)inModel;
MOS2instance *here;
@ -130,8 +128,12 @@ MOS2temp(inModel,ckt)
if (here->MOS2owner != ARCHme) continue;
/* perform the parameter defaulting */
if(!here->MOS2dtempGiven) {
here->MOS2dtemp = 0.0;
}
if(!here->MOS2tempGiven) {
here->MOS2temp = ckt->CKTtemp;
here->MOS2temp = ckt->CKTtemp + here->MOS2dtemp;
}
here->MOS2mode = 1;
here->MOS2von = 0;

5
src/spicelib/devices/mos2/mos2trun.c

@ -13,10 +13,7 @@ Author: 1985 Thomas L. Quarles
int
MOS2trunc(inModel,ckt,timeStep)
GENmodel *inModel;
CKTcircuit *ckt;
double *timeStep;
MOS2trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
MOS2model *model = (MOS2model *)inModel;
MOS2instance *here;

Loading…
Cancel
Save