diff --git a/src/spicelib/devices/vbic/vbicacld.c b/src/spicelib/devices/vbic/vbicacld.c index d9cfa892e..ada696e19 100644 --- a/src/spicelib/devices/vbic/vbicacld.c +++ b/src/spicelib/devices/vbic/vbicacld.c @@ -37,6 +37,7 @@ VBICacLoad(GENmodel *inModel, CKTcircuit *ckt) Ibcp_Vrth, Iccp_Vrth, Irs_Vrth, Irth_Vrth, Icth_Vrth, Ith_Vrth, Ith_Vbei, Ith_Vbci, Ith_Vcei, Ith_Vbex, Ith_Vbep, Ith_Vbcp, Ith_Vcep, Ith_Vrci, Ith_Vbcx, Ith_Vrbi, Ith_Vrbp, Ith_Vrcx, Ith_Vrbx, Ith_Vre, Ith_Vrs; + double XQcth_Vrth, XQbe_Vrth, XQbex_Vrth, XQbc_Vrth, XQbcx_Vrth, XQbep_Vrth, XQbcp_Vrth; /* loop through all the models */ for( ; model != NULL; model = VBICnextModel(model)) { @@ -459,13 +460,23 @@ c Stamp element: Qbco *(here->VBICbaseCollPtr + 1) += -XQbco_Vbc; *(here->VBICcollBasePtr + 1) += -XQbco_Vbc; - - if (here->VBIC_selfheat) { + XQcth_Vrth = *(ckt->CKTstate0 + here->VBICcqcth) * ckt->CKTomega; + XQbe_Vrth = *(ckt->CKTstate0 + here->VBICcqbeth) * ckt->CKTomega; + XQbex_Vrth = *(ckt->CKTstate0 + here->VBICcqbexth) * ckt->CKTomega; + XQbc_Vrth = *(ckt->CKTstate0 + here->VBICcqbcth) * ckt->CKTomega; + XQbcx_Vrth = *(ckt->CKTstate0 + here->VBICcqbcxth) * ckt->CKTomega; + XQbep_Vrth = *(ckt->CKTstate0 + here->VBICcqbepth) * ckt->CKTomega; + XQbcp_Vrth = *(ckt->CKTstate0 + here->VBICcqbcpth) * ckt->CKTomega; - } - +// *(here->VBICtempTempPtr + 1) += XQcth_Vrth; +// +// *(here->VBICbaseBIBaseBIPtr + 1) += XQbe_Vrth; +// *(here->VBICbaseBItempPtr + 1) += -XQbe_Vrth; +// *(here->VBICemitEIBaseBIPtr + 1) += -XQbe_Vrth; +// *(here->VBICemitEItempPtr + 1) += XQbe_Vrth; + } } } diff --git a/src/spicelib/devices/vbic/vbicdefs.h b/src/spicelib/devices/vbic/vbicdefs.h index b6a54203c..76bd8b81b 100644 --- a/src/spicelib/devices/vbic/vbicdefs.h +++ b/src/spicelib/devices/vbic/vbicdefs.h @@ -466,7 +466,14 @@ typedef struct sVBICinstance { #define VBICith_Vre VBICstate+100 #define VBICith_Vrs VBICstate+101 -#define VBICnumStates 102 +#define VBICcqbeth VBICstate+102 +#define VBICcqbexth VBICstate+103 +#define VBICcqbcth VBICstate+104 +#define VBICcqbcxth VBICstate+105 +#define VBICcqbepth VBICstate+106 +#define VBICcqbcpth VBICstate+107 + +#define VBICnumStates 108 /* per model data */ typedef struct sVBICmodel { /* model structure for a vbic */ diff --git a/src/spicelib/devices/vbic/vbicload.c b/src/spicelib/devices/vbic/vbicload.c index 43c83b4ef..b01311209 100644 --- a/src/spicelib/devices/vbic/vbicload.c +++ b/src/spicelib/devices/vbic/vbicload.c @@ -706,8 +706,9 @@ VBICload(GENmodel *inModel, CKTcircuit *ckt) *(ckt->CKTstate0 + here->VBICqbeo) = Qbeo; *(ckt->CKTstate0 + here->VBICqbco) = Qbco; *(ckt->CKTstate0 + here->VBICqbcp) = Qbcp; - if (here->VBIC_selfheat) + if (here->VBIC_selfheat) { *(ckt->CKTstate0 + here->VBICqcth) = Qcth; + } here->VBICcapbe = Qbe_Vbei; here->VBICcapbex = Qbex_Vbex; @@ -716,7 +717,7 @@ VBICload(GENmodel *inModel, CKTcircuit *ckt) here->VBICcapbep = Qbep_Vbep; here->VBICcapbcp = Qbcp_Vbcp; if (here->VBIC_selfheat) - here->VBICcapcth = Qcth_Vrth; + here->VBICcapcth = Qcth_Vrth; /* * store small-signal parameters @@ -734,8 +735,15 @@ VBICload(GENmodel *inModel, CKTcircuit *ckt) *(ckt->CKTstate0 + here->VBICcqbeo) = Qbeo_Vbe; *(ckt->CKTstate0 + here->VBICcqbco) = Qbco_Vbc; *(ckt->CKTstate0 + here->VBICcqbcp) = Qbcp_Vbcp; - if (here->VBIC_selfheat) + if (here->VBIC_selfheat) { *(ckt->CKTstate0 + here->VBICcqcth) = Qcth_Vrth; + *(ckt->CKTstate0 + here->VBICcqbeth) = Qbe_Vrth; + *(ckt->CKTstate0 + here->VBICcqbexth) = Qbex_Vrth; + *(ckt->CKTstate0 + here->VBICcqbcth) = Qbc_Vrth; + *(ckt->CKTstate0 + here->VBICcqbcxth) = Qbcx_Vrth; + *(ckt->CKTstate0 + here->VBICcqbepth) = Qbep_Vrth; + *(ckt->CKTstate0 + here->VBICcqbcpth) = Qbcp_Vrth; + } continue; /* go to 1000 */ } /*