Merge branch 'markus_dev' into hicum_vae

This commit is contained in:
Markus Mueller 2020-08-08 15:44:38 +02:00
commit 75ea194675
21 changed files with 1929 additions and 2404 deletions

View File

@ -21,7 +21,7 @@ noise v(c) vin dec 10 10 10G 1
setplot
setplot noise1
plot ally
plot 300*inoise_spectrum onoise_spectrum
plot inoise_spectrum onoise_spectrum loglog
setplot noise2
print all
echo

View File

@ -0,0 +1,27 @@
HICUM2v2.40 Amplifier in Time Domain
vcc 2 0 2.5
*vin 1 0 ac 1 dc 0 sin 0 25m 1G
vin 1 0 ac 1 dc 0 pulse 0 50m 0 5p 5p 4n 8n
rs 1 in 50
c1 in b 1n
r1 2 c 180
r2 c b 5k
q1 c b 0 0 hicuml2v2p40
c2 c out 100p
r3 out 0 1k
.ic v(c)=0.9
.control
option method=gear
op
print all
ac dec 10 1Meg 9.9g
plot vdb(out)
tran 2p 200n
plot v(in) v(out)
.endc
.include model-card-examples.lib
.end

View File

@ -9,19 +9,17 @@
+ hfe = 10.01
+ hfc = 20.04
+ hjei = 3.382
+ hjci = 0.2
+ ahjei = 3
+ rhjei = 2
+ hjci = 0.2
*
*Base-Emitter diode currents
+ ibeis = 1.328e-019
+ mbei = 1.027
*+ ireis = 1.5e-014
+ ireis = 1.5e-015
+ mrei = 2
+ ibeps = 1.26e-019
+ mbep = 1.042
*+ ireps = 1.8e-014
+ ireps = 1.8e-015
+ mrep = 1.8
+ mcf = 1
@ -59,7 +57,6 @@
+ rcx = 2.483
*
*Substrate transistor
*+ itss = 1.143e-019
+ itss = 1.143e-017
+ msf = 1.056
+ iscs = 4.60106e-015
@ -111,11 +108,12 @@
+ vlim = 0.6999
+ vces = 0.01
+ vpt = 2
+ aick = 1e-3
+ delck = 2
+ tr = 0
+ acbar = 1.5
+ icbar = 0.01
+ vcbar = 0.04
+ icbar = 0.01
+ acbar = 1.5
*
*Isolation Capacitances
+ cbepar = 2.609e-014
@ -131,10 +129,12 @@
+ af = .75
+ cfbe = -1
+ flcono = 0
+ kfre = 0.0
+ afre = 2.0
*
*Lateral Geometry Scaling (at high current densities)
+ latb = 0
+ latl = 0
+ latb = 0.0
+ latl = 0.0
*
*Temperature dependence
+ vgb = 0.91
@ -156,6 +156,7 @@
+ zetact = 5
+ zetabet = 4.892
+ alb = 0
+ dvgbe = 0
+ zetahjei = -0.5
+ zetavgbe = 0.7
*

View File

@ -273,7 +273,6 @@ IFparm HICUMmPTable[] = { /* model parameters */
//Self-Heating
IOP("flsh", HICUM_MOD_FLSH , IF_INTEGER, "Flag for turning on and off self-heating effect"),
IOP("rth_de", HICUM_MOD_RTH_DE , IF_INTEGER, "Experimental flag for turning on and off self-heating using direct evaluation"),
IOP("rth", HICUM_MOD_RTH , IF_REAL, "Thermal resistance"),
IOP("zetarth", HICUM_MOD_ZETARTH, IF_REAL, "Temperature coefficient for Rth"),
IOP("alrth", HICUM_MOD_ALRTH , IF_REAL, "First order relative TC of parameter Rth"),

View File

@ -127,6 +127,7 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt)
for( here = HICUMinstances(model); here!= NULL;
here = HICUMnextInstance(here)) {
// get all derivatives of branch DC currents
if(model->HICUMrcxGiven && model->HICUMrcx != 0) {
Icic_Vcic = 1/here->HICUMrcx_t.rpart;
@ -150,7 +151,7 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt)
Ieie_Vrth = 0.0;
}
if(model->HICUMrsuGiven && model->HICUMrsu != 0) {
Isis_Vsis = 1/model->HICUMrsu;
Isis_Vsis = 1/model->HICUMrsu*here->HICUMm;
} else {
Isis_Vsis = 0.0;
}
@ -285,18 +286,20 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt)
*(here->HICUMemitEmitEIPtr) += -Ieie_Veie;
// Stamp element: Ibpbi
*(here->HICUMbaseBPBaseBPPtr) += Ibpbi_Vbpbi;
*(here->HICUMbaseBIBaseBIPtr) += Ibpbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr) += -Ibpbi_Vbpbi;
*(here->HICUMbaseBIBaseBPPtr) += -Ibpbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr) += Ibpbi_Vbiei;
*(here->HICUMbaseBIEmitEIPtr) += Ibpbi_Vbiei;
*(here->HICUMbaseBPEmitEIPtr) += -Ibpbi_Vbiei;
*(here->HICUMbaseBIBaseBIPtr) += -Ibpbi_Vbiei;
*(here->HICUMbaseBPBaseBIPtr) += Ibpbi_Vbici;
*(here->HICUMbaseBICollCIPtr) += Ibpbi_Vbici;
*(here->HICUMbaseBPCollCIPtr) += -Ibpbi_Vbici;
*(here->HICUMbaseBIBaseBIPtr) += -Ibpbi_Vbici;
if (here->HICUMrbi>0.0) {
*(here->HICUMbaseBPBaseBPPtr) += Ibpbi_Vbpbi;
*(here->HICUMbaseBIBaseBIPtr) += Ibpbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr) += -Ibpbi_Vbpbi;
*(here->HICUMbaseBIBaseBPPtr) += -Ibpbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr) += Ibpbi_Vbiei;
*(here->HICUMbaseBIEmitEIPtr) += Ibpbi_Vbiei;
*(here->HICUMbaseBPEmitEIPtr) += -Ibpbi_Vbiei;
*(here->HICUMbaseBIBaseBIPtr) += -Ibpbi_Vbiei;
*(here->HICUMbaseBPBaseBIPtr) += Ibpbi_Vbici;
*(here->HICUMbaseBICollCIPtr) += Ibpbi_Vbici;
*(here->HICUMbaseBPCollCIPtr) += -Ibpbi_Vbici;
*(here->HICUMbaseBIBaseBIPtr) += -Ibpbi_Vbici;
};
// Stamp element: Isici
*(here->HICUMsubsSISubsSIPtr) += Isici_Vsici;
@ -404,18 +407,20 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt)
XQxf2_Vxf2 = *(ckt->CKTstate0 + here->HICUMcqxf2) * ckt->CKTomega;
//Qrbi f_bp=+ f_bi=-
*(here->HICUMbaseBPBaseBPPtr + 1) += XQrbi_Vbpbi;
*(here->HICUMbaseBIBaseBIPtr + 1) += XQrbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr + 1) += -XQrbi_Vbpbi;
*(here->HICUMbaseBIBaseBPPtr + 1) += -XQrbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr + 1) += XQrbi_Vbiei;
*(here->HICUMbaseBIEmitEIPtr + 1) += XQrbi_Vbiei;
*(here->HICUMbaseBPEmitEIPtr + 1) += -XQrbi_Vbiei;
*(here->HICUMbaseBIBaseBIPtr + 1) += -XQrbi_Vbiei;
*(here->HICUMbaseBPBaseBIPtr + 1) += XQrbi_Vbici;
*(here->HICUMbaseBICollCIPtr + 1) += XQrbi_Vbici;
*(here->HICUMbaseBPCollCIPtr + 1) += -XQrbi_Vbici;
*(here->HICUMbaseBIBaseBIPtr + 1) += -XQrbi_Vbici;
if (here->HICUMrbi>0.0) {
*(here->HICUMbaseBPBaseBPPtr + 1) += XQrbi_Vbpbi;
*(here->HICUMbaseBIBaseBIPtr + 1) += XQrbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr + 1) += -XQrbi_Vbpbi;
*(here->HICUMbaseBIBaseBPPtr + 1) += -XQrbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr + 1) += XQrbi_Vbiei;
*(here->HICUMbaseBIEmitEIPtr + 1) += XQrbi_Vbiei;
*(here->HICUMbaseBPEmitEIPtr + 1) += -XQrbi_Vbiei;
*(here->HICUMbaseBIBaseBIPtr + 1) += -XQrbi_Vbiei;
*(here->HICUMbaseBPBaseBIPtr + 1) += XQrbi_Vbici;
*(here->HICUMbaseBICollCIPtr + 1) += XQrbi_Vbici;
*(here->HICUMbaseBPCollCIPtr + 1) += -XQrbi_Vbici;
*(here->HICUMbaseBIBaseBIPtr + 1) += -XQrbi_Vbici;
}
//Qjei
*(here->HICUMbaseBIBaseBIPtr + 1) += XQjei_Vbiei;
*(here->HICUMemitEIEmitEIPtr + 1) += XQjei_Vbiei;

View File

@ -44,6 +44,7 @@ HICUMconvTest(GENmodel *inModel, CKTcircuit *ckt)
double isicihat;
double volatile ithhat;
double Vbiei, Vbici, Vciei, Vbpei, Vbpbi, Vbpci, Vbci, Vsici, Vrth, Vcic, Vbbp, Veie;
double Ibiei, Ibici, Iciei, Ibpei, Ibpbi, Ibpci, Ibpsi, Isici, Ith;
@ -82,15 +83,9 @@ HICUMconvTest(GENmodel *inModel, CKTcircuit *ckt)
*(ckt->CKTrhsOld+here->HICUMemitEINode));
Vciei = Vbiei - Vbici;
//model->HICUMrth_de
if (model->HICUMrth_de==1) {
Vrth = *(ckt->CKTstate0 + here->HICUMith)*here->HICUMrth_t.rpart;
delvrth = 0;
} else {
Vrth = model->HICUMtype*(*(ckt->CKTrhsOld+here->HICUMtempNode));
delvrth = Vrth - *(ckt->CKTstate0 + here->HICUMvrth);
}
Vrth = model->HICUMtype*(*(ckt->CKTrhsOld+here->HICUMtempNode));
delvrth = Vrth - *(ckt->CKTstate0 + here->HICUMvrth);
delvbiei = Vbiei - *(ckt->CKTstate0 + here->HICUMvbiei);
delvbici = Vbici - *(ckt->CKTstate0 + here->HICUMvbici);
delvbpei = Vbpei - *(ckt->CKTstate0 + here->HICUMvbpei);

View File

@ -65,8 +65,8 @@ typedef struct sHICUMinstance {
int HICUMbaseBPNode; /* number of internal base node of hicum */
int HICUMsubsSINode; /* number of internal substrate node */
int HICUMxfNode; /* number of internal excess phase node qdei */
int HICUMxf1Node; /* number of internal excess phase node itf */
int HICUMxf2Node; /* number of internal excess phase node itf */
int HICUMxf1Node; /* number of internal excess phase 1 node itf */
int HICUMxf2Node; /* number of internal excess phase 2 node itf */
double HICUMarea; /* area factor for the hicum */
//initial conditions
@ -75,6 +75,7 @@ typedef struct sHICUMinstance {
double HICUMicVCS; /* initial condition inner C-S branch */
double HICUMtemp; /* instance temperature */
double HICUMtemp_Vrth;/* derivative device temperature to temperature at thermal node */
double HICUMdtemp; /* instance delta temperature */
double HICUMdtemp_sh; /* instance delta temperature because of self-heating */
double HICUMm; /* multiply factor for the hicum */
@ -160,6 +161,8 @@ typedef struct sHICUMinstance {
double HICUMrbx_scaled;
double HICUMrcx_scaled;
double HICUMrbi0_scaled;
double HICUMkf_scaled;
double HICUMkfre_scaled;
double HICUMrbi;
double HICUMiavl;
@ -523,7 +526,9 @@ typedef struct sHICUMinstance {
#define HICUMith_Vbbp HICUMstate+123
#define HICUMith_Veie HICUMstate+124
#define HICUMnumStates 125
#define HICUMit HICUMstate+125 //for noise
#define HICUMnumStates 126
/* per model data */
typedef struct sHICUMmodel { /* model structure for a hicum */
@ -702,7 +707,6 @@ typedef struct sHICUMmodel { /* model structure for a hicum */
//Self-Heating
int HICUMflsh;
int HICUMrth_de;
double HICUMrth;
double HICUMzetarth;
double HICUMalrth;
@ -1083,7 +1087,6 @@ enum {
//Self-Heating
HICUM_MOD_FLSH,
HICUM_MOD_RTH_DE,
HICUM_MOD_RTH,
HICUM_MOD_ZETARTH,
HICUM_MOD_ALRTH,

View File

@ -461,9 +461,6 @@ HICUMmAsk(CKTcircuit *ckt, GENmodel *instPtr, int which, IFvalue *value)
case HICUM_MOD_FLSH:
value->iValue = model->HICUMflsh;
return(OK);
case HICUM_MOD_RTH_DE:
value->iValue = model->HICUMrth_de;
return(OK);
case HICUM_MOD_RTH:
value->rValue = model->HICUMrth;
return(OK);

View File

@ -19,8 +19,6 @@ Spice3 Implementation: 2019 Dietmar Warning
#include "ngspice/suffix.h"
#include "model_class.hpp"
#define MIN_R 0.001
int
HICUMmParam(int param, IFvalue *value, GENmodel *inModel)
{
@ -213,7 +211,6 @@ HICUMmParam(int param, IFvalue *value, GENmodel *inModel)
//Series resistances
case HICUM_MOD_RBI0:
model->HICUMrbi0 = value->rValue;
if (model->HICUMrbi0 < MIN_R) model->HICUMrbi0 = MIN_R;
model->HICUMrbi0Given = TRUE;
break;
case HICUM_MOD_RBX:
@ -610,10 +607,6 @@ HICUMmParam(int param, IFvalue *value, GENmodel *inModel)
model->HICUMflsh = value->iValue;
model->HICUMflshGiven = TRUE;
break;
case HICUM_MOD_RTH_DE:
model->HICUMrth_de = value->iValue;
model->HICUMrth_deGiven = TRUE;
break;
case HICUM_MOD_RTH:
model->HICUMrth = value->rValue;
model->HICUMrthGiven = TRUE;

View File

@ -30,7 +30,7 @@ HICUMnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata
HICUMmodel *firstModel = (HICUMmodel *) genmodel;
HICUMmodel *model;
HICUMinstance *inst;
HICUMinstance *here;
double tempOnoise;
double tempInoise;
double noizDens[HICUMNSRCS];
@ -66,31 +66,35 @@ HICUMnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata
};
for (model=firstModel; model != NULL; model=HICUMnextModel(model)) {
for (inst=HICUMinstances(model); inst != NULL;
inst=HICUMnextInstance(inst)) {
for (here=HICUMinstances(model); here != NULL;
here=HICUMnextInstance(here)) {
// get all derivatives of branch DC currents
if(model->HICUMrcxGiven && model->HICUMrcx != 0) {
Icic_Vcic = 1/inst->HICUMrcx_t.rpart;
Icic_Vcic = 1/here->HICUMrcx_t.rpart;
} else {
Icic_Vcic = 0.0;
}
if(model->HICUMrbxGiven && model->HICUMrbx != 0) {
Ibbp_Vbbp = 1/inst->HICUMrbx_t.rpart;
Ibbp_Vbbp = 1/here->HICUMrbx_t.rpart;
} else {
Ibbp_Vbbp = 0.0;
}
if(model->HICUMreGiven && model->HICUMre != 0) {
Ieie_Veie = 1/inst->HICUMre_t.rpart;
Ieie_Veie = 1/here->HICUMre_t.rpart;
} else {
Ieie_Veie = 0.0;
}
if(model->HICUMrsuGiven && model->HICUMrsu != 0) {
Isis_Vsis = 1/model->HICUMrsu;
Isis_Vsis = 1/model->HICUMrsu*here->HICUMm;
} else {
Isis_Vsis = 0.0;
}
Ibpbi_Vbpbi = 1/inst->HICUMrbi;
if(here->HICUMrbi > 0) {
Ibpbi_Vbpbi = 1/here->HICUMrbi;
} else {
Ibpbi_Vbpbi = 0.0;
}
switch (operation) {
@ -104,14 +108,14 @@ HICUMnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata
case N_DENS:
for (i=0; i < HICUMNSRCS; i++) {
NOISE_ADD_OUTVAR(ckt, data, "onoise_%s%s", inst->HICUMname, HICUMnNames[i]);
NOISE_ADD_OUTVAR(ckt, data, "onoise_%s%s", here->HICUMname, HICUMnNames[i]);
}
break;
case INT_NOIZ:
for (i=0; i < HICUMNSRCS; i++) {
NOISE_ADD_OUTVAR(ckt, data, "onoise_total_%s%s", inst->HICUMname, HICUMnNames[i]);
NOISE_ADD_OUTVAR(ckt, data, "inoise_total_%s%s", inst->HICUMname, HICUMnNames[i]);
NOISE_ADD_OUTVAR(ckt, data, "onoise_total_%s%s", here->HICUMname, HICUMnNames[i]);
NOISE_ADD_OUTVAR(ckt, data, "inoise_total_%s%s", here->HICUMname, HICUMnNames[i]);
}
break;
}
@ -123,77 +127,77 @@ HICUMnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata
case N_DENS:
NevalSrc(&noizDens[HICUMRCNOIZ],&lnNdens[HICUMRCNOIZ],
ckt,THERMNOISE,inst->HICUMcollCINode,inst->HICUMcollNode,
Icic_Vcic * inst->HICUMm);
ckt,THERMNOISE,here->HICUMcollCINode,here->HICUMcollNode,
Icic_Vcic);
NevalSrc(&noizDens[HICUMRBNOIZ],&lnNdens[HICUMRBNOIZ],
ckt,THERMNOISE,inst->HICUMbaseNode,inst->HICUMbaseBPNode,
Ibbp_Vbbp * inst->HICUMm);
ckt,THERMNOISE,here->HICUMbaseNode,here->HICUMbaseBPNode,
Ibbp_Vbbp);
NevalSrc(&noizDens[HICUMRBINOIZ],&lnNdens[HICUMRBINOIZ],
ckt,THERMNOISE,inst->HICUMbaseBPNode,inst->HICUMbaseBINode,
*(ckt->CKTstate0 + inst->HICUMibpbi_Vbpbi) * inst->HICUMm);
ckt,THERMNOISE,here->HICUMbaseBPNode,here->HICUMbaseBINode,
Ibpbi_Vbpbi);
NevalSrc(&noizDens[HICUMRENOIZ],&lnNdens[HICUMRENOIZ],
ckt,THERMNOISE,inst->HICUMemitEINode,inst->HICUMemitNode,
Ieie_Veie * inst->HICUMm);
ckt,THERMNOISE,here->HICUMemitEINode,here->HICUMemitNode,
Ieie_Veie);
NevalSrc(&noizDens[HICUMRSNOIZ],&lnNdens[HICUMRSNOIZ],
ckt,THERMNOISE,inst->HICUMsubsSINode,inst->HICUMsubsNode,
Isis_Vsis * inst->HICUMm);
ckt,THERMNOISE,here->HICUMsubsSINode,here->HICUMsubsNode,
Isis_Vsis);
NevalSrc(&noizDens[HICUMIAVLNOIZ],&lnNdens[HICUMIAVLNOIZ],
ckt,SHOTNOISE,inst->HICUMcollCINode,inst->HICUMbaseBINode,
inst->HICUMiavl);
ckt,SHOTNOISE,here->HICUMcollCINode,here->HICUMbaseBINode,
here->HICUMiavl);
NevalSrc(&noizDens[HICUMIBCINOIZ],&lnNdens[HICUMIBCINOIZ],
ckt,SHOTNOISE,inst->HICUMbaseBINode,inst->HICUMcollCINode,
*(ckt->CKTstate0 + inst->HICUMibici) * inst->HICUMm);
ckt,SHOTNOISE,here->HICUMbaseBINode,here->HICUMcollCINode,
*(ckt->CKTstate0 + here->HICUMibici)+here->HICUMiavl);
NevalSrc(&noizDens[HICUMIBEPNOIZ],&lnNdens[HICUMIBEPNOIZ],
ckt,SHOTNOISE,inst->HICUMbaseBPNode,inst->HICUMemitEINode,
*(ckt->CKTstate0 + inst->HICUMibpei) * inst->HICUMm);
ckt,SHOTNOISE,here->HICUMbaseBPNode,here->HICUMemitEINode,
*(ckt->CKTstate0 + here->HICUMibpei));
NevalSrc(&noizDens[HICUMIBCXNOIZ],&lnNdens[HICUMIBCXNOIZ],
ckt,SHOTNOISE,inst->HICUMbaseBPNode,inst->HICUMcollCINode,
*(ckt->CKTstate0 + inst->HICUMibpci) * inst->HICUMm);
ckt,SHOTNOISE,here->HICUMbaseBPNode,here->HICUMcollCINode,
*(ckt->CKTstate0 + here->HICUMibpci));
NevalSrc(&noizDens[HICUMIJSCNOIZ],&lnNdens[HICUMIJSCNOIZ],
ckt,SHOTNOISE,inst->HICUMsubsSINode,inst->HICUMcollCINode,
*(ckt->CKTstate0 + inst->HICUMisici) * inst->HICUMm);
ckt,SHOTNOISE,here->HICUMsubsSINode,here->HICUMcollCINode,
*(ckt->CKTstate0 + here->HICUMisici));
NevalSrc(&noizDens[HICUMITNOIZ],&lnNdens[HICUMITNOIZ],
ckt,SHOTNOISE,inst->HICUMcollCINode,inst->HICUMemitEINode,
*(ckt->CKTstate0 + inst->HICUMiciei) * inst->HICUMm);
ckt,SHOTNOISE,here->HICUMcollCINode,here->HICUMemitEINode,
*(ckt->CKTstate0 + here->HICUMit));
NevalSrc(&noizDens[HICUMIBEINOIZ],&lnNdens[HICUMIBEINOIZ],
ckt,SHOTNOISE,inst->HICUMbaseBINode,inst->HICUMemitEINode,
*(ckt->CKTstate0 + inst->HICUMibiei) * inst->HICUMm);
ckt,SHOTNOISE,here->HICUMbaseBINode,here->HICUMemitEINode,
*(ckt->CKTstate0 + here->HICUMibiei));
if (model->HICUMcfbe == -1) {
NevalSrc(&noizDens[HICUMFLBENOIZ], NULL, ckt,
N_GAIN,inst->HICUMbaseBINode, inst->HICUMemitEINode,
N_GAIN,here->HICUMbaseBINode, here->HICUMemitEINode,
(double)0.0);
} else {
NevalSrc(&noizDens[HICUMFLBENOIZ], NULL, ckt,
N_GAIN,inst->HICUMbaseBPNode, inst->HICUMemitEINode,
N_GAIN,here->HICUMbaseBPNode, here->HICUMemitEINode,
(double)0.0);
}
noizDens[HICUMFLBENOIZ] *= inst->HICUMm * model->HICUMkf *
noizDens[HICUMFLBENOIZ] *= here->HICUMkf_scaled *
exp(model->HICUMaf *
log(MAX(fabs((*(ckt->CKTstate0 + inst->HICUMibiei)+*(ckt->CKTstate0 + inst->HICUMibpei))),N_MINLOG))) /
log(MAX(fabs((*(ckt->CKTstate0 + here->HICUMibiei)+*(ckt->CKTstate0 + here->HICUMibpei))),N_MINLOG))) /
data->freq;
lnNdens[HICUMFLBENOIZ] =
log(MAX(noizDens[HICUMFLBENOIZ],N_MINLOG));
NevalSrc(&noizDens[HICUMFLRENOIZ], NULL, ckt,
N_GAIN,inst->HICUMemitEINode, inst->HICUMemitNode,
N_GAIN,here->HICUMemitEINode, here->HICUMemitNode,
(double)0.0);
noizDens[HICUMFLRENOIZ] *= inst->HICUMm * model->HICUMkfre *
noizDens[HICUMFLRENOIZ] *= here->HICUMkfre_scaled *
exp(model->HICUMafre *
log(MAX(fabs(*(ckt->CKTstate0 + inst->HICUMieie)),N_MINLOG))) /
log(MAX(fabs(*(ckt->CKTstate0 + here->HICUMieie)),N_MINLOG))) /
data->freq;
lnNdens[HICUMFLRENOIZ] =
log(MAX(noizDens[HICUMFLRENOIZ],N_MINLOG));
@ -226,15 +230,15 @@ HICUMnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata
/* initialize our "history" variables */
for (i=0; i < HICUMNSRCS; i++) {
inst->HICUMnVar[LNLSTDENS][i] = lnNdens[i];
here->HICUMnVar[LNLSTDENS][i] = lnNdens[i];
}
/* clear out our integration variables if it's the first pass */
if (data->freq == job->NstartFreq) {
for (i=0; i < HICUMNSRCS; i++) {
inst->HICUMnVar[OUTNOIZ][i] = 0.0;
inst->HICUMnVar[INNOIZ][i] = 0.0;
here->HICUMnVar[OUTNOIZ][i] = 0.0;
here->HICUMnVar[INNOIZ][i] = 0.0;
}
}
} else { /* data->delFreq != 0.0 (we have to integrate) */
@ -244,19 +248,19 @@ HICUMnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata
for (i=0; i < HICUMNSRCS; i++) {
if (i != HICUMTOTNOIZ) {
tempOnoise = Nintegrate(noizDens[i], lnNdens[i],
inst->HICUMnVar[LNLSTDENS][i], data);
here->HICUMnVar[LNLSTDENS][i], data);
tempInoise = Nintegrate(noizDens[i] * data->GainSqInv ,
lnNdens[i] + data->lnGainInv,
inst->HICUMnVar[LNLSTDENS][i] + data->lnGainInv,
here->HICUMnVar[LNLSTDENS][i] + data->lnGainInv,
data);
inst->HICUMnVar[LNLSTDENS][i] = lnNdens[i];
here->HICUMnVar[LNLSTDENS][i] = lnNdens[i];
data->outNoiz += tempOnoise;
data->inNoise += tempInoise;
if (job->NStpsSm != 0) {
inst->HICUMnVar[OUTNOIZ][i] += tempOnoise;
inst->HICUMnVar[OUTNOIZ][HICUMTOTNOIZ] += tempOnoise;
inst->HICUMnVar[INNOIZ][i] += tempInoise;
inst->HICUMnVar[INNOIZ][HICUMTOTNOIZ] += tempInoise;
here->HICUMnVar[OUTNOIZ][i] += tempOnoise;
here->HICUMnVar[OUTNOIZ][HICUMTOTNOIZ] += tempOnoise;
here->HICUMnVar[INNOIZ][i] += tempInoise;
here->HICUMnVar[INNOIZ][HICUMTOTNOIZ] += tempInoise;
}
}
}
@ -271,8 +275,8 @@ HICUMnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata
case INT_NOIZ: /* already calculated, just output */
if (job->NStpsSm != 0) {
for (i=0; i < HICUMNSRCS; i++) {
data->outpVector[data->outNumber++] = inst->HICUMnVar[OUTNOIZ][i];
data->outpVector[data->outNumber++] = inst->HICUMnVar[INNOIZ][i];
data->outpVector[data->outNumber++] = here->HICUMnVar[OUTNOIZ][i];
data->outpVector[data->outNumber++] = here->HICUMnVar[INNOIZ][i];
}
} /* if */
break;
@ -283,7 +287,7 @@ HICUMnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata
return (OK); /* do nothing, the main calling routine will close */
break; /* the plots */
} /* switch (operation) */
} /* for inst */
} /* for here */
} /* for model */
return(OK);

View File

@ -127,6 +127,7 @@ HICUMpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
for( here = HICUMinstances(model); here!= NULL;
here = HICUMnextInstance(here)) {
// get all derivatives of branch DC currents
if(model->HICUMrcxGiven && model->HICUMrcx != 0) {
Icic_Vcic = 1/here->HICUMrcx_t.rpart;
@ -150,7 +151,7 @@ HICUMpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
Ieie_Vrth = 0.0;
}
if(model->HICUMrsuGiven && model->HICUMrsu != 0) {
Isis_Vsis = 1/model->HICUMrsu;
Isis_Vsis = 1/model->HICUMrsu*here->HICUMm;
} else {
Isis_Vsis = 0.0;
}
@ -285,18 +286,20 @@ HICUMpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
*(here->HICUMemitEmitEIPtr) += -Ieie_Veie;
// Stamp element: Ibpbi
*(here->HICUMbaseBPBaseBPPtr) += Ibpbi_Vbpbi;
*(here->HICUMbaseBIBaseBIPtr) += Ibpbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr) += -Ibpbi_Vbpbi;
*(here->HICUMbaseBIBaseBPPtr) += -Ibpbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr) += Ibpbi_Vbiei;
*(here->HICUMbaseBIEmitEIPtr) += Ibpbi_Vbiei;
*(here->HICUMbaseBPEmitEIPtr) += -Ibpbi_Vbiei;
*(here->HICUMbaseBIBaseBIPtr) += -Ibpbi_Vbiei;
*(here->HICUMbaseBPBaseBIPtr) += Ibpbi_Vbici;
*(here->HICUMbaseBICollCIPtr) += Ibpbi_Vbici;
*(here->HICUMbaseBPCollCIPtr) += -Ibpbi_Vbici;
*(here->HICUMbaseBIBaseBIPtr) += -Ibpbi_Vbici;
if (here->HICUMrbi>0.0) {
*(here->HICUMbaseBPBaseBPPtr) += Ibpbi_Vbpbi;
*(here->HICUMbaseBIBaseBIPtr) += Ibpbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr) += -Ibpbi_Vbpbi;
*(here->HICUMbaseBIBaseBPPtr) += -Ibpbi_Vbpbi;
*(here->HICUMbaseBPBaseBIPtr) += Ibpbi_Vbiei;
*(here->HICUMbaseBIEmitEIPtr) += Ibpbi_Vbiei;
*(here->HICUMbaseBPEmitEIPtr) += -Ibpbi_Vbiei;
*(here->HICUMbaseBIBaseBIPtr) += -Ibpbi_Vbiei;
*(here->HICUMbaseBPBaseBIPtr) += Ibpbi_Vbici;
*(here->HICUMbaseBICollCIPtr) += Ibpbi_Vbici;
*(here->HICUMbaseBPCollCIPtr) += -Ibpbi_Vbici;
*(here->HICUMbaseBIBaseBIPtr) += -Ibpbi_Vbici;
};
// Stamp element: Isici
*(here->HICUMsubsSISubsSIPtr) += Isici_Vsici;
@ -404,30 +407,32 @@ HICUMpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
XQxf2_Vxf2 = *(ckt->CKTstate0 + here->HICUMcqxf2);
//Qrbi f_bp=+ f_bi=-
*(here->HICUMbaseBPBaseBPPtr + 1) += XQrbi_Vbpbi*(s->imag);
*(here->HICUMbaseBPBaseBPPtr ) += XQrbi_Vbpbi*(s->real);
*(here->HICUMbaseBIBaseBIPtr + 1) += XQrbi_Vbpbi*(s->imag);
*(here->HICUMbaseBIBaseBIPtr ) += XQrbi_Vbpbi*(s->real);
*(here->HICUMbaseBPBaseBIPtr + 1) += -XQrbi_Vbpbi*(s->imag);
*(here->HICUMbaseBPBaseBIPtr ) += -XQrbi_Vbpbi*(s->real);
*(here->HICUMbaseBIBaseBPPtr + 1) += -XQrbi_Vbpbi*(s->imag);
*(here->HICUMbaseBIBaseBPPtr ) += -XQrbi_Vbpbi*(s->real);
*(here->HICUMbaseBPBaseBIPtr + 1) += XQrbi_Vbiei*(s->imag);
*(here->HICUMbaseBPBaseBIPtr ) += XQrbi_Vbiei*(s->real);
*(here->HICUMbaseBIEmitEIPtr + 1) += XQrbi_Vbiei*(s->imag);
*(here->HICUMbaseBIEmitEIPtr ) += XQrbi_Vbiei*(s->real);
*(here->HICUMbaseBPEmitEIPtr + 1) += -XQrbi_Vbiei*(s->imag);
*(here->HICUMbaseBPEmitEIPtr ) += -XQrbi_Vbiei*(s->real);
*(here->HICUMbaseBIBaseBIPtr + 1) += -XQrbi_Vbiei*(s->imag);
*(here->HICUMbaseBIBaseBIPtr ) += -XQrbi_Vbiei*(s->real);
*(here->HICUMbaseBPBaseBIPtr + 1) += XQrbi_Vbici*(s->imag);
*(here->HICUMbaseBPBaseBIPtr ) += XQrbi_Vbici*(s->real);
*(here->HICUMbaseBICollCIPtr + 1) += XQrbi_Vbici*(s->imag);
*(here->HICUMbaseBICollCIPtr ) += XQrbi_Vbici*(s->real);
*(here->HICUMbaseBPCollCIPtr + 1) += -XQrbi_Vbici*(s->imag);
*(here->HICUMbaseBPCollCIPtr ) += -XQrbi_Vbici*(s->real);
*(here->HICUMbaseBIBaseBIPtr + 1) += -XQrbi_Vbici*(s->imag);
*(here->HICUMbaseBIBaseBIPtr ) += -XQrbi_Vbici*(s->real);
if (here->HICUMrbi>0.0) {
*(here->HICUMbaseBPBaseBPPtr + 1) += XQrbi_Vbpbi*(s->imag);
*(here->HICUMbaseBPBaseBPPtr ) += XQrbi_Vbpbi*(s->real);
*(here->HICUMbaseBIBaseBIPtr + 1) += XQrbi_Vbpbi*(s->imag);
*(here->HICUMbaseBIBaseBIPtr ) += XQrbi_Vbpbi*(s->real);
*(here->HICUMbaseBPBaseBIPtr + 1) += -XQrbi_Vbpbi*(s->imag);
*(here->HICUMbaseBPBaseBIPtr ) += -XQrbi_Vbpbi*(s->real);
*(here->HICUMbaseBIBaseBPPtr + 1) += -XQrbi_Vbpbi*(s->imag);
*(here->HICUMbaseBIBaseBPPtr ) += -XQrbi_Vbpbi*(s->real);
*(here->HICUMbaseBPBaseBIPtr + 1) += XQrbi_Vbiei*(s->imag);
*(here->HICUMbaseBPBaseBIPtr ) += XQrbi_Vbiei*(s->real);
*(here->HICUMbaseBIEmitEIPtr + 1) += XQrbi_Vbiei*(s->imag);
*(here->HICUMbaseBIEmitEIPtr ) += XQrbi_Vbiei*(s->real);
*(here->HICUMbaseBPEmitEIPtr + 1) += -XQrbi_Vbiei*(s->imag);
*(here->HICUMbaseBPEmitEIPtr ) += -XQrbi_Vbiei*(s->real);
*(here->HICUMbaseBIBaseBIPtr + 1) += -XQrbi_Vbiei*(s->imag);
*(here->HICUMbaseBIBaseBIPtr ) += -XQrbi_Vbiei*(s->real);
*(here->HICUMbaseBPBaseBIPtr + 1) += XQrbi_Vbici*(s->imag);
*(here->HICUMbaseBPBaseBIPtr ) += XQrbi_Vbici*(s->real);
*(here->HICUMbaseBICollCIPtr + 1) += XQrbi_Vbici*(s->imag);
*(here->HICUMbaseBICollCIPtr ) += XQrbi_Vbici*(s->real);
*(here->HICUMbaseBPCollCIPtr + 1) += -XQrbi_Vbici*(s->imag);
*(here->HICUMbaseBPCollCIPtr ) += -XQrbi_Vbici*(s->real);
*(here->HICUMbaseBIBaseBIPtr + 1) += -XQrbi_Vbici*(s->imag);
*(here->HICUMbaseBIBaseBIPtr ) += -XQrbi_Vbici*(s->real);
};
//Qjei
*(here->HICUMbaseBIBaseBIPtr + 1) += XQjei_Vbiei*(s->imag);
*(here->HICUMbaseBIBaseBIPtr ) += XQjei_Vbiei*(s->real);
@ -632,9 +637,11 @@ HICUMpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
// Stamp element: Re f_Ei = + f_E = -
*(here->HICUMemitEItempPtr) += Ieie_Vrth;
*(here->HICUMemitTempPtr) += -Ieie_Vrth;
// Stamp element: Rbi f_Bp = + f_Bi = -
*(here->HICUMbaseBPtempPtr) += Ibpbi_Vrth;
*(here->HICUMbaseBItempPtr) += -Ibpbi_Vrth;
if (here->HICUMrbi>0.0) {
// Stamp element: Rbi f_Bp = + f_Bi = -
*(here->HICUMbaseBPtempPtr) += Ibpbi_Vrth;
*(here->HICUMbaseBItempPtr) += -Ibpbi_Vrth;
};
// Stamp element: Isici f_Si = + f_Ci = -
*(here->HICUMsubsSItempPtr) += Isici_Vrth;
*(here->HICUMcollCItempPtr) += -Isici_Vrth;

View File

@ -21,8 +21,6 @@ Spice3 Implementation: 2019 Dietmar Warning
#include "ngspice/ifsim.h"
#include "ngspice/suffix.h"
#define MIN_R 0.001
int
HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
/* load the HICUM structure with those pointers needed later
@ -154,10 +152,10 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
//Series resistances
if(!model->HICUMrbi0Given)
model->HICUMrbi0 = MIN_R;
model->HICUMrbi0 = 0.0;
if(!model->HICUMrbxGiven)
model->HICUMrbx = MIN_R;
model->HICUMrbx = 0.0;
if(!model->HICUMfgeoGiven)
model->HICUMfgeo = 0.6557;
@ -172,10 +170,10 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
model->HICUMfqi = 1.0;
if(!model->HICUMreGiven)
model->HICUMre = MIN_R;
model->HICUMre = 0.0;
if(!model->HICUMrcxGiven)
model->HICUMrcx = MIN_R;
model->HICUMrcx = 0.0;
//Substrate transistor
if(!model->HICUMitssGiven)
@ -195,7 +193,7 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
//Intra-device substrate coupling
if(!model->HICUMrsuGiven)
model->HICUMrsu = MIN_R;
model->HICUMrsu = 0.0;
if(!model->HICUMcsuGiven)
model->HICUMcsu = 0.0;
@ -447,8 +445,6 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
//Self-Heating
if(!model->HICUMflshGiven)
model->HICUMflsh = 0;
if(!model->HICUMrth_deGiven)
model->HICUMrth_de = 0;
if(!model->HICUMrthGiven)
model->HICUMrth = 0.0;
@ -499,24 +495,24 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
// Warning:
// The scaling with HICUMm and HICUMarea is done here from model to here variables in order to save memory.
// Classical spice scaling with "area" is implemented, but it is not recommended to be used. If you want
// scaling, more sophisticated expressions should be used. Those can be found in modern PDKs or should be
// provided by modeling engineers.
// Classical spice scaling with "area" is implemented, but it is not recommended to be used. If you want
// scaling, more sophisticated expressions should be used. Those can be found in modern PDKs or should be
// provided by modeling engineers.
// For discrete devices, the multiplication factor "m" should give reasonable results.
//
// The HICUMm device multiplicaton factor can be exected to give good results.
// The following variables need scaling in HICUM:
// IT : qp0 ~ (area m)**2 qp0 ~ area m icbar ~ area m
// IT : qp0 ~ (area m)**2 qp0 ~ area m icbar ~ area m
// BE junction: cjei0 ~ area m cjep0 ~ m
// ibeis ~ area m ibeps ~ m
// cbepar ~ m -> area scaling not reasonable
// BC junction: cjci0 ~ area m cjcx0 ~ m
// ibcis ~ area m ibcxs ~ m
// ireis ~ area m ireps ~ m
// ibcis ~ area m ibcxs ~ m
// ireis ~ area m ireps ~ m
// cbcpar ~ m -> area scaling not reasonable
// qavl ~ area m
// re ~1/(area*m)
// rci0 ~1/(area*m)
// qavl ~ area m
// re ~1/(area*m)
// rci0 ~1/(area*m)
// rbx ~1/(area*m) -> assume that scaling with "area" is due to lE0 increase
// rcx ~1/(area*m) -> assume that scaling with "area" is due to lE0 increase
// rbi0 ~1/(area*m) -> assume that scaling with "area" is due to lE0 increase
@ -553,6 +549,9 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
here->HICUMrbx_scaled = model->HICUMrbx / area_times_m;
here->HICUMrcx_scaled = model->HICUMrcx / area_times_m;
here->HICUMrbi0_scaled = model->HICUMrbi0 / area_times_m;
//noise
here->HICUMkf_scaled = model->HICUMkf * pow(here->HICUMm, (1-model->HICUMaf));
here->HICUMkfre_scaled = model->HICUMkfre * pow(here->HICUMm, (1-model->HICUMafre));
here->HICUMstate = *states;
*states += HICUMnumStates;
@ -564,12 +563,12 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if(error) return(error);
here->HICUMcollCINode = tmp->number;
if (ckt->CKTcopyNodesets) {
if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) {
if (tmpNode->nsGiven) {
tmp->nodeset=tmpNode->nodeset;
tmp->nsGiven=tmpNode->nsGiven;
if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) {
if (tmpNode->nsGiven) {
tmp->nodeset=tmpNode->nodeset;
tmp->nsGiven=tmpNode->nsGiven;
}
}
}
}
}
if(model->HICUMrbx == 0) {
@ -579,12 +578,12 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if(error) return(error);
here->HICUMbaseBPNode = tmp->number;
if (ckt->CKTcopyNodesets) {
if (CKTinst2Node(ckt,here,2,&tmpNode,&tmpName)==OK) {
if (tmpNode->nsGiven) {
tmp->nodeset=tmpNode->nodeset;
tmp->nsGiven=tmpNode->nsGiven;
}
}
if (CKTinst2Node(ckt,here,2,&tmpNode,&tmpName)==OK) {
if (tmpNode->nsGiven) {
tmp->nodeset=tmpNode->nodeset;
tmp->nsGiven=tmpNode->nsGiven;
}
}
}
}
if(model->HICUMre == 0) {
@ -594,12 +593,12 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if(error) return(error);
here->HICUMemitEINode = tmp->number;
if (ckt->CKTcopyNodesets) {
if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) {
if (tmpNode->nsGiven) {
tmp->nodeset=tmpNode->nodeset;
tmp->nsGiven=tmpNode->nsGiven;
}
}
if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) {
if (tmpNode->nsGiven) {
tmp->nodeset=tmpNode->nodeset;
tmp->nsGiven=tmpNode->nsGiven;
}
}
}
}
if(model->HICUMrsu == 0) {
@ -609,27 +608,36 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if(error) return(error);
here->HICUMsubsSINode = tmp->number;
if (ckt->CKTcopyNodesets) {
if (CKTinst2Node(ckt,here,4,&tmpNode,&tmpName)==OK) {
if (tmpNode->nsGiven) {
tmp->nodeset=tmpNode->nodeset;
tmp->nsGiven=tmpNode->nsGiven;
}
}
if (CKTinst2Node(ckt,here,4,&tmpNode,&tmpName)==OK) {
if (tmpNode->nsGiven) {
tmp->nodeset=tmpNode->nodeset;
tmp->nsGiven=tmpNode->nsGiven;
}
}
}
}
if(here->HICUMbaseBINode == 0) {
if(model->HICUMrbi0 == 0) {
here->HICUMbaseBINode = here->HICUMbaseBPNode;
} else if(here->HICUMbaseBINode == 0) {
error = CKTmkVolt(ckt, &tmp, here->HICUMname, "baseBI");
if(error) return(error);
here->HICUMbaseBINode = tmp->number;
if (ckt->CKTcopyNodesets) {
if (CKTinst2Node(ckt,here,5,&tmpNode,&tmpName)==OK) {
if (tmpNode->nsGiven) {
tmp->nodeset=tmpNode->nodeset;
tmp->nsGiven=tmpNode->nsGiven;
}
}
}
}
if (selfheat) {
if (here->HICUMtempNode == 0) { // no external node for temperature
error = CKTmkVolt(ckt,&tmp,here->HICUMname,"dT"); // create internal node
if (error) return(error);
here->HICUMtempNode = tmp->number;
}
if (here->HICUMtempNode == 0) { // no external node for temperature
error = CKTmkVolt(ckt,&tmp,here->HICUMname,"dT"); // create internal node
if (error) return(error);
here->HICUMtempNode = tmp->number;
}
} else {
if (here->HICUMtempNode > 0) { // external temp node is given, but no she parameter
here->HICUMtempNode = 0;
@ -658,7 +666,6 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
here->HICUMxf2Node = 0;
}
/* macro to make elements with built in test for out of memory */
#define TSTALLOC(ptr,first,second) \
do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
@ -746,7 +753,6 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
TSTALLOC(HICUMxfCollCIPtr ,HICUMxfNode,HICUMcollCINode);
TSTALLOC(HICUMxfBaseBIPtr ,HICUMxfNode,HICUMbaseBINode);
}
TSTALLOC(HICUMbaseBPSubsSIPtr ,HICUMbaseBPNode,HICUMsubsSINode);
@ -782,7 +788,7 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
TSTALLOC(HICUMxf2TempPtr ,HICUMxf2Node ,HICUMtempNode);
TSTALLOC(HICUMxf1TempPtr ,HICUMxf1Node ,HICUMtempNode);
}
}
}
}
}
return(OK);
@ -800,56 +806,57 @@ HICUMunsetup(
model = HICUMnextModel(model))
{
int selfheat = (((model->HICUMflsh == 1) || (model->HICUMflsh == 2)) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0));
int nqs = ( (model->HICUMflnqs != 0 || model->HICUMflcomp == 0.0 || model->HICUMflcomp == 2.1) && (model->HICUMalit > 0 || model->HICUMalqf > 0));
int nqs = ( (model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMalit > 0 || model->HICUMalqf > 0));
for (here = HICUMinstances(model); here != NULL;
here=HICUMnextInstance(here))
{
if (here->HICUMbaseBINode > 0)
if (here->HICUMcollCINode > 0
&& here->HICUMcollCINode != here->HICUMcollNode)
CKTdltNNum(ckt, here->HICUMcollCINode);
here->HICUMcollCINode = 0;
if (here->HICUMbaseBINode > 0
&& here->HICUMbaseBPNode != here->HICUMbaseBINode)
CKTdltNNum(ckt, here->HICUMbaseBINode);
here->HICUMbaseBINode = 0;
if (here->HICUMsubsSINode > 0
&& here->HICUMsubsSINode != here->HICUMsubsNode)
CKTdltNNum(ckt, here->HICUMsubsSINode);
here->HICUMsubsSINode = 0;
if (here->HICUMemitEINode > 0
&& here->HICUMemitEINode != here->HICUMemitNode)
CKTdltNNum(ckt, here->HICUMemitEINode);
here->HICUMemitEINode = 0;
if (here->HICUMbaseBPNode > 0
&& here->HICUMbaseBPNode != here->HICUMbaseNode)
CKTdltNNum(ckt, here->HICUMbaseBPNode);
here->HICUMbaseBPNode = 0;
if (here->HICUMcollCINode > 0
&& here->HICUMcollCINode != here->HICUMcollNode)
CKTdltNNum(ckt, here->HICUMcollCINode);
here->HICUMcollCINode = 0;
if (here->HICUMemitEINode > 0
&& here->HICUMemitEINode != here->HICUMemitNode)
CKTdltNNum(ckt, here->HICUMemitEINode);
here->HICUMemitEINode = 0;
if (here->HICUMsubsSINode > 0
&& here->HICUMsubsSINode != here->HICUMsubsNode)
CKTdltNNum(ckt, here->HICUMsubsSINode);
here->HICUMsubsSINode = 0;
if (selfheat) {
if (here->HICUMtempNode > 5) { // it is an internal node
if (here->HICUMtempNode > 6) { // it is an internal node
CKTdltNNum(ckt, here->HICUMtempNode);
here->HICUMtempNode = 0;
}
}
if (nqs) {
if (nqs) {
if(here->HICUMxfNode > 0)
CKTdltNNum(ckt, here->HICUMxfNode);
here->HICUMxfNode = 0;
if(here->HICUMxfNode > 0)
CKTdltNNum(ckt, here->HICUMxfNode);
here->HICUMxfNode = 0;
if(here->HICUMxf1Node > 0)
CKTdltNNum(ckt, here->HICUMxf1Node);
here->HICUMxf1Node = 0;
if(here->HICUMxf1Node > 0)
CKTdltNNum(ckt, here->HICUMxf1Node);
here->HICUMxf1Node = 0;
if(here->HICUMxf2Node > 0)
CKTdltNNum(ckt, here->HICUMxf2Node);
here->HICUMxf2Node = 0;
}
if(here->HICUMxf2Node > 0)
CKTdltNNum(ckt, here->HICUMxf2Node);
here->HICUMxf2Node = 0;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ extern "C" {
void hicum_diode(double T, double IS, double UM1, double U, double *Iz, double *Gz, double *Tz);
void hicum_qjmodf(double T, double c_0, double u_d, double z, double a_j, double U_cap, double *C, double *C_dU, double *C_dvt, double *Qz, double *Qz_dU, double *Qz_dvt);
static double HICUMlimitlog( double deltemp, double deltemp_old, double LIM_TOL, int *check);
int hicum_thermal_update(HICUMmodel *, HICUMinstance *, double Temp);
int hicum_thermal_update(HICUMmodel *, HICUMinstance *, double * Temp, double * Tdev_Vrth);
int HICUMload(GENmodel *inModel, CKTcircuit *ckt);
int HICUMtemp(GENmodel *inModel, CKTcircuit *ckt);
#ifdef __cplusplus

View File

@ -38,6 +38,19 @@ using namespace duals::literals;
#define TMIN -100.0
#define LN_EXP_LIMIT 11.0
duals::duald clip_temperature(duals::duald T){
// smooth clipping function for device temperature, if self heating increases temperature beyond
// T0+TMAX or below T0-TMIN
duals::duald Tdev;
Tdev = T;
if (T<(TMIN+CONSTCtoK+1.0)){
Tdev = TMIN+CONSTCtoK+exp(T-TMIN+CONSTCtoK-1.0);
} else if (T>(TMAX+CONSTCtoK-1.0)) {
Tdev = TMAX+CONSTCtoK-exp(TMAX+CONSTCtoK-T-1.0);
};
return Tdev;
};
void TMPHICJ(double , double , double , double , double ,
double , double , double , double , double , double ,
double *, double *, double *);
@ -120,14 +133,14 @@ HICUMtemp(GENmodel *inModel, CKTcircuit *ckt)
if(here->HICUMdtempGiven) here->HICUMtemp = here->HICUMtemp + here->HICUMdtemp;
iret = hicum_thermal_update(model, here, here -> HICUMtemp);
iret = hicum_thermal_update(model, here, &here -> HICUMtemp, &here->HICUMtemp_Vrth);
}
}
return(OK);
}
int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double HICUMTemp)
int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double * HICUMTemp, double * Tdev_Vrth)
{
HICUMmodel *model = (HICUMmodel *)inModel;
HICUMinstance *here = (HICUMinstance *)inInstance;
@ -157,16 +170,30 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
zetabcxt= mg+1-model->HICUMzetacx;
zetasct = mg-1.5;
// Limit temperature to avoid FPEs in equations
if(HICUMTemp < TMIN + CONSTCtoK) {
HICUMTemp = TMIN + CONSTCtoK;
} else {
if (HICUMTemp > TMAX + CONSTCtoK) {
HICUMTemp = TMAX + CONSTCtoK;
}
}
temp = HICUMTemp+1_e; // dual number valued temperature
vt = temp*CONSTKoverQ; // dual valued temperature voltage
// Smooth ngspice T clipping
temp = clip_temperature( *(HICUMTemp)+1_e );
*(HICUMTemp) = temp.rpart();
*(Tdev_Vrth) = temp.dpart();
// original HICUM clipping for Tdev => left here for reference
// *(Tdev_Vrth) = 1.0;
// if(*(HICUMTemp) < TMIN + CONSTCtoK) {
// *(HICUMTemp) = TMIN + CONSTCtoK;
// *(Tdev_Vrth) = 0.0;
// } else {
// if (*(HICUMTemp) > TMAX + CONSTCtoK) {
// *(HICUMTemp) = TMAX + CONSTCtoK;
// *(Tdev_Vrth) = 0.0;
// }
//}
//This routine calculate the derivative with respect to Vrth. Since at some point
// Tdev becomes constant (see above), we need to account for this like below.
//temp = *(HICUMTemp)+1_e* *(Tdev_Vrth); // dual number device temperature
vt = temp*CONSTKoverQ; // dual valued temperature voltage
here->HICUMvt0 = Tnom * CONSTKoverQ;
here->HICUMvt.rpart = vt.rpart();

View File

@ -1,202 +0,0 @@
notes of Mario and Markus with thanks to Dietmar
# Overview of Spice Files for HiCUM
This file gives an overview of the files needed for the ngspice HiCUM version, e.g. their:
- intent
- status
- assignee (Mario or Markus)
- hicum2.c
- Definition of the external instance and model structure.
- Including the variables which can be accessed from the outside.
- hicum2acld.c
- hicum2ask.c
- Define how the instance output data is saved.
- hicum2conv.c
- hicum2defs.h
- Define the internal data structure
- hicum2ext.h
- hicum2getic.h
- hicum2init.h
- hicum2itf.h
- hicum2load.c
- hicum2mask.c
- Define how the model output data is saved.
- hicum2mpar.c
- Check which parameters for the model were given in the netlist. If a parameter is given, save it and set the XXXGiven flag.
- hicum2noise.c
- hicum2param.c
- hicum2pzld.c
- hicum2setup.c
- hicum2soachk.c
- hicum2temp.c
- Temperature scaling of all parameters
- Models are implemented and all derivatives are implemented using dual numbers
- Assignee: Mario
- hicum2trunc.c
- hicumL2.cpp
Implemented equivalent circuit elements:
- Ijbei
- Ijbci
- Cjei
- Cjci
- It
- Crbi (Mario check this)
- Iavl
- Ibhrec
- rbi
- Ijbep
- Ijbep
- Ijbcx
- Cjcx
- Cjs
- Cjep
- Ibet
- Ijsc
Missing:
- Ibpsi
## Working in the DC case without self heating:
See test case in DMT where this is compared against ADS.
- re
- Ibiei
- Ibici
## useful stuff
non-ancient explanation how equation system of spice looks:
<https://spicesharp.github.io/SpiceSharp/articles/custom_components/modified_nodal_analysis.html#nonlinear-components>
# run tests and get netlists
Ja, gibt es: run_cmc_check script im tests/bin Verzeichnis hat oben einen debug Schalter.
Dann musst Du in qaSpec Dir die entsprechenden tests ein- bzw. auskommentieren.
Nicht über die hohen % Zahlen wundern. Wir bewegen uns oft im exp Bereich. Deshalb der tkdiff Vergleich ob es grob stimmt.
# run cmc tests
P.S. Bedienungsanleitung cmc qa check:
- das zu prüfende ngspice muß im Pfad liegen!
- ins tests/hicum2/npn Verzeichnis setzen und "./run" aufrufen
- die results mit den reference per tkdiff oder ähnlich vergleichen
# AC Anleitung
Die Regeln für die AC load Aufstellung sind:
1. Inspizieren ob XXXload.c Matrix und RHS vollständig ist!
2. Cut the entire block.
3. Paste into XXXacload.c
4. Löschen der RHS Einträge.
5. Verdoppeln aller Matrixeinträge + shift mit +1 für die imag Anteile von reaktive Zweigen.
6. dafür sorgen daß diese mit 2*Pi*f CKTomega) malgenommen werden.
Es ist reine cut&paste Arbeit mit einem guten Editor.
# Kommentar von DWarn, mal ansehen
Im Init part, line 1142:
if (ibets > 0) begin : HICTUN_T
Im Update part, line 1361:
if (ibets > 0 && (Vbpei < 0.0 || Vbiei < 0.0)) begin : HICTUN_T
# gmin
Die Knoten eines nichlinearen Zweiges müssen einmal (!) mit gmin verbunden werden.
Daraus folgt, wie schon gemacht, für den Strom gmin*Vxy als Zusatz und für alle (!)
Ableitungen des Stromes gmin als Zusatz.
Praktisch heißt das, daß die Beaufschlagung von Iciei überflüssig ist,
da schon mit den Zweigen biei und bici erfolgt ist.
Es fehlen aber noch Beaufschlagungen,
z.B. Ibiei_Vbici, weil die Ableitung später hinzugekommen ist.
# CMC Failing Tests
****** Checking test (ngspice): fgum_ac_npn_1D_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
****** Checking test (ngspice): fgum_ac_npn_internal_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
****** Checking test (ngspice): fgum_ac_npn_full_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
****** Checking test (ngspice): fgum_ac_npn_full_subcoupl_peri_bias_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
****** Checking test (ngspice): fgum_ac_npn_full_subcoupl_peri_con_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
****** Checking test (ngspice): fgum_ac_npn_full_subcoupl_peri_bias_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
****** Checking test (ngspice): fgum_ac_npn_full_subcoupl_peri_cond_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
****** Checking test (ngspice): fgum_ac_npn_vert_nqs_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
***** Checking test (ngspice): fgum_ac_npn_lat_nqs_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
****** Checking test (ngspice): fgum_ac_npn_cornoise_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
***** Checking test (ngspice): CBE_npn_1D_dc
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
****** Checking test (ngspice): CBE_npn_1D_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
****** Checking test (ngspice): CBE_npn_internal_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
***** Checking test (ngspice): CBE_npn_full_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
***** Checking test (ngspice): ypara_npn_1D_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
***** Checking test (ngspice): ypara_npn_internal_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
***** Checking test (ngspice): ypara_npn_full_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
***** Checking test (ngspice): ypara_npn_full_sh_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
****** Checking test (ngspice): ypara_npn_full_subtran_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
****** Checking test (ngspice): ypara_npn_full_subcoupl_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
****** Checking test (ngspice): ypara_npn_full_subcoupl_peri_bias_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
****** Checking test (ngspice): ypara_npn_full_subcoupl_peri_con_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
***** Checking test (ngspice): ypara_npn_full_subcoupl_peri_bias_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
****** Checking test (ngspice): ypara_npn_full_subcoupl_peri_con_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
variant: standard (compared to: reference) DIFFER (max rel error is 100%)
***** Checking test (ngspice): ypara_npn_vert_nqs_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
****** Checking test (ngspice): ypara_npn_lat_nqs_ac
variant: standard (compared to: reference) FAIL (probably from some simulation failure)
****** Checking test (ngspice): ypara_npn_cornoise_ac
variant: standard (compared to: reference) DIFFER (max rel error is 100%)

View File

@ -1,169 +0,0 @@
; Noise simulation for ads
Options UseNutmegFormat=yes ASCII_Rawfile=yes
Options Temp=27
Vsweep = 0 V
define mysub (coll_x base_x emit_x subs_x therm_x)
#uselib "ckt", "VCVS"
VCVS:e_coll coll_x 0 coll_v 0 G=1
V_Source:v_coll coll_v coll Vdc=0
SDD:f_coll coll_x 0 C[1]="v_coll" I[1]=_c1*-1
#uselib "ckt", "VCVS"
VCVS:e_base base_x 0 base_v 0 G=1
V_Source:v_base base_v base Vdc=0
SDD:f_base base_x 0 C[1]="v_base" I[1]=_c1*-1
#uselib "ckt", "VCVS"
VCVS:e_emit emit_x 0 emit_v 0 G=1
V_Source:v_emit emit_v emit Vdc=0
SDD:f_emit emit_x 0 C[1]="v_emit" I[1]=_c1*-1
#uselib "ckt", "VCVS"
VCVS:e_subs subs_x 0 subs_v 0 G=1
V_Source:v_subs subs_v subs Vdc=0
SDD:f_subs subs_x 0 C[1]="v_subs" I[1]=_c1*-1
V_Source:v_therm therm therm_x Vdc=0
mymodel:q1 coll base emit subs therm \
model mymodel HICUM2_22 \
C10= 9.074e-030 \
Qp0= 1.008e-013 \
Ich= 0 \
Hfe= 10.01 \
Hfc= 20.04 \
Hjei= 3.382 \
Hjci= 0.2 \
Ibeis= 1.328e-019 \
Mbei= 1.027 \
Ireis= 1.5e-014 \
Mrei= 2 \
Ibeps= 1.26e-019 \
Mbep= 1.042 \
Ireps= 1.8e-014 \
Mrep= 1.8 \
Mcf= 1 \
Tbhrec= 1e-010 \
Ibcis= 4.603e-017 \
Mbci= 1.15 \
Ibcxs= 0 \
Mbcx= 1 \
Ibets= 0.02035 \
Abet= 24 \
Tunode= 1 \
Favl= 18.96 \
Qavl= 5.092e-014 \
Alfav= -0.0024 \
Alqav= -0.0006284 \
Rbi0= 4.444 \
Rbx= 2.568 \
Fgeo= 0.7409 \
Fdqr0= 0 \
Fcrbi= 0 \
Fqi= 1 \
Re= 1.511 \
Rcx= 2.483 \
Itss= 1.143e-019 \
Msf= 1.056 \
Iscs= 4.60106e-015 \
Msc= 1.018 \
Tsf= 0 \
Rsu= 500 \
Csu= 6.4e-014 \
Cjei0= 8.869e-015 \
Vdei= 0.714 \
Zei= 0.2489 \
Ajei= 1.65 \
Cjep0= 2.178e-015 \
Vdep= 0.8501 \
Zep= 0.2632 \
Ajep= 1.6 \
Cjci0= 3.58e-015 \
Vdci= 0.8201 \
Zci= 0.2857 \
Vptci= 1.79 \
Cjcx0= 6.299e-015 \
Vdcx= 0.8201 \
Zcx= 0.2863 \
Vptcx= 1.977 \
Fbcpar= 0.3 \
Fbepar= 1 \
Cjs0= 2.6e-014 \
Vds= 0.9997 \
Zs= 0.4295 \
Vpts= 100 \
T0= 2.089e-013 \
Dt0h= 8e-014 \
Tbvl= 8.25e-014 \
Tef0= 3.271e-013 \
Gtfe= 3.548 \
Thcs= 5.001e-012 \
Ahc= 0.05 \
Fthc= 0.7 \
Rci0= 9.523 \
Vlim= 0.6999 \
Vces= 0.01 \
Vpt= 2 \
Tr= 0 \
Cbepar= 2.609e-014 \
Cbcpar= 1.64512e-014 \
Alqf= 0.166667 \
Alit= 0.333333 \
Flnqs= 0 \
Kf= 0 \
Af= 2 \
Cfbe= -1 \
Latb= 0 \
Latl= 0 \
Vgb= 0.91 \
Alt0= 0.004 \
Kt0= 6.588e-005 \
Zetaci= 0.58 \
Alvs= 0.001 \
Alces= -0.2286 \
Zetarbi= 0.3002 \
Zetarbx= 0.06011 \
Zetarcx= -0.02768 \
Zetare= -0.9605 \
Zetacx= 0 \
Vge= 1.17 \
Vgc= 1.17 \
Vgs= 1.049 \
F1vg= -0.000102377 \
F2vg= 0.00043215 \
Zetact= 5 \
Zetabet= 4.892 \
Alb= 0 \
Flsh= 1 \
Rth= 1113.4 \
Cth= 6.841e-012 \
Zetarth= 0 \
Alrth= 0.002 \
Flcomp= 2.3 \
Tnom= 26.85 \
Dt= 0 \
Acbar= 1.5 \
Flcono= 1 \
Icbar= 0.01 \
Vcbar= 0.04 \
Zetavgbe= 0.7 \
Hf0= 40 \
Ahjei= 3 \
Rhjei= 2 \
Delck= 2 \
Zetahjei= -0.5 \
end mysub
V_Source:v_coll coll 0 Vdc=1.000000
V_Source:v_base base 0 Vdc=Vsweep
V_Source:v_emit emit 0 Vdc=0
V_Source:v_subs subs 0 Vdc=0
I_Source:i_therm therm 0 Idc=0
mysub:x_coll coll base emit subs therm
SDD:fn_coll 0 n_coll I[1,0]=_c1 C[1]="v_coll"
R:r_coll n_coll 0 R=1 Noise=no
OutputPlan:noiseOutput Type="Output"
SweepPlan:noisePlan Start=1000 Stop=1e+011 Dec=2
SweepPlan:dcPlan Start=0.700000 Stop=1.100000 Step=0.1
AC:AC1 CalcNoise=yes OutputPlan="noiseOutput" SweepVar="freq" \
SweepPlan="noisePlan" NoiseNode="n_coll"
ParamSweep:Vsweep SimInstanceName="AC1" SweepVar="Vsweep" SweepPlan="dcPlan"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1344,11 +1344,6 @@
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\src\frontend\parse-bison.y;..\src\spicelib\parser\inpptree-parser.y">
<Message>invoke win_bison.exe for %(Identity)</Message>
<Command>..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
<Outputs>.\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h</Outputs>
</CustomBuild>
<None Include="..\src\xspice\icm\objects.inc" />
</ItemGroup>
<ItemGroup>
@ -2726,6 +2721,18 @@
<ItemGroup>
<ResourceCompile Include="vngspice.rc" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\src\frontend\parse-bison.y">
<Message>invoke win_bison.exe for %(Identity)</Message>
<Command>..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
<Outputs>.\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\spicelib\parser\inpptree-parser.y">
<Message>invoke win_bison.exe for %(Identity)</Message>
<Command>..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
<Outputs>.\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -155,16 +155,26 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\src\xspice\cmpp\ifs_yacc.y;..\..\..\src\xspice\cmpp\mod_yacc.y">
<CustomBuild Include="..\..\..\src\xspice\cmpp\ifs_lex.l">
<Message>invoke win_flex.exe for %(Identity)</Message>
<Command>..\..\..\..\flex-bison\win_flex.exe --outfile=.\tmp-bison\%(Filename).c --header-file=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
<Outputs>.\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\src\xspice\cmpp\ifs_yacc.y">
<Message>invoke win_bison.exe for %(Identity)</Message>
<Command>..\..\..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
<Outputs>.\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\src\xspice\cmpp\ifs_lex.l;..\..\..\src\xspice\cmpp\mod_lex.l">
<CustomBuild Include="..\..\..\src\xspice\cmpp\mod_lex.l">
<Message>invoke win_flex.exe for %(Identity)</Message>
<Command>..\..\..\..\flex-bison\win_flex.exe --outfile=.\tmp-bison\%(Filename).c --header-file=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
<Outputs>.\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\src\xspice\cmpp\mod_yacc.y">
<Message>invoke win_bison.exe for %(Identity)</Message>
<Command>..\..\..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
<Outputs>.\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h</Outputs>
</CustomBuild>
<None Include="..\src\xspice\icm\objects.inc" />
</ItemGroup>
<ItemGroup>