Using GMIN from simulator will improve op solution
This commit is contained in:
parent
06339d2072
commit
0e424010ed
|
|
@ -67,7 +67,7 @@
|
|||
`define TMAX 326.85
|
||||
`define TMIN -100.0
|
||||
`define MIN_R 0.001
|
||||
`define Gmin 1.0e-12
|
||||
//`define Gmin 1.0e-12
|
||||
|
||||
`define QCMODF(vj,cj0,vd,z,aj,cjf)\
|
||||
if(cj0 > 0.0) begin\
|
||||
|
|
@ -353,6 +353,8 @@ module hic0_full (c,b,e,s,tnode);
|
|||
|
||||
// Declaration of the variables: begin
|
||||
|
||||
real _circuit_gmin;
|
||||
|
||||
real HICUMtype `P(spice:name="type" info="Device type from npn or pnp flags" unit="no" ask="yes");
|
||||
|
||||
// QCJMOD
|
||||
|
|
@ -777,33 +779,33 @@ analog begin
|
|||
//
|
||||
// Define branch sources
|
||||
//
|
||||
I(br_biei) <+ `Gmin*V(br_biei);
|
||||
I(br_bici) <+ `Gmin*V(br_bici);
|
||||
I(br_biei) <+ _circuit_gmin*V(br_biei);
|
||||
I(br_bici) <+ _circuit_gmin*V(br_bici);
|
||||
|
||||
I(br_bs) <+ HSI_Tsu;
|
||||
I(br_sci) <+ ijsc `P(spectre:gmin="add" spectre:pwl_passive="1e10");
|
||||
I(br_sci) <+ ijsc + _circuit_gmin*V(br_sci); //`P(spectre:gmin="add" spectre:pwl_passive="1e10");
|
||||
I(br_sci) <+ ddt(qjs);
|
||||
I(br_bci) <+ ddt(qjcx);
|
||||
I(br_bci) <+ ddt(Qbci);
|
||||
I(br_be) <+ ddt(Qbe);
|
||||
if (re >= `MIN_R) begin
|
||||
I(br_eie_i) <+ Veie/re_t `P(spectre:gmin="add");
|
||||
I(br_eie_i) <+ Veie/re_t + _circuit_gmin*V(br_eie_i);//`P(spectre:gmin="add");
|
||||
end else begin
|
||||
V(br_eie_v) <+ 0.0;
|
||||
end
|
||||
if (rcx >= `MIN_R) begin
|
||||
I(br_cic_i) <+ Vcic/rcx_t `P(spectre:gmin="add");
|
||||
I(br_cic_i) <+ Vcic/rcx_t + _circuit_gmin*V(br_cic_i);//`P(spectre:gmin="add");
|
||||
end else begin
|
||||
V(br_cic_v) <+ 0.0;
|
||||
end
|
||||
if (rbi0 >= `MIN_R || rbx >= `MIN_R) begin
|
||||
I(br_bbi_i) <+ Vbbi/rb `P(spectre:gmin="add");
|
||||
I(br_bbi_i) <+ Vbbi/rb + _circuit_gmin*V(br_bbi_i); //`P(spectre:gmin="add");
|
||||
end else begin
|
||||
V(br_bbi_v) <+ 0.0;
|
||||
end
|
||||
I(br_bici) <+ Ibici `P(spectre:gmin="add" spectre:pwl_sat_current="IMAX" spectre:pwl_sat_cond="imax/0.025" spectre:pwl_rev_current="imax" spectre:pwl_rev_cond="IMAX/0.025");
|
||||
I(br_bici) <+ Ibici + _circuit_gmin*V(br_bici); //`P(spectre:gmin="add" spectre:pwl_sat_current="IMAX" spectre:pwl_sat_cond="imax/0.025" spectre:pwl_rev_current="imax" spectre:pwl_rev_cond="IMAX/0.025");
|
||||
I(br_bici) <+ ddt(Qbici);
|
||||
I(br_biei) <+ ijbe `P(spectre:gmin="add" spectre:pwl_fwd_current="IBEIS*exp(25.0)" spectre:pwl_fwd_node="bi" spectre:pwl_fwd_cond="IBEIS*exp(25.0)/0.025" spectre:pwl_sat_current="IMAX" spectre:pwl_sat_cond="IMAX/0.025" spectre:pwl_passive="1e10");
|
||||
I(br_biei) <+ ijbe + _circuit_gmin*V(br_biei); //`P(spectre:gmin="add" spectre:pwl_fwd_current="IBEIS*exp(25.0)" spectre:pwl_fwd_node="bi" spectre:pwl_fwd_cond="IBEIS*exp(25.0)/0.025" spectre:pwl_sat_current="IMAX" spectre:pwl_sat_cond="IMAX/0.025" spectre:pwl_passive="1e10");
|
||||
I(br_biei) <+ ddt(Qbiei);
|
||||
I(br_ciei) <+ it `P(spectre:pwl_fwd_current="IS*exp(25.0)" spectre:pwl_fwd_node="bi" spectre:pwl_fwd_cond="IS*exp(25.0)/0.025" spectre:pwl_rev_current="IMAX" spectre:pwl_rev_cond="IMAX/0.025" spectre:pwl_passive="1e10");
|
||||
|
||||
|
|
@ -812,7 +814,7 @@ analog begin
|
|||
if(flsh == 0 || rth < `MIN_R) begin
|
||||
I(br_sht) <+ Vrth/`MIN_R;
|
||||
end else begin
|
||||
I(br_sht) <+ Vrth/rth-pterm `P(spectre:gmin="add");
|
||||
I(br_sht) <+ Vrth/rth-pterm + _circuit_gmin*V(br_sht);//`P(spectre:gmin="add");
|
||||
I(br_sht) <+ ddt(cth*Vrth);
|
||||
end
|
||||
// ******************************************
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@
|
|||
`define TMIN -100.0
|
||||
`define LN_EXP_LIMIT 11.0
|
||||
`define MIN_R 0.001
|
||||
`define Gmin 1.0e-12
|
||||
//`define Gmin 1.0e-12
|
||||
|
||||
|
||||
//ADS
|
||||
|
|
@ -520,7 +520,6 @@ branch (n2 ) b_n2;
|
|||
// -- ########### Parameters initialization ################
|
||||
// -- ###########################################################
|
||||
|
||||
|
||||
//Transfer current
|
||||
parameter real c10 = 2.0E-30 from [0:1] `ATTR(info="GICCR constant" unit="A^2s");
|
||||
parameter real qp0 = 2.0E-14 from (0:1] `ATTR(info="Zero-bias hole charge" unit="Coul");
|
||||
|
|
@ -680,6 +679,8 @@ parameter real dt = 0.0 `ATTR(info="Temperature
|
|||
|
||||
//Declaration of variables
|
||||
|
||||
real _circuit_gmin;
|
||||
|
||||
//Temperature and drift
|
||||
real VT,Tdev,qtt0,ln_qtt0,r_VgVT,V_gT,dT,k;
|
||||
real ireis_t,ibeis_t,ibcxs_t,ibcis_t,iscs_t,cjci0_t;
|
||||
|
|
@ -1488,8 +1489,8 @@ end //of Model_evaluation
|
|||
|
||||
begin : Load_sources
|
||||
|
||||
I(br_biei) <+ `Gmin*V(br_biei);
|
||||
I(br_bici) <+ `Gmin*V(br_bici);
|
||||
I(br_biei) <+ _circuit_gmin*V(br_biei);
|
||||
I(br_bici) <+ _circuit_gmin*V(br_bici);
|
||||
|
||||
I(br_bci) <+ ddt(qjcx0_t_i);
|
||||
I(br_bci) <+ ddt(cbcpar1*V(br_bci));
|
||||
|
|
|
|||
|
|
@ -203,11 +203,11 @@ Vsc3 = Vsc4 - Vc3c4 ;
|
|||
|
||||
Ib1_s = XIBI * Ibf0 * (eVb1e1 - 1.0);
|
||||
`expLin(tmpExp,Vb2e1 * VtINV / MLF)
|
||||
Ib2 = IBF_TM * (tmpExp - 1.0) + GMIN * Vb2e1;
|
||||
Ib2 = IBF_TM * (tmpExp - 1.0) + _circuit_gmin * Vb2e1;
|
||||
`expLin(tmpExp,0.5 * Vb1c4 * VtINV)
|
||||
Ib3 = IBR_TM * (eVb1c4 - 1.0) /
|
||||
(tmpExp + exp(0.5 * VLR * VtINV)) +
|
||||
GMIN * Vb1c4;
|
||||
_circuit_gmin * Vb1c4;
|
||||
|
||||
// Iex, Isub (XIex, XIsub)
|
||||
|
||||
|
|
|
|||
|
|
@ -189,6 +189,6 @@ parameter integer TYPE = 1 from [-1:1]
|
|||
`else
|
||||
parameter integer TYPE = 1 from [-1:1] exclude 0;
|
||||
`endif
|
||||
parameter real GMIN = 1.0e-12 from (0:1e-10]
|
||||
`ATTR(info="Minimum conductance");
|
||||
|
||||
//parameter real GMIN = 1.0e-12 from (0:1e-10]
|
||||
// `ATTR(info="Minimum conductance");
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
// Declaration of variables
|
||||
|
||||
real _circuit_gmin;
|
||||
|
||||
// Model constants
|
||||
|
||||
real An, Bn;
|
||||
|
|
|
|||
Loading…
Reference in New Issue