Merge branch 'pre-master-45' of ssh://git.code.sf.net/p/ngspice/ngspice into pre-master-45
This commit is contained in:
commit
bd2a2144dc
|
|
@ -42,6 +42,10 @@ IFparm VBICpTable[] = { /* parameters */
|
|||
OP("ib", VBIC_QUEST_CB, IF_REAL, "Base current"),
|
||||
OP("ie", VBIC_QUEST_CE, IF_REAL, "Emitter current"),
|
||||
OP("is", VBIC_QUEST_CS, IF_REAL, "Substrate current"),
|
||||
OP("p", VBIC_QUEST_POWER,IF_REAL, "Power dissipation"),
|
||||
OPR("power",VBIC_QUEST_POWER,IF_REAL, "Power dissipation"),
|
||||
OP("beta", VBIC_QUEST_BETA, IF_REAL, "CE current gain DC"),
|
||||
OPR("betad",VBIC_QUEST_BETA, IF_REAL, "CE current gain DC"),
|
||||
OP("gm", VBIC_QUEST_GM, IF_REAL, "Small signal transconductance dIc/dVbe"),
|
||||
OP("go", VBIC_QUEST_GO, IF_REAL, "Small signal output conductance dIc/dVbc"),
|
||||
OP("gpi", VBIC_QUEST_GPI, IF_REAL, "Small signal input conductance dIb/dVbe"),
|
||||
|
|
@ -53,15 +57,8 @@ IFparm VBICpTable[] = { /* parameters */
|
|||
OP("cbcx", VBIC_QUEST_CBCX, IF_REAL, "External Base to collector capacitance"),
|
||||
OP("cbep", VBIC_QUEST_CBEP, IF_REAL, "Parasitic Base to emitter capacitance"),
|
||||
OP("cbcp", VBIC_QUEST_CBCP, IF_REAL, "Parasitic Base to collector capacitance"),
|
||||
OP("p", VBIC_QUEST_POWER,IF_REAL, "Power dissipation"),
|
||||
OPU("geqcb",VBIC_QUEST_GEQCB,IF_REAL, "Internal C-B-base cap. equiv. cond."),
|
||||
OPU("geqbx",VBIC_QUEST_GEQBX,IF_REAL, "External C-B-base cap. equiv. cond."),
|
||||
OPU("qbe", VBIC_QUEST_QBE, IF_REAL, "Charge storage B-E junction"),
|
||||
OPU("cqbe", VBIC_QUEST_CQBE, IF_REAL, "Cap. due to charge storage in B-E jct."),
|
||||
OPU("qbc", VBIC_QUEST_QBC, IF_REAL, "Charge storage B-C junction"),
|
||||
OPU("cqbc", VBIC_QUEST_CQBC, IF_REAL, "Cap. due to charge storage in B-C jct."),
|
||||
OPU("qbx", VBIC_QUEST_QBX, IF_REAL, "Charge storage B-X junction"),
|
||||
OPU("cqbx", VBIC_QUEST_CQBX, IF_REAL, "Cap. due to charge storage in B-X jct.")
|
||||
};
|
||||
|
||||
IFparm VBICmPTable[] = { /* model parameters */
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ VBICacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
VBICinstance *here;
|
||||
VBICmodel *model = (VBICmodel*)inModel;
|
||||
double Ibe_Vbei,Ibex_Vbex
|
||||
,Itzf_Vbei,Itzf_Vbci,Itzr_Vbci,Itzr_Vbei,Ibc_Vbci
|
||||
,Iciei_Vbei,Iciei_Vbci,Ibc_Vbci
|
||||
,Ibc_Vbei,Ibep_Vbep,Ircx_Vrcx,Irci_Vrci
|
||||
,Irci_Vbci,Irci_Vbcx,Irbx_Vrbx,Irbi_Vrbi,Irbi_Vbei
|
||||
,Irbi_Vbci,Ire_Vre,Irbp_Vrbp,Irbp_Vbep,Irbp_Vbci
|
||||
|
|
@ -32,7 +32,7 @@ VBICacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
XQbcx_Vbcx, XQbep_Vbep, XQbep_Vbci,
|
||||
XQbcp_Vbcp, XQbeo_Vbe, XQbco_Vbc;
|
||||
|
||||
double Ibe_Vrth, Ibex_Vrth, Itzf_Vrth=0.0, Itzr_Vrth, Ibc_Vrth, Ibep_Vrth,
|
||||
double Ibe_Vrth, Ibex_Vrth, Iciei_Vrth, Iciei_Vxf2, 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,
|
||||
|
|
@ -40,42 +40,66 @@ VBICacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double XQcth_Vrth, XQbe_Vrth, XQbex_Vrth, XQbc_Vrth, XQbcx_Vrth, XQbep_Vrth, XQbcp_Vrth;
|
||||
|
||||
//NQS
|
||||
double Itxf_Vrxf, Ibc_Vrxf, Ith_Vrxf, Ixzf_Vrth, Ixxf_Vrxf, XQcxf_Vcxf;
|
||||
double Ixzf_Vbei, Ixzf_Vbci, Xl;
|
||||
double XQxf1_Vxf1;
|
||||
double XQxf2_Vxf2;
|
||||
|
||||
double Ixf1_Vbei;
|
||||
double Ixf1_Vbci;
|
||||
double Ixf1_Vxf2;
|
||||
double Ixf1_Vxf1;
|
||||
double Ixf1_Vrth;
|
||||
|
||||
double Ixf2_Vbei;
|
||||
double Ixf2_Vbci;
|
||||
double Ixf2_Vxf2;
|
||||
double Ixf2_Vxf1;
|
||||
double Ixf2_Vrth;
|
||||
|
||||
/* loop through all the models */
|
||||
for( ; model != NULL; model = VBICnextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for( here = VBICinstances(model); here!= NULL;
|
||||
for( here = VBICinstances(model); here!= NULL;
|
||||
here = VBICnextInstance(here)) {
|
||||
|
||||
Ibe_Vbei = *(ckt->CKTstate0 + here->VBICibe_Vbei);
|
||||
Ibex_Vbex = *(ckt->CKTstate0 + here->VBICibex_Vbex);
|
||||
Itzf_Vbei = *(ckt->CKTstate0 + here->VBICitzf_Vbei);
|
||||
Itzf_Vbci = *(ckt->CKTstate0 + here->VBICitzf_Vbci);
|
||||
Itzr_Vbci = *(ckt->CKTstate0 + here->VBICitzr_Vbci);
|
||||
Itzr_Vbei = *(ckt->CKTstate0 + here->VBICitzr_Vbei);
|
||||
Ibc_Vbci = *(ckt->CKTstate0 + here->VBICibc_Vbci);
|
||||
Ibc_Vbei = *(ckt->CKTstate0 + here->VBICibc_Vbei);
|
||||
Ibep_Vbep = *(ckt->CKTstate0 + here->VBICibep_Vbep);
|
||||
Irci_Vrci = *(ckt->CKTstate0 + here->VBICirci_Vrci);
|
||||
Irci_Vbci = *(ckt->CKTstate0 + here->VBICirci_Vbci);
|
||||
Irci_Vbcx = *(ckt->CKTstate0 + here->VBICirci_Vbcx);
|
||||
Irbi_Vrbi = *(ckt->CKTstate0 + here->VBICirbi_Vrbi);
|
||||
Irbi_Vbei = *(ckt->CKTstate0 + here->VBICirbi_Vbei);
|
||||
Irbi_Vbci = *(ckt->CKTstate0 + here->VBICirbi_Vbci);
|
||||
Irbp_Vrbp = *(ckt->CKTstate0 + here->VBICirbp_Vrbp);
|
||||
Irbp_Vbep = *(ckt->CKTstate0 + here->VBICirbp_Vbep);
|
||||
Irbp_Vbci = *(ckt->CKTstate0 + here->VBICirbp_Vbci);
|
||||
Ibcp_Vbcp = *(ckt->CKTstate0 + here->VBICibcp_Vbcp);
|
||||
Iccp_Vbep = *(ckt->CKTstate0 + here->VBICiccp_Vbep);
|
||||
Iccp_Vbci = *(ckt->CKTstate0 + here->VBICiccp_Vbci);
|
||||
Iccp_Vbcp = *(ckt->CKTstate0 + here->VBICiccp_Vbcp);
|
||||
Ircx_Vrcx = *(ckt->CKTstate0 + here->VBICircx_Vrcx);
|
||||
Irbx_Vrbx = *(ckt->CKTstate0 + here->VBICirbx_Vrbx);
|
||||
Irs_Vrs = *(ckt->CKTstate0 + here->VBICirs_Vrs);
|
||||
Ire_Vre = *(ckt->CKTstate0 + here->VBICire_Vre);
|
||||
Ibe_Vbei = *(ckt->CKTstate0 + here->VBICibe_Vbei);
|
||||
Ibex_Vbex = *(ckt->CKTstate0 + here->VBICibex_Vbex);
|
||||
Iciei_Vbei = *(ckt->CKTstate0 + here->VBICiciei_Vbei);
|
||||
Iciei_Vbci = *(ckt->CKTstate0 + here->VBICiciei_Vbci);
|
||||
Iciei_Vrth = *(ckt->CKTstate0 + here->VBICiciei_Vrth);
|
||||
Iciei_Vxf2 = *(ckt->CKTstate0 + here->VBICiciei_Vxf2);
|
||||
Ibc_Vbci = *(ckt->CKTstate0 + here->VBICibc_Vbci);
|
||||
Ibc_Vbei = *(ckt->CKTstate0 + here->VBICibc_Vbei);
|
||||
Ibep_Vbep = *(ckt->CKTstate0 + here->VBICibep_Vbep);
|
||||
Irci_Vrci = *(ckt->CKTstate0 + here->VBICirci_Vrci);
|
||||
Irci_Vbci = *(ckt->CKTstate0 + here->VBICirci_Vbci);
|
||||
Irci_Vbcx = *(ckt->CKTstate0 + here->VBICirci_Vbcx);
|
||||
Irbi_Vrbi = *(ckt->CKTstate0 + here->VBICirbi_Vrbi);
|
||||
Irbi_Vbei = *(ckt->CKTstate0 + here->VBICirbi_Vbei);
|
||||
Irbi_Vbci = *(ckt->CKTstate0 + here->VBICirbi_Vbci);
|
||||
Irbp_Vrbp = *(ckt->CKTstate0 + here->VBICirbp_Vrbp);
|
||||
Irbp_Vbep = *(ckt->CKTstate0 + here->VBICirbp_Vbep);
|
||||
Irbp_Vbci = *(ckt->CKTstate0 + here->VBICirbp_Vbci);
|
||||
Ibcp_Vbcp = *(ckt->CKTstate0 + here->VBICibcp_Vbcp);
|
||||
Iccp_Vbep = *(ckt->CKTstate0 + here->VBICiccp_Vbep);
|
||||
Iccp_Vbci = *(ckt->CKTstate0 + here->VBICiccp_Vbci);
|
||||
Iccp_Vbcp = *(ckt->CKTstate0 + here->VBICiccp_Vbcp);
|
||||
Ircx_Vrcx = *(ckt->CKTstate0 + here->VBICircx_Vrcx);
|
||||
Irbx_Vrbx = *(ckt->CKTstate0 + here->VBICirbx_Vrbx);
|
||||
Irs_Vrs = *(ckt->CKTstate0 + here->VBICirs_Vrs);
|
||||
Ire_Vre = *(ckt->CKTstate0 + here->VBICire_Vre);
|
||||
|
||||
Ixf1_Vbei = *(ckt->CKTstate0 + here->VBICixf1_Vbei);
|
||||
Ixf1_Vbci = *(ckt->CKTstate0 + here->VBICixf1_Vbci);
|
||||
Ixf1_Vxf2 = *(ckt->CKTstate0 + here->VBICixf1_Vxf2);
|
||||
Ixf1_Vxf1 = *(ckt->CKTstate0 + here->VBICixf1_Vxf1);
|
||||
Ixf1_Vrth = *(ckt->CKTstate0 + here->VBICixf1_Vrth);
|
||||
|
||||
Ixf2_Vbei = *(ckt->CKTstate0 + here->VBICixf2_Vbei);
|
||||
Ixf2_Vbci = *(ckt->CKTstate0 + here->VBICixf2_Vbci);
|
||||
Ixf2_Vxf2 = *(ckt->CKTstate0 + here->VBICixf2_Vxf2);
|
||||
Ixf2_Vxf1 = *(ckt->CKTstate0 + here->VBICixf2_Vxf1);
|
||||
Ixf2_Vrth = *(ckt->CKTstate0 + here->VBICixf2_Vrth);
|
||||
|
||||
/*
|
||||
c The real part
|
||||
|
|
@ -94,32 +118,22 @@ c Stamp element: Ibex
|
|||
*(here->VBICbaseBXEmitEIPtr) += -Ibex_Vbex;
|
||||
*(here->VBICemitEIBaseBXPtr) += -Ibex_Vbex;
|
||||
*(here->VBICemitEIEmitEIPtr) += Ibex_Vbex;
|
||||
|
||||
if (!here->VBIC_excessPhase) {
|
||||
/*
|
||||
c Stamp element: Itzf
|
||||
c Stamp element: Iciei
|
||||
*/
|
||||
*(here->VBICcollCIBaseBIPtr) += Itzf_Vbei;
|
||||
*(here->VBICcollCIEmitEIPtr) += -Itzf_Vbei;
|
||||
*(here->VBICcollCIBaseBIPtr) += Itzf_Vbci;
|
||||
*(here->VBICcollCICollCIPtr) += -Itzf_Vbci;
|
||||
*(here->VBICemitEIBaseBIPtr) += -Itzf_Vbei;
|
||||
*(here->VBICemitEIEmitEIPtr) += Itzf_Vbei;
|
||||
*(here->VBICemitEIBaseBIPtr) += -Itzf_Vbci;
|
||||
*(here->VBICemitEICollCIPtr) += Itzf_Vbci;
|
||||
*(here->VBICcollCIBaseBIPtr) += Iciei_Vbei;
|
||||
*(here->VBICcollCIEmitEIPtr) += -Iciei_Vbei;
|
||||
*(here->VBICcollCIBaseBIPtr) += Iciei_Vbci;
|
||||
*(here->VBICcollCICollCIPtr) += -Iciei_Vbci;
|
||||
*(here->VBICemitEIBaseBIPtr) += -Iciei_Vbei;
|
||||
*(here->VBICemitEIEmitEIPtr) += Iciei_Vbei;
|
||||
*(here->VBICemitEIBaseBIPtr) += -Iciei_Vbci;
|
||||
*(here->VBICemitEICollCIPtr) += Iciei_Vbci;
|
||||
if (here->VBIC_excessPhase) {
|
||||
*(here->VBICcollCIXf2Ptr) += Iciei_Vxf2;
|
||||
*(here->VBICemitEIXf2Ptr) += -Iciei_Vxf2;
|
||||
}
|
||||
/*
|
||||
c Stamp element: Itzr
|
||||
*/
|
||||
*(here->VBICemitEIBaseBIPtr) += Itzr_Vbei;
|
||||
*(here->VBICemitEIEmitEIPtr) += -Itzr_Vbei;
|
||||
*(here->VBICemitEIBaseBIPtr) += Itzr_Vbci;
|
||||
*(here->VBICemitEICollCIPtr) += -Itzr_Vbci;
|
||||
*(here->VBICcollCIBaseBIPtr) += -Itzr_Vbei;
|
||||
*(here->VBICcollCIEmitEIPtr) += Itzr_Vbei;
|
||||
*(here->VBICcollCIBaseBIPtr) += -Itzr_Vbci;
|
||||
*(here->VBICcollCICollCIPtr) += Itzr_Vbci;
|
||||
/*
|
||||
c Stamp element: Ibc
|
||||
*/
|
||||
*(here->VBICbaseBIBaseBIPtr) += Ibc_Vbci;
|
||||
|
|
@ -145,7 +159,7 @@ c Stamp element: Rcx
|
|||
*(here->VBICcollCXCollPtr) += -Ircx_Vrcx;
|
||||
*(here->VBICcollCollCXPtr) += -Ircx_Vrcx;
|
||||
/*
|
||||
c Stamp element: Irci
|
||||
c Stamp element: Rci
|
||||
*/
|
||||
*(here->VBICcollCXCollCXPtr) += Irci_Vrci;
|
||||
*(here->VBICcollCXCollCIPtr) += -Irci_Vrci;
|
||||
|
|
@ -167,7 +181,7 @@ c Stamp element: Rbx
|
|||
*(here->VBICbaseBXBasePtr) += -Irbx_Vrbx;
|
||||
*(here->VBICbaseBaseBXPtr) += -Irbx_Vrbx;
|
||||
/*
|
||||
c Stamp element: Irbi
|
||||
c Stamp element: Rbi
|
||||
*/
|
||||
*(here->VBICbaseBXBaseBXPtr) += Irbi_Vrbi;
|
||||
*(here->VBICbaseBXBaseBIPtr) += -Irbi_Vrbi;
|
||||
|
|
@ -189,7 +203,7 @@ c Stamp element: Re
|
|||
*(here->VBICemitEIEmitPtr) += -Ire_Vre;
|
||||
*(here->VBICemitEmitEIPtr) += -Ire_Vre;
|
||||
/*
|
||||
c Stamp element: Irbp
|
||||
c Stamp element: Rbp
|
||||
*/
|
||||
*(here->VBICbaseBPBaseBPPtr) += Irbp_Vrbp;
|
||||
*(here->VBICbaseBPCollCXPtr) += -Irbp_Vrbp;
|
||||
|
|
@ -237,9 +251,6 @@ c Stamp element: Rs
|
|||
|
||||
Ibe_Vrth = here->VBICibe_Vrth;
|
||||
Ibex_Vrth = here->VBICibex_Vrth;
|
||||
if (!here->VBIC_excessPhase)
|
||||
Itzf_Vrth = here->VBICitzf_vrth;
|
||||
Itzr_Vrth = here->VBICitzr_Vrth;
|
||||
Ibc_Vrth = here->VBICibc_Vrth;
|
||||
Ibep_Vrth = here->VBICibep_Vrth;
|
||||
Ircx_Vrth = here->VBICircx_Vrth;
|
||||
|
|
@ -279,19 +290,11 @@ c Stamp element: Ibex
|
|||
*/
|
||||
*(here->VBICbaseBXtempPtr) += Ibex_Vrth;
|
||||
*(here->VBICemitEItempPtr) += -Ibex_Vrth;
|
||||
|
||||
if (!here->VBIC_excessPhase) {
|
||||
/*
|
||||
c Stamp element: Itzf
|
||||
c Stamp element: Iciei
|
||||
*/
|
||||
*(here->VBICcollCItempPtr) += Itzf_Vrth;
|
||||
*(here->VBICemitEItempPtr) += -Itzf_Vrth;
|
||||
}
|
||||
/*
|
||||
c Stamp element: Itzr
|
||||
*/
|
||||
*(here->VBICemitEItempPtr) += Itzr_Vrth;
|
||||
*(here->VBICcollCItempPtr) += -Itzr_Vrth;
|
||||
*(here->VBICcollCItempPtr) += Iciei_Vrth;
|
||||
*(here->VBICemitEItempPtr) += -Iciei_Vrth;
|
||||
/*
|
||||
c Stamp element: Ibc
|
||||
*/
|
||||
|
|
@ -386,44 +389,22 @@ c Stamp element: Ith
|
|||
*(here->VBICtempEmitEIPtr) += +Ith_Vre;
|
||||
*(here->VBICtempSubsPtr) += -Ith_Vrs;
|
||||
*(here->VBICtempSubsSIPtr) += +Ith_Vrs;
|
||||
if (here->VBIC_excessPhase) {
|
||||
Ith_Vrxf = *(ckt->CKTstate0 + here->VBICith_Vrxf);
|
||||
*(here->VBICtempXf2Ptr) += +Ith_Vrxf;
|
||||
}
|
||||
}
|
||||
|
||||
if (here->VBIC_excessPhase) {
|
||||
Itxf_Vrxf = *(ckt->CKTstate0 + here->VBICitxf_Vrxf);
|
||||
Ibc_Vrxf = *(ckt->CKTstate0 + here->VBICibc_Vrxf);
|
||||
Ixzf_Vbei = *(ckt->CKTstate0 + here->VBICixzf_Vbei);
|
||||
Ixzf_Vbci = *(ckt->CKTstate0 + here->VBICixzf_Vbci);
|
||||
Ixxf_Vrxf = *(ckt->CKTstate0 + here->VBICixxf_Vrxf);
|
||||
/*
|
||||
c Stamp element: Itxf
|
||||
*/
|
||||
*(here->VBICcollCIXf2Ptr) += Itxf_Vrxf;
|
||||
*(here->VBICemitEIXf2Ptr) += -Itxf_Vrxf;
|
||||
/*
|
||||
c Stamp element: Ibc
|
||||
*/
|
||||
*(here->VBICbaseBIXf2Ptr) += Ibc_Vrxf;
|
||||
*(here->VBICcollCIXf2Ptr) += -Ibc_Vrxf;
|
||||
/*
|
||||
c Stamp element: Ixzf, Branch: xf1-ground
|
||||
*/
|
||||
*(here->VBICxf1BaseBIPtr) += +Ixzf_Vbei;
|
||||
*(here->VBICxf1EmitEIPtr) += -Ixzf_Vbei;
|
||||
*(here->VBICxf1BaseBIPtr) += +Ixzf_Vbci;
|
||||
*(here->VBICxf1CollCIPtr) += -Ixzf_Vbci;
|
||||
if (here->VBIC_selfheat) {
|
||||
Ixzf_Vrth = *(ckt->CKTstate0 + here->VBICixzf_Vrth);
|
||||
*(here->VBICxf1TempPtr) += Ixzf_Vrth;
|
||||
}
|
||||
/*
|
||||
c Stamp element: Ixxf, Branch: xf2-ground
|
||||
*/
|
||||
*(here->VBICxf2Xf2Ptr) += +Ixxf_Vrxf;
|
||||
|
||||
//Ixf1
|
||||
*(here->VBICxf1BaseBIPtr) += +Ixf1_Vbei;
|
||||
*(here->VBICxf1EmitEIPtr) += -Ixf1_Vbei;
|
||||
*(here->VBICxf1BaseBIPtr) += +Ixf1_Vbci;
|
||||
*(here->VBICxf1CollCIPtr) += -Ixf1_Vbci;
|
||||
*(here->VBICxf1Xf2Ptr) += +Ixf1_Vxf2;
|
||||
*(here->VBICxf1Xf1Ptr) += +Ixf1_Vxf1;
|
||||
//Ixf2
|
||||
*(here->VBICxf2BaseBIPtr) += +Ixf2_Vbei;
|
||||
*(here->VBICxf2EmitEIPtr) += -Ixf2_Vbei;
|
||||
*(here->VBICxf2BaseBIPtr) += +Ixf2_Vbci;
|
||||
*(here->VBICxf2CollCIPtr) += -Ixf2_Vbci;
|
||||
*(here->VBICxf2Xf2Ptr) += +Ixf2_Vxf2;
|
||||
*(here->VBICxf2Xf1Ptr) += +Ixf2_Vxf1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -439,6 +420,8 @@ c The complex part
|
|||
XQbcp_Vbcp = *(ckt->CKTstate0 + here->VBICcqbcp) * ckt->CKTomega;
|
||||
XQbeo_Vbe = *(ckt->CKTstate0 + here->VBICcqbeo) * ckt->CKTomega;
|
||||
XQbco_Vbc = *(ckt->CKTstate0 + here->VBICcqbco) * ckt->CKTomega;
|
||||
XQxf1_Vxf1 = *(ckt->CKTstate0 + here->VBICcqxf1) * ckt->CKTomega;
|
||||
XQxf2_Vxf2 = *(ckt->CKTstate0 + here->VBICcqxf2) * ckt->CKTomega;
|
||||
/*
|
||||
c Stamp element: Qbe
|
||||
*/
|
||||
|
|
@ -504,6 +487,13 @@ c Stamp element: Qbco
|
|||
*(here->VBICbaseCollPtr + 1) += -XQbco_Vbc;
|
||||
*(here->VBICcollBasePtr + 1) += -XQbco_Vbc;
|
||||
|
||||
if (here->VBIC_excessPhase) {
|
||||
//Qxf1
|
||||
*(here->VBICxf1Xf1Ptr + 1) += +XQxf1_Vxf1;
|
||||
//Qxf2
|
||||
*(here->VBICxf2Xf2Ptr + 1) += +XQxf2_Vxf2;
|
||||
}
|
||||
|
||||
if (here->VBIC_selfheat) {
|
||||
XQcth_Vrth = here->VBICcapcth * ckt->CKTomega;
|
||||
XQbe_Vrth = here->VBICcapqbeth * ckt->CKTomega;
|
||||
|
|
@ -527,24 +517,12 @@ c Stamp element: Qbco
|
|||
*(here->VBICbaseBPtempPtr + 1) += -XQbep_Vrth;
|
||||
*(here->VBICsubsSItempPtr + 1) += XQbcp_Vrth;
|
||||
*(here->VBICbaseBPtempPtr + 1) += -XQbcp_Vrth;
|
||||
}
|
||||
if (here->VBIC_excessPhase) {
|
||||
/*
|
||||
c Stamp element: Qcxf
|
||||
*/
|
||||
XQcxf_Vcxf = here->VBICcapQcxf * ckt->CKTomega;
|
||||
*(here->VBICxf1Xf1Ptr + 1) += XQcxf_Vcxf;
|
||||
/*
|
||||
c Stamp element: L = TD/3
|
||||
*/
|
||||
Xl = here->VBICindInduct * ckt->CKTomega;
|
||||
|
||||
*(here->VBICxf1IbrPtr) += 1;
|
||||
*(here->VBICxf2IbrPtr) -= 1;
|
||||
*(here->VBICibrXf1Ptr) += 1;
|
||||
*(here->VBICibrXf2Ptr) -= 1;
|
||||
*(here->VBICibrIbrPtr + 1) -= Xl;
|
||||
|
||||
if (here->VBIC_excessPhase) {
|
||||
// Stamp element: Ixf1 f_xf1 = +
|
||||
*(here->VBICxf1TempPtr) += Ixf1_Vrth;
|
||||
// Stamp element: Ixf2 f_xf2 = +
|
||||
*(here->VBICxf2TempPtr) += Ixf2_Vrth;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,11 @@ Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH
|
|||
int
|
||||
VBICask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalue *select)
|
||||
{
|
||||
IFvalue IC, IB, IE, IS;
|
||||
NG_IGNORE(select);
|
||||
VBICinstance *here = (VBICinstance*)instPtr;
|
||||
|
||||
IFvalue IC, IB;
|
||||
|
||||
switch(which) {
|
||||
case VBIC_AREA:
|
||||
value->rValue = here->VBICarea;
|
||||
|
|
@ -75,14 +77,9 @@ VBICask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalu
|
|||
value->rValue = *(ckt->CKTstate0 + here->VBICvbci);
|
||||
return(OK);
|
||||
case VBIC_QUEST_CC:
|
||||
if (!here->VBIC_excessPhase)
|
||||
value->rValue = *(ckt->CKTstate0 + here->VBICitzf) -
|
||||
*(ckt->CKTstate0 + here->VBICitzr) -
|
||||
*(ckt->CKTstate0 + here->VBICibc);
|
||||
else
|
||||
value->rValue = *(ckt->CKTstate0 + here->VBICitxf) -
|
||||
*(ckt->CKTstate0 + here->VBICitzr) -
|
||||
*(ckt->CKTstate0 + here->VBICibc);
|
||||
value->rValue = *(ckt->CKTstate0 + here->VBICiciei) -
|
||||
*(ckt->CKTstate0 + here->VBICiccp) -
|
||||
*(ckt->CKTstate0 + here->VBICibc);
|
||||
value->rValue *= VBICmodPtr(here)->VBICtype;
|
||||
return(OK);
|
||||
case VBIC_QUEST_CB:
|
||||
|
|
@ -94,16 +91,9 @@ VBICask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalu
|
|||
value->rValue *= VBICmodPtr(here)->VBICtype;
|
||||
return(OK);
|
||||
case VBIC_QUEST_CE:
|
||||
if (!here->VBIC_excessPhase)
|
||||
value->rValue = - *(ckt->CKTstate0 + here->VBICibe) -
|
||||
*(ckt->CKTstate0 + here->VBICibex) -
|
||||
*(ckt->CKTstate0 + here->VBICitzf) +
|
||||
*(ckt->CKTstate0 + here->VBICitzr);
|
||||
else
|
||||
value->rValue = - *(ckt->CKTstate0 + here->VBICibe) -
|
||||
*(ckt->CKTstate0 + here->VBICibex) -
|
||||
*(ckt->CKTstate0 + here->VBICitxf) +
|
||||
*(ckt->CKTstate0 + here->VBICitzr);
|
||||
value->rValue = - *(ckt->CKTstate0 + here->VBICibe) -
|
||||
*(ckt->CKTstate0 + here->VBICibex) -
|
||||
*(ckt->CKTstate0 + here->VBICiciei);
|
||||
value->rValue *= VBICmodPtr(here)->VBICtype;
|
||||
return(OK);
|
||||
case VBIC_QUEST_CS:
|
||||
|
|
@ -112,48 +102,22 @@ VBICask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalu
|
|||
value->rValue *= VBICmodPtr(here)->VBICtype;
|
||||
return(OK);
|
||||
case VBIC_QUEST_POWER:
|
||||
value->rValue = fabs(here->VBICpower);
|
||||
return(OK);
|
||||
case VBIC_QUEST_BETA:
|
||||
VBICask(ckt, instPtr, VBIC_QUEST_CC, &IC, select);
|
||||
VBICask(ckt, instPtr, VBIC_QUEST_CB, &IB, select);
|
||||
VBICask(ckt, instPtr, VBIC_QUEST_CE, &IE, select);
|
||||
VBICask(ckt, instPtr, VBIC_QUEST_CS, &IS, select);
|
||||
if (!here->VBIC_excessPhase)
|
||||
value->rValue = fabs(*(ckt->CKTstate0 + here->VBICibe) * *(ckt->CKTstate0 + here->VBICvbei)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICibc) * *(ckt->CKTstate0 + here->VBICvbci)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICitzf) - *(ckt->CKTstate0 + here->VBICitzr))
|
||||
* fabs(*(ckt->CKTstate0 + here->VBICvbei) - *(ckt->CKTstate0 + here->VBICvbci)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICibex) * *(ckt->CKTstate0 + here->VBICvbex)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICibep) * *(ckt->CKTstate0 + here->VBICvbep)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICibcp) * *(ckt->CKTstate0 + here->VBICvbcp)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICiccp))
|
||||
* fabs(*(ckt->CKTstate0 + here->VBICvbep) - *(ckt->CKTstate0 + here->VBICvbcp)) +
|
||||
fabs(IC.rValue * IC.rValue * here->VBICtextCollResist) +
|
||||
fabs(IC.rValue * *(ckt->CKTstate0 + here->VBICvrci)) +
|
||||
fabs(IB.rValue * IB.rValue * here->VBICtextBaseResist) +
|
||||
fabs(IB.rValue * *(ckt->CKTstate0 + here->VBICvrbi)) +
|
||||
fabs(IE.rValue * IE.rValue * here->VBICtemitterResist) +
|
||||
fabs(IS.rValue * *(ckt->CKTstate0 + here->VBICvrbp));
|
||||
else
|
||||
value->rValue = fabs(*(ckt->CKTstate0 + here->VBICibe) * *(ckt->CKTstate0 + here->VBICvbei)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICibc) * *(ckt->CKTstate0 + here->VBICvbci)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICitxf) - *(ckt->CKTstate0 + here->VBICitzr))
|
||||
* fabs(*(ckt->CKTstate0 + here->VBICvbei) - *(ckt->CKTstate0 + here->VBICvbci)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICibex) * *(ckt->CKTstate0 + here->VBICvbex)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICibep) * *(ckt->CKTstate0 + here->VBICvbep)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICibcp) * *(ckt->CKTstate0 + here->VBICvbcp)) +
|
||||
fabs(*(ckt->CKTstate0 + here->VBICiccp))
|
||||
* fabs(*(ckt->CKTstate0 + here->VBICvbep) - *(ckt->CKTstate0 + here->VBICvbcp)) +
|
||||
fabs(IC.rValue * IC.rValue * here->VBICtextCollResist) +
|
||||
fabs(IC.rValue * *(ckt->CKTstate0 + here->VBICvrci)) +
|
||||
fabs(IB.rValue * IB.rValue * here->VBICtextBaseResist) +
|
||||
fabs(IB.rValue * *(ckt->CKTstate0 + here->VBICvrbi)) +
|
||||
fabs(IE.rValue * IE.rValue * here->VBICtemitterResist) +
|
||||
fabs(IS.rValue * *(ckt->CKTstate0 + here->VBICvrbp));
|
||||
if (IB.rValue != 0.0) {
|
||||
value->rValue = IC.rValue/IB.rValue;
|
||||
} else {
|
||||
value->rValue = 0.0;
|
||||
}
|
||||
return(OK);
|
||||
case VBIC_QUEST_GM:
|
||||
value->rValue = *(ckt->CKTstate0 + here->VBICitzf_Vbei);
|
||||
value->rValue = *(ckt->CKTstate0 + here->VBICiciei_Vbei);
|
||||
return(OK);
|
||||
case VBIC_QUEST_GO:
|
||||
value->rValue = *(ckt->CKTstate0 + here->VBICitzf_Vbci);
|
||||
value->rValue = *(ckt->CKTstate0 + here->VBICiciei_Vbci);
|
||||
return(OK);
|
||||
case VBIC_QUEST_GPI:
|
||||
value->rValue = *(ckt->CKTstate0 + here->VBICibe_Vbei);
|
||||
|
|
|
|||
|
|
@ -104,27 +104,25 @@ VBICbindCSC (GENmodel *inModel, CKTcircuit *ckt)
|
|||
CREATE_KLU_BINDING_TABLE(VBICtempSubsSIPtr, VBICtempSubsSIBinding, VBICtempNode, VBICsubsSINode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICtempTempPtr, VBICtempTempBinding, VBICtempNode, VBICtempNode);
|
||||
if (here->VBIC_excessPhase) {
|
||||
CREATE_KLU_BINDING_TABLE(VBICtempXf2Ptr, VBICtempXf2Binding, VBICtempNode, VBICxf2Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1TempPtr, VBICxf1TempBinding, VBICxf1Node ,VBICtempNode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf2TempPtr, VBICxf2TempBinding, VBICxf2Node, VBICtempNode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1TempPtr, VBICxf1TempBinding, VBICxf1Node, VBICtempNode);
|
||||
}
|
||||
}
|
||||
|
||||
if (here->VBIC_excessPhase) {
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1Xf1Ptr , VBICxf1Xf1Binding , VBICxf1Node , VBICxf1Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1Xf2Ptr , VBICxf1Xf2Binding , VBICxf1Node , VBICxf2Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1CollCIPtr, VBICxf1CollCIBinding, VBICxf1Node , VBICcollCINode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1BaseBIPtr, VBICxf1BaseBIBinding, VBICxf1Node , VBICbaseBINode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1EmitEIPtr, VBICxf1EmitEIBinding, VBICxf1Node , VBICemitEINode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf2Xf2Ptr , VBICxf2Xf2Binding , VBICxf2Node , VBICxf2Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf2Xf1Ptr , VBICxf2Xf1Binding , VBICxf2Node , VBICxf1Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICcollCIXf2Ptr, VBICcollCIXf2Binding, VBICcollCINode, VBICxf2Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICbaseBIXf2Ptr, VBICbaseBIXf2Binding, VBICbaseBINode, VBICxf2Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1Xf1Ptr, VBICxf1Xf1Binding, VBICxf1Node, VBICxf1Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1BaseBIPtr, VBICxf1BaseBIBinding, VBICxf1Node, VBICbaseBINode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1EmitEIPtr, VBICxf1EmitEIBinding, VBICxf1Node, VBICemitEINode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1CollCIPtr, VBICxf1CollCIBinding, VBICxf1Node, VBICcollCINode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1Xf2Ptr, VBICxf1Xf2Binding, VBICxf1Node, VBICxf2Node);
|
||||
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf2Xf1Ptr, VBICxf2Xf1Binding, VBICxf2Node, VBICxf1Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf2BaseBIPtr, VBICxf2BaseBIBinding, VBICxf2Node, VBICbaseBINode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf2EmitEIPtr, VBICxf2EmitEIBinding, VBICxf2Node, VBICemitEINode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf2CollCIPtr, VBICxf2CollCIBinding, VBICxf2Node, VBICcollCINode);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf2Xf2Ptr, VBICxf2Xf2Binding, VBICxf2Node, VBICxf2Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICemitEIXf2Ptr, VBICemitEIXf2Binding, VBICemitEINode, VBICxf2Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf1IbrPtr , VBICxf1IbrBinding , VBICxf1Node , VBICbrEq);
|
||||
CREATE_KLU_BINDING_TABLE(VBICxf2IbrPtr , VBICxf2IbrBinding , VBICxf2Node , VBICbrEq);
|
||||
CREATE_KLU_BINDING_TABLE(VBICibrXf2Ptr , VBICibrXf2Binding , VBICbrEq , VBICxf2Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICibrXf1Ptr , VBICibrXf1Binding , VBICbrEq , VBICxf1Node);
|
||||
CREATE_KLU_BINDING_TABLE(VBICibrIbrPtr , VBICibrIbrBinding , VBICbrEq , VBICbrEq);
|
||||
CREATE_KLU_BINDING_TABLE(VBICcollCIXf2Ptr, VBICcollCIXf2Binding, VBICcollCINode, VBICxf2Node);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -223,25 +221,25 @@ VBICbindCSCComplex (GENmodel *inModel, CKTcircuit *ckt)
|
|||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICtempSubsPtr, VBICtempSubsBinding, VBICtempNode, VBICsubsNode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICtempSubsSIPtr, VBICtempSubsSIBinding, VBICtempNode, VBICsubsSINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICtempTempPtr, VBICtempTempBinding, VBICtempNode, VBICtempNode);
|
||||
|
||||
if (here->VBIC_excessPhase) {
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1Xf1Ptr , VBICxf1Xf1Binding , VBICxf1Node , VBICxf1Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1Xf2Ptr , VBICxf1Xf2Binding , VBICxf1Node , VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1CollCIPtr, VBICxf1CollCIBinding, VBICxf1Node , VBICcollCINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1BaseBIPtr, VBICxf1BaseBIBinding, VBICxf1Node , VBICbaseBINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1EmitEIPtr, VBICxf1EmitEIBinding, VBICxf1Node , VBICemitEINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf2Xf2Ptr , VBICxf2Xf2Binding , VBICxf2Node , VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf2Xf1Ptr , VBICxf2Xf1Binding , VBICxf2Node , VBICxf1Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICcollCIXf2Ptr, VBICcollCIXf2Binding, VBICcollCINode, VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICbaseBIXf2Ptr, VBICbaseBIXf2Binding, VBICbaseBINode, VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICemitEIXf2Ptr, VBICemitEIXf2Binding, VBICemitEINode, VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf1IbrPtr , VBICxf1IbrBinding , VBICxf1Node , VBICbrEq);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICxf2IbrPtr , VBICxf2IbrBinding , VBICxf2Node , VBICbrEq);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICibrXf2Ptr , VBICibrXf2Binding , VBICbrEq , VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICibrXf1Ptr , VBICibrXf1Binding , VBICbrEq , VBICxf1Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(VBICibrIbrPtr , VBICibrIbrBinding , VBICbrEq , VBICbrEq);
|
||||
if (here->VBIC_excessPhase) {
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2TempPtr, VBICxf2TempBinding, VBICxf2Node, VBICtempNode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1TempPtr, VBICxf1TempBinding, VBICxf1Node, VBICtempNode);
|
||||
}
|
||||
}
|
||||
if (here->VBIC_excessPhase) {
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1Xf1Ptr, VBICxf1Xf1Binding, VBICxf1Node, VBICxf1Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1BaseBIPtr, VBICxf1BaseBIBinding, VBICxf1Node, VBICbaseBINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1EmitEIPtr, VBICxf1EmitEIBinding, VBICxf1Node, VBICemitEINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1CollCIPtr, VBICxf1CollCIBinding, VBICxf1Node, VBICcollCINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1Xf2Ptr, VBICxf1Xf2Binding, VBICxf1Node, VBICxf2Node);
|
||||
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2Xf1Ptr, VBICxf2Xf1Binding, VBICxf2Node, VBICxf1Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2BaseBIPtr, VBICxf2BaseBIBinding, VBICxf2Node, VBICbaseBINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2EmitEIPtr, VBICxf2EmitEIBinding, VBICxf2Node, VBICemitEINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2CollCIPtr, VBICxf2CollCIBinding, VBICxf2Node, VBICcollCINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2Xf2Ptr, VBICxf2Xf2Binding, VBICxf2Node, VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICemitEIXf2Ptr, VBICemitEIXf2Binding, VBICemitEINode, VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICcollCIXf2Ptr, VBICcollCIXf2Binding, VBICcollCINode, VBICxf2Node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -339,24 +337,26 @@ VBICbindCSCComplexToReal (GENmodel *inModel, CKTcircuit *ckt)
|
|||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICtempSubsPtr, VBICtempSubsBinding, VBICtempNode, VBICsubsNode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICtempSubsSIPtr, VBICtempSubsSIBinding, VBICtempNode, VBICsubsSINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICtempTempPtr, VBICtempTempBinding, VBICtempNode, VBICtempNode);
|
||||
if (here->VBIC_excessPhase) {
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2TempPtr, VBICxf2TempBinding, VBICxf2Node, VBICtempNode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1TempPtr, VBICxf1TempBinding, VBICxf1Node, VBICtempNode);
|
||||
}
|
||||
}
|
||||
|
||||
if (here->VBIC_excessPhase) {
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1Xf1Ptr , VBICxf1Xf1Binding , VBICxf1Node , VBICxf1Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1Xf2Ptr , VBICxf1Xf2Binding , VBICxf1Node , VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1CollCIPtr, VBICxf1CollCIBinding, VBICxf1Node , VBICcollCINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1BaseBIPtr, VBICxf1BaseBIBinding, VBICxf1Node , VBICbaseBINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1EmitEIPtr, VBICxf1EmitEIBinding, VBICxf1Node , VBICemitEINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2Xf2Ptr , VBICxf2Xf2Binding , VBICxf2Node , VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2Xf1Ptr , VBICxf2Xf1Binding , VBICxf2Node , VBICxf1Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICcollCIXf2Ptr, VBICcollCIXf2Binding, VBICcollCINode, VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICbaseBIXf2Ptr, VBICbaseBIXf2Binding, VBICbaseBINode, VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1Xf1Ptr, VBICxf1Xf1Binding, VBICxf1Node, VBICxf1Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1BaseBIPtr, VBICxf1BaseBIBinding, VBICxf1Node, VBICbaseBINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1EmitEIPtr, VBICxf1EmitEIBinding, VBICxf1Node, VBICemitEINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1CollCIPtr, VBICxf1CollCIBinding, VBICxf1Node, VBICcollCINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1Xf2Ptr, VBICxf1Xf2Binding, VBICxf1Node, VBICxf2Node);
|
||||
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2Xf1Ptr, VBICxf2Xf1Binding, VBICxf2Node, VBICxf1Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2BaseBIPtr, VBICxf2BaseBIBinding, VBICxf2Node, VBICbaseBINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2EmitEIPtr, VBICxf2EmitEIBinding, VBICxf2Node, VBICemitEINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2CollCIPtr, VBICxf2CollCIBinding, VBICxf2Node, VBICcollCINode);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2Xf2Ptr, VBICxf2Xf2Binding, VBICxf2Node, VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICemitEIXf2Ptr, VBICemitEIXf2Binding, VBICemitEINode, VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf1IbrPtr , VBICxf1IbrBinding , VBICxf1Node , VBICbrEq);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICxf2IbrPtr , VBICxf2IbrBinding , VBICxf2Node , VBICbrEq);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICibrXf2Ptr , VBICibrXf2Binding , VBICbrEq , VBICxf2Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICibrXf1Ptr , VBICibrXf1Binding , VBICbrEq , VBICxf1Node);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICibrIbrPtr , VBICibrIbrBinding , VBICbrEq , VBICbrEq);
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(VBICcollCIXf2Ptr, VBICcollCIXf2Binding, VBICcollCINode, VBICxf2Node);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ VBICconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double delvbcp;
|
||||
double ibehat;
|
||||
double ibexhat;
|
||||
double itzfhat;
|
||||
double itzrhat;
|
||||
double icieihat;
|
||||
double ibchat;
|
||||
double ibephat;
|
||||
double ircihat;
|
||||
|
|
@ -43,7 +42,7 @@ VBICconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double ibcphat;
|
||||
double iccphat;
|
||||
double Vbei, Vbex, Vbci, Vbcx, Vbep, Vrci, Vrbi, Vrbp, Vbcp;
|
||||
double Ibe, Ibex, Itzf, Itzr, Ibc, Ibep, Irci, Irbi, Irbp, Ibcp, Iccp;
|
||||
double Ibe, Ibex, Iciei, Ibc, Ibep, Irci, Irbi, Irbp, Ibcp, Iccp;
|
||||
|
||||
for( ; model != NULL; model = VBICnextModel(model)) {
|
||||
for(here=VBICinstances(model);here!=NULL;here = VBICnextInstance(here)) {
|
||||
|
|
@ -88,10 +87,8 @@ VBICconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
*(ckt->CKTstate0 + here->VBICibe_Vbei)*delvbei;
|
||||
ibexhat = *(ckt->CKTstate0 + here->VBICibex) +
|
||||
*(ckt->CKTstate0 + here->VBICibex_Vbex)*delvbex;
|
||||
itzfhat = *(ckt->CKTstate0 + here->VBICitzf) +
|
||||
*(ckt->CKTstate0 + here->VBICitzf_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICitzf_Vbci)*delvbci;
|
||||
itzrhat = *(ckt->CKTstate0 + here->VBICitzr) +
|
||||
*(ckt->CKTstate0 + here->VBICitzr_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICitzr_Vbci)*delvbci;
|
||||
icieihat = *(ckt->CKTstate0 + here->VBICiciei) +
|
||||
*(ckt->CKTstate0 + here->VBICiciei_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICiciei_Vbci)*delvbci;
|
||||
ibchat = *(ckt->CKTstate0 + here->VBICibc) +
|
||||
*(ckt->CKTstate0 + here->VBICibc_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICibc_Vbci)*delvbci;
|
||||
ibephat = *(ckt->CKTstate0 + here->VBICibep) +
|
||||
|
|
@ -108,8 +105,7 @@ VBICconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
*(ckt->CKTstate0 + here->VBICiccp_Vbci)*delvbci + *(ckt->CKTstate0 + here->VBICiccp_Vbcp)*delvbcp;
|
||||
Ibe = *(ckt->CKTstate0 + here->VBICibe);
|
||||
Ibex = *(ckt->CKTstate0 + here->VBICibex);
|
||||
Itzf = *(ckt->CKTstate0 + here->VBICitzf);
|
||||
Itzr = *(ckt->CKTstate0 + here->VBICitzr);
|
||||
Iciei = *(ckt->CKTstate0 + here->VBICiciei);
|
||||
Ibc = *(ckt->CKTstate0 + here->VBICibc);
|
||||
Ibep = *(ckt->CKTstate0 + here->VBICibep);
|
||||
Irci = *(ckt->CKTstate0 + here->VBICirci);
|
||||
|
|
@ -132,60 +128,53 @@ VBICconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
ckt->CKTtroubleElt = (GENinstance *) here;
|
||||
return(OK); /* no reason to continue - we've failed... */
|
||||
} else {
|
||||
tol=ckt->CKTreltol*MAX(fabs(itzfhat),fabs(Itzf))+ckt->CKTabstol;
|
||||
if (fabs(itzfhat-Itzf) > tol) {
|
||||
tol=ckt->CKTreltol*MAX(fabs(icieihat),fabs(Iciei))+ckt->CKTabstol;
|
||||
if (fabs(icieihat-Iciei) > tol) {
|
||||
ckt->CKTnoncon++;
|
||||
ckt->CKTtroubleElt = (GENinstance *) here;
|
||||
return(OK); /* no reason to continue - we've failed... */
|
||||
} else {
|
||||
tol=ckt->CKTreltol*MAX(fabs(itzrhat),fabs(Itzr))+ckt->CKTabstol;
|
||||
if (fabs(itzrhat-Itzr) > tol) {
|
||||
tol=ckt->CKTreltol*MAX(fabs(ibchat),fabs(Ibc))+ckt->CKTabstol;
|
||||
if (fabs(ibchat-Ibc) > tol) {
|
||||
ckt->CKTnoncon++;
|
||||
ckt->CKTtroubleElt = (GENinstance *) here;
|
||||
return(OK); /* no reason to continue - we've failed... */
|
||||
} else {
|
||||
tol=ckt->CKTreltol*MAX(fabs(ibchat),fabs(Ibc))+ckt->CKTabstol;
|
||||
if (fabs(ibchat-Ibc) > tol) {
|
||||
tol=ckt->CKTreltol*MAX(fabs(ibephat),fabs(Ibep))+ckt->CKTabstol;
|
||||
if (fabs(ibephat-Ibep) > tol) {
|
||||
ckt->CKTnoncon++;
|
||||
ckt->CKTtroubleElt = (GENinstance *) here;
|
||||
return(OK); /* no reason to continue - we've failed... */
|
||||
} else {
|
||||
tol=ckt->CKTreltol*MAX(fabs(ibephat),fabs(Ibep))+ckt->CKTabstol;
|
||||
if (fabs(ibephat-Ibep) > tol) {
|
||||
tol=ckt->CKTreltol*MAX(fabs(ircihat),fabs(Irci))+ckt->CKTabstol;
|
||||
if (fabs(ircihat-Irci) > tol) {
|
||||
ckt->CKTnoncon++;
|
||||
ckt->CKTtroubleElt = (GENinstance *) here;
|
||||
return(OK); /* no reason to continue - we've failed... */
|
||||
} else {
|
||||
tol=ckt->CKTreltol*MAX(fabs(ircihat),fabs(Irci))+ckt->CKTabstol;
|
||||
if (fabs(ircihat-Irci) > tol) {
|
||||
tol=ckt->CKTreltol*MAX(fabs(irbihat),fabs(Irbi))+ckt->CKTabstol;
|
||||
if (fabs(irbihat-Irbi) > tol) {
|
||||
ckt->CKTnoncon++;
|
||||
ckt->CKTtroubleElt = (GENinstance *) here;
|
||||
return(OK); /* no reason to continue - we've failed... */
|
||||
} else {
|
||||
tol=ckt->CKTreltol*MAX(fabs(irbihat),fabs(Irbi))+ckt->CKTabstol;
|
||||
if (fabs(irbihat-Irbi) > tol) {
|
||||
tol=ckt->CKTreltol*MAX(fabs(irbphat),fabs(Irbp))+ckt->CKTabstol;
|
||||
if (fabs(irbphat-Irbp) > tol) {
|
||||
ckt->CKTnoncon++;
|
||||
ckt->CKTtroubleElt = (GENinstance *) here;
|
||||
return(OK); /* no reason to continue - we've failed... */
|
||||
} else {
|
||||
tol=ckt->CKTreltol*MAX(fabs(irbphat),fabs(Irbp))+ckt->CKTabstol;
|
||||
if (fabs(irbphat-Irbp) > tol) {
|
||||
tol=ckt->CKTreltol*MAX(fabs(ibcphat),fabs(Ibcp))+ckt->CKTabstol;
|
||||
if (fabs(ibcphat-Ibcp) > tol) {
|
||||
ckt->CKTnoncon++;
|
||||
ckt->CKTtroubleElt = (GENinstance *) here;
|
||||
return(OK); /* no reason to continue - we've failed... */
|
||||
} else {
|
||||
tol=ckt->CKTreltol*MAX(fabs(ibcphat),fabs(Ibcp))+ckt->CKTabstol;
|
||||
if (fabs(ibcphat-Ibcp) > tol) {
|
||||
tol=ckt->CKTreltol*MAX(fabs(iccphat),fabs(Iccp))+ckt->CKTabstol;
|
||||
if (fabs(iccphat-Iccp) > tol) {
|
||||
ckt->CKTnoncon++;
|
||||
ckt->CKTtroubleElt = (GENinstance *) here;
|
||||
return(OK); /* no reason to continue - we've failed... */
|
||||
} else {
|
||||
tol=ckt->CKTreltol*MAX(fabs(iccphat),fabs(Iccp))+ckt->CKTabstol;
|
||||
if (fabs(iccphat-Iccp) > tol) {
|
||||
ckt->CKTnoncon++;
|
||||
ckt->CKTtroubleElt = (GENinstance *) here;
|
||||
return(OK); /* no reason to continue - we've failed... */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ typedef struct sVBICinstance {
|
|||
int VBICsubsSINode; /* number of internal substrate node */
|
||||
int VBICxf1Node; /* number of internal excess phase 1 node itf */
|
||||
int VBICxf2Node; /* number of internal excess phase 2 node itf */
|
||||
int VBICbrEq; /* number of the branch equation added for current */
|
||||
|
||||
double VBICarea; /* area factor for the vbic */
|
||||
double VBICicVBE; /* initial condition voltage B-E*/
|
||||
|
|
@ -241,26 +240,22 @@ typedef struct sVBICinstance {
|
|||
double *VBICtempTempPtr;
|
||||
|
||||
/* excess phase */
|
||||
double *VBICtempXf2Ptr;
|
||||
double *VBICxf1TempPtr;
|
||||
|
||||
double *VBICxf1Xf1Ptr;
|
||||
double *VBICxf1Xf2Ptr;
|
||||
double *VBICxf1CollCIPtr;
|
||||
double *VBICxf1TempPtr;
|
||||
double *VBICxf1BaseBIPtr;
|
||||
double *VBICxf1EmitEIPtr;
|
||||
double *VBICxf1CollCIPtr;
|
||||
double *VBICxf1Xf2Ptr;
|
||||
|
||||
double *VBICxf2Xf2Ptr;
|
||||
double *VBICxf2Xf1Ptr;
|
||||
double *VBICcollCIXf2Ptr;
|
||||
double *VBICbaseBIXf2Ptr;
|
||||
double *VBICxf2TempPtr;
|
||||
double *VBICxf2BaseBIPtr;
|
||||
double *VBICxf2EmitEIPtr;
|
||||
double *VBICxf2CollCIPtr;
|
||||
double *VBICxf2Xf2Ptr;
|
||||
double *VBICemitXf2Ptr;
|
||||
double *VBICemitEIXf2Ptr;
|
||||
|
||||
double *VBICxf1IbrPtr;
|
||||
double *VBICxf2IbrPtr;
|
||||
double *VBICibrXf1Ptr;
|
||||
double *VBICibrXf2Ptr;
|
||||
double *VBICibrIbrPtr;
|
||||
double *VBICcollCIXf2Ptr;
|
||||
|
||||
unsigned VBICareaGiven :1; /* flag to indicate area was specified */
|
||||
unsigned VBICoff :1; /* 'off' flag for vbic */
|
||||
|
|
@ -287,8 +282,6 @@ typedef struct sVBICinstance {
|
|||
|
||||
double VBICibe_Vrth;
|
||||
double VBICibex_Vrth;
|
||||
double VBICitzf_vrth;
|
||||
double VBICitzr_Vrth;
|
||||
double VBICibc_Vrth;
|
||||
double VBICibep_Vrth;
|
||||
double VBICircx_Vrth;
|
||||
|
|
@ -319,8 +312,7 @@ typedef struct sVBICinstance {
|
|||
double VBICith_Vre;
|
||||
double VBICith_Vrs;
|
||||
|
||||
double VBICindInduct;
|
||||
double VBICcapQcxf;
|
||||
double VBICpower;
|
||||
|
||||
int VBIC_selfheat; /* self-heating enabled */
|
||||
int VBIC_excessPhase; /* excess phase enabled */
|
||||
|
|
@ -411,24 +403,21 @@ typedef struct sVBICinstance {
|
|||
BindElement *VBICtempSubsSIBinding ;
|
||||
BindElement *VBICtempTempBinding ;
|
||||
|
||||
BindElement *VBICtempXf2Binding ;
|
||||
BindElement *VBICxf1TempBinding ;
|
||||
BindElement *VBICcollCIXf2Binding ;
|
||||
BindElement *VBICemitEIXf2Binding ;
|
||||
|
||||
BindElement *VBICxf1BaseBIBinding ;
|
||||
BindElement *VBICxf1CollCIBinding ;
|
||||
BindElement *VBICxf1EmitEIBinding ;
|
||||
BindElement *VBICxf1TempBinding ;
|
||||
BindElement *VBICxf1Xf1Binding ;
|
||||
BindElement *VBICxf1Xf2Binding ;
|
||||
BindElement *VBICxf1CollCIBinding ;
|
||||
BindElement *VBICxf1BaseBIBinding ;
|
||||
BindElement *VBICxf1EmitEIBinding ;
|
||||
BindElement *VBICxf2Xf2Binding ;
|
||||
BindElement *VBICxf2BaseBIBinding ;
|
||||
BindElement *VBICxf2CollCIBinding ;
|
||||
BindElement *VBICxf2EmitEIBinding ;
|
||||
BindElement *VBICxf2TempBinding ;
|
||||
BindElement *VBICxf2Xf1Binding ;
|
||||
BindElement *VBICcollCIXf2Binding ;
|
||||
BindElement *VBICbaseBIXf2Binding ;
|
||||
BindElement *VBICemitEIXf2Binding ;
|
||||
BindElement *VBICxf1IbrBinding ;
|
||||
BindElement *VBICxf2IbrBinding ;
|
||||
BindElement *VBICibrXf2Binding ;
|
||||
BindElement *VBICibrXf1Binding ;
|
||||
BindElement *VBICibrIbrBinding ;
|
||||
BindElement *VBICxf2Xf2Binding ;
|
||||
#endif
|
||||
|
||||
} VBICinstance ;
|
||||
|
|
@ -444,21 +433,20 @@ typedef struct sVBICinstance {
|
|||
#define VBICvrbi VBICstate+6
|
||||
#define VBICvrbp VBICstate+7
|
||||
#define VBICvbcp VBICstate+8
|
||||
#define VBICvxf1 VBICstate+9
|
||||
#define VBICvxf2 VBICstate+10
|
||||
|
||||
#define VBICibe VBICstate+9
|
||||
#define VBICibe_Vbei VBICstate+10
|
||||
#define VBICibe VBICstate+11
|
||||
#define VBICibe_Vbei VBICstate+12
|
||||
|
||||
#define VBICibex VBICstate+11
|
||||
#define VBICibex_Vbex VBICstate+12
|
||||
#define VBICibex VBICstate+13
|
||||
#define VBICibex_Vbex VBICstate+14
|
||||
|
||||
#define VBICitzf VBICstate+13
|
||||
#define VBICitzf_Vbei VBICstate+14
|
||||
#define VBICitzf_Vbci VBICstate+15
|
||||
#define VBICitzf_Vrth VBICstate+16
|
||||
|
||||
#define VBICitzr VBICstate+17
|
||||
#define VBICitzr_Vbci VBICstate+18
|
||||
#define VBICitzr_Vbei VBICstate+19
|
||||
#define VBICiciei VBICstate+15
|
||||
#define VBICiciei_Vbei VBICstate+16
|
||||
#define VBICiciei_Vbci VBICstate+17
|
||||
#define VBICiciei_Vrth VBICstate+18
|
||||
#define VBICiciei_Vxf2 VBICstate+19
|
||||
|
||||
#define VBICibc VBICstate+20
|
||||
#define VBICibc_Vbci VBICstate+21
|
||||
|
|
@ -482,7 +470,6 @@ typedef struct sVBICinstance {
|
|||
#define VBICirbp_Vbep VBICstate+35
|
||||
#define VBICirbp_Vbci VBICstate+36
|
||||
|
||||
|
||||
#define VBICqbe VBICstate+37
|
||||
#define VBICcqbe VBICstate+38
|
||||
#define VBICcqbeci VBICstate+39
|
||||
|
|
@ -534,24 +521,27 @@ typedef struct sVBICinstance {
|
|||
#define VBICcqcxf VBICstate+72
|
||||
#define VBICgqcxf VBICstate+73
|
||||
|
||||
#define VBICibc_Vrxf VBICstate+74
|
||||
#define VBICqxf1 VBICstate+74
|
||||
#define VBICcqxf1 VBICstate+75
|
||||
#define VBICgqxf1 VBICstate+76
|
||||
#define VBICixf1 VBICstate+77
|
||||
#define VBICixf1_Vbei VBICstate+78
|
||||
#define VBICixf1_Vbci VBICstate+79
|
||||
#define VBICixf1_Vxf2 VBICstate+80
|
||||
#define VBICixf1_Vxf1 VBICstate+81
|
||||
#define VBICixf1_Vrth VBICstate+82
|
||||
|
||||
#define VBICixzf VBICstate+75
|
||||
#define VBICixzf_Vbei VBICstate+76
|
||||
#define VBICixzf_Vbci VBICstate+77
|
||||
#define VBICixzf_Vrth VBICstate+78
|
||||
#define VBICqxf2 VBICstate+83
|
||||
#define VBICcqxf2 VBICstate+84
|
||||
#define VBICgqxf2 VBICstate+85
|
||||
#define VBICixf2 VBICstate+86
|
||||
#define VBICixf2_Vbei VBICstate+87
|
||||
#define VBICixf2_Vbci VBICstate+88
|
||||
#define VBICixf2_Vxf1 VBICstate+89
|
||||
#define VBICixf2_Vxf2 VBICstate+90
|
||||
#define VBICixf2_Vrth VBICstate+91
|
||||
|
||||
#define VBICixxf VBICstate+79
|
||||
#define VBICixxf_Vrxf VBICstate+80
|
||||
|
||||
#define VBICitxf VBICstate+81
|
||||
#define VBICitxf_Vrxf VBICstate+82
|
||||
#define VBICith_Vrxf VBICstate+83
|
||||
|
||||
#define VBICindFlux VBICstate+84
|
||||
#define VBICindVolt VBICstate+85
|
||||
|
||||
#define VBICnumStates 86
|
||||
#define VBICnumStates 92
|
||||
|
||||
/* per model data */
|
||||
typedef struct sVBICmodel { /* model structure for a vbic */
|
||||
|
|
@ -945,8 +935,7 @@ enum {
|
|||
|
||||
/* device questions */
|
||||
enum {
|
||||
VBIC_QUEST_FT = 221,
|
||||
VBIC_QUEST_COLLNODE,
|
||||
VBIC_QUEST_COLLNODE = 221,
|
||||
VBIC_QUEST_BASENODE,
|
||||
VBIC_QUEST_EMITNODE,
|
||||
VBIC_QUEST_SUBSNODE,
|
||||
|
|
@ -963,31 +952,21 @@ enum {
|
|||
VBIC_QUEST_CB,
|
||||
VBIC_QUEST_CE,
|
||||
VBIC_QUEST_CS,
|
||||
VBIC_QUEST_POWER,
|
||||
VBIC_QUEST_BETA,
|
||||
VBIC_QUEST_GM,
|
||||
VBIC_QUEST_GO,
|
||||
VBIC_QUEST_GPI,
|
||||
VBIC_QUEST_GMU,
|
||||
VBIC_QUEST_GX,
|
||||
VBIC_QUEST_QBE,
|
||||
VBIC_QUEST_CQBE,
|
||||
VBIC_QUEST_QBC,
|
||||
VBIC_QUEST_CQBC,
|
||||
VBIC_QUEST_QBX,
|
||||
VBIC_QUEST_CQBX,
|
||||
VBIC_QUEST_QBCP,
|
||||
VBIC_QUEST_CQBCP,
|
||||
VBIC_QUEST_CEXBC,
|
||||
VBIC_QUEST_GEQCB,
|
||||
VBIC_QUEST_GCSUB,
|
||||
VBIC_QUEST_GDSUB,
|
||||
VBIC_QUEST_GEQBX,
|
||||
VBIC_QUEST_CBE,
|
||||
VBIC_QUEST_CBEX,
|
||||
VBIC_QUEST_CBC,
|
||||
VBIC_QUEST_CBCX,
|
||||
VBIC_QUEST_CBEP,
|
||||
VBIC_QUEST_CBCP,
|
||||
VBIC_QUEST_POWER,
|
||||
VBIC_QUEST_QBE,
|
||||
VBIC_QUEST_QBC,
|
||||
};
|
||||
|
||||
/* model questions */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -127,16 +127,10 @@ VBICnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *
|
|||
ckt,THERMNOISE,inst->VBICsubsSINode,inst->VBICsubsNode,
|
||||
*(ckt->CKTstate0 + inst->VBICirs_Vrs), dtemp);
|
||||
|
||||
if (!inst->VBIC_excessPhase) {
|
||||
NevalSrc(&noizDens[VBICICNOIZ],&lnNdens[VBICICNOIZ],
|
||||
ckt,SHOTNOISE,inst->VBICcollCINode, inst->VBICemitEINode,
|
||||
*(ckt->CKTstate0 + inst->VBICitzf));
|
||||
}
|
||||
if (inst->VBIC_excessPhase) {
|
||||
NevalSrc(&noizDens[VBICICNOIZ],&lnNdens[VBICICNOIZ],
|
||||
ckt,SHOTNOISE,inst->VBICcollCINode, inst->VBICemitEINode,
|
||||
*(ckt->CKTstate0 + inst->VBICitxf));
|
||||
}
|
||||
NevalSrc(&noizDens[VBICICNOIZ],&lnNdens[VBICICNOIZ],
|
||||
ckt,SHOTNOISE,inst->VBICcollCINode, inst->VBICemitEINode,
|
||||
*(ckt->CKTstate0 + inst->VBICiciei));
|
||||
|
||||
NevalSrc(&noizDens[VBICIBNOIZ],&lnNdens[VBICIBNOIZ],
|
||||
ckt,SHOTNOISE,inst->VBICbaseBINode, inst->VBICemitEINode,
|
||||
*(ckt->CKTstate0 + inst->VBICibe));
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ VBICpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
VBICinstance *here;
|
||||
VBICmodel *model = (VBICmodel*)inModel;
|
||||
double Ibe_Vbei,Ibex_Vbex
|
||||
,Itzf_Vbei,Itzf_Vbci,Itzr_Vbci,Itzr_Vbei,Ibc_Vbci
|
||||
,Iciei_Vbei,Iciei_Vbci,Ibc_Vbci
|
||||
,Ibc_Vbei,Ibep_Vbep,Ircx_Vrcx,Irci_Vrci
|
||||
,Irci_Vbci,Irci_Vbcx,Irbx_Vrbx,Irbi_Vrbi,Irbi_Vbei
|
||||
,Irbi_Vbci,Ire_Vre,Irbp_Vrbp,Irbp_Vbep,Irbp_Vbci
|
||||
|
|
@ -32,7 +32,7 @@ VBICpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
XQbcx_Vbcx, XQbep_Vbep, XQbep_Vbci,
|
||||
XQbcp_Vbcp, XQbeo_Vbe, XQbco_Vbc;
|
||||
|
||||
double Ibe_Vrth, Ibex_Vrth, Itzf_Vrth=0.0, Itzr_Vrth, Ibc_Vrth, Ibep_Vrth,
|
||||
double Ibe_Vrth, Ibex_Vrth, Iciei_Vrth, Iciei_Vxf2, 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,
|
||||
|
|
@ -40,22 +40,34 @@ VBICpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
double XQcth_Vrth, XQbe_Vrth, XQbex_Vrth, XQbc_Vrth, XQbcx_Vrth, XQbep_Vrth, XQbcp_Vrth;
|
||||
|
||||
//NQS
|
||||
double Itxf_Vrxf, Ibc_Vrxf, Ith_Vrxf, Ixzf_Vrth, Ixxf_Vrxf, XQcxf_Vcxf;
|
||||
double Ixzf_Vbei, Ixzf_Vbci, Xl;
|
||||
double XQxf1_Vxf1;
|
||||
double XQxf2_Vxf2;
|
||||
|
||||
double Ixf1_Vbei;
|
||||
double Ixf1_Vbci;
|
||||
double Ixf1_Vxf2;
|
||||
double Ixf1_Vxf1;
|
||||
double Ixf1_Vrth;
|
||||
|
||||
double Ixf2_Vbei;
|
||||
double Ixf2_Vbci;
|
||||
double Ixf2_Vxf2;
|
||||
double Ixf2_Vxf1;
|
||||
double Ixf2_Vrth;
|
||||
|
||||
/* loop through all the models */
|
||||
for( ; model != NULL; model = VBICnextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for( here = VBICinstances(model); here!= NULL;
|
||||
for( here = VBICinstances(model); here!= NULL;
|
||||
here = VBICnextInstance(here)) {
|
||||
|
||||
Ibe_Vbei = *(ckt->CKTstate0 + here->VBICibe_Vbei);
|
||||
Ibex_Vbex = *(ckt->CKTstate0 + here->VBICibex_Vbex);
|
||||
Itzf_Vbei = *(ckt->CKTstate0 + here->VBICitzf_Vbei);
|
||||
Itzf_Vbci = *(ckt->CKTstate0 + here->VBICitzf_Vbci);
|
||||
Itzr_Vbci = *(ckt->CKTstate0 + here->VBICitzr_Vbci);
|
||||
Itzr_Vbei = *(ckt->CKTstate0 + here->VBICitzr_Vbei);
|
||||
Iciei_Vbei = *(ckt->CKTstate0 + here->VBICiciei_Vbei);
|
||||
Iciei_Vbci = *(ckt->CKTstate0 + here->VBICiciei_Vbci);
|
||||
Iciei_Vrth = *(ckt->CKTstate0 + here->VBICiciei_Vrth);
|
||||
Iciei_Vxf2 = *(ckt->CKTstate0 + here->VBICiciei_Vxf2);
|
||||
Ibc_Vbci = *(ckt->CKTstate0 + here->VBICibc_Vbci);
|
||||
Ibc_Vbei = *(ckt->CKTstate0 + here->VBICibc_Vbei);
|
||||
Ibep_Vbep = *(ckt->CKTstate0 + here->VBICibep_Vbep);
|
||||
|
|
@ -77,6 +89,18 @@ VBICpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
Irs_Vrs = *(ckt->CKTstate0 + here->VBICirs_Vrs);
|
||||
Ire_Vre = *(ckt->CKTstate0 + here->VBICire_Vre);
|
||||
|
||||
Ixf1_Vbei = *(ckt->CKTstate0 + here->VBICixf1_Vbei);
|
||||
Ixf1_Vbci = *(ckt->CKTstate0 + here->VBICixf1_Vbci);
|
||||
Ixf1_Vxf2 = *(ckt->CKTstate0 + here->VBICixf1_Vxf2);
|
||||
Ixf1_Vxf1 = *(ckt->CKTstate0 + here->VBICixf1_Vxf1);
|
||||
Ixf1_Vrth = *(ckt->CKTstate0 + here->VBICixf1_Vrth);
|
||||
|
||||
Ixf2_Vbei = *(ckt->CKTstate0 + here->VBICixf2_Vbei);
|
||||
Ixf2_Vbci = *(ckt->CKTstate0 + here->VBICixf2_Vbci);
|
||||
Ixf2_Vxf2 = *(ckt->CKTstate0 + here->VBICixf2_Vxf2);
|
||||
Ixf2_Vxf1 = *(ckt->CKTstate0 + here->VBICixf2_Vxf1);
|
||||
Ixf2_Vrth = *(ckt->CKTstate0 + here->VBICixf2_Vrth);
|
||||
|
||||
/*
|
||||
c The real part
|
||||
*/
|
||||
|
|
@ -94,32 +118,22 @@ c Stamp element: Ibex
|
|||
*(here->VBICbaseBXEmitEIPtr) += -Ibex_Vbex;
|
||||
*(here->VBICemitEIBaseBXPtr) += -Ibex_Vbex;
|
||||
*(here->VBICemitEIEmitEIPtr) += Ibex_Vbex;
|
||||
|
||||
if (!here->VBIC_excessPhase) {
|
||||
/*
|
||||
c Stamp element: Itzf
|
||||
c Stamp element: Iciei
|
||||
*/
|
||||
*(here->VBICcollCIBaseBIPtr) += Itzf_Vbei;
|
||||
*(here->VBICcollCIEmitEIPtr) += -Itzf_Vbei;
|
||||
*(here->VBICcollCIBaseBIPtr) += Itzf_Vbci;
|
||||
*(here->VBICcollCICollCIPtr) += -Itzf_Vbci;
|
||||
*(here->VBICemitEIBaseBIPtr) += -Itzf_Vbei;
|
||||
*(here->VBICemitEIEmitEIPtr) += Itzf_Vbei;
|
||||
*(here->VBICemitEIBaseBIPtr) += -Itzf_Vbci;
|
||||
*(here->VBICemitEICollCIPtr) += Itzf_Vbci;
|
||||
*(here->VBICcollCIBaseBIPtr) += Iciei_Vbei;
|
||||
*(here->VBICcollCIEmitEIPtr) += -Iciei_Vbei;
|
||||
*(here->VBICcollCIBaseBIPtr) += Iciei_Vbci;
|
||||
*(here->VBICcollCICollCIPtr) += -Iciei_Vbci;
|
||||
*(here->VBICemitEIBaseBIPtr) += -Iciei_Vbei;
|
||||
*(here->VBICemitEIEmitEIPtr) += Iciei_Vbei;
|
||||
*(here->VBICemitEIBaseBIPtr) += -Iciei_Vbci;
|
||||
*(here->VBICemitEICollCIPtr) += Iciei_Vbci;
|
||||
if (here->VBIC_excessPhase) {
|
||||
*(here->VBICcollCIXf2Ptr) += Iciei_Vxf2;
|
||||
*(here->VBICemitEIXf2Ptr) += -Iciei_Vxf2;
|
||||
}
|
||||
/*
|
||||
c Stamp element: Itzr
|
||||
*/
|
||||
*(here->VBICemitEIBaseBIPtr) += Itzr_Vbci;
|
||||
*(here->VBICemitEICollCIPtr) += -Itzr_Vbci;
|
||||
*(here->VBICemitEIBaseBIPtr) += Itzr_Vbei;
|
||||
*(here->VBICemitEIEmitEIPtr) += -Itzr_Vbei;
|
||||
*(here->VBICcollCIBaseBIPtr) += -Itzr_Vbci;
|
||||
*(here->VBICcollCICollCIPtr) += Itzr_Vbci;
|
||||
*(here->VBICcollCIBaseBIPtr) += -Itzr_Vbei;
|
||||
*(here->VBICcollCIEmitEIPtr) += Itzr_Vbei;
|
||||
/*
|
||||
c Stamp element: Ibc
|
||||
*/
|
||||
*(here->VBICbaseBIBaseBIPtr) += Ibc_Vbci;
|
||||
|
|
@ -138,14 +152,14 @@ c Stamp element: Ibep
|
|||
*(here->VBICbaseBPBaseBXPtr) += -Ibep_Vbep;
|
||||
*(here->VBICbaseBPBaseBPPtr) += Ibep_Vbep;
|
||||
/*
|
||||
c Stamp element: Ircx
|
||||
c Stamp element: Rcx
|
||||
*/
|
||||
*(here->VBICcollCollPtr) += Ircx_Vrcx;
|
||||
*(here->VBICcollCXCollCXPtr) += Ircx_Vrcx;
|
||||
*(here->VBICcollCXCollPtr) += -Ircx_Vrcx;
|
||||
*(here->VBICcollCollCXPtr) += -Ircx_Vrcx;
|
||||
/*
|
||||
c Stamp element: Irci
|
||||
c Stamp element: Rci
|
||||
*/
|
||||
*(here->VBICcollCXCollCXPtr) += Irci_Vrci;
|
||||
*(here->VBICcollCXCollCIPtr) += -Irci_Vrci;
|
||||
|
|
@ -160,14 +174,14 @@ c Stamp element: Irci
|
|||
*(here->VBICcollCIBaseBIPtr) += -Irci_Vbcx;
|
||||
*(here->VBICcollCICollCXPtr) += Irci_Vbcx;
|
||||
/*
|
||||
c Stamp element: Irbx
|
||||
c Stamp element: Rbx
|
||||
*/
|
||||
*(here->VBICbaseBasePtr) += Irbx_Vrbx;
|
||||
*(here->VBICbaseBXBaseBXPtr) += Irbx_Vrbx;
|
||||
*(here->VBICbaseBXBasePtr) += -Irbx_Vrbx;
|
||||
*(here->VBICbaseBaseBXPtr) += -Irbx_Vrbx;
|
||||
/*
|
||||
c Stamp element: Irbi
|
||||
c Stamp element: Rbi
|
||||
*/
|
||||
*(here->VBICbaseBXBaseBXPtr) += Irbi_Vrbi;
|
||||
*(here->VBICbaseBXBaseBIPtr) += -Irbi_Vrbi;
|
||||
|
|
@ -182,14 +196,14 @@ c Stamp element: Irbi
|
|||
*(here->VBICbaseBIBaseBIPtr) += -Irbi_Vbci;
|
||||
*(here->VBICbaseBICollCIPtr) += Irbi_Vbci;
|
||||
/*
|
||||
c Stamp element: Ire
|
||||
c Stamp element: Re
|
||||
*/
|
||||
*(here->VBICemitEmitPtr) += Ire_Vre;
|
||||
*(here->VBICemitEIEmitEIPtr) += Ire_Vre;
|
||||
*(here->VBICemitEIEmitPtr) += -Ire_Vre;
|
||||
*(here->VBICemitEmitEIPtr) += -Ire_Vre;
|
||||
/*
|
||||
c Stamp element: Irbp
|
||||
c Stamp element: Rbp
|
||||
*/
|
||||
*(here->VBICbaseBPBaseBPPtr) += Irbp_Vrbp;
|
||||
*(here->VBICbaseBPCollCXPtr) += -Irbp_Vrbp;
|
||||
|
|
@ -226,7 +240,7 @@ c Stamp element: Iccp
|
|||
*(here->VBICsubsSISubsSIPtr) += -Iccp_Vbcp;
|
||||
*(here->VBICsubsSIBaseBPPtr) += Iccp_Vbcp;
|
||||
/*
|
||||
c Stamp element: Irs
|
||||
c Stamp element: Rs
|
||||
*/
|
||||
*(here->VBICsubsSubsPtr) += Irs_Vrs;
|
||||
*(here->VBICsubsSISubsSIPtr) += Irs_Vrs;
|
||||
|
|
@ -237,9 +251,6 @@ c Stamp element: Irs
|
|||
|
||||
Ibe_Vrth = here->VBICibe_Vrth;
|
||||
Ibex_Vrth = here->VBICibex_Vrth;
|
||||
if (!here->VBIC_excessPhase)
|
||||
Itzf_Vrth = here->VBICitzf_vrth;
|
||||
Itzr_Vrth = here->VBICitzr_Vrth;
|
||||
Ibc_Vrth = here->VBICibc_Vrth;
|
||||
Ibep_Vrth = here->VBICibep_Vrth;
|
||||
Ircx_Vrth = here->VBICircx_Vrth;
|
||||
|
|
@ -279,19 +290,11 @@ c Stamp element: Ibex
|
|||
*/
|
||||
*(here->VBICbaseBXtempPtr) += Ibex_Vrth;
|
||||
*(here->VBICemitEItempPtr) += -Ibex_Vrth;
|
||||
|
||||
if (!here->VBIC_excessPhase) {
|
||||
/*
|
||||
c Stamp element: Itzf
|
||||
c Stamp element: Iciei
|
||||
*/
|
||||
*(here->VBICcollCItempPtr) += Itzf_Vrth;
|
||||
*(here->VBICemitEItempPtr) += -Itzf_Vrth;
|
||||
}
|
||||
/*
|
||||
c Stamp element: Itzr
|
||||
*/
|
||||
*(here->VBICemitEItempPtr) += Itzr_Vrth;
|
||||
*(here->VBICcollCItempPtr) += -Itzr_Vrth;
|
||||
*(here->VBICcollCItempPtr) += Iciei_Vrth;
|
||||
*(here->VBICemitEItempPtr) += -Iciei_Vrth;
|
||||
/*
|
||||
c Stamp element: Ibc
|
||||
*/
|
||||
|
|
@ -386,44 +389,23 @@ c Stamp element: Ith
|
|||
*(here->VBICtempEmitEIPtr) += +Ith_Vre;
|
||||
*(here->VBICtempSubsPtr) += -Ith_Vrs;
|
||||
*(here->VBICtempSubsSIPtr) += +Ith_Vrs;
|
||||
if (here->VBIC_excessPhase) {
|
||||
Ith_Vrxf = *(ckt->CKTstate0 + here->VBICith_Vrxf);
|
||||
*(here->VBICtempXf2Ptr) += +Ith_Vrxf;
|
||||
}
|
||||
}
|
||||
|
||||
if (here->VBIC_excessPhase) {
|
||||
Itxf_Vrxf = *(ckt->CKTstate0 + here->VBICitxf_Vrxf);
|
||||
Ibc_Vrxf = *(ckt->CKTstate0 + here->VBICibc_Vrxf);
|
||||
Ixzf_Vbei = *(ckt->CKTstate0 + here->VBICixzf_Vbei);
|
||||
Ixzf_Vbci = *(ckt->CKTstate0 + here->VBICixzf_Vbci);
|
||||
Ixxf_Vrxf = *(ckt->CKTstate0 + here->VBICixxf_Vrxf);
|
||||
/*
|
||||
c Stamp element: Itxf
|
||||
*/
|
||||
*(here->VBICcollCIXf2Ptr) += Itxf_Vrxf;
|
||||
*(here->VBICemitEIXf2Ptr) += -Itxf_Vrxf;
|
||||
/*
|
||||
c Stamp element: Ibc
|
||||
*/
|
||||
*(here->VBICbaseBIXf2Ptr) += Ibc_Vrxf;
|
||||
*(here->VBICcollCIXf2Ptr) += -Ibc_Vrxf;
|
||||
/*
|
||||
c Stamp element: Ixzf, Branch: xf1-ground
|
||||
*/
|
||||
*(here->VBICxf1BaseBIPtr) += +Ixzf_Vbei;
|
||||
*(here->VBICxf1EmitEIPtr) += -Ixzf_Vbei;
|
||||
*(here->VBICxf1BaseBIPtr) += +Ixzf_Vbci;
|
||||
*(here->VBICxf1CollCIPtr) += -Ixzf_Vbci;
|
||||
if (here->VBIC_selfheat) {
|
||||
Ixzf_Vrth = *(ckt->CKTstate0 + here->VBICixzf_Vrth);
|
||||
*(here->VBICxf1TempPtr) += Ixzf_Vrth;
|
||||
}
|
||||
/*
|
||||
c Stamp element: Ixxf, Branch: xf2-ground
|
||||
*/
|
||||
*(here->VBICxf2Xf2Ptr) += +Ixxf_Vrxf;
|
||||
|
||||
//Ixf1
|
||||
*(here->VBICxf1BaseBIPtr) += +Ixf1_Vbei;
|
||||
*(here->VBICxf1EmitEIPtr) += -Ixf1_Vbei;
|
||||
*(here->VBICxf1BaseBIPtr) += +Ixf1_Vbci;
|
||||
*(here->VBICxf1CollCIPtr) += -Ixf1_Vbci;
|
||||
*(here->VBICxf1Xf2Ptr) += +Ixf1_Vxf2;
|
||||
*(here->VBICxf1Xf1Ptr) += +Ixf1_Vxf1;
|
||||
//Ixf2
|
||||
*(here->VBICxf2BaseBIPtr) += +Ixf2_Vbei;
|
||||
*(here->VBICxf2EmitEIPtr) += -Ixf2_Vbei;
|
||||
*(here->VBICxf2BaseBIPtr) += +Ixf2_Vbci;
|
||||
*(here->VBICxf2CollCIPtr) += -Ixf2_Vbci;
|
||||
*(here->VBICxf2Xf2Ptr) += +Ixf2_Vxf2;
|
||||
*(here->VBICxf2Xf1Ptr) += +Ixf2_Vxf1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -439,6 +421,8 @@ c The complex part
|
|||
XQbcp_Vbcp = *(ckt->CKTstate0 + here->VBICcqbcp);
|
||||
XQbeo_Vbe = *(ckt->CKTstate0 + here->VBICcqbeo);
|
||||
XQbco_Vbc = *(ckt->CKTstate0 + here->VBICcqbco);
|
||||
XQxf1_Vxf1 = *(ckt->CKTstate0 + here->VBICcqxf1);
|
||||
XQxf2_Vxf2 = *(ckt->CKTstate0 + here->VBICcqxf2);
|
||||
/*
|
||||
c Stamp element: Qbe
|
||||
*/
|
||||
|
|
@ -545,6 +529,14 @@ c Stamp element: Qbco
|
|||
*(here->VBICcollBasePtr ) += -XQbco_Vbc * (s->real);
|
||||
*(here->VBICcollBasePtr + 1) += -XQbco_Vbc * (s->imag);
|
||||
|
||||
if (here->VBIC_excessPhase) {
|
||||
//Qxf1
|
||||
*(here->VBICxf1Xf1Ptr + 1) += +XQxf1_Vxf1*(s->imag);
|
||||
*(here->VBICxf1Xf1Ptr) += +XQxf1_Vxf1*(s->real);
|
||||
//Qxf2
|
||||
*(here->VBICxf2Xf2Ptr + 1) += +XQxf2_Vxf2*(s->imag);
|
||||
*(here->VBICxf2Xf2Ptr ) += +XQxf2_Vxf2*(s->real);
|
||||
}
|
||||
if (here->VBIC_selfheat) {
|
||||
XQcth_Vrth = here->VBICcapcth;
|
||||
XQbe_Vrth = here->VBICcapqbeth;
|
||||
|
|
@ -581,28 +573,14 @@ c Stamp element: Qbco
|
|||
*(here->VBICsubsSItempPtr + 1) += XQbcp_Vrth * (s->imag);
|
||||
*(here->VBICbaseBPtempPtr ) += -XQbcp_Vrth * (s->real);
|
||||
*(here->VBICbaseBPtempPtr + 1) += -XQbcp_Vrth * (s->imag);
|
||||
|
||||
if (here->VBIC_excessPhase) {
|
||||
// Stamp element: Ixf1 f_xf1 = +
|
||||
*(here->VBICxf1TempPtr) += Ixf1_Vrth;
|
||||
// Stamp element: Ixf2 f_xf2 = +
|
||||
*(here->VBICxf2TempPtr) += Ixf2_Vrth;
|
||||
}
|
||||
}
|
||||
if (here->VBIC_excessPhase) {
|
||||
/*
|
||||
c Stamp element: Qcxf
|
||||
*/
|
||||
XQcxf_Vcxf = here->VBICcapQcxf;
|
||||
*(here->VBICxf1Xf1Ptr ) += XQcxf_Vcxf * s->real;
|
||||
*(here->VBICxf1Xf1Ptr + 1) += XQcxf_Vcxf * s->imag;
|
||||
/*
|
||||
c Stamp element: L = TD/3
|
||||
*/
|
||||
Xl = here->VBICindInduct;
|
||||
|
||||
*(here->VBICxf1IbrPtr) += 1;
|
||||
*(here->VBICxf2IbrPtr) -= 1;
|
||||
*(here->VBICibrXf1Ptr) += 1;
|
||||
*(here->VBICibrXf2Ptr) -= 1;
|
||||
*(here->VBICibrIbrPtr ) -= Xl * s->real;
|
||||
*(here->VBICibrIbrPtr + 1) -= Xl * s->imag;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
|
|
|
|||
|
|
@ -483,7 +483,6 @@ VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
model->VBICthermalCapacitance = 1e-12;
|
||||
|
||||
if((model->VBICdelayTimeFGiven) && (model->VBICdelayTimeF > 0.0)) {
|
||||
here->VBICindInduct = model->VBICdelayTimeF / 3.0 / here->VBICm;
|
||||
here->VBIC_excessPhase = 1;
|
||||
} else {
|
||||
here->VBIC_excessPhase = 0;
|
||||
|
|
@ -518,11 +517,6 @@ VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
if(error) return(error);
|
||||
here->VBICxf2Node = tmp->number;
|
||||
}
|
||||
if(here->VBICbrEq == 0) {
|
||||
error = CKTmkCur(ckt,&tmp,here->VBICname,"branch");
|
||||
if(error) return(error);
|
||||
here->VBICbrEq = tmp->number;
|
||||
}
|
||||
} else {
|
||||
here->VBICxf1Node = 0;
|
||||
here->VBICxf2Node = 0;
|
||||
|
|
@ -612,27 +606,25 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
TSTALLOC(VBICtempSubsSIPtr,VBICtempNode,VBICsubsSINode);
|
||||
TSTALLOC(VBICtempTempPtr,VBICtempNode,VBICtempNode);
|
||||
if (here->VBIC_excessPhase) {
|
||||
TSTALLOC(VBICtempXf2Ptr, VBICtempNode, VBICxf2Node);
|
||||
TSTALLOC(VBICxf1TempPtr, VBICxf1Node ,VBICtempNode);
|
||||
TSTALLOC(VBICxf2TempPtr ,VBICxf2Node ,VBICtempNode);
|
||||
TSTALLOC(VBICxf1TempPtr ,VBICxf1Node ,VBICtempNode);
|
||||
}
|
||||
}
|
||||
|
||||
if (here->VBIC_excessPhase) {
|
||||
TSTALLOC(VBICxf1Xf1Ptr , VBICxf1Node , VBICxf1Node);
|
||||
TSTALLOC(VBICxf1Xf2Ptr , VBICxf1Node , VBICxf2Node);
|
||||
TSTALLOC(VBICxf1CollCIPtr, VBICxf1Node , VBICcollCINode);
|
||||
TSTALLOC(VBICxf1BaseBIPtr, VBICxf1Node , VBICbaseBINode);
|
||||
TSTALLOC(VBICxf1EmitEIPtr, VBICxf1Node , VBICemitEINode);
|
||||
TSTALLOC(VBICxf2Xf2Ptr , VBICxf2Node , VBICxf2Node);
|
||||
TSTALLOC(VBICxf2Xf1Ptr , VBICxf2Node , VBICxf1Node);
|
||||
TSTALLOC(VBICcollCIXf2Ptr, VBICcollCINode, VBICxf2Node);
|
||||
TSTALLOC(VBICbaseBIXf2Ptr, VBICbaseBINode, VBICxf2Node);
|
||||
TSTALLOC(VBICemitEIXf2Ptr, VBICemitEINode, VBICxf2Node);
|
||||
TSTALLOC(VBICxf1IbrPtr, VBICxf1Node, VBICbrEq);
|
||||
TSTALLOC(VBICxf2IbrPtr, VBICxf2Node, VBICbrEq);
|
||||
TSTALLOC(VBICibrXf2Ptr, VBICbrEq, VBICxf2Node);
|
||||
TSTALLOC(VBICibrXf1Ptr, VBICbrEq, VBICxf1Node);
|
||||
TSTALLOC(VBICibrIbrPtr, VBICbrEq, VBICbrEq);
|
||||
TSTALLOC(VBICxf1Xf1Ptr ,VBICxf1Node ,VBICxf1Node);
|
||||
TSTALLOC(VBICxf1BaseBIPtr,VBICxf1Node ,VBICbaseBINode);
|
||||
TSTALLOC(VBICxf1EmitEIPtr,VBICxf1Node ,VBICemitEINode);
|
||||
TSTALLOC(VBICxf1CollCIPtr,VBICxf1Node ,VBICcollCINode);
|
||||
TSTALLOC(VBICxf1Xf2Ptr ,VBICxf1Node ,VBICxf2Node);
|
||||
|
||||
TSTALLOC(VBICxf2Xf1Ptr ,VBICxf2Node ,VBICxf1Node);
|
||||
TSTALLOC(VBICxf2BaseBIPtr,VBICxf2Node ,VBICbaseBINode);
|
||||
TSTALLOC(VBICxf2EmitEIPtr,VBICxf2Node ,VBICemitEINode);
|
||||
TSTALLOC(VBICxf2CollCIPtr,VBICxf2Node ,VBICcollCINode);
|
||||
TSTALLOC(VBICxf2Xf2Ptr ,VBICxf2Node ,VBICxf2Node);
|
||||
TSTALLOC(VBICemitEIXf2Ptr,VBICemitEINode,VBICxf2Node);
|
||||
TSTALLOC(VBICcollCIXf2Ptr,VBICcollCINode,VBICxf2Node);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -695,9 +687,6 @@ VBICunsetup(
|
|||
CKTdltNNum(ckt, here->VBICxf2Node);
|
||||
here->VBICxf2Node = 0;
|
||||
|
||||
if (here->VBICbrEq > 0)
|
||||
CKTdltNNum(ckt, here->VBICbrEq);
|
||||
here->VBICbrEq = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue