Merge remote-tracking branch 'origin/markus_dev' into markus_dev

This commit is contained in:
Markus Mueller 2020-07-23 15:56:29 +02:00
commit 64704fd53e
6 changed files with 1449 additions and 1676 deletions

View File

@ -17,8 +17,6 @@ Spice3 Implementation: 2019 Dietmar Warning
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
#define MIN_R 0.001
int
HICUMmParam(int param, IFvalue *value, GENmodel *inModel)
{
@ -196,7 +194,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:

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;
@ -499,24 +497,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
@ -667,7 +665,7 @@ 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){\
@ -791,7 +789,7 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
TSTALLOC(HICUMxf2TempPtr ,HICUMxf2Node ,HICUMtempNode);
TSTALLOC(HICUMxf1TempPtr ,HICUMxf1Node ,HICUMtempNode);
}
}
}
}
}
return(OK);
@ -814,29 +812,30 @@ HICUMunsetup(
for (here = HICUMinstances(model); here != NULL;
here=HICUMnextInstance(here))
{
if (here->HICUMbaseBINode > 0)
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->HICUMcollCINode > 0
&& here->HICUMcollCINode != here->HICUMcollNode)
CKTdltNNum(ckt, here->HICUMcollCINode);
here->HICUMcollCINode = 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 (here->HICUMbaseBINode > 0
&& here->HICUMbaseBPNode != here->HICUMbaseBINode)
CKTdltNNum(ckt, here->HICUMbaseBINode);
here->HICUMbaseBINode = 0;
if (selfheat) {
if (here->HICUMtempNode > 5) { // it is an internal node
@ -847,17 +846,17 @@ HICUMunsetup(
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;
}
}

View File

@ -1845,8 +1845,6 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
Vbici = DEVpnjlim(Vbici,*(ckt->CKTstate0 + here->HICUMvbici),here->HICUMvt.rpart,
here->HICUMtVcrit,&ichk1);
}
// ichk1 = 0;
// Vbici = HICUMlimitlog(Vbici,*(ckt->CKTstate0 + here->HICUMvbici),0.4,&ichk1);
Vbpei = DEVpnjlim(Vbpei,*(ckt->CKTstate0 + here->HICUMvbpei),here->HICUMvt.rpart,
here->HICUMtVcrit,&ichk2);
Vbpci = DEVpnjlim(Vbpci,*(ckt->CKTstate0 + here->HICUMvbpci),here->HICUMvt.rpart,

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