diff --git a/src/spicelib/devices/bjt/bjt.c b/src/spicelib/devices/bjt/bjt.c index 9c8c64d7c..7c0fb832f 100644 --- a/src/spicelib/devices/bjt/bjt.c +++ b/src/spicelib/devices/bjt/bjt.c @@ -221,6 +221,8 @@ IFparm BJTmPTable[] = { /* model parameters */ IOP("tise2", BJT_MOD_TISE2, IF_REAL, "ISE 2. temperature coefficient"), IOP("tisc1", BJT_MOD_TISC1, IF_REAL, "ISC 1. temperature coefficient"), IOP("tisc2", BJT_MOD_TISC2, IF_REAL, "ISC 2. temperature coefficient"), + IOP("tiss1", BJT_MOD_TISS1, IF_REAL, "ISS 1. temperature coefficient"), + IOP("tiss2", BJT_MOD_TISS2, IF_REAL, "ISS 2. temperature coefficient"), IOP("quasimod", BJT_MOD_QUASIMOD, IF_INTEGER, "Temperature equation selector"), IOP("vg", BJT_MOD_EGQS, IF_REAL, "Energy gap for QS temp. dependency"), IOP("cn", BJT_MOD_XRCI, IF_REAL, "Temperature exponent of RCI"), diff --git a/src/spicelib/devices/bjt/bjtdefs.h b/src/spicelib/devices/bjt/bjtdefs.h index 625db4772..9064f7a8c 100644 --- a/src/spicelib/devices/bjt/bjtdefs.h +++ b/src/spicelib/devices/bjt/bjtdefs.h @@ -489,6 +489,8 @@ typedef struct sBJTmodel { /* model structure for a bjt */ double BJTtise2; double BJTtisc1; double BJTtisc2; + double BJTtiss1; + double BJTtiss2; int BJTquasimod; double BJTenergyGapQS; double BJTtempExpRCI; @@ -606,6 +608,8 @@ typedef struct sBJTmodel { /* model structure for a bjt */ unsigned BJTtise2Given : 1; unsigned BJTtisc1Given : 1; unsigned BJTtisc2Given : 1; + unsigned BJTtiss1Given : 1; + unsigned BJTtiss2Given : 1; unsigned BJTquasimodGiven : 1; unsigned BJTenergyGapQSGiven : 1; unsigned BJTtempExpRCIGiven : 1; @@ -757,6 +761,8 @@ enum { BJT_MOD_TISE2, BJT_MOD_TISC1, BJT_MOD_TISC2, + BJT_MOD_TISS1, + BJT_MOD_TISS2, BJT_MOD_QUASIMOD, BJT_MOD_EGQS, BJT_MOD_XRCI, diff --git a/src/spicelib/devices/bjt/bjtmask.c b/src/spicelib/devices/bjt/bjtmask.c index 2034b1826..b68464d02 100644 --- a/src/spicelib/devices/bjt/bjtmask.c +++ b/src/spicelib/devices/bjt/bjtmask.c @@ -390,6 +390,12 @@ BJTmAsk(CKTcircuit *ckt, GENmodel *instPtr, int which, IFvalue *value) case BJT_MOD_TISC2: value->rValue = here->BJTtisc2; return(OK); + case BJT_MOD_TISS1: + value->rValue = here->BJTtiss1; + return(OK); + case BJT_MOD_TISS2: + value->rValue = here->BJTtiss2; + return(OK); case BJT_MOD_QUASIMOD: value->iValue = here->BJTquasimod; return(OK); diff --git a/src/spicelib/devices/bjt/bjtmpar.c b/src/spicelib/devices/bjt/bjtmpar.c index 51409905b..63a369bb6 100644 --- a/src/spicelib/devices/bjt/bjtmpar.c +++ b/src/spicelib/devices/bjt/bjtmpar.c @@ -470,6 +470,14 @@ BJTmParam(int param, IFvalue *value, GENmodel *inModel) mods->BJTtisc2 = value->rValue; mods->BJTtisc2Given = TRUE; break; + case BJT_MOD_TISS1: + mods->BJTtiss1 = value->rValue; + mods->BJTtiss1Given = TRUE; + break; + case BJT_MOD_TISS2: + mods->BJTtiss2 = value->rValue; + mods->BJTtiss2Given = TRUE; + break; case BJT_MOD_QUASIMOD: mods->BJTquasimod = value->iValue; mods->BJTquasimodGiven = TRUE; diff --git a/src/spicelib/devices/bjt/bjtsetup.c b/src/spicelib/devices/bjt/bjtsetup.c index d7c5bbe05..9b8d900cb 100644 --- a/src/spicelib/devices/bjt/bjtsetup.c +++ b/src/spicelib/devices/bjt/bjtsetup.c @@ -335,6 +335,12 @@ BJTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) if(!model->BJTtisc2Given) { model->BJTtisc2 = 0.0; } + if(!model->BJTtiss1Given) { + model->BJTtiss1 = 0.0; + } + if(!model->BJTtiss2Given) { + model->BJTtiss2 = 0.0; + } if(!model->BJTquasimodGiven) { model->BJTquasimod = 0; } diff --git a/src/spicelib/devices/bjt/bjttemp.c b/src/spicelib/devices/bjt/bjttemp.c index eb80b50b5..be4dfa7aa 100644 --- a/src/spicelib/devices/bjt/bjttemp.c +++ b/src/spicelib/devices/bjt/bjttemp.c @@ -175,6 +175,7 @@ BJTtemp(GENmodel *inModel, CKTcircuit *ckt) here->BJTtSubSatCur = model->BJTsubSatCur * factor; } else if (model->BJTtlev == 3) { here->BJTtSatCur = pow(model->BJTsatCur,(1+model->BJTtis1*dt+model->BJTtis2*dt*dt)); + here->BJTtSubSatCur = pow(model->BJTsubSatCur,(1+model->BJTtiss1*dt+model->BJTtiss2*dt*dt)); } if (model->BJTintCollResistGiven) { @@ -273,8 +274,12 @@ BJTtemp(GENmodel *inModel, CKTcircuit *ckt) (1 - here->BJTtjunctionExpBC); here->BJTtVcrit = vt * log(vt / (CONSTroot2*here->BJTtSatCur*here->BJTarea)); - here->BJTtSubVcrit = vt * - log(vt / (CONSTroot2*here->BJTtSubSatCur*here->BJTarea)); + if(model->BJTsubSatCurGiven) { + here->BJTtSubVcrit = vt * + log(vt / (CONSTroot2*here->BJTtSubSatCur*here->BJTarea)); + } else { + here->BJTtSubVcrit = here->BJTtVcrit; + } here->BJTtf2 = exp((1 + here->BJTtjunctionExpBE) * xfc); here->BJTtf3 = 1 - model->BJTdepletionCapCoeff * (1 + here->BJTtjunctionExpBE);