something like that -.-
This commit is contained in:
parent
929e668836
commit
404e165e4a
|
|
@ -67,6 +67,8 @@ typedef struct sHICUMinstance {
|
||||||
int HICUMxfNode; /* number of internal excess phase node qdei */
|
int HICUMxfNode; /* number of internal excess phase node qdei */
|
||||||
int HICUMxf1Node; /* number of internal excess phase 1 node itf */
|
int HICUMxf1Node; /* number of internal excess phase 1 node itf */
|
||||||
int HICUMxf2Node; /* number of internal excess phase 2 node itf */
|
int HICUMxf2Node; /* number of internal excess phase 2 node itf */
|
||||||
|
int HICUMNoise1Node; /* number of internal noise 1 node for BiEi correlated noise */
|
||||||
|
int HICUMNoise2Node; /* number of internal noise 2 node for CiEi correlated noise */
|
||||||
|
|
||||||
double HICUMarea; /* area factor for the hicum */
|
double HICUMarea; /* area factor for the hicum */
|
||||||
//initial conditions
|
//initial conditions
|
||||||
|
|
@ -311,6 +313,10 @@ typedef struct sHICUMinstance {
|
||||||
double *HICUMtempSubsSIPtr;
|
double *HICUMtempSubsSIPtr;
|
||||||
double *HICUMtempTempPtr;
|
double *HICUMtempTempPtr;
|
||||||
|
|
||||||
|
/* correlated noise */
|
||||||
|
double *HICUMn1N1Ptr;
|
||||||
|
double *HICUMn2N2Ptr;
|
||||||
|
|
||||||
unsigned HICUMareaGiven :1; /* flag to indicate area was specified */
|
unsigned HICUMareaGiven :1; /* flag to indicate area was specified */
|
||||||
unsigned HICUMoff :1; /* 'off' flag for hicum */
|
unsigned HICUMoff :1; /* 'off' flag for hicum */
|
||||||
unsigned HICUMicVBEGiven :1; /* flag to indicate VBE init. cond. given */
|
unsigned HICUMicVBEGiven :1; /* flag to indicate VBE init. cond. given */
|
||||||
|
|
@ -383,150 +389,160 @@ typedef struct sHICUMinstance {
|
||||||
#define HICUMvxf HICUMstate+10
|
#define HICUMvxf HICUMstate+10
|
||||||
#define HICUMvxf1 HICUMstate+11
|
#define HICUMvxf1 HICUMstate+11
|
||||||
#define HICUMvxf2 HICUMstate+12
|
#define HICUMvxf2 HICUMstate+12
|
||||||
|
#define HICUMvn1 HICUMstate+13
|
||||||
|
#define HICUMvn2 HICUMstate+14
|
||||||
|
|
||||||
#define HICUMibiei HICUMstate+13
|
#define HICUMibiei HICUMstate+15
|
||||||
#define HICUMibiei_Vbiei HICUMstate+14
|
#define HICUMibiei_Vbiei HICUMstate+16
|
||||||
#define HICUMibiei_Vbici HICUMstate+15
|
#define HICUMibiei_Vbici HICUMstate+17
|
||||||
#define HICUMibiei_Vrth HICUMstate+16
|
#define HICUMibiei_Vrth HICUMstate+18
|
||||||
|
|
||||||
#define HICUMibpei HICUMstate+17
|
#define HICUMibpei HICUMstate+19
|
||||||
#define HICUMibpei_Vbpei HICUMstate+18
|
#define HICUMibpei_Vbpei HICUMstate+20
|
||||||
#define HICUMibpei_Vrth HICUMstate+19
|
#define HICUMibpei_Vrth HICUMstate+21
|
||||||
|
|
||||||
#define HICUMiciei HICUMstate+20
|
#define HICUMiciei HICUMstate+22
|
||||||
#define HICUMiciei_Vbiei HICUMstate+21
|
#define HICUMiciei_Vbiei HICUMstate+23
|
||||||
#define HICUMiciei_Vbici HICUMstate+22
|
#define HICUMiciei_Vbici HICUMstate+24
|
||||||
#define HICUMiciei_Vxf2 HICUMstate+23
|
#define HICUMiciei_Vxf2 HICUMstate+25
|
||||||
#define HICUMiciei_Vrth HICUMstate+24
|
#define HICUMiciei_Vrth HICUMstate+26
|
||||||
|
|
||||||
#define HICUMibici HICUMstate+25
|
#define HICUMibici HICUMstate+27
|
||||||
#define HICUMibici_Vbici HICUMstate+26
|
#define HICUMibici_Vbici HICUMstate+28
|
||||||
#define HICUMibici_Vbiei HICUMstate+27
|
#define HICUMibici_Vbiei HICUMstate+29
|
||||||
#define HICUMibici_Vrth HICUMstate+28
|
#define HICUMibici_Vrth HICUMstate+30
|
||||||
|
|
||||||
#define HICUMibpbi HICUMstate+29
|
#define HICUMibpbi HICUMstate+31
|
||||||
#define HICUMibpbi_Vbpbi HICUMstate+30
|
#define HICUMibpbi_Vbpbi HICUMstate+32
|
||||||
#define HICUMibpbi_Vbiei HICUMstate+31
|
#define HICUMibpbi_Vbiei HICUMstate+33
|
||||||
#define HICUMibpbi_Vbici HICUMstate+32
|
#define HICUMibpbi_Vbici HICUMstate+34
|
||||||
#define HICUMibpbi_Vrth HICUMstate+33
|
#define HICUMibpbi_Vrth HICUMstate+35
|
||||||
|
|
||||||
#define HICUMibpci HICUMstate+34
|
#define HICUMibpci HICUMstate+36
|
||||||
#define HICUMibpci_Vbpci HICUMstate+35
|
#define HICUMibpci_Vbpci HICUMstate+37
|
||||||
#define HICUMibpci_Vrth HICUMstate+36
|
#define HICUMibpci_Vrth HICUMstate+38
|
||||||
|
|
||||||
#define HICUMisici HICUMstate+37
|
#define HICUMisici HICUMstate+39
|
||||||
#define HICUMisici_Vsici HICUMstate+38
|
#define HICUMisici_Vsici HICUMstate+40
|
||||||
#define HICUMisici_Vrth HICUMstate+39
|
#define HICUMisici_Vrth HICUMstate+41
|
||||||
|
|
||||||
#define HICUMibpsi HICUMstate+40
|
#define HICUMibpsi HICUMstate+42
|
||||||
#define HICUMibpsi_Vbpci HICUMstate+41
|
#define HICUMibpsi_Vbpci HICUMstate+43
|
||||||
#define HICUMibpsi_Vsici HICUMstate+42
|
#define HICUMibpsi_Vsici HICUMstate+44
|
||||||
#define HICUMibpsi_Vrth HICUMstate+43
|
#define HICUMibpsi_Vrth HICUMstate+45
|
||||||
|
|
||||||
#define HICUMisis_Vsis HICUMstate+44
|
#define HICUMisis_Vsis HICUMstate+46
|
||||||
|
|
||||||
#define HICUMieie HICUMstate+45 // needed for re-flicker noise
|
#define HICUMieie HICUMstate+47 // needed for re-flicker noise
|
||||||
#define HICUMieie_Vrth HICUMstate+46
|
#define HICUMieie_Vrth HICUMstate+48
|
||||||
|
|
||||||
#define HICUMqrbi HICUMstate+47
|
#define HICUMqrbi HICUMstate+49
|
||||||
#define HICUMcqrbi HICUMstate+48
|
#define HICUMcqrbi HICUMstate+50
|
||||||
|
|
||||||
#define HICUMqjei HICUMstate+49
|
#define HICUMqjei HICUMstate+51
|
||||||
#define HICUMcqjei HICUMstate+50
|
#define HICUMcqjei HICUMstate+52
|
||||||
|
|
||||||
#define HICUMqf HICUMstate+51
|
#define HICUMqf HICUMstate+53
|
||||||
#define HICUMcqf HICUMstate+52
|
#define HICUMcqf HICUMstate+54
|
||||||
|
|
||||||
#define HICUMqr HICUMstate+53
|
#define HICUMqr HICUMstate+55
|
||||||
#define HICUMcqr HICUMstate+54
|
#define HICUMcqr HICUMstate+56
|
||||||
|
|
||||||
#define HICUMqjci HICUMstate+55
|
#define HICUMqjci HICUMstate+57
|
||||||
#define HICUMcqjci HICUMstate+56
|
#define HICUMcqjci HICUMstate+58
|
||||||
|
|
||||||
#define HICUMqjep HICUMstate+57
|
#define HICUMqjep HICUMstate+59
|
||||||
#define HICUMcqjep HICUMstate+58
|
#define HICUMcqjep HICUMstate+60
|
||||||
|
|
||||||
#define HICUMqjcx0_i HICUMstate+59
|
#define HICUMqjcx0_i HICUMstate+61
|
||||||
#define HICUMcqcx0_t_i HICUMstate+60
|
#define HICUMcqcx0_t_i HICUMstate+62
|
||||||
|
|
||||||
#define HICUMqjcx0_ii HICUMstate+61
|
#define HICUMqjcx0_ii HICUMstate+63
|
||||||
#define HICUMcqcx0_t_ii HICUMstate+62
|
#define HICUMcqcx0_t_ii HICUMstate+64
|
||||||
|
|
||||||
#define HICUMqdsu HICUMstate+63
|
#define HICUMqdsu HICUMstate+65
|
||||||
#define HICUMcqdsu HICUMstate+64
|
#define HICUMcqdsu HICUMstate+66
|
||||||
|
|
||||||
#define HICUMqjs HICUMstate+65
|
#define HICUMqjs HICUMstate+67
|
||||||
#define HICUMcqjs HICUMstate+66
|
#define HICUMcqjs HICUMstate+68
|
||||||
|
|
||||||
#define HICUMqscp HICUMstate+67
|
#define HICUMqscp HICUMstate+69
|
||||||
#define HICUMcqscp HICUMstate+68
|
#define HICUMcqscp HICUMstate+70
|
||||||
|
|
||||||
#define HICUMqbepar1 HICUMstate+69
|
#define HICUMqbepar1 HICUMstate+71
|
||||||
#define HICUMcqbepar1 HICUMstate+70
|
#define HICUMcqbepar1 HICUMstate+72
|
||||||
#define HICUMgqbepar1 HICUMstate+71
|
#define HICUMgqbepar1 HICUMstate+73
|
||||||
|
|
||||||
#define HICUMqbepar2 HICUMstate+72
|
#define HICUMqbepar2 HICUMstate+74
|
||||||
#define HICUMcqbepar2 HICUMstate+73
|
#define HICUMcqbepar2 HICUMstate+75
|
||||||
#define HICUMgqbepar2 HICUMstate+74
|
#define HICUMgqbepar2 HICUMstate+76
|
||||||
|
|
||||||
#define HICUMqbcpar1 HICUMstate+75
|
#define HICUMqbcpar1 HICUMstate+77
|
||||||
#define HICUMcqbcpar1 HICUMstate+76
|
#define HICUMcqbcpar1 HICUMstate+78
|
||||||
#define HICUMgqbcpar1 HICUMstate+77
|
#define HICUMgqbcpar1 HICUMstate+79
|
||||||
|
|
||||||
#define HICUMqbcpar2 HICUMstate+78
|
#define HICUMqbcpar2 HICUMstate+80
|
||||||
#define HICUMcqbcpar2 HICUMstate+79
|
#define HICUMcqbcpar2 HICUMstate+81
|
||||||
#define HICUMgqbcpar2 HICUMstate+80
|
#define HICUMgqbcpar2 HICUMstate+82
|
||||||
|
|
||||||
#define HICUMqsu HICUMstate+81
|
#define HICUMqsu HICUMstate+83
|
||||||
#define HICUMcqsu HICUMstate+82
|
#define HICUMcqsu HICUMstate+84
|
||||||
#define HICUMgqsu HICUMstate+83
|
#define HICUMgqsu HICUMstate+85
|
||||||
|
|
||||||
#define HICUMqcth HICUMstate+84
|
#define HICUMqcth HICUMstate+86
|
||||||
#define HICUMcqcth HICUMstate+85
|
#define HICUMcqcth HICUMstate+87
|
||||||
|
|
||||||
#define HICUMqxf HICUMstate+86
|
#define HICUMqxf HICUMstate+88
|
||||||
#define HICUMcqxf HICUMstate+87
|
#define HICUMcqxf HICUMstate+89
|
||||||
#define HICUMgqxf HICUMstate+88
|
#define HICUMgqxf HICUMstate+90
|
||||||
#define HICUMixf HICUMstate+89
|
#define HICUMixf HICUMstate+91
|
||||||
#define HICUMixf_Vbiei HICUMstate+90
|
#define HICUMixf_Vbiei HICUMstate+92
|
||||||
#define HICUMixf_Vbici HICUMstate+91
|
#define HICUMixf_Vbici HICUMstate+93
|
||||||
#define HICUMixf_Vxf HICUMstate+92
|
#define HICUMixf_Vxf HICUMstate+94
|
||||||
#define HICUMixf_Vrth HICUMstate+93
|
#define HICUMixf_Vrth HICUMstate+95
|
||||||
|
|
||||||
#define HICUMqxf1 HICUMstate+94
|
#define HICUMqxf1 HICUMstate+96
|
||||||
#define HICUMcqxf1 HICUMstate+95
|
#define HICUMcqxf1 HICUMstate+97
|
||||||
#define HICUMgqxf1 HICUMstate+96
|
#define HICUMgqxf1 HICUMstate+98
|
||||||
#define HICUMixf1 HICUMstate+97
|
#define HICUMixf1 HICUMstate+99
|
||||||
#define HICUMixf1_Vbiei HICUMstate+98
|
#define HICUMixf1_Vbiei HICUMstate+100
|
||||||
#define HICUMixf1_Vbici HICUMstate+99
|
#define HICUMixf1_Vbici HICUMstate+101
|
||||||
#define HICUMixf1_Vxf2 HICUMstate+100
|
#define HICUMixf1_Vxf2 HICUMstate+102
|
||||||
#define HICUMixf1_Vxf1 HICUMstate+101
|
#define HICUMixf1_Vxf1 HICUMstate+103
|
||||||
#define HICUMixf1_Vrth HICUMstate+102
|
#define HICUMixf1_Vrth HICUMstate+104
|
||||||
|
|
||||||
#define HICUMqxf2 HICUMstate+103
|
#define HICUMqxf2 HICUMstate+105
|
||||||
#define HICUMcqxf2 HICUMstate+104
|
#define HICUMcqxf2 HICUMstate+106
|
||||||
#define HICUMgqxf2 HICUMstate+105
|
#define HICUMgqxf2 HICUMstate+107
|
||||||
#define HICUMixf2 HICUMstate+106
|
#define HICUMixf2 HICUMstate+108
|
||||||
#define HICUMixf2_Vbiei HICUMstate+108
|
#define HICUMixf2_Vbiei HICUMstate+109
|
||||||
#define HICUMixf2_Vbici HICUMstate+109
|
#define HICUMixf2_Vbici HICUMstate+110
|
||||||
#define HICUMixf2_Vxf1 HICUMstate+110
|
#define HICUMixf2_Vxf1 HICUMstate+111
|
||||||
#define HICUMixf2_Vxf2 HICUMstate+111
|
#define HICUMixf2_Vxf2 HICUMstate+112
|
||||||
#define HICUMixf2_Vrth HICUMstate+112
|
#define HICUMixf2_Vrth HICUMstate+113
|
||||||
|
|
||||||
#define HICUMith HICUMstate+113
|
#define HICUMith HICUMstate+114
|
||||||
#define HICUMith_Vrth HICUMstate+114
|
#define HICUMith_Vrth HICUMstate+115
|
||||||
#define HICUMith_Vbiei HICUMstate+115
|
#define HICUMith_Vbiei HICUMstate+116
|
||||||
#define HICUMith_Vbici HICUMstate+116
|
#define HICUMith_Vbici HICUMstate+117
|
||||||
#define HICUMith_Vbpbi HICUMstate+117
|
#define HICUMith_Vbpbi HICUMstate+118
|
||||||
#define HICUMith_Vbpci HICUMstate+118
|
#define HICUMith_Vbpci HICUMstate+119
|
||||||
#define HICUMith_Vbpei HICUMstate+119
|
#define HICUMith_Vbpei HICUMstate+120
|
||||||
#define HICUMith_Vciei HICUMstate+120
|
#define HICUMith_Vciei HICUMstate+121
|
||||||
#define HICUMith_Vsici HICUMstate+121
|
#define HICUMith_Vsici HICUMstate+122
|
||||||
#define HICUMith_Vcic HICUMstate+122
|
#define HICUMith_Vcic HICUMstate+123
|
||||||
#define HICUMith_Vbbp HICUMstate+123
|
#define HICUMith_Vbbp HICUMstate+124
|
||||||
#define HICUMith_Veie HICUMstate+124
|
#define HICUMith_Veie HICUMstate+125
|
||||||
|
|
||||||
#define HICUMnumStates 125
|
#define HICUMqn1 HICUMstate+126
|
||||||
|
#define HICUMcqn1 HICUMstate+127
|
||||||
|
#define HICUMgqn1 HICUMstate+128
|
||||||
|
|
||||||
|
#define HICUMqn2 HICUMstate+129
|
||||||
|
#define HICUMcqn2 HICUMstate+130
|
||||||
|
#define HICUMgqn2 HICUMstate+131
|
||||||
|
|
||||||
|
#define HICUMnumStates 132
|
||||||
|
|
||||||
/* per model data */
|
/* per model data */
|
||||||
typedef struct sHICUMmodel { /* model structure for a hicum */
|
typedef struct sHICUMmodel { /* model structure for a hicum */
|
||||||
|
|
|
||||||
|
|
@ -169,33 +169,16 @@ HICUMnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata
|
||||||
*(ckt->CKTstate0 + here->HICUMisici));
|
*(ckt->CKTstate0 + here->HICUMisici));
|
||||||
|
|
||||||
//todo: iciei contains it, has to be separated for non-correlated noise
|
//todo: iciei contains it, has to be separated for non-correlated noise
|
||||||
if ( model->HICUMflcono == 1 && (model->HICUMalit > 0 && model->HICUMalqf > 0)) {
|
if (model->HICUMflcono == 1 && (model->HICUMalit > 0 && model->HICUMalqf > 0)) {
|
||||||
// parameter definition
|
// in case of correlated noise, the noise is added to two new branches and then added to biei and ciei in the DC/AC load
|
||||||
int n_w = 1;
|
NevalSrc(&noizDens[HICUMIBEINOIZ],&lnNdens[HICUMIBEINOIZ],
|
||||||
float n_1 = here->HICUMtf*model->HICUMalit;
|
ckt,SHOTNOISE,here->HICUMNoise1Node, 0,
|
||||||
IFvalue betadc;
|
*(ckt->CKTstate0 + here->HICUMibiei));
|
||||||
HICUMask(ckt, here, HICUM_QUEST_BETADC, &betadc, select);
|
NevalSrc(&noizDens[HICUMITNOIZ],&lnNdens[HICUMITNOIZ],
|
||||||
float sqrt_n2 = betadc.rValue * (2*model->HICUMalqf-model->HICUMalit*model->HICUMalit);
|
ckt,SHOTNOISE,here->HICUMNoise2Node, 0,
|
||||||
float n_2 = 0;
|
*(ckt->CKTstate0 + here->HICUMiciei));
|
||||||
|
|
||||||
if (sqrt_n2 > 0.0) {
|
|
||||||
n_2 = here->HICUMtf*sqrt(sqrt_n2);
|
|
||||||
}
|
|
||||||
|
|
||||||
// realization of modified base shot noise source I1(bi,ei)
|
|
||||||
I(b_n1) <+ white_noise(2*`P_Q*abs(ibei),"ibei");
|
|
||||||
I(b_n1) <+ -V(b_n1);
|
|
||||||
I(bi,ei) <+ V(b_n1)+n_2/n_w*ddt(n_w*V(b_n1));
|
|
||||||
|
|
||||||
// realization of controlled base noise source I2(bi,ei)
|
|
||||||
I(bi,ei) <+ n_1/n_w*ddt(n_w*V(b_n2));
|
|
||||||
|
|
||||||
// realization of modified collector shot noise source I(ci,ei) (uncontrolled)
|
|
||||||
I(b_n2) <+ white_noise(2*`P_Q*abs(it),"it");
|
|
||||||
I(b_n2) <+ -V(b_n2);
|
|
||||||
I(ci,ei) <+ V(b_n2);
|
|
||||||
|
|
||||||
// end "Correlated noise in BJT"
|
|
||||||
} else {
|
} else {
|
||||||
NevalSrc(&noizDens[HICUMITNOIZ],&lnNdens[HICUMITNOIZ],
|
NevalSrc(&noizDens[HICUMITNOIZ],&lnNdens[HICUMITNOIZ],
|
||||||
ckt,SHOTNOISE,here->HICUMcollCINode,here->HICUMemitEINode,
|
ckt,SHOTNOISE,here->HICUMcollCINode,here->HICUMemitEINode,
|
||||||
|
|
|
||||||
|
|
@ -1119,6 +1119,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
// Model_initialization
|
// Model_initialization
|
||||||
int selfheat = ((model->HICUMflsh > 0) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0));
|
int selfheat = ((model->HICUMflsh > 0) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0));
|
||||||
int nqs = ((model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMalit > 0 || model->HICUMalqf > 0));
|
int nqs = ((model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMalit > 0 || model->HICUMalqf > 0));
|
||||||
|
int correlated_noise = (model->HICUMflcono == 1 && (model->HICUMalit > 0 && model->HICUMalqf > 0));
|
||||||
|
|
||||||
// Avoid divide-by-zero and define infinity other way
|
// Avoid divide-by-zero and define infinity other way
|
||||||
// High current correction for 2D and 3D effects
|
// High current correction for 2D and 3D effects
|
||||||
|
|
@ -3355,6 +3356,63 @@ load:
|
||||||
*(here->HICUMtempTempPtr) += +Icth_Vrth;
|
*(here->HICUMtempTempPtr) += +Icth_Vrth;
|
||||||
// finish
|
// finish
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (correlated_noise) {
|
||||||
|
// #############################################################
|
||||||
|
// ############# STAMP WITH CORRELATED NOISE ###################
|
||||||
|
// #############################################################
|
||||||
|
// parameter definition
|
||||||
|
int n_w = 1;
|
||||||
|
double n_1 = Tf*model->HICUMalit;
|
||||||
|
double betadc = it/ibei;
|
||||||
|
double sqrt_n2 = betadc * (2*model->HICUMalqf-model->HICUMalit*model->HICUMalit);
|
||||||
|
double n_2 = 0;
|
||||||
|
|
||||||
|
if (sqrt_n2 > 0.0) {
|
||||||
|
n_2 = Tf*sqrt(sqrt_n2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Branch: n1 0, Stamp element: Rn1 = 1 Ohm
|
||||||
|
// with respect to Vn1
|
||||||
|
*(ckt->CKTrhs + here->HICUMNoise1Node) -= *(ckt->CKTstate0 + here->HICUMvn1);
|
||||||
|
// finish
|
||||||
|
|
||||||
|
// Branch: n2 0, Stamp element: Rn2 = 1 Ohm
|
||||||
|
// with respect to Vn2
|
||||||
|
*(ckt->CKTrhs + here->HICUMNoise2Node) -= *(ckt->CKTstate0 + here->HICUMvn2);
|
||||||
|
// finish
|
||||||
|
|
||||||
|
// Stamp element: Ibiei f_Bi = + f_Ei = -
|
||||||
|
// realization of modified base shot noise source I1(bi,ei)
|
||||||
|
rhs_current = -*(ckt->CKTstate0 + here->HICUMvn1);
|
||||||
|
double q_n1 = n_w* *(ckt->CKTstate0 + here->HICUMvn1);
|
||||||
|
double In1_Vn1 = 0;
|
||||||
|
// I(bi,ei) <+ n_2/n_w*ddt(n_w* *(ckt->CKTstate0 + here->HICUMvn1));
|
||||||
|
error = NIintegrate(ckt, &geq, &ceq, n_w, here->HICUMqn1);
|
||||||
|
if(error) return(error);
|
||||||
|
In1_Vn1 += n_2/n_w*geq;
|
||||||
|
rhs_current += n_2/n_w * *(ckt->CKTstate0 + here->HICUMcqn1);
|
||||||
|
|
||||||
|
*(ckt->CKTrhs + here->HICUMcollCINode) += -rhs_current;
|
||||||
|
*(ckt->CKTrhs + here->HICUMemitEINode) += rhs_current;
|
||||||
|
*(here->HICUMn1N1Ptr) += +In1_Vn1;
|
||||||
|
|
||||||
|
// realization of controlled base noise source I2(bi,ei)
|
||||||
|
// I(bi,ei) <+ n_1/n_w*ddt(n_w* *(ckt->CKTstate0 + here->HICUMvn2));
|
||||||
|
error = NIintegrate(ckt, &geq, &ceq, n_w, here->HICUMqn1);
|
||||||
|
if(error) return(error);
|
||||||
|
In1_Vn1 += n_2/n_w*geq;
|
||||||
|
rhs_current += n_2/n_w * *(ckt->CKTstate0 + here->HICUMcqn1);
|
||||||
|
// finish
|
||||||
|
|
||||||
|
// Stamp element: Iciei f_Ci = + f_Ei = -
|
||||||
|
// realization of modified collector shot noise source I(ci,ei) (uncontrolled)
|
||||||
|
rhs_current = -*(ckt->CKTstate0 + here->HICUMvn2);
|
||||||
|
*(ckt->CKTrhs + here->HICUMcollCINode) += -rhs_current;
|
||||||
|
*(ckt->CKTrhs + here->HICUMemitEINode) += rhs_current;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue