Merge branch 'fix_calcop_transient' into markus_vbic
This commit is contained in:
commit
c428ddb99c
|
|
@ -28,6 +28,12 @@ VBICacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
,Irci_Vbci,Irci_Vbcx,Irbx_Vrbx,Irbi_Vrbi,Irbi_Vbei
|
,Irci_Vbci,Irci_Vbcx,Irbx_Vrbx,Irbi_Vrbi,Irbi_Vbei
|
||||||
,Irbi_Vbci,Ire_Vre,Irbp_Vrbp,Irbp_Vbep,Irbp_Vbci
|
,Irbi_Vbci,Ire_Vre,Irbp_Vrbp,Irbp_Vbep,Irbp_Vbci
|
||||||
,Ibcp_Vbcp,Iccp_Vbep,Irs_Vrs,Iccp_Vbci,Iccp_Vbcp;
|
,Ibcp_Vbcp,Iccp_Vbep,Irs_Vrs,Iccp_Vbci,Iccp_Vbcp;
|
||||||
|
double Ibe_Vrth, Ibex_Vrth, Itzf_Vrth, Itzr_Vrth, Ibc_Vrth
|
||||||
|
,Ibep_Vrth, Ircx_Vrth, Irci_Vrth, Irbx_Vrth, Irbi_Vrth, Ire_Vrth
|
||||||
|
,Irbp_Vrth, Ibcp_Vrth, Iccp_Vrth, Irs_Vrth, Irth_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;
|
||||||
double XQbe_Vbei, XQbe_Vbci, XQbex_Vbex, XQbc_Vbci,
|
double XQbe_Vbei, XQbe_Vbci, XQbex_Vbex, XQbc_Vbci,
|
||||||
XQbcx_Vbcx, XQbep_Vbep, XQbep_Vbci,
|
XQbcx_Vbcx, XQbep_Vbep, XQbep_Vbci,
|
||||||
XQbcp_Vbcp, XQbeo_Vbe, XQbco_Vbc;
|
XQbcp_Vbcp, XQbeo_Vbe, XQbco_Vbc;
|
||||||
|
|
@ -65,6 +71,39 @@ VBICacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
Irbx_Vrbx = *(ckt->CKTstate0 + here->VBICirbx_Vrbx);
|
Irbx_Vrbx = *(ckt->CKTstate0 + here->VBICirbx_Vrbx);
|
||||||
Irs_Vrs = *(ckt->CKTstate0 + here->VBICirs_Vrs);
|
Irs_Vrs = *(ckt->CKTstate0 + here->VBICirs_Vrs);
|
||||||
Ire_Vre = *(ckt->CKTstate0 + here->VBICire_Vre);
|
Ire_Vre = *(ckt->CKTstate0 + here->VBICire_Vre);
|
||||||
|
// new self-heating related entries
|
||||||
|
Ibe_Vrth = *(ckt->CKTstate0 + here->VBICibe_Vrth);
|
||||||
|
Ibex_Vrth = *(ckt->CKTstate0 + here->VBICibex_Vrth);
|
||||||
|
Itzf_Vrth = *(ckt->CKTstate0 + here->VBICitzf_Vrth);
|
||||||
|
Itzr_Vrth = *(ckt->CKTstate0 + here->VBICitzr_Vrth);
|
||||||
|
Ibc_Vrth = *(ckt->CKTstate0 + here->VBICibc_Vrth);
|
||||||
|
Ibep_Vrth = *(ckt->CKTstate0 + here->VBICibep_Vrth);
|
||||||
|
Ircx_Vrth = *(ckt->CKTstate0 + here->VBICircx_Vrth);
|
||||||
|
Irci_Vrth = *(ckt->CKTstate0 + here->VBICirci_Vrth);
|
||||||
|
Irbx_Vrth = *(ckt->CKTstate0 + here->VBICirbx_Vrth);
|
||||||
|
Irbi_Vrth = *(ckt->CKTstate0 + here->VBICirbi_Vrth);
|
||||||
|
Ire_Vrth = *(ckt->CKTstate0 + here->VBICire_Vrth);
|
||||||
|
Irbp_Vrth = *(ckt->CKTstate0 + here->VBICirbp_Vrth);
|
||||||
|
Ibcp_Vrth = *(ckt->CKTstate0 + here->VBICibcp_Vrth);
|
||||||
|
Iccp_Vrth = *(ckt->CKTstate0 + here->VBICiccp_Vrth);
|
||||||
|
Irs_Vrth = *(ckt->CKTstate0 + here->VBICirs_Vrth);
|
||||||
|
Irth_Vrth = *(ckt->CKTstate0 + here->VBICirth_Vrth);
|
||||||
|
Ith_Vrth = *(ckt->CKTstate0 + here->VBICith_Vrth);
|
||||||
|
Ith_Vbei = *(ckt->CKTstate0 + here->VBICith_Vbei);
|
||||||
|
Ith_Vbci = *(ckt->CKTstate0 + here->VBICith_Vbci);
|
||||||
|
Ith_Vcei = *(ckt->CKTstate0 + here->VBICith_Vcei);
|
||||||
|
Ith_Vbex = *(ckt->CKTstate0 + here->VBICith_Vbex);
|
||||||
|
Ith_Vbep = *(ckt->CKTstate0 + here->VBICith_Vbep);
|
||||||
|
Ith_Vbcp = *(ckt->CKTstate0 + here->VBICith_Vbcp);
|
||||||
|
Ith_Vcep = *(ckt->CKTstate0 + here->VBICith_Vcep);
|
||||||
|
Ith_Vrci = *(ckt->CKTstate0 + here->VBICith_Vrci);
|
||||||
|
Ith_Vbcx = *(ckt->CKTstate0 + here->VBICith_Vbcx);
|
||||||
|
Ith_Vrbi = *(ckt->CKTstate0 + here->VBICith_Vrbi);
|
||||||
|
Ith_Vrbp = *(ckt->CKTstate0 + here->VBICith_Vrbp);
|
||||||
|
Ith_Vrcx = *(ckt->CKTstate0 + here->VBICith_Vrcx);
|
||||||
|
Ith_Vrbx = *(ckt->CKTstate0 + here->VBICith_Vrbx);
|
||||||
|
Ith_Vre = *(ckt->CKTstate0 + here->VBICith_Vre);
|
||||||
|
Ith_Vrs = *(ckt->CKTstate0 + here->VBICith_Vrs);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
c The real part
|
c The real part
|
||||||
|
|
@ -231,6 +270,15 @@ c The complex part
|
||||||
XQbcp_Vbcp = *(ckt->CKTstate0 + here->VBICcqbcp) * ckt->CKTomega;
|
XQbcp_Vbcp = *(ckt->CKTstate0 + here->VBICcqbcp) * ckt->CKTomega;
|
||||||
XQbeo_Vbe = *(ckt->CKTstate0 + here->VBICcqbeo) * ckt->CKTomega;
|
XQbeo_Vbe = *(ckt->CKTstate0 + here->VBICcqbeo) * ckt->CKTomega;
|
||||||
XQbco_Vbc = *(ckt->CKTstate0 + here->VBICcqbco) * ckt->CKTomega;
|
XQbco_Vbc = *(ckt->CKTstate0 + here->VBICcqbco) * ckt->CKTomega;
|
||||||
|
|
||||||
|
// self heating related charge changes
|
||||||
|
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;
|
||||||
/*
|
/*
|
||||||
c Stamp element: Qbe
|
c Stamp element: Qbe
|
||||||
*/
|
*/
|
||||||
|
|
@ -297,6 +345,145 @@ c Stamp element: Qbco
|
||||||
*(here->VBICcollBasePtr + 1) += -XQbco_Vbc;
|
*(here->VBICcollBasePtr + 1) += -XQbco_Vbc;
|
||||||
|
|
||||||
|
|
||||||
|
if (here->VBIC_selfheat) {
|
||||||
|
/*
|
||||||
|
c Stamp element: Ibe
|
||||||
|
*/
|
||||||
|
*(here->VBICbaseBItempPtr) += Ibe_Vrth;
|
||||||
|
*(here->VBICemitEItempPtr) += -Ibe_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Ibex
|
||||||
|
*/
|
||||||
|
*(here->VBICbaseBXtempPtr) += Ibex_Vrth;
|
||||||
|
*(here->VBICemitEItempPtr) += -Ibex_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Itzf
|
||||||
|
*/
|
||||||
|
*(here->VBICcollCItempPtr) += Itzf_Vrth;
|
||||||
|
*(here->VBICemitEItempPtr) += -Itzf_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Itzr
|
||||||
|
*/
|
||||||
|
*(here->VBICemitEItempPtr) += Itzr_Vrth;
|
||||||
|
*(here->VBICcollCItempPtr) += -Itzr_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Ibc
|
||||||
|
*/
|
||||||
|
*(here->VBICbaseBItempPtr) += Ibc_Vrth;
|
||||||
|
*(here->VBICcollCItempPtr) += -Ibc_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Ibep
|
||||||
|
*/
|
||||||
|
*(here->VBICbaseBXtempPtr) += Ibep_Vrth;
|
||||||
|
*(here->VBICbaseBPtempPtr) += -Ibep_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Rcx
|
||||||
|
*/
|
||||||
|
*(here->VBICcollTempPtr) += Ircx_Vrth;
|
||||||
|
*(here->VBICcollCXtempPtr) += -Ircx_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Irci
|
||||||
|
*/
|
||||||
|
*(here->VBICcollCXtempPtr) += Irci_Vrth;
|
||||||
|
*(here->VBICcollCItempPtr) += -Irci_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Rbx
|
||||||
|
*/
|
||||||
|
*(here->VBICbaseTempPtr) += Irbx_Vrth;
|
||||||
|
*(here->VBICbaseBXtempPtr) += -Irbx_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Irbi
|
||||||
|
*/
|
||||||
|
*(here->VBICbaseBXtempPtr) += Irbi_Vrth;
|
||||||
|
*(here->VBICbaseBItempPtr) += -Irbi_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Re
|
||||||
|
*/
|
||||||
|
*(here->VBICemitTempPtr) += Ire_Vrth;
|
||||||
|
*(here->VBICemitEItempPtr) += -Ire_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Irbp
|
||||||
|
*/
|
||||||
|
*(here->VBICbaseBPtempPtr) += Irbp_Vrth;
|
||||||
|
*(here->VBICcollCXtempPtr) += -Irbp_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Ibcp
|
||||||
|
*/
|
||||||
|
*(here->VBICsubsSItempPtr) += Ibcp_Vrth;
|
||||||
|
*(here->VBICbaseBPtempPtr) += -Ibcp_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Iccp
|
||||||
|
*/
|
||||||
|
*(here->VBICbaseBXtempPtr) += Iccp_Vrth;
|
||||||
|
*(here->VBICsubsSItempPtr) += -Iccp_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Rs
|
||||||
|
*/
|
||||||
|
*(here->VBICsubsTempPtr) += Irs_Vrth;
|
||||||
|
*(here->VBICsubsSItempPtr) += -Irs_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Rth
|
||||||
|
*/
|
||||||
|
*(here->VBICtempTempPtr) += Irth_Vrth;
|
||||||
|
/*
|
||||||
|
c Stamp element: Ith
|
||||||
|
*/
|
||||||
|
*(here->VBICtempTempPtr) += -Ith_Vrth;
|
||||||
|
|
||||||
|
*(here->VBICtempBaseBIPtr) += -Ith_Vbei;
|
||||||
|
*(here->VBICtempEmitEIPtr) += +Ith_Vbei;
|
||||||
|
*(here->VBICtempBaseBIPtr) += -Ith_Vbci;
|
||||||
|
*(here->VBICtempCollCIPtr) += +Ith_Vbci;
|
||||||
|
*(here->VBICtempCollCIPtr) += -Ith_Vcei;
|
||||||
|
*(here->VBICtempEmitEIPtr) += +Ith_Vcei;
|
||||||
|
*(here->VBICtempBaseBXPtr) += -Ith_Vbex;
|
||||||
|
*(here->VBICtempEmitEIPtr) += +Ith_Vbex;
|
||||||
|
*(here->VBICtempBaseBXPtr) += -Ith_Vbep;
|
||||||
|
*(here->VBICtempBaseBPPtr) += +Ith_Vbep;
|
||||||
|
*(here->VBICtempSubsPtr) += -Ith_Vbcp;
|
||||||
|
*(here->VBICtempBaseBPPtr) += +Ith_Vbcp;
|
||||||
|
*(here->VBICtempBaseBXPtr) += -Ith_Vcep;
|
||||||
|
*(here->VBICtempSubsPtr) += +Ith_Vcep;
|
||||||
|
*(here->VBICtempCollCXPtr) += -Ith_Vrci;
|
||||||
|
*(here->VBICtempCollCIPtr) += +Ith_Vrci;
|
||||||
|
*(here->VBICtempBaseBIPtr) += -Ith_Vbcx;
|
||||||
|
*(here->VBICtempCollCXPtr) += +Ith_Vbcx;
|
||||||
|
*(here->VBICtempBaseBXPtr) += -Ith_Vrbi;
|
||||||
|
*(here->VBICtempBaseBIPtr) += +Ith_Vrbi;
|
||||||
|
*(here->VBICtempBaseBPPtr) += -Ith_Vrbp;
|
||||||
|
*(here->VBICtempCollCXPtr) += +Ith_Vrbp;
|
||||||
|
*(here->VBICtempCollPtr) += -Ith_Vrcx;
|
||||||
|
*(here->VBICtempCollCXPtr) += +Ith_Vrcx;
|
||||||
|
*(here->VBICtempBasePtr) += -Ith_Vrbx;
|
||||||
|
*(here->VBICtempBaseBXPtr) += +Ith_Vrbx;
|
||||||
|
*(here->VBICtempEmitPtr) += -Ith_Vre;
|
||||||
|
*(here->VBICtempEmitEIPtr) += +Ith_Vre;
|
||||||
|
*(here->VBICtempSubsPtr) += -Ith_Vrs;
|
||||||
|
*(here->VBICtempSubsSIPtr) += +Ith_Vrs;
|
||||||
|
|
||||||
|
// //the charges
|
||||||
|
*(here->VBICbaseBItempPtr + 1) += +XQbe_Vrth;
|
||||||
|
*(here->VBICemitEItempPtr + 1) += -XQbe_Vrth;
|
||||||
|
|
||||||
|
*(here->VBICbaseBXtempPtr + 1) += +XQbex_Vrth;
|
||||||
|
*(here->VBICemitEItempPtr + 1) += -XQbex_Vrth;
|
||||||
|
|
||||||
|
*(here->VBICbaseBItempPtr + 1) += +XQbc_Vrth;
|
||||||
|
*(here->VBICcollCItempPtr + 1) += -XQbc_Vrth;
|
||||||
|
|
||||||
|
*(here->VBICbaseBItempPtr + 1) += +XQbcx_Vrth;
|
||||||
|
*(here->VBICcollCXtempPtr + 1) += -XQbcx_Vrth;
|
||||||
|
|
||||||
|
*(here->VBICbaseBXtempPtr + 1) += +XQbep_Vrth;
|
||||||
|
*(here->VBICbaseBPtempPtr + 1) += -XQbep_Vrth;
|
||||||
|
|
||||||
|
*(here->VBICsubsSItempPtr + 1) += +XQbcp_Vrth;
|
||||||
|
*(here->VBICbaseBPtempPtr + 1) += -XQbcp_Vrth;
|
||||||
|
|
||||||
|
*(here->VBICtempTempPtr + 1) += -XQcth_Vrth;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(OK);
|
return(OK);
|
||||||
|
|
|
||||||
|
|
@ -274,89 +274,129 @@ typedef struct sVBICinstance {
|
||||||
|
|
||||||
#define VBICibe VBICstate+9
|
#define VBICibe VBICstate+9
|
||||||
#define VBICibe_Vbei VBICstate+10
|
#define VBICibe_Vbei VBICstate+10
|
||||||
|
#define VBICibe_Vrth VBICstate+11
|
||||||
|
|
||||||
#define VBICibex VBICstate+11
|
#define VBICibex VBICstate+12
|
||||||
#define VBICibex_Vbex VBICstate+12
|
#define VBICibex_Vbex VBICstate+13
|
||||||
|
#define VBICibex_Vrth VBICstate+14
|
||||||
|
|
||||||
#define VBICitzf VBICstate+13
|
#define VBICitzf VBICstate+15
|
||||||
#define VBICitzf_Vbei VBICstate+14
|
#define VBICitzf_Vbei VBICstate+16
|
||||||
#define VBICitzf_Vbci VBICstate+15
|
#define VBICitzf_Vbci VBICstate+17
|
||||||
|
#define VBICitzf_Vrth VBICstate+18
|
||||||
|
|
||||||
#define VBICitzr VBICstate+16
|
#define VBICitzr VBICstate+19
|
||||||
#define VBICitzr_Vbci VBICstate+17
|
#define VBICitzr_Vbci VBICstate+20
|
||||||
#define VBICitzr_Vbei VBICstate+18
|
#define VBICitzr_Vbei VBICstate+21
|
||||||
|
#define VBICitzr_Vrth VBICstate+22
|
||||||
|
|
||||||
#define VBICibc VBICstate+19
|
#define VBICibc VBICstate+23
|
||||||
#define VBICibc_Vbci VBICstate+20
|
#define VBICibc_Vbci VBICstate+24
|
||||||
#define VBICibc_Vbei VBICstate+21
|
#define VBICibc_Vbei VBICstate+25
|
||||||
|
#define VBICibc_Vrth VBICstate+26
|
||||||
|
|
||||||
#define VBICibep VBICstate+22
|
#define VBICibep VBICstate+27
|
||||||
#define VBICibep_Vbep VBICstate+23
|
#define VBICibep_Vbep VBICstate+28
|
||||||
|
#define VBICibep_Vrth VBICstate+29
|
||||||
|
|
||||||
#define VBICirci VBICstate+24
|
#define VBICirci VBICstate+30
|
||||||
#define VBICirci_Vrci VBICstate+25
|
#define VBICirci_Vrci VBICstate+31
|
||||||
#define VBICirci_Vbci VBICstate+26
|
#define VBICirci_Vbci VBICstate+32
|
||||||
#define VBICirci_Vbcx VBICstate+27
|
#define VBICirci_Vbcx VBICstate+33
|
||||||
|
#define VBICirci_Vrth VBICstate+34
|
||||||
|
|
||||||
#define VBICirbi VBICstate+28
|
#define VBICirbi VBICstate+35
|
||||||
#define VBICirbi_Vrbi VBICstate+29
|
#define VBICirbi_Vrbi VBICstate+36
|
||||||
#define VBICirbi_Vbei VBICstate+30
|
#define VBICirbi_Vbei VBICstate+37
|
||||||
#define VBICirbi_Vbci VBICstate+31
|
#define VBICirbi_Vbci VBICstate+38
|
||||||
|
#define VBICirbi_Vrth VBICstate+39
|
||||||
|
|
||||||
#define VBICirbp VBICstate+32
|
#define VBICirbp VBICstate+40
|
||||||
#define VBICirbp_Vrbp VBICstate+33
|
#define VBICirbp_Vrbp VBICstate+41
|
||||||
#define VBICirbp_Vbep VBICstate+34
|
#define VBICirbp_Vbep VBICstate+42
|
||||||
#define VBICirbp_Vbci VBICstate+35
|
#define VBICirbp_Vbci VBICstate+43
|
||||||
|
#define VBICirbp_Vrth VBICstate+44
|
||||||
|
|
||||||
|
|
||||||
#define VBICqbe VBICstate+36
|
#define VBICqbe VBICstate+45
|
||||||
#define VBICcqbe VBICstate+37
|
#define VBICcqbe VBICstate+46
|
||||||
#define VBICcqbeci VBICstate+38
|
#define VBICcqbeci VBICstate+47
|
||||||
|
#define VBICcqbeth VBICstate+48
|
||||||
|
|
||||||
#define VBICqbex VBICstate+39
|
#define VBICqbex VBICstate+49
|
||||||
#define VBICcqbex VBICstate+40
|
#define VBICcqbex VBICstate+50
|
||||||
|
#define VBICcqbexth VBICstate+51
|
||||||
|
|
||||||
#define VBICqbc VBICstate+41
|
#define VBICqbc VBICstate+52
|
||||||
#define VBICcqbc VBICstate+42
|
#define VBICcqbc VBICstate+53
|
||||||
|
#define VBICcqbcth VBICstate+54
|
||||||
|
|
||||||
#define VBICqbcx VBICstate+43
|
#define VBICqbcx VBICstate+55
|
||||||
#define VBICcqbcx VBICstate+44
|
#define VBICcqbcx VBICstate+56
|
||||||
|
#define VBICcqbcxth VBICstate+57
|
||||||
|
|
||||||
#define VBICqbep VBICstate+45
|
#define VBICqbep VBICstate+58
|
||||||
#define VBICcqbep VBICstate+46
|
#define VBICcqbep VBICstate+59
|
||||||
#define VBICcqbepci VBICstate+47
|
#define VBICcqbepci VBICstate+60
|
||||||
|
#define VBICcqbepth VBICstate+61
|
||||||
|
|
||||||
#define VBICqbeo VBICstate+48
|
#define VBICqbeo VBICstate+62
|
||||||
#define VBICcqbeo VBICstate+49
|
#define VBICcqbeo VBICstate+63
|
||||||
#define VBICgqbeo VBICstate+50
|
#define VBICgqbeo VBICstate+64
|
||||||
|
|
||||||
#define VBICqbco VBICstate+51
|
#define VBICqbco VBICstate+65
|
||||||
#define VBICcqbco VBICstate+52
|
#define VBICcqbco VBICstate+66
|
||||||
#define VBICgqbco VBICstate+53
|
#define VBICgqbco VBICstate+67
|
||||||
|
|
||||||
#define VBICibcp VBICstate+54
|
#define VBICibcp VBICstate+68
|
||||||
#define VBICibcp_Vbcp VBICstate+55
|
#define VBICibcp_Vrth VBICstate+69
|
||||||
|
#define VBICibcp_Vbcp VBICstate+70
|
||||||
|
|
||||||
#define VBICiccp VBICstate+56
|
#define VBICiccp VBICstate+71
|
||||||
#define VBICiccp_Vbep VBICstate+57
|
#define VBICiccp_Vbep VBICstate+72
|
||||||
#define VBICiccp_Vbci VBICstate+58
|
#define VBICiccp_Vbci VBICstate+73
|
||||||
#define VBICiccp_Vbcp VBICstate+59
|
#define VBICiccp_Vbcp VBICstate+74
|
||||||
|
#define VBICiccp_Vrth VBICstate+75
|
||||||
|
|
||||||
#define VBICqbcp VBICstate+60
|
#define VBICqbcp VBICstate+76
|
||||||
#define VBICcqbcp VBICstate+61
|
#define VBICcqbcp VBICstate+77
|
||||||
|
#define VBICcqbcpth VBICstate+78
|
||||||
|
|
||||||
#define VBICircx_Vrcx VBICstate+62
|
#define VBICircx_Vrcx VBICstate+79
|
||||||
#define VBICirbx_Vrbx VBICstate+63
|
#define VBICircx_Vrth VBICstate+80
|
||||||
#define VBICirs_Vrs VBICstate+64
|
#define VBICirbx_Vrbx VBICstate+81
|
||||||
#define VBICire_Vre VBICstate+65
|
#define VBICirbx_Vrth VBICstate+82
|
||||||
|
#define VBICirs_Vrs VBICstate+83
|
||||||
|
#define VBICirs_Vrth VBICstate+84
|
||||||
|
#define VBICire_Vre VBICstate+85
|
||||||
|
#define VBICire_Vrth VBICstate+86
|
||||||
|
|
||||||
#define VBICqcth VBICstate+66 /* thermal capacitor charge */
|
#define VBICqcth VBICstate+87 /* thermal capacitor charge */
|
||||||
#define VBICcqcth VBICstate+67 /* thermal capacitor current */
|
#define VBICcqcth VBICstate+88 /* thermal capacitor current */
|
||||||
|
|
||||||
#define VBICvrth VBICstate+68
|
#define VBICvrth VBICstate+89
|
||||||
#define VBICicth_Vrth VBICstate+69
|
#define VBICicth_Vrth VBICstate+90
|
||||||
|
|
||||||
#define VBICnumStates 70
|
#define VBICirth_Vrth VBICstate+91
|
||||||
|
|
||||||
|
#define VBICith_Vrth VBICstate+92
|
||||||
|
#define VBICith_Vrs VBICstate+93
|
||||||
|
#define VBICith_Vbei VBICstate+94
|
||||||
|
#define VBICith_Vbci VBICstate+95
|
||||||
|
#define VBICith_Vcei VBICstate+96
|
||||||
|
#define VBICith_Vbex VBICstate+97
|
||||||
|
#define VBICith_Vbep VBICstate+98
|
||||||
|
#define VBICith_Vbcp VBICstate+99
|
||||||
|
#define VBICith_Vcep VBICstate+100
|
||||||
|
#define VBICith_Vrci VBICstate+101
|
||||||
|
#define VBICith_Vbcx VBICstate+102
|
||||||
|
#define VBICith_Vrbi VBICstate+103
|
||||||
|
#define VBICith_Vrbp VBICstate+104
|
||||||
|
#define VBICith_Vrcx VBICstate+105
|
||||||
|
#define VBICith_Vrbx VBICstate+106
|
||||||
|
#define VBICith_Vre VBICstate+107
|
||||||
|
|
||||||
|
#define VBICnumStates 108
|
||||||
|
|
||||||
/* per model data */
|
/* per model data */
|
||||||
typedef struct sVBICmodel { /* model structure for a vbic */
|
typedef struct sVBICmodel { /* model structure for a vbic */
|
||||||
|
|
|
||||||
|
|
@ -386,6 +386,70 @@ VBICload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
*(ckt->CKTstate1 + here->VBICirs_Vrs);
|
*(ckt->CKTstate1 + here->VBICirs_Vrs);
|
||||||
*(ckt->CKTstate0 + here->VBICire_Vre) =
|
*(ckt->CKTstate0 + here->VBICire_Vre) =
|
||||||
*(ckt->CKTstate1 + here->VBICire_Vre);
|
*(ckt->CKTstate1 + here->VBICire_Vre);
|
||||||
|
*(ckt->CKTstate0 + here->VBICibe_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICibe_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICibex_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICibex_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICitzf_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICitzf_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICitzr_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICitzr_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICibc_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICibc_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICibep_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICibep_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICircx_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICircx_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICirci_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICirci_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICirbx_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICirbx_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICirbi_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICirbi_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICire_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICire_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICirbp_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICirbp_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICibcp_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICibcp_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICiccp_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICiccp_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICirs_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICirs_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICirth_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICirth_Vrth);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbei)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vbei);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbci)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vbci);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vcei)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vcei);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbex)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vbex);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbep)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vbep);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbcp)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vbcp);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vcep)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vcep);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrci)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vrci);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbcx)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vbcx);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrbi)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vrbi);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrbp)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vrbp);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrcx)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vrcx);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrbx)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vrbx);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vre)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vre);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrs)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vrs);
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrth)=
|
||||||
|
*(ckt->CKTstate1 + here->VBICith_Vrth);
|
||||||
if (here->VBIC_selfheat)
|
if (here->VBIC_selfheat)
|
||||||
*(ckt->CKTstate0 + here->VBICqcth) =
|
*(ckt->CKTstate0 + here->VBICqcth) =
|
||||||
*(ckt->CKTstate1 + here->VBICqcth);
|
*(ckt->CKTstate1 + here->VBICqcth);
|
||||||
|
|
@ -610,6 +674,38 @@ VBICload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
Irbx_Vrbx = *(ckt->CKTstate0 + here->VBICirbx_Vrbx);
|
Irbx_Vrbx = *(ckt->CKTstate0 + here->VBICirbx_Vrbx);
|
||||||
Irs_Vrs = *(ckt->CKTstate0 + here->VBICirs_Vrs);
|
Irs_Vrs = *(ckt->CKTstate0 + here->VBICirs_Vrs);
|
||||||
Ire_Vre = *(ckt->CKTstate0 + here->VBICire_Vre);
|
Ire_Vre = *(ckt->CKTstate0 + here->VBICire_Vre);
|
||||||
|
Ibe_Vrth = *(ckt->CKTstate0 + here->VBICibe_Vrth);
|
||||||
|
Ibex_Vrth = *(ckt->CKTstate0 + here->VBICibex_Vrth);
|
||||||
|
Itzf_Vrth = *(ckt->CKTstate0 + here->VBICitzf_Vrth);
|
||||||
|
Itzr_Vrth = *(ckt->CKTstate0 + here->VBICitzr_Vrth);
|
||||||
|
Ibc_Vrth = *(ckt->CKTstate0 + here->VBICibc_Vrth);
|
||||||
|
Ibep_Vrth = *(ckt->CKTstate0 + here->VBICibep_Vrth);
|
||||||
|
Ircx_Vrth = *(ckt->CKTstate0 + here->VBICircx_Vrth);
|
||||||
|
Irci_Vrth = *(ckt->CKTstate0 + here->VBICirci_Vrth);
|
||||||
|
Irbx_Vrth = *(ckt->CKTstate0 + here->VBICirbx_Vrth);
|
||||||
|
Irbi_Vrth = *(ckt->CKTstate0 + here->VBICirbi_Vrth);
|
||||||
|
Ire_Vrth = *(ckt->CKTstate0 + here->VBICire_Vrth);
|
||||||
|
Irbp_Vrth = *(ckt->CKTstate0 + here->VBICirbp_Vrth);
|
||||||
|
Ibcp_Vrth = *(ckt->CKTstate0 + here->VBICibcp_Vrth);
|
||||||
|
Iccp_Vrth = *(ckt->CKTstate0 + here->VBICiccp_Vrth);
|
||||||
|
Irs_Vrth = *(ckt->CKTstate0 + here->VBICirs_Vrth);
|
||||||
|
Irth_Vrth = *(ckt->CKTstate0 + here->VBICirth_Vrth);
|
||||||
|
Ith_Vrth = *(ckt->CKTstate0 + here->VBICith_Vrth);
|
||||||
|
Ith_Vbei = *(ckt->CKTstate0 + here->VBICith_Vbei);
|
||||||
|
Ith_Vbci = *(ckt->CKTstate0 + here->VBICith_Vbci);
|
||||||
|
Ith_Vcei = *(ckt->CKTstate0 + here->VBICith_Vcei);
|
||||||
|
Ith_Vbex = *(ckt->CKTstate0 + here->VBICith_Vbex);
|
||||||
|
Ith_Vbep = *(ckt->CKTstate0 + here->VBICith_Vbep);
|
||||||
|
Ith_Vbcp = *(ckt->CKTstate0 + here->VBICith_Vbcp);
|
||||||
|
Ith_Vcep = *(ckt->CKTstate0 + here->VBICith_Vcep);
|
||||||
|
Ith_Vrci = *(ckt->CKTstate0 + here->VBICith_Vrci);
|
||||||
|
Ith_Vbcx = *(ckt->CKTstate0 + here->VBICith_Vbcx);
|
||||||
|
Ith_Vrbi = *(ckt->CKTstate0 + here->VBICith_Vrbi);
|
||||||
|
Ith_Vrbp = *(ckt->CKTstate0 + here->VBICith_Vrbp);
|
||||||
|
Ith_Vrcx = *(ckt->CKTstate0 + here->VBICith_Vrcx);
|
||||||
|
Ith_Vrbx = *(ckt->CKTstate0 + here->VBICith_Vrbx);
|
||||||
|
Ith_Vre = *(ckt->CKTstate0 + here->VBICith_Vre);
|
||||||
|
Ith_Vrs = *(ckt->CKTstate0 + here->VBICith_Vrs);
|
||||||
goto load;
|
goto load;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
@ -734,6 +830,12 @@ VBICload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
*(ckt->CKTstate0 + here->VBICcqbeo) = Qbeo_Vbe;
|
*(ckt->CKTstate0 + here->VBICcqbeo) = Qbeo_Vbe;
|
||||||
*(ckt->CKTstate0 + here->VBICcqbco) = Qbco_Vbc;
|
*(ckt->CKTstate0 + here->VBICcqbco) = Qbco_Vbc;
|
||||||
*(ckt->CKTstate0 + here->VBICcqbcp) = Qbcp_Vbcp;
|
*(ckt->CKTstate0 + here->VBICcqbcp) = Qbcp_Vbcp;
|
||||||
|
*(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;
|
||||||
if (here->VBIC_selfheat)
|
if (here->VBIC_selfheat)
|
||||||
*(ckt->CKTstate0 + here->VBICcqcth) = Qcth_Vrth;
|
*(ckt->CKTstate0 + here->VBICcqcth) = Qcth_Vrth;
|
||||||
continue; /* go to 1000 */
|
continue; /* go to 1000 */
|
||||||
|
|
@ -814,6 +916,19 @@ VBICload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
*(ckt->CKTstate0 + here->VBICcqbep);
|
*(ckt->CKTstate0 + here->VBICcqbep);
|
||||||
*(ckt->CKTstate1 + here->VBICcqbcp) =
|
*(ckt->CKTstate1 + here->VBICcqbcp) =
|
||||||
*(ckt->CKTstate0 + here->VBICcqbcp);
|
*(ckt->CKTstate0 + here->VBICcqbcp);
|
||||||
|
*(ckt->CKTstate1 + here->VBICcqbeth) =
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbeth);
|
||||||
|
*(ckt->CKTstate1 + here->VBICcqbexth) =
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbexth);
|
||||||
|
*(ckt->CKTstate1 + here->VBICcqbcth) =
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbcth);
|
||||||
|
*(ckt->CKTstate1 + here->VBICcqbcxth) =
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbcxth);
|
||||||
|
*(ckt->CKTstate1 + here->VBICcqbepth) =
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbepth);
|
||||||
|
*(ckt->CKTstate1 + here->VBICcqbcpth) =
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbepth);
|
||||||
|
|
||||||
if (here->VBIC_selfheat)
|
if (here->VBIC_selfheat)
|
||||||
*(ckt->CKTstate1 + here->VBICcqcth) =
|
*(ckt->CKTstate1 + here->VBICcqcth) =
|
||||||
*(ckt->CKTstate0 + here->VBICcqcth);
|
*(ckt->CKTstate0 + here->VBICcqcth);
|
||||||
|
|
@ -900,7 +1015,40 @@ VBICload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
*(ckt->CKTstate0 + here->VBICcqcth) = Icth;
|
*(ckt->CKTstate0 + here->VBICcqcth) = Icth;
|
||||||
*(ckt->CKTstate0 + here->VBICicth_Vrth) = Icth_Vrth;
|
*(ckt->CKTstate0 + here->VBICicth_Vrth) = Icth_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICibe_Vrth)=Ibe_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICibex_Vrth)=Ibex_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICitzf_Vrth)=Itzf_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICitzr_Vrth)=Itzr_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICibc_Vrth)=Ibc_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICibep_Vrth)=Ibep_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICircx_Vrth)=Ircx_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICirci_Vrth)=Irci_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICirbx_Vrth)=Irbx_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICirbi_Vrth)=Irbi_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICire_Vrth)=Ire_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICirbp_Vrth)=Irbp_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICibcp_Vrth)=Ibcp_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICiccp_Vrth)=Iccp_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICirs_Vrth)=Irs_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICirth_Vrth)=Irth_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrth)=Ith_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbei)=Ith_Vbei;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbci)=Ith_Vbci;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vcei)=Ith_Vcei;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbex)=Ith_Vbex;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbep)=Ith_Vbep;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbcp)=Ith_Vbcp;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vcep)=Ith_Vcep;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrci)=Ith_Vrci;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vbcx)=Ith_Vbcx;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrbi)=Ith_Vrbi;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrbp)=Ith_Vrbp;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrcx)=Ith_Vrcx;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrbx)=Ith_Vrbx;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vre)=Ith_Vre;
|
||||||
|
*(ckt->CKTstate0 + here->VBICith_Vrs)=Ith_Vrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
load:
|
load:
|
||||||
/*
|
/*
|
||||||
* load current excitation vector and matrix
|
* load current excitation vector and matrix
|
||||||
|
|
|
||||||
|
|
@ -479,10 +479,6 @@ VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
||||||
else
|
else
|
||||||
here->VBIC_selfheat = 0;
|
here->VBIC_selfheat = 0;
|
||||||
|
|
||||||
if((model->VBICthermalResistGiven) && (model->VBICthermalCapacitance < 1e-12))
|
|
||||||
model->VBICthermalCapacitance = 1e-12;
|
|
||||||
|
|
||||||
|
|
||||||
if(here->VBICcollCINode == 0) {
|
if(here->VBICcollCINode == 0) {
|
||||||
error = CKTmkVolt(ckt, &tmp, here->VBICname, "collCI");
|
error = CKTmkVolt(ckt, &tmp, here->VBICname, "collCI");
|
||||||
if(error) return(error);
|
if(error) return(error);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue