|
|
|
@ -22,10 +22,9 @@ Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH |
|
|
|
int |
|
|
|
VBICask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalue *select) |
|
|
|
{ |
|
|
|
IFvalue IC, IB, IE, IS; |
|
|
|
VBICinstance *here = (VBICinstance*)instPtr; |
|
|
|
|
|
|
|
NG_IGNORE(select); |
|
|
|
|
|
|
|
switch(which) { |
|
|
|
case VBIC_AREA: |
|
|
|
value->rValue = here->VBICarea; |
|
|
|
@ -98,14 +97,25 @@ VBICask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalu |
|
|
|
*(ckt->CKTstate0 + here->VBICibcp); |
|
|
|
return(OK); |
|
|
|
case VBIC_QUEST_POWER: |
|
|
|
value->rValue = fabs(*(ckt->CKTstate0 + here->VBICitzf) - *(ckt->CKTstate0 + here->VBICitzr)) |
|
|
|
* fabs(*(ckt->CKTstate0 + here->VBICvbei) - *(ckt->CKTstate0 + here->VBICvbci)) + |
|
|
|
fabs(*(ckt->CKTstate0 + here->VBICibe) * *(ckt->CKTstate0 + here->VBICvbei)) + |
|
|
|
fabs(*(ckt->CKTstate0 + here->VBICibex) * *(ckt->CKTstate0 + here->VBICvbex)) + |
|
|
|
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); |
|
|
|
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(*(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)); |
|
|
|
return(OK); |
|
|
|
case VBIC_QUEST_GM: |
|
|
|
value->rValue = *(ckt->CKTstate0 + here->VBICitzf_Vbei); |
|
|
|
|