├── ASMHEMT101.0.0_Manual.pdf ├── README.md ├── research_papers ├── ASM GaN Industry Standard Model for GaN RF.pdf ├── Consistent IV and CV modeling.pdf └── nonlinear RF Modeling.pdf ├── vacode ├── LICENSE.txt ├── NOTICE.txt └── asmhemt.va └── videos └── Links.txt /ASMHEMT101.0.0_Manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourabhberkeley/ASM-HEMT/9d98c3219e2cb3217526b16c8a598b08ae3ef2ef/ASMHEMT101.0.0_Manual.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is repository for open source version of ASM-HEMT model. 2 | ASM-HEMT is industry standard compact model for GaN RF and power transistors. 3 | -------------------------------------------------------------------------------- /research_papers/ASM GaN Industry Standard Model for GaN RF.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourabhberkeley/ASM-HEMT/9d98c3219e2cb3217526b16c8a598b08ae3ef2ef/research_papers/ASM GaN Industry Standard Model for GaN RF.pdf -------------------------------------------------------------------------------- /research_papers/Consistent IV and CV modeling.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourabhberkeley/ASM-HEMT/9d98c3219e2cb3217526b16c8a598b08ae3ef2ef/research_papers/Consistent IV and CV modeling.pdf -------------------------------------------------------------------------------- /research_papers/nonlinear RF Modeling.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourabhberkeley/ASM-HEMT/9d98c3219e2cb3217526b16c8a598b08ae3ef2ef/research_papers/nonlinear RF Modeling.pdf -------------------------------------------------------------------------------- /vacode/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2018 Sourabh Khandelwal and Indian Institute of Technology Kanpur 2 | Copyright 2014 Sourabh Khandelwal and Indian Institute of Technology Kanpur 3 | Copyright 2013 Norwegian University of Science and Technology Trondheim and Indian Institute of Technology Kanpur 4 | Copyright 2012 Norwegian University of Science and Technology Trondheim 5 | 6 | Licensed under Educational Community License, Version 2.0 (the "License"); you may 7 | not use this file except in compliance with the License. You may obtain a copy of the license at 8 | http://opensource.org/licenses/ECL-2.0 9 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 10 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations 11 | under the License. 12 | -------------------------------------------------------------------------------- /vacode/NOTICE.txt: -------------------------------------------------------------------------------- 1 | The ASM HEMT standard has been supported by the members of Silicon Integration Initiative's Compact Model Coalition. A link to the most recent version of this standard can be found at: 2 | http://www.si2.org/cmc 3 | -------------------------------------------------------------------------------- /vacode/asmhemt.va: -------------------------------------------------------------------------------- 1 | /* ASM HEMT Model Version 101.0.0 released by Sourabh Khandelwal on 03-16-2018 2 | Copyright 2018 Sourabh Khandelwal and Indian Institute of Technology Kanpur 3 | Copyright 2014 Sourabh Khandelwal and Indian Institute of Technology Kanpur 4 | Copyright 2013 Norwegian University of Science and Technology Trondheim and Indian Institute of Technology Kanpur 5 | Copyright 2012 Norwegian University of Science and Technology Trondheim 6 | 7 | Authors: Sourabh Khandelwal, Tor A Fjeldly 8 | Contact: sourabh.khandelwal@mq.edu.au, sourabhkhandelwal@gmail.com, chauhan@iitk.ac.in 9 | Project Directors and Developers: Sourabh Khandelwal (Macquarie University) and Yogesh Singh Chauhan (IIT Kanpur) 10 | */ 11 | /* 12 | Licensed under Educational Community License, Version 2.0 (the "License"); you may 13 | not use this file except in compliance with the License. You may obtain a copy of the license at 14 | http://opensource.org/licenses/ECL-2.0 15 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 16 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations 17 | under the License. 18 | 19 | ASM HEMT model is supported by the memebrs of Silicon Integration Initiative's Compact Model Coalition. A link to the most recent version of this 20 | standard can be found at: http://www.si2.org/cmc 21 | */ 22 | `include "discipline.h" 23 | `include "constants.h" 24 | 25 | ////////// Numerical and Physical Constants ////////// 26 | `define DOS 3.240e17 //Density of states, Reference M. Shur Plenum Press 1987, GaAs Device and Circuits 27 | `define ep_psi 0.3 //Smoothing Constant 28 | `define Oneby3 0.33333333333333333 29 | `define Twoby3 0.66666666666666667 30 | `define EXPL_THRESHOLD 80.0 31 | `define MAX_EXPL 5.540622384e+34 32 | `define MIN_EXPL 1.804851387e-35 33 | `define KboQ 8.617087e-5 // J/deg 34 | ////////// Macros for the model/instance parameters ////////// 35 | /* 36 | MPRxx model parameter real 37 | MPIxx model parameter integer 38 | IPRxx instance parameter real 39 | IPIxx instance parameter integer 40 | || 41 | cc closed lower bound, closed upper bound 42 | oo open lower bound, open upper bound 43 | co closed lower bound, open upper bound 44 | oc open lower bound, closed upper bound 45 | cz closed lower bound=0, open upper bound=inf 46 | oz open lower bound=0, open upper bound=inf 47 | nb no bounds 48 | ex no bounds with exclude 49 | sw switch(integer only, values 0=false and 1=true) 50 | ty switch(integer only, values -1=p-type and +1=n-type) 51 | 52 | IPM instance parameter mFactor(multiplicity, implicit for LRM2.2) 53 | OPP operating point parameter, includes units and description for printing 54 | */ 55 | 56 | `define OPP(nam,uni,des) (*units=uni, desc=des*) real nam ; 57 | `define MPRnb(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def ; 58 | `define MPRex(nam,def,uni,exc, des) (*units=uni, desc=des*) parameter real nam=def exclude exc ; 59 | `define MPRcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr] ; 60 | `define MPRoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr) ; 61 | `define MPRco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr) ; 62 | `define MPRoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr] ; 63 | `define MPRcz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from[ 0:inf); 64 | `define MPRoz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from( 0:inf); 65 | `define MPInb(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def ; 66 | `define MPIex(nam,def,uni,exc, des) (*units=uni, desc=des*) parameter integer nam=def exclude exc ; 67 | `define MPIcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from[lwr:upr] ; 68 | `define MPIoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr) ; 69 | `define MPIco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from[lwr:upr) ; 70 | `define MPIoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr] ; 71 | `define MPIcz(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ 0:inf); 72 | `define MPIoz(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from( 0:inf); 73 | `define MPIsw(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ 0: 1] ; 74 | `define MPIty(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ -1: 1] exclude 0 ; 75 | `define IPRnb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def ; 76 | `define IPRex(nam,def,uni,exc, des) (*units=uni, type="instance", desc=des*) parameter real nam=def exclude exc ; 77 | `define IPRcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr] ; 78 | `define IPRoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr) ; 79 | `define IPRco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr) ; 80 | `define IPRoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr] ; 81 | `define IPRcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[ 0:inf); 82 | `define IPRoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from( 0:inf); 83 | `define IPInb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def ; 84 | `define IPIex(nam,def,uni,exc, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def exclude exc ; 85 | `define IPIcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr] ; 86 | `define IPIoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr) ; 87 | `define IPIco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr) ; 88 | `define IPIoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr] ; 89 | `define IPIcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[ 0:inf); 90 | `define IPIoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from( 0:inf); 91 | 92 | /* 93 | Not all Verilog-A compilers are able to properly collapse internal nodes. To ensure minimal node 94 | count, comment out the following lines: 95 | */ 96 | 97 | `define __FP1MOD__ 98 | `define __FP2MOD__ 99 | `define __FP3MOD__ 100 | `define __FP4MOD__ 101 | 102 | ////////// Function for VG0 Calculation ////////// 103 | `define VG0(l,w,Voff_dibl_temp,imin,Vgs,Vtv,Vg0) \ 104 | t0 = l/(2.0*w*`P_Q*`DOS*Vtv*Vtv); \ 105 | vgmin = Voff_dibl_temp + Vtv*ln(t0*imin); \ 106 | vggmin = 0.5*((Vgs-vgmin) + sqrt((Vgs-vgmin)*(Vgs-vgmin) + 1.0e-4)) + vgmin; \ 107 | Vg0 = vggmin - Voff_dibl_temp; 108 | 109 | ////////// Function for PSIS Calculation ////////// 110 | `define PSIS(Cg,Vg0,GAMMA0Ival,GAMMA1Ival,Vtv, beta,ALPHAN,ALPHAD,Cch,psis) \ 111 | beta = Cg/(`P_Q*`DOS*Vtv); \ 112 | ALPHAN = `M_E/beta; \ 113 | ALPHAD = 1.0/beta; \ 114 | Cch = Cg/`P_Q; \ 115 | vgop = 0.5*Vg0 + 0.5*sqrt(Vg0*Vg0 + 4.0*`ep_psi*`ep_psi); \ 116 | vgopacc = vgop ; \ 117 | vgon = vgop*ALPHAN/(sqrt(vgop*vgop + ALPHAN*ALPHAN)); \ 118 | vgod = vgop*ALPHAD/(sqrt(vgop*vgop + ALPHAD*ALPHAD)); \ 119 | Hx = (vgop + Vtv*(1.0-ln(beta*vgon)) - (GAMMA0Ival/3.0)*pow(Cch*vgop,`Twoby3))/(vgop*(1.0+(Vtv/vgod)) + ((2.0*GAMMA0Ival)/3.0)*pow(Cch*vgop,`Twoby3)); \ 120 | t0 = (Vg0/(2.0*Vtv)); \ 121 | if (t0 < 200.0) begin \ 122 | t1 = lexp(t0/4.0); \ 123 | t2 = lexp(-3.0*t0/4.0); \ 124 | nsx = (2.0*Vtv*(Cch)*((3.0*t0/4.0)+ln(t1 + t2)))/((1.0/Hx) + (Cch/`DOS)*lexp((-1.0*Vg0)/(2.0*Vtv))); \ 125 | end else begin \ 126 | nsx = (2.0*Vtv*(Cch)*((1.0*t0/1.0)))/((1.0/Hx) + (Cch/`DOS)*lexp((-1.0*Vg0)/(2.0*Vtv))); \ 127 | end \ 128 | ef1 = Vg0 - nsx/Cch; \ 129 | if (abs(ef1-Vg0) > 1.0e-19) begin \ 130 | vgef1 = Vg0 - ef1; \ 131 | vgef1 = 0.5*vgef1 + 0.5*sqrt(vgef1*vgef1 + 4.0*1.0e-9*1.0e-9); \ 132 | t0 = pow(Cch,`Twoby3); \ 133 | t1 = pow(vgef1,`Twoby3); \ 134 | t2 = pow(vgef1,-`Oneby3); \ 135 | vgef23g0 = GAMMA0Ival*t0*t1; \ 136 | vgef23g1 = GAMMA1Ival*t0*t1; \ 137 | tg0 = (ef1/Vtv) - (vgef23g0/Vtv); \ 138 | tg1 = (ef1/Vtv) - (vgef23g1/Vtv); \ 139 | t4 = Cch*vgef1 - `DOS*Vtv*ln(lexp(tg0) + 1.0) - `DOS*Vtv*ln(lexp(tg1) + 1.0); \ 140 | vgefm13g0 = GAMMA0Ival*t0*t2; \ 141 | vgefm13g1 = GAMMA1Ival*t0*t2; \ 142 | t5ng0 = lexp(tg0)*`DOS*(1.0 + `Twoby3*vgefm13g0); \ 143 | t5dg0 = 1.0 + lexp(tg0); \ 144 | t5ng1 = lexp(tg1)*`DOS*(1.0 + `Twoby3*vgefm13g1); \ 145 | t5dg1 = 1.0 + lexp(tg1); \ 146 | t5 = -1.0*Cch - (t5ng0/t5dg0) - (t5ng1/t5dg1); \ 147 | ef2 = ef1 - (t4/t5); \ 148 | vgef2 = Vg0 - ef2; \ 149 | vgef2 = 0.5*vgef2 + 0.5*sqrt(vgef2*vgef2 + 4.0*1.0e-9*1.0e-9); \ 150 | t3 = pow(vgef2,-`Oneby3); \ 151 | vgef223g0 = GAMMA0Ival*t0*pow(vgef2,`Twoby3); \ 152 | vgef223g1 = GAMMA1Ival*t0*pow(vgef2,`Twoby3); \ 153 | tg02 = (ef2/Vtv) - (vgef223g0/Vtv); \ 154 | tg12 = (ef2/Vtv) - (vgef223g1/Vtv); \ 155 | t42 = Cch*vgef2 - `DOS*Vtv*ln(lexp(tg02) + 1.0) - `DOS*Vtv*ln(lexp(tg12) + 1.0); \ 156 | vgefm213g0 = GAMMA0Ival*t0*t3; \ 157 | vgefm213g1 = GAMMA1Ival*t0*t3; \ 158 | t5ng02 = lexp(tg02)*`DOS*(1.0 + `Twoby3*vgefm213g0); \ 159 | t5dg02 = 1.0 + lexp(tg02); \ 160 | t5ng12 = lexp(tg12)*`DOS*(1.0 + `Twoby3*vgefm213g1); \ 161 | t5dg12 = 1.0 + lexp(tg12); \ 162 | t52 = -1.0*Cch - (t5ng02/t5dg02) - (t5ng12/t5dg12); \ 163 | ef3 = ef2 - (t42/t52); \ 164 | psis = ef3 ; \ 165 | end else begin \ 166 | psis = ef1 ; \ 167 | end 168 | 169 | ////////// Function for PSID Calculation ////////// 170 | `define PSID(Tdev,Tnom,epsilon,delta,beta,ALPHAN,ALPHAD,Vtv,Cch,U0val,ute,VSATval,at,Cg,psis,Vg0,ua,ub,l,Vds,GAMMA0Ival, GAMMA1Ival, mulf_tdev,Vdeff,psid) \ 171 | mulf_tdev = U0val*pow((Tdev/Tnom),ute); \ 172 | vsat_tdev = VSATval*pow((Tdev/Tnom),at); \ 173 | t0 = (Cg/epsilon)*abs(Vg0 - psis); \ 174 | mu_eff = mulf_tdev/(1.0 + ua*(t0) + ub*t0*t0); \ 175 | t0 = 2.0*vsat_tdev/mu_eff; \ 176 | t1 = 0.5*Vg0 + 0.5*sqrt(Vg0*Vg0 + 4.0*`ep_psi*`ep_psi); \ 177 | Vdsat = t0*l*t1/(t0*l + t1 ); \ 178 | t0 = pow(Vds/Vdsat, delta); \ 179 | t1 = pow(1.0 + t0,-1.0/delta); \ 180 | Vdeff = Vds * t1; \ 181 | Vgdeff = Vg0 - Vdeff; \ 182 | vgod = Vgdeff; \ 183 | vgodp = 0.5*vgod + 0.5*sqrt(vgod*vgod + 4.0*`ep_psi*`ep_psi); \ 184 | vgop = vgodp ; \ 185 | dvgon = vgop*ALPHAN/(sqrt(vgop*vgop + ALPHAN*ALPHAN)); \ 186 | dvgod = vgop*ALPHAD/(sqrt(vgop*vgop + ALPHAD*ALPHAD)); \ 187 | Hx = (vgop + Vtv*(1.0-ln(beta*dvgon)) - (GAMMA0Ival/3.0)*pow(Cch*vgop,`Twoby3))/(vgop*(1.0+(Vtv/dvgod)) + ((2.0*GAMMA0Ival)/3.0)*pow(Cch*vgop,`Twoby3)); \ 188 | t0 = (vgod/(2.0*Vtv)); \ 189 | if (t0 < 200.0) begin \ 190 | t1 = lexp(t0/4.0); \ 191 | t2 = lexp(-3.0*t0/4.0); \ 192 | ndx = (2.0*Vtv*(Cch)*((3.0*t0/4.0)+ln(t1 + t2)))/((1.0/Hx) + (Cch/`DOS)*lexp((-1.0*vgod)/(2.0*Vtv))); \ 193 | end else begin \ 194 | ndx = (2.0*Vtv*(Cch)*((1.0*t0/1.0)))/((1.0/Hx) + (Cch/`DOS)*lexp((-1.0*vgod)/(2.0*Vtv))); \ 195 | end \ 196 | ef1 = vgod - ndx/Cch; \ 197 | if (abs(ef1-vgod)>1.0e-19) begin \ 198 | vgef1 = vgod - ef1; \ 199 | vgef1 = 0.5*vgef1 + 0.5*sqrt(vgef1*vgef1 + 4.0*1.0e-9*1.0e-9); \ 200 | t0 = pow(Cch,`Twoby3) ; \ 201 | t1 = pow(vgef1,`Twoby3) ; \ 202 | t2 = pow(vgef1,-`Oneby3) ; \ 203 | vgef23g0 = GAMMA0Ival*t0*t1; \ 204 | vgef23g1 = GAMMA1Ival*t0*t1; \ 205 | tg0 = (ef1/Vtv) - (vgef23g0/Vtv); \ 206 | tg1 = (ef1/Vtv) - (vgef23g1/Vtv); \ 207 | t4 = Cch*vgef1 - `DOS*Vtv*ln(lexp(tg0) + 1.0) - `DOS*Vtv*ln(lexp(tg1) + 1.0); \ 208 | vgefm13g0 = GAMMA0Ival*t0*t2; \ 209 | vgefm13g1 = GAMMA1Ival*t0*t2; \ 210 | t5ng0 = lexp(tg0)*`DOS*(1.0 + `Twoby3*vgefm13g0); \ 211 | t5dg0 = 1.0 + lexp(tg0); \ 212 | t5ng1 = lexp(tg1)*`DOS*(1.0 + `Twoby3*vgefm13g1); \ 213 | t5dg1 = 1.0 + lexp(tg1); \ 214 | t5 = -1.0*Cch - (t5ng0/t5dg0) - (t5ng1/t5dg1); \ 215 | ef2 = ef1 - (t4/t5); \ 216 | vgef2 = vgod - ef2; \ 217 | vgef2 = 0.5*vgef2 + 0.5*sqrt(vgef2*vgef2 + 4.0*1.0e-9*1.0e-9); \ 218 | vgef223g0 = GAMMA0Ival*t0*pow(vgef2,`Twoby3); \ 219 | vgef223g1 = GAMMA1Ival*t0*pow(vgef2,`Twoby3); \ 220 | tg02 = (ef2/Vtv) - (vgef223g0/Vtv); \ 221 | tg12 = (ef2/Vtv) - (vgef223g1/Vtv); \ 222 | t42 = Cch*vgef2 - `DOS*Vtv*ln(lexp(tg02) + 1.0) - `DOS*Vtv*ln(lexp(tg12) + 1.0); \ 223 | vgefm213g0 = GAMMA0Ival*t0*pow(vgef2,-`Oneby3); \ 224 | vgefm213g1 = GAMMA1Ival*t0*pow(vgef2,-`Oneby3); \ 225 | t5ng02 = lexp(tg02)*`DOS*(1.0 + `Twoby3*vgefm213g0); \ 226 | t5dg02 = 1.0 + lexp(tg02); \ 227 | t5ng12 = lexp(tg12)*`DOS*(1.0 + `Twoby3*vgefm213g1); \ 228 | t5dg12 = 1.0 + lexp(tg12); \ 229 | t52 = -1.0*Cch - (t5ng02/t5dg02) - (t5ng12/t5dg12); \ 230 | ef3 = ef2 - (t42/t52); \ 231 | psid = ef3 + Vdeff ; \ 232 | end else begin \ 233 | psid = ef1 + Vdeff ; \ 234 | end 235 | 236 | ////////// Function for IDS Calculation ////////// 237 | `define IDS(Vg0,psim,psisd,Cg,l,Vdsx,w,nf,Vtv,mulf_tdev,Vdeff, Ids) \ 238 | ids0 = (Vg0 - psim + Vtv)*(psisd); \ 239 | t0 = (Cg/epsilon)*abs(Vg0 - psim); \ 240 | mu_eff = mulf_tdev/(1.0 + ua*(t0) + ub*t0*t0) ; \ 241 | Geff = (mu_eff*Cg*w*nf)/(l); \ 242 | Geff_clm = Geff*(1.0 + lambda*(Vdsx-Vdeff)); \ 243 | vf = sqrt(1.0 + thesat*thesat*psisd*psisd) ; \ 244 | G_vf = Geff_clm/vf; \ 245 | Ids = G_vf*(ids0); 246 | 247 | ////////// Function for QGI Calculation ////////// 248 | `define QGI(Vg0,psis,psid,psim,Cg,l,QM0Ival,BDOSIval,ADOSIval,TBARval,Vtv,w,nf, Cg_qme,qgint) \ 249 | t0 = Vg0 + Vtv ; \ 250 | t1 = psid - psis; \ 251 | t2 = Vg0 + Vtv - psim; \ 252 | t3 = (Cg*w*nf*l)*(Vg0 - psim + 0.5*t1*t1/(6.0*t2)); \ 253 | T0 = 1.0e+26 * (t3/QM0Ival); \ 254 | T1 = 1.0 + pow(T0, BDOSIval); \ 255 | XDCinv = ADOSIval / T1; \ 256 | Cg_qme = epsilon/(TBARval + XDCinv); \ 257 | qgint = (Cg_qme*w*nf*l)*(Vg0 - psim + 0.5*t1*t1/(6.0*t2)); 258 | 259 | ////////// Function for QDI Calculation ////////// 260 | `define QDI(Vg0,psim,psis,psid,psisd,l,Vtv,w,nf,Cg_qme, qdint) \ 261 | t0 = Vg0 + Vtv - psim ; \ 262 | t1 = (psis + 2.0*psid)/3.0 ; \ 263 | t2 = (1.0/12.0)*(psisd*psisd)/t0 ; \ 264 | t3 = (1.0/120.0)*(psisd*psisd*psisd)/(t0*t0) ; \ 265 | qdint = -(Cg_qme*w*l*nf*0.5)*(Vg0 - t1 + t2 + t3) ; 266 | 267 | /* 268 | Model Schematic: 269 | 270 | 271 | O (g) Gate 272 | | 273 | Gate Resistor 274 | | 275 | O (gi) Source (s) connected 276 | | O 277 | |---------------| | 278 | | | | 279 | |-------| |-------| |-------| 280 | | | | | | | 281 | O--------/\/\/\/\----O----| |---O---| |---O---| |---O------/\/\/\/\----------O 282 | Source (s) S ACC RES (si) MAIN HEMT (di) FP1 (fp1) FP2 (fp2) D ACC RES (d) Drain 283 | 284 | 285 | 286 | 287 | */ 288 | 289 | module asmhemt(d,g,s,b,dt); 290 | inout d,g,s,b,dt; 291 | electrical d,g,s,b; 292 | electrical trap1, trap2; 293 | electrical di, si, gi; 294 | thermal dt; 295 | 296 | 297 | ////////// Node Conditioning For Field-plates ////////// 298 | `ifdef __FP1MOD__ 299 | electrical fp1; 300 | `endif 301 | 302 | `ifdef __FP1MOD__ 303 | `define IntrinsicDrain_fp1 fp1 304 | `else 305 | `define IntrinsicDrain_fp1 di 306 | `endif 307 | /////////////////////////////// 308 | `ifdef __FP2MOD__ 309 | electrical fp2; 310 | `endif 311 | 312 | `ifdef __FP2MOD__ 313 | `define IntrinsicDrain_fp2 fp2 314 | `else 315 | `define IntrinsicDrain_fp2 `IntrinsicDrain_fp1 316 | `endif 317 | ////////////////////////////// 318 | `ifdef __FP3MOD__ 319 | electrical fp3; 320 | `endif 321 | 322 | `ifdef __FP3MOD__ 323 | `define IntrinsicDrain_fp3 fp3 324 | `else 325 | `define IntrinsicDrain_fp3 `IntrinsicDrain_fp2 326 | `endif 327 | ////////////////////////////// 328 | `ifdef __FP4MOD__ 329 | electrical fp4; 330 | `endif 331 | 332 | `ifdef __FP4MOD__ 333 | `define IntrinsicDrain_fp4 fp4 334 | `else 335 | `define IntrinsicDrain_fp4 `IntrinsicDrain_fp3 336 | `endif 337 | ///////////////////////////////////////////////////// 338 | 339 | 340 | ////////// Clamped Exponential Function ////////// 341 | analog function real lexp; 342 | input x; 343 | real x; 344 | begin 345 | if(x > `EXPL_THRESHOLD) begin 346 | lexp = `MAX_EXPL * (1.0+(x)-`EXPL_THRESHOLD); 347 | end else if(x < -`EXPL_THRESHOLD) begin 348 | lexp = `MIN_EXPL; 349 | end else begin 350 | lexp = exp(x); 351 | end 352 | end 353 | endfunction 354 | 355 | ////////// Hyperbolic Smoothing Functions (max) ////////// 356 | analog function real hypmax; 357 | input x , xmin, c; 358 | real x , xmin, c; 359 | begin 360 | hypmax = xmin + x - 0.5 * (xmin + x - sqrt((x-xmin)*(x-xmin)+c)); 361 | end 362 | endfunction 363 | 364 | ////////// Smoothing Function To Fix A Minimum Value ////////// 365 | analog function real smoothminx; 366 | input x, x0, dx; 367 | real x, x0, dx; 368 | begin 369 | smoothminx = 0.5*(x + x0 + sqrt((x - x0)*(x - x0) + 0.25*dx*dx)); 370 | end 371 | endfunction 372 | 373 | ////////// Branches Self-heating ////////// 374 | branch (dt) rth; 375 | branch (dt) ith; 376 | 377 | ////////// List Of Model Parameters ////////// 378 | `MPRco( tnom ,27.0 ,"K" ,-`P_CELSIUS0,inf ," Nominal Temperature in degree Celsius" ) 379 | `MPRco( tbar ,2.5e-8 ,"m" ,0.1e-9 ,inf ," Barrier layer thickness" ) 380 | `IPRco( l ,0.25e-6 ,"m" ,20e-9 ,inf ," Channel Length" ) 381 | `IPRco( w ,200.0e-6 ,"m" ,20e-9 ,inf ," Channel Width" ) 382 | `IPIco( nf ,1 ,"" ,1.0 ,inf ," Number of fingers" ) 383 | `MPRoo( epsilon ,10.66e-11 ,"F/m" ,0.0 ,inf ," Dielectric Permittivity of AlGaN layer" ) 384 | `MPRcc( voff ,-2.0 ,"V" ,-100.0 ,5 ," Cut-off voltage" ) 385 | `MPRco( u0 ,170.0e-3 ,"m^2/(V * s)" ,0.0 ,inf ," Low field mobility" ) 386 | `MPRco( ua ,0.0e-9 ,"V^-1" ,0.0 ,inf ," Mobility Degradation coefficient first order" ) 387 | `MPRco( ub ,0.0e-18 ,"V^-2" ,0.0 ,inf ," Mobility Degradation coefficient second order" ) 388 | `MPRco( vsat ,1.9e5 ,"m/s" ,1.0e3 ,inf ," Saturation Velocity" ) 389 | `MPRco( delta ,2.0 ,"" ,2.0 ,inf ," Exponent for Vdeff" ) 390 | `MPRoo( at ,0.0 ,"" ,-inf ,inf ," Temperature Dependence for saturation velocity" ) 391 | `MPRcc( ute ,-0.5 ,"" ,-10.0 ,0 ," Temperature dependence of mobility" ) 392 | `MPRco( lambda ,0.0 ,"V^-1" ,0.0 ,inf ," Channel Length Modulation Coefficient" ) 393 | `MPRco( eta0 ,1.0e-9 ,"" ,0.0 ,inf ," DIBL Parameter" ) 394 | `MPRoo( vdscale ,5.0 ,"V" ,0.0 ,inf ," DIBL Scaling VDS" ) 395 | `MPRoo( kt1 ,0.0e-3 ,"" ,-inf ,inf ," Temperature Dependence for Voff" ) 396 | `MPRco( thesat ,1.0 ,"V^-2" ,1.0 ,inf ," Velocity Saturation Parameter" ) 397 | `MPRco( nfactor ,0.5 ,"" ,0.0 ,inf ," Sub-voff Slope parameters" ) 398 | `MPRco( cdscd ,1.0e-3 ,"" ,0.0 ,inf ," Sub-voff Slope Change due to Drain Voltage" ) 399 | `MPRcc( gamma0i ,2.12e-12 ,"" ,0.0 ,1.0 ," Schrodinger-Poisson solution parameter" ) 400 | `MPRcc( gamma1i ,3.73e-12 ,"" ,0.0 ,1.0 ," Schrodinger-Poisson solution parameter" ) 401 | `MPRoo( imin ,1.0e-15 ,"A" ,0.0 ,inf ," Minimum Drain Current" ) 402 | ////////// Self Heating Model Parameters ////////// 403 | `MPIsw( shmod ,1 ,"" ," Switch to turn on and off self-heating model" ) 404 | `MPRco( rth0 ,5.0 ,"K/w" ,0.0 ,inf ," Thermal Resistance" ) 405 | `MPRco( cth0 ,1.0e-9 ,"s*w/K" ,0.0 ,inf ," Thermal Capacitance" ) 406 | ////////// Access Region Resistance Model Parameters ////////// 407 | `MPIsw( rdsmod ,0 ,"" ," Switch for external source and drain resistances" ) 408 | `MPRoo( vsataccs ,50.0e3 ,"cm/s" ,0.0 ,inf ," Saturation Velocity for access region: Source Side" ) 409 | `MPRco( ns0accs ,5.0e17 ,"C/m^-2" ,1.0e5 ,inf ," 2-DEG Charge Density in per square meter in Source access region" ) 410 | `MPRco( ns0accd ,5.0e17 ,"C/m^-2" ,1.0e5 ,inf ," 2-DEG Charge Density in per square meter in Drain access region" ) 411 | `MPRco( k0accs ,0.0 ,"" ,0.0 ,inf ," Vg dependence parameter of source side access region 2-DEG charge density" ) 412 | `MPRco( k0accd ,0.0 ,"" ,0.0 ,inf ," Vg dependence parameter of drain side access region 2-DEG charge density" ) 413 | `MPRoo( u0accs ,155e-3 ,"m^2/(V * s)" ,0.0 ,inf ," Access region mobility source-side" ) 414 | `MPRoo( u0accd ,155e-3 ,"m^2/(V * s)" ,0.0 ,inf ," Access region mobility drain-side" ) 415 | `MPRoo( mexpaccs ,2.0 ,"" ,0.0 ,inf ," Exponent for access region resistance model" ) 416 | `MPRoo( mexpaccd ,2.0 ,"" ,0.0 ,inf ," Exponent for access region resistance model" ) 417 | `MPRco( lsg ,1.0e-6 ,"m" ,0.0 ,inf ," Length of Source-Gate Access Region" ) 418 | `MPRco( ldg ,1.0e-6 ,"m" ,0.0 ,inf ," Length of Drain-Gate Access Region or Length of drain side access region" ) 419 | `MPRco( rsc ,1.0e-4 ,"ohm*m" ,0.0 ,inf ," Source Contact Resistance" ) 420 | `MPRco( rdc ,1.0e-4 ,"ohm*m" ,0.0 ,inf ," Drain Contact Resistance" ) 421 | `MPRco( kns0 ,0.0 ,"" ,0.0 ,inf ," Temperature Dependence for 2-DEG charge density at access region" ) 422 | `MPRoo( ats ,0.0 ,"" ,-inf ,inf ," Temperature Dependence for saturation velocity at access region" ) 423 | `MPRoo( utes ,0.0 ,"" ,-inf ,inf ," Temperature dependence of mobility at access region: Source Side" ) 424 | `MPRoo( uted ,0.0 ,"" ,-inf ,inf ," Temperature dependence of mobility at access region: Drain Side" ) 425 | `MPRco( krsc ,0.0 ,"" ,0.0 ,inf ," Temperature dependence of Source Contact Resistance" ) 426 | `MPRco( krdc ,0.0 ,"" ,0.0 ,inf ," Temperature dependence of Drain Contact Resistance" ) 427 | `MPIsw( gatemod ,0 ,"" ," Gate current model flag [0: No gate current; 1: Basic model]" ) 428 | ////////// Gate current Model Parameters (MOD1) ////////// 429 | `MPRoo( njgs ,2.5 ,"" ,0.0 ,50.0 ," Gate-source junction diode current ideality factor" ) 430 | `MPRoo( njgd ,2.5 ,"" ,0.0 ,50.0 ," Gate-drain junction diode current ideality factor" ) 431 | `MPRco( igsdio ,1.0 ,"A/m^2" ,0.0 ,inf ," Gate-source junction diode saturation current" ) 432 | `MPRco( igddio ,1.0 ,"A/m^2" ,0.0 ,inf ," Gate-drain junction diode saturation current" ) 433 | `MPRoo( ktgs ,0.0 ,"" ,-inf ,inf ," Temperature co-efficient of gate-source junction diode current" ) 434 | `MPRoo( ktgd ,0.0 ,"" ,-inf ,inf ," Temperature coefficient of gate-drain junction diode current" ) 435 | `MPIcc( trapmod ,0 ,"" ,0 ,3 ," Model Switch to turn on and off the dynamic trapping effects" ) 436 | ////////// Trap Model For RF trapmod=1 ////////// 437 | `MPRoo( cdlag ,1.0e-6 ,"" ,0.0 ,inf ," Trap Network capacitance" ) 438 | `MPRoo( rdlag ,1.0e6 ,"" ,0.0 ,inf ," Trap Network resistance" ) 439 | `MPRoo( idio ,1.0e0 ,"A" ,0.0 ,inf ," Saturation Current parameter for trap model" ) 440 | `MPRoo( atrapvoff ,0.1 ,"" ,-inf ,inf ," Voff change due to trapping effects" ) 441 | `MPRoo( btrapvoff ,0.3 ,"" ,-inf ,inf ," Voff change with input power due to trapping effects" ) 442 | `MPRoo( atrapeta0 ,0 ,"" ,-inf ,inf ," DIBL change due to trapping effects" ) 443 | `MPRoo( btrapeta0 ,0.05 ,"" ,-inf ,inf ," DIBL change with input power due to trapping effects" ) 444 | `MPRoo( atraprs ,0.1 ,"" ,-inf ,inf ," Rs change due to trapping effects" ) 445 | `MPRoo( btraprs ,0.6 ,"" ,-inf ,inf ," Rs change with input power due to trapping effects" ) 446 | `MPRoo( atraprd ,0.5 ,"" ,-inf ,inf ," Rd change due to trapping effects" ) 447 | `MPRoo( btraprd ,0.6 ,"" ,-inf ,inf ," Rd change with input power due to trapping effects" ) 448 | ////////// Trap Model Parameters for Pulse IV trapmod=2 ////////// 449 | `MPRoo( rtrap1 ,1.0 ,"ohm" ,0.0 ,inf ," Trap Network1 Resistance" ) 450 | `MPRoo( rtrap2 ,1.0 ,"ohm" ,0.0 ,inf ," Trap Network2 Resistance" ) 451 | `MPRco( ctrap1 ,10.0e-6 ,"F" ,0.0 ,inf ," Trap Network1 Capacitance" ) 452 | `MPRco( ctrap2 ,1.0e-6 ,"F" ,0.0 ,inf ," Trap Network2 Capacitance" ) 453 | `MPRoo( a1 ,0.1 ,"" ,-inf ,inf ," Multiplication factor [1st network]" ) 454 | `MPRoo( vofftr ,1.0e-9 ,"" ,-inf ,inf ," Trap contribution to voff [2nd network]" ) 455 | `MPRoo( cdscdtr ,1.0e-15 ,"" ,-inf ,inf ," Trap contribution to cdscd [2nd network]" ) 456 | `MPRoo( eta0tr ,1.0e-15 ,"" ,-inf ,inf ," Trap contribution to DIBL [2nd network]" ) 457 | `MPRoo( rontr1 ,1.0e-12 ,"" ,-inf ,inf ," Trap contribution to RON [1st network]" ) 458 | `MPRoo( rontr2 ,1.0e-13 ,"" ,-inf ,inf ," Trap contribution to RON [2nd network]" ) 459 | `MPRoo( rontr3 ,1.0e-13 ,"" ,-inf ,inf ," Trap contribution to RON" ) 460 | ////////// Trap Model Parameters Dynamic On Resistance For Power Devices trapmod=3 ////////// 461 | `MPRoo( rtrap3 ,1.0 ,"ohm" ,0.0 ,inf ," Trap Network Resistance" ) 462 | `MPRco( ctrap3 ,1.0e-4 ,"F" ,0.0 ,inf ," Trap Network Capacitance" ) 463 | `MPRoo( vatrap ,10.0 ,"" ,0.0 ,inf ," Division factor for V[trap1]" ) 464 | `MPRoo( wd ,0.016 ,"" ,-inf ,inf ," Weak dependence of vdlr1 on Vdg" ) 465 | `MPRoo( vdlr1 ,2.0 ,"" ,-inf ,inf ," Slope for region one" ) 466 | `MPRoo( vdlr2 ,20.0 ,"" ,-inf ,inf ," Slope for region two" ) 467 | `MPRoo( talpha ,1.0 ,"" ,-inf ,inf ," Temperature dependence Coefficient" ) 468 | `MPRco( vtb ,250.0 ,"V" ,0.0 ,inf ," Break Point for Vdg effect on Von" ) 469 | `MPRco( deltax ,0.01 ,"" ,0.0 ,inf ," Smoothing parameter" ) 470 | ////////// Field Plate Region Parameters ////////// 471 | `MPIcc( fp1mod ,0 ,"" ,0 ,2 ," Field Plate Model Selector [0:No FP; 1:Gate FP; 2:Source FP;]" ) 472 | `MPIcc( fp2mod ,0 ,"" ,0 ,2 ," Field Plate Model Selector [0:No FP; 1:Gate FP; 2:Source FP;]" ) 473 | `MPIcc( fp3mod ,0 ,"" ,0 ,2 ," Field Plate Model Selector [0:No FP; 1:Gate FP; 2:Source FP;]" ) 474 | `MPIcc( fp4mod ,0 ,"" ,0 ,2 ," Field Plate Model Selector [0:No FP; 1:Gate FP; 2:Source FP;]" ) 475 | `MPRoo( iminfp1 ,1.0e-15 ,"A" ,0.0 ,inf ," Minimum Drain Current FP1 region" ) 476 | `MPRcc( vofffp1 ,-25.0 ,"V" ,-500.0 ,5 ," voff for FP1" ) 477 | `IPRco( dfp1 ,50.0e-9 ,"m" ,0.1e-9 ,inf ," Distance of FP1 from 2-DEG Charge" ) 478 | `IPRoo( lfp1 ,1.0e-6 ,"m" ,0.0 ,inf ," Length of FP1" ) 479 | `MPRoo( ktfp1 ,50.0e-3 ,"" ,-inf ,inf ," Temperature Dependence for vofffp1" ) 480 | `MPRco( u0fp1 ,100e-3 ,"m^2/(V * s)" ,0.0 ,inf ," FP1 region mobility" ) 481 | `MPRco( vsatfp1 ,100e+3 ,"m/s" ,0.0 ,inf ," Saturation Velocity of FP1 region" ) 482 | `MPRco( nfactorfp1 ,0.5 ,"" ,0.0 ,inf ," Sub-voff Slope parameters for FP1" ) 483 | `MPRco( cdscdfp1 ,0.0 ,"" ,0.0 ,inf ," Sub-voff Slope Change due to Drain Voltage for FP1" ) 484 | `MPRco( eta0fp1 ,1.0e-9 ,"" ,0.0 ,inf ," DIBL Parameter for FP1" ) 485 | `MPRoo( vdscalefp1 ,10.0 ,"V" ,0.0 ,inf ," DIBL Scaling VDS for FP1" ) 486 | `MPRcc( gamma0fp1 ,2.12e-12 ,"" ,0.0 ,1.0 ," Schrodinger-Poisson solution parameter for FP1" ) 487 | `MPRcc( gamma1fp1 ,3.73e-12 ,"" ,0.0 ,1.0 ," Schrodinger-Poisson solution parameter for FP1" ) 488 | `MPRoo( iminfp2 ,1.0e-15 ,"A" ,0.0 ,inf ," Minimum Drain Current FP2 region" ) 489 | `MPRcc( vofffp2 ,-50.0 ,"V" ,-100.0 ,5 ," voff for FP2" ) 490 | `IPRco( dfp2 ,100.0e-9 ,"m" ,0.1e-9 ,inf ," Distance of FP2 from 2-DEG Charge" ) 491 | `IPRoo( lfp2 ,1.0e-6 ,"m" ,0.0 ,inf ," Length of FP2" ) 492 | `MPRoo( ktfp2 ,50.0e-3 ,"" ,-inf ,inf ," Temperature Dependence for vofffp2" ) 493 | `MPRco( u0fp2 ,100e-3 ,"m^2/(V * s)" ,0.0 ,inf ," Carrier mobility of FP2 region" ) 494 | `MPRco( vsatfp2 ,100e+3 ,"m/s" ,0.0 ,inf ," Saturation velocity of FP2 region" ) 495 | `MPRco( nfactorfp2 ,0.5 ,"" ,0.0 ,inf ," Sub-voff Slope parameters for FP2" ) 496 | `MPRco( cdscdfp2 ,0.0 ,"" ,0.0 ,inf ," Sub-voff Slope Change due to Drain Voltage for FP2" ) 497 | `MPRco( eta0fp2 ,1.0e-9 ,"" ,0.0 ,inf ," DIBL Parameter for FP2" ) 498 | `MPRoo( vdscalefp2 ,10.0 ,"V" ,0.0 ,inf ," DIBL Scaling VDS for FP2" ) 499 | `MPRcc( gamma0fp2 ,2.12e-12 ,"" ,0.0 ,1.0 ," Schrodinger-Poisson solution parameter for FP2" ) 500 | `MPRcc( gamma1fp2 ,3.73e-12 ,"" ,0.0 ,1.0 ," Schrodinger-Poisson solution parameter for FP2" ) 501 | `MPRoo( iminfp3 ,1.0e-15 ,"A" ,0.0 ,inf ," Minimum Drain Current FP3 region" ) 502 | `MPRcc( vofffp3 ,-75.0 ,"V" ,-500.0 ,5 ," voff for FP3" ) 503 | `IPRco( dfp3 ,150.0e-9 ,"m" ,0.1e-9 ,inf ," Distance of FP3 from 2-DEG Charge" ) 504 | `IPRoo( lfp3 ,1.0e-6 ,"m" ,0.0 ,inf ," Length of FP3" ) 505 | `MPRoo( ktfp3 ,50.0e-3 ,"" ,-inf ,inf ," Temperature Dependence for vofffp3" ) 506 | `MPRco( u0fp3 ,100e-3 ,"m^2/(V * s)" ,0.0 ,inf ," FP3 region mobility" ) 507 | `MPRco( vsatfp3 ,100e+3 ,"m/s" ,0.0 ,inf ," Saturation Velocity of FP3 region" ) 508 | `MPRco( nfactorfp3 ,0.5 ,"" ,0.0 ,inf ," Sub-voff Slope parameters for FP3" ) 509 | `MPRco( cdscdfp3 ,0.0 ,"" ,0.0 ,inf ," Sub-voff Slope Change due to Drain Voltage for FP3" ) 510 | `MPRco( eta0fp3 ,1.0e-9 ,"" ,0.0 ,inf ," DIBL Parameter for FP3" ) 511 | `MPRoo( vdscalefp3 ,10.0 ,"V" ,0.0 ,inf ," DIBL Scaling VDS for FP3" ) 512 | `MPRcc( gamma0fp3 ,2.12e-12 ,"" ,0.0 ,1.0 ," Schrodinger-Poisson solution parameter for FP3" ) 513 | `MPRcc( gamma1fp3 ,3.73e-12 ,"" ,0.0 ,1.0 ," Schrodinger-Poisson solution parameter for FP3" ) 514 | `MPRoo( iminfp4 ,1.0e-15 ,"A" ,0.0 ,inf ," Minimum Drain Current FP4 region" ) 515 | `MPRcc( vofffp4 ,-100.0 ,"V" ,-500.0 ,5 ," voff for FP4" ) 516 | `IPRco( dfp4 ,200.0e-9 ,"m" ,0.1e-9 ,inf ," Distance of FP4 from 2-DEG Charge" ) 517 | `IPRoo( lfp4 ,1.0e-6 ,"m" ,0.0 ,inf ," Length of FP4" ) 518 | `MPRoo( ktfp4 ,50.0e-3 ,"" ,-inf ,inf ," Temperature Dependence for vofffp4" ) 519 | `MPRco( u0fp4 ,100e-3 ,"m^2/(V * s)" ,0.0 ,inf ," FP4 region mobility" ) 520 | `MPRco( vsatfp4 ,100e+3 ,"m/s" ,0.0 ,inf ," Saturation Velocity of FP4 region" ) 521 | `MPRco( nfactorfp4 ,0.5 ,"" ,0.0 ,inf ," Sub-voff Slope parameters for FP4" ) 522 | `MPRco( cdscdfp4 ,0.0 ,"" ,0.0 ,inf ," Sub-voff Slope Change due to Drain Voltage for FP4" ) 523 | `MPRco( eta0fp4 ,1.0e-9 ,"" ,0.0 ,inf ," DIBL Parameter for FP4" ) 524 | `MPRoo( vdscalefp4 ,10.0 ,"V" ,0.0 ,inf ," DIBL Scaling VDS for FP4" ) 525 | `MPRcc( gamma0fp4 ,2.12e-12 ,"" ,0.0 ,1.0 ," Schrodinger-Poisson solution parameter for FP4" ) 526 | `MPRcc( gamma1fp4 ,3.73e-12 ,"" ,0.0 ,1.0 ," Schrodinger-Poisson solution parameter for FP4" ) 527 | ////////// Capacitance Parameters ////////// 528 | `MPRco( cgso ,0.0e-18 ,"F" ,0.0 ,inf ," Gate-source overlap capacitance" ) 529 | `MPRco( cgdo ,0.0e-18 ,"F" ,0.0 ,inf ," Gate-drain overlap capacitance" ) 530 | `MPRco( cdso ,0.0e-18 ,"F" ,0.0 ,inf ," Cds capacitance parameter" ) 531 | `MPRco( cgdl ,0.0e-15 ,"F" ,0.0 ,inf ," Vds bias dependence of parasitic gate drain overlap capacitance" ) 532 | `MPRoo( vdsatcv ,100.0 ,"V" ,0.0 ,inf ," Saturation voltage on drain side in CV Model" ) 533 | `MPRco( cbdo ,0.0e-15 ,"F" ,0.0 ,inf ," Substrate capacitance parameter" ) 534 | `MPRco( cbso ,0.0e-15 ,"F" ,0.0 ,inf ," Substrate capacitance parameter" ) 535 | `MPRco( cbgo ,0.0e-15 ,"F" ,0.0 ,inf ," Substrate capacitance parameter" ) 536 | `MPRco( cfg ,0.0e-18 ,"F" ,0.0 ,inf ," Fringing capacitance parameter" ) 537 | `MPRco( cfd ,0.0e-18 ,"F" ,0.0 ,inf ," Fringing capacitance parameter" ) 538 | `MPRco( cfgd ,0.0e-13 ,"F" ,0.0 ,inf ," Fringing capacitance parameter" ) 539 | `MPRco( cfgdsm ,1.0e-24 ,"F" ,0.0 ,inf ," Capacitance smoothing parameter" ) 540 | `MPRco( cfgd0 ,0.0e-12 ,"F" ,0.0 ,inf ," Fringing capacitance parameter" ) 541 | `MPRco( cj0 ,0.0e-15 ,"F" ,0.0 ,inf ," Zero bias depletion capacitance" ) 542 | `MPRoo( vbi ,0.9 ,"V" ,0.0 ,inf ," Built in potential" ) 543 | `MPRco( ktvbi ,0.0 ,"" ,0.0 ,inf ," Temperature dependence of built in potential" ) 544 | `MPRco( ktcfg ,0.0e-3 ,"" ,0.0 ,inf ," Temperature dependence of Fringing capacitance" ) 545 | `MPRco( ktcfgd ,0.0e-3 ,"" ,0.0 ,inf ," Temperature dependence of Fringing capacitance" ) 546 | `MPRoo( mz ,0.5 ,"" ,0.0 ,1.0 ," Grading factor of depletion capacitance" ) 547 | `MPRco( aj ,100.0e-3 ,"" ,0.0 ,inf ," Limiting factor of depletion capacitance in forward bias region" ) 548 | `MPRco( dj ,1.0 ,"" ,0.0 ,inf ," Fitting parameter " ) 549 | ////////// Quantum Mechanical Effects ////////// 550 | `MPRco( adosi ,0.0 ,"" ,0 ,inf ," Quantum mechanical effect pre-factor cum switch in inversion" ) 551 | `MPRco( bdosi ,1.0 ,"" ,0 ,inf ," Charge centroid parameter - slope of CV curve under QME in inversion" ) 552 | `MPRoo( qm0i ,1.0e-3 ,"" ,0 ,inf ," Charge centroid parameter - starting point for QME in inversion" ) 553 | `MPRco( adosfp1 ,0.0 ,"" ,0 ,inf ," Quantum mechanical effect pre-factor cum switch in inversion" ) 554 | `MPRco( bdosfp1 ,1.0 ,"" ,0 ,inf ," Charge centroid parameter - slope of CV curve under QME in inversion" ) 555 | `MPRoo( qm0fp1 ,1.0e-3 ,"" ,0 ,inf ," Charge centroid parameter - starting point for QME in inversion" ) 556 | `MPRco( adosfp2 ,0.0 ,"" ,0 ,inf ," Quantum mechanical effect pre-factor cum switch in inversion" ) 557 | `MPRco( bdosfp2 ,1.0 ,"" ,0 ,inf ," Charge centroid parameter - slope of CV curve under QME in inversion" ) 558 | `MPRoo( qm0fp2 ,1.0e-3 ,"" ,0 ,inf ," Charge centroid parameter - starting point for QME in inversion" ) 559 | `MPRco( adosfp3 ,0.0 ,"" ,0 ,inf ," Quantum mechanical effect pre-factor cum switch in inversion" ) 560 | `MPRco( bdosfp3 ,1.0 ,"" ,0 ,inf ," Charge centroid parameter - slope of CV curve under QME in inversion" ) 561 | `MPRoo( qm0fp3 ,1.0e-3 ,"" ,0 ,inf ," Charge centroid parameter - starting point for QME in inversion" ) 562 | `MPRco( adosfp4 ,0.0 ,"" ,0 ,inf ," Quantum mechanical effect pre-factor cum switch in inversion" ) 563 | `MPRco( bdosfp4 ,1.0 ,"" ,0 ,inf ," Charge centroid parameter - slope of CV curve under QME in inversion" ) 564 | `MPRoo( qm0fp4 ,1.0e-3 ,"" ,0 ,inf ," Charge centroid parameter - starting point for QME in inversion" ) 565 | ////////// Cross Coupling Capacitance Parameters ////////// 566 | `MPRco( cfp1scale ,0.0 ,"" ,0 ,inf ," Coupling of charge under FP1" ) 567 | `MPRco( cfp2scale ,0.0 ,"" ,0 ,inf ," Coupling of charge under FP2" ) 568 | `MPRco( cfp3scale ,0.0 ,"" ,0 ,inf ," Coupling of charge under FP3" ) 569 | `MPRco( cfp4scale ,0.0 ,"" ,0 ,inf ," Coupling of charge under FP4" ) 570 | `MPRco( csubscalei ,0.0 ,"" ,0 ,inf ," Sub Capacitance scaling parameter" ) 571 | `MPRco( csubscale1 ,0.0 ,"" ,0 ,inf ," Sub Capacitance scaling parameter" ) 572 | `MPRco( csubscale2 ,0.0 ,"" ,0 ,inf ," Sub Capacitance scaling parameter" ) 573 | `MPRco( csubscale3 ,0.0 ,"" ,0 ,inf ," Sub Capacitance scaling parameter" ) 574 | `MPRco( csubscale4 ,0.0 ,"" ,0 ,inf ," Sub Capacitance scaling parameter" ) 575 | ////////// Gate Resistance Parameters ////////// 576 | `MPIsw( rgatemod ,0 ,"" ," Switch to turn on/off gate Resistance" ) 577 | `MPRco( xgw ,0.0 ,"m" ,0 ,inf ," Distance from gate contact centre to dev edge" ) 578 | `IPIcc( ngcon ,1 ,"" ,1 ,2 ," Number of gate contacts" ) 579 | `MPRco( rshg ,1.0e-3 ,"ohm/square" ,1e-3 ,inf ," Gate sheet resistance" ) 580 | ////////// Noise Model Parameters ////////// 581 | `MPIsw( fnmod ,0 ,"" ," Switch to turn Flicker Noise Model ON [fnmod=1] or OFF [fnmod=0]" ) 582 | `MPIsw( tnmod ,0 ,"" ," Switch to turn Thermal Noise Model ON [tnmod=1] or OFF [tnmod=0]" ) 583 | `MPRoo( noia ,15.0e-12 ,"" ,-inf ,inf ," Flicker Noise parameter" ) 584 | `MPRco( noib ,0.0 ,"" ,0 ,inf ," Flicker Noise parameter" ) 585 | `MPRco( noic ,0.0 ,"" ,0 ,inf ," Flicker Noise parameter" ) 586 | `MPRoo( ef ,1 ,"" ,0 ,inf ," Exponent of frequency---Determines slope in log plot" ) 587 | `MPRoo( tnsc ,1.0e27 ,"" ,0 ,inf ," Thermal noise scaling parameter" ) 588 | ////////// gdsmin For Convergence ////////// 589 | `MPRoo( gdsmin ,1.0e-12 ,"S" ,0 ,inf ," Convergence Parameter" ) 590 | 591 | ////////// Operating Point Variables ////////// 592 | (* desc="idisi" *) real idisi; 593 | (* desc="vdisi" *) real vdisi; 594 | (* desc="vgisi" *) real vgisi; 595 | (* desc="gmi" *) real gmi; 596 | (* desc="gdsi" *) real gdsi; 597 | (* desc="gmbi" *) real gmbi; 598 | (* desc="igs" *) real igs; 599 | (* desc="igd" *) real igd; 600 | (* desc="qgi" *) real qgi; 601 | (* desc="qdi" *) real qdi; 602 | (* desc="qsi" *) real qsi; 603 | (* desc="qbi" *) real qbi; 604 | (* desc="cggi" *) real cggi; 605 | (* desc="cgsi" *) real cgsi; 606 | (* desc="cgdi" *) real cgdi; 607 | (* desc="cgbi" *) real cgbi; 608 | (* desc="cddi" *) real cddi; 609 | (* desc="cdgi" *) real cdgi; 610 | (* desc="cdsi" *) real cdsi; 611 | (* desc="cdbi" *) real cdbi; 612 | (* desc="cssi" *) real cssi; 613 | (* desc="csgi" *) real csgi; 614 | (* desc="csdi" *) real csdi; 615 | (* desc="csbi" *) real csbi; 616 | (* desc="cbbi" *) real cbbi; 617 | (* desc="cbsi" *) real cbsi; 618 | (* desc="cbdi" *) real cbdi; 619 | (* desc="cbgi" *) real cbgi; 620 | (* desc="t_total_k" *) real t_total_k; 621 | (* desc="t_total_c" *) real t_total_c; 622 | (* desc="t_delta_sh" *) real t_delta_sh; 623 | (* desc="rd" *) real rd; 624 | (* desc="rs" *) real rs; 625 | (* desc="cgs" *) real cgs; 626 | (* desc="cgd" *) real cgd; 627 | /////////////////////////////////////////////////////////////////// 628 | 629 | analog begin 630 | begin : voltages 631 | real Tnom, Vth; 632 | real Vg0, Vds, Vgdeff, Vgs, sigvds, Vds_noswap, Vgs_noswap, Vgd_noswap; 633 | real sigvdsfp1, Vds_noswapfp1, Vgs_noswapfp1, Vgd_noswapfp1; 634 | real sigvdsfp2, Vds_noswapfp2, Vgs_noswapfp2, Vgd_noswapfp2; 635 | real sigvdsfp3, Vds_noswapfp3, Vgs_noswapfp3, Vgd_noswapfp3; 636 | real sigvdsfp4, Vds_noswapfp4, Vgs_noswapfp4, Vgd_noswapfp4; 637 | real Cg, Tdev, Vtv, beta, Vdsat, Vdeff, Voff_dibl, Voff_dibl_temp, vsat_tdev ; 638 | real t1, t2, vf, G_vf, Ids, mu_eff, Geff, mulf_tdev, Geff_clm; 639 | real Cch, ef1, vgef1, vgef23g0, vgef23g1, tg0, tg1; 640 | real t4, vgefm13g0, vgefm13g1, t5ng0,t5dg0, t5ng1, t5dg1, t5, ef2, vgef2, vgef223g0, vgef223g1, tg02, tg12, t42, vgefm213g0, vgefm213g1; 641 | real t5ng02, t5dg02, t5ng12, t5dg12, t52, ef3, psis, vgod, vgodp, psid, psim, psisd, ids0; 642 | real t0, t3, qd, qs, Vdsx, gdpr, gspr, Rdrain, Rsource, cdsc; 643 | real vdg, vdgeff, ct; 644 | real ALPHAN, ALPHAD, Hx, nsx, vgop, vgon, ndx, dvgon, dvgod ; 645 | real vgmin, vggmin ; 646 | real qgint, qsov, qdov, qdsov, qdint, qsint, cgdvar, VdseffCV; 647 | real rsbias, rdbias, qsacc, isatacc, rd0, rs0 ; 648 | real vsataccs_t, ns0_t, rsc_t, rdc_t, u0accs_t, u0accd_t; 649 | real Rtrap, Rtrap_t, vcap, vgopacc; 650 | real T0, T1, XDCinv, Cg_qme, t6, t8, Qdep, qfr, qfr2, qfr3; 651 | real Pf, Kr, FNint1, FNint2, FNint3, FNint4, FNat1Hz; 652 | real ThSid; 653 | real Igs, Igd; 654 | real vdgeff1, voff_trap, ron_trap, cdscd_trap, eta0_trap; 655 | real voff_cap, rs_cap, rd_cap, eta0_cap; 656 | real qgp, qdp, qsp, qbdov, qbsov, qbgov; 657 | real Vg0_fp1, Cg_fp1, psis_fp1, psid_fp1, psim_fp1, psisd_fp1, qg_fp1, qd_fp1, Vgs_fp1, Vds_fp1, Vdsx_fp1, qs_fp1, Ids_fp1; 658 | real Vg0_fp2, Cg_fp2, psis_fp2, psid_fp2, psim_fp2, psisd_fp2, qg_fp2, qd_fp2, Vgs_fp2, Vds_fp2, Vdsx_fp2, qs_fp2, Ids_fp2; 659 | real Vg0_fp3, Cg_fp3, psis_fp3, psid_fp3, psim_fp3, psisd_fp3, qg_fp3, qd_fp3, Vgs_fp3, Vds_fp3, Vdsx_fp3, qs_fp3, Ids_fp3; 660 | real Vg0_fp4, Cg_fp4, psis_fp4, psid_fp4, psim_fp4, psisd_fp4, qg_fp4, qd_fp4, Vgs_fp4, Vds_fp4, Vdsx_fp4, qs_fp4, Ids_fp4; 661 | real Grgeltd; 662 | 663 | ////////// Variable initialization ////////// 664 | t6 = 0.0; t8 = 0.0; Qdep = 0.0; qfr = 0.0; qfr2 = 0.0; qfr3 = 0.0; 665 | vcap = 1.0; voff_cap = 0.0; rs_cap = 0.0; rd_cap = 0.0; eta0_cap = 0.0; Ids = 0.0; 666 | voff_trap = 0.0; ron_trap= 0.0; cdscd_trap=0.0; eta0_trap=0.0; Rtrap_t = 0.0 ; 667 | Vg0_fp1 = 0.0; Cg_fp1 = 0.0; psis_fp1 = 0.0; psid_fp1 = 0.0; psim_fp1 = 0.0; psisd_fp1 = 0.0; qg_fp1 = 0.0; qd_fp1 = 0.0; 668 | qs_fp1 = 0.0; Vgs_fp1 = 0.0; Vds_fp1 = 0.0; Ids_fp1 = 0.0; 669 | Vg0_fp2 = 0.0; Cg_fp2 = 0.0; psis_fp2 = 0.0; psid_fp2 = 0.0; psim_fp2 = 0.0; psisd_fp2 = 0.0; qg_fp2 = 0.0; qd_fp2 = 0.0; 670 | qs_fp2 = 0.0; Vgs_fp2 = 0.0; Vds_fp2 = 0.0; Ids_fp2 = 0.0; 671 | Vg0_fp3 = 0.0; Cg_fp3 = 0.0; psis_fp3 = 0.0; psid_fp3 = 0.0; psim_fp3 = 0.0; psisd_fp3 = 0.0; qg_fp3 = 0.0; qd_fp3 = 0.0; 672 | qs_fp3 = 0.0; Vgs_fp3 = 0.0; Vds_fp3 = 0.0; Ids_fp3 = 0.0; 673 | Vg0_fp4 = 0.0; Cg_fp4 = 0.0; psis_fp4 = 0.0; psid_fp4 = 0.0; psim_fp4 = 0.0; psisd_fp4 = 0.0; qg_fp4 = 0.0; qd_fp4 = 0.0; 674 | qs_fp4 = 0.0; Vgs_fp4 = 0.0; Vds_fp4 = 0.0; Ids_fp4 = 0.0; 675 | Igs = 0.0; Igd = 0.0; 676 | Rdrain = 0.0; Rsource = 0.0; gdpr = 0.0; gspr = 0.0; 677 | sigvdsfp1 = 1.0; sigvdsfp2 = 1.0; sigvdsfp3 = 1.0; sigvdsfp4 = 1.0; 678 | 679 | if ($port_connected(dt) == 0) begin 680 | if (shmod == 0 || rth0 == 0.0) begin 681 | Temp(dt) <+ 0.0; 682 | end else begin 683 | $strobe("5 terminal Module, while 't' node is not connected, SH is activated."); 684 | end 685 | end 686 | ////////// Temperature Conversion From Celsius To Kelvin ////////// 687 | Tnom = tnom + `P_CELSIUS0; 688 | 689 | ////////// Terminal Voltage Conditioning ////////// 690 | Vds_noswap = V(di,si); 691 | Vgs_noswap = V(gi,si); 692 | Vgd_noswap = V(gi,di); 693 | sigvds = 1.0; 694 | if (Vds_noswap < 0.0) begin 695 | sigvds = -1.0; 696 | Vds = sigvds*Vds_noswap ; 697 | Vgs = Vgd_noswap ; 698 | end else begin 699 | Vds = Vds_noswap ; 700 | Vgs = Vgs_noswap ; 701 | end 702 | Vdsx = sqrt(Vds*Vds + 0.01) - 0.1; 703 | Tdev = $temperature + Temp(rth); 704 | Vth = `KboQ * Tdev ; 705 | ////////// Trap Models ////////// 706 | case (trapmod) 707 | 0:begin 708 | V(trap1) <+ 0.0; V(trap2) <+ 0.0; 709 | end 710 | 1:begin 711 | V(trap2) <+ Vds*Ids; 712 | I(trap2,trap1) <+ idio*(lexp(V(trap2,trap1)/10.0) - 1.0); 713 | I(trap1) <+ cdlag*ddt(V(trap1)); 714 | I(trap1) <+ V(trap1)/rdlag; 715 | vcap = V(trap1); 716 | vcap = smoothminx(vcap,Vth,deltax); 717 | voff_cap = atrapvoff + btrapvoff*lexp(-1.0/vcap); 718 | rs_cap = atraprs + btraprs*lexp(-1.0/vcap); 719 | rd_cap = atraprd + btraprd*lexp(-1.0/vcap); 720 | eta0_cap = atrapeta0 + btrapeta0*lexp(-1.0/vcap); 721 | end 722 | 2:begin 723 | vdgeff1 = lexp(a1*(-V(g,s))); 724 | I(trap1) <+ V(trap1)/rtrap1; 725 | I(trap1) <+ -1.0*vdgeff1; 726 | I(trap1) <+ ctrap1*ddt(V(trap1)); 727 | I(trap2) <+ V(trap2)/rtrap2; 728 | I(trap2) <+ -1.0*V(d,s); 729 | I(trap2) <+ ctrap2*ddt(V(trap2)); 730 | voff_trap = vofftr*V(trap2); 731 | ron_trap = -rontr1 * V(trap1)+rontr2 * V(trap2) + rontr3; 732 | cdscd_trap = cdscdtr*V(trap2); 733 | eta0_trap = eta0tr*V(trap2); 734 | end 735 | 3:begin 736 | vdg = V(d,g); 737 | t1 = (vdlr1/(1.0 + vdg*wd))*vdg; 738 | t2 = vdlr2*(vdg - vtb); //vtb for break between two linear regions 739 | vdgeff = 0.5*(t1+t2 + sqrt((t1-t2)*(t1-t2) + 0.25*deltax*deltax)); //Max function for t1 or t2 740 | if (V(g) > voff) begin //Charge-Discharge Condition 741 | ct = ctrap3; 742 | end else begin 743 | ct = 1.0e-09; 744 | end 745 | I(trap1) <+ V(trap1)/rtrap3; 746 | I(trap1) <+ -1.0*vdgeff; 747 | I(trap1) <+ ct*ddt(V(trap1)); 748 | Rtrap = V(trap1)/vatrap; 749 | Rtrap_t = Rtrap*pow((Tdev/Tnom),talpha); //Temperature Dependence 750 | V(trap2) <+ 0.0; 751 | end 752 | endcase 753 | ////////// End of Trap Models ////////// 754 | 755 | ////////// Calculation For Physical Quantities Required In SP Calculation ////////// 756 | cdsc = 1.0 + nfactor + (cdscd+cdscd_trap)*Vdsx; //Sub-threshold Slope 757 | Vtv = `KboQ*Tdev*cdsc; 758 | Voff_dibl = voff - (eta0 + eta0_trap - eta0_cap)*(Vdsx*vdscale)/sqrt(Vdsx*Vdsx + vdscale*vdscale); 759 | Voff_dibl_temp = Voff_dibl - (Tdev/Tnom - 1.0)*kt1 + voff_trap + voff_cap; 760 | Cg = epsilon/tbar; 761 | 762 | ////////// VGMin and VG0 Calculation ////////// 763 | `VG0(l,w,Voff_dibl_temp,imin,Vgs,Vtv,Vg0) 764 | 765 | ////////// Surface Potential Calculation Source Side ////////// 766 | `PSIS(Cg,Vg0,gamma0i,gamma1i,Vtv, beta,ALPHAN,ALPHAD,Cch,psis) 767 | 768 | ////////// Surface Potential Drain Side ////////// 769 | `PSID(Tdev,Tnom,epsilon,delta,beta,ALPHAN,ALPHAD,Vtv,Cch,u0,ute,vsat,at,Cg,psis,Vg0,ua,ub,l,Vds,gamma0i,gamma1i, mulf_tdev,Vdeff,psid) 770 | psim = 0.5*(psis + psid); 771 | psisd = psid - psis ; 772 | `IDS(Vg0,psim,psisd,Cg,l,Vdsx,w,nf,Vtv,mulf_tdev,Vdeff, Ids) 773 | I(di,si) <+ sigvds*Ids + gdsmin*V(di,si); 774 | 775 | ////////// Terminal Charge Equations ////////// 776 | `QGI(Vg0,psis,psid,psim,Cg,l,qm0i,bdosi,adosi,tbar,Vtv,w,nf, Cg_qme,qgint) 777 | `QDI(Vg0,psim,psis,psid,psisd,l,Vtv,w,nf,Cg_qme, qdint) 778 | qsint = -1.0*qgint -1.0*qdint; //Source Charge 779 | if(sigvds < 0.0) begin 780 | t1 = qsint; 781 | qsint = qdint; 782 | qdint = t1; 783 | end 784 | 785 | ////////// Parasitic Charges ////////// 786 | qsov = cgso*V(g,s); 787 | VdseffCV = V(d,s)*vdsatcv/sqrt(V(d,s)*V(d,s) + vdsatcv*vdsatcv); 788 | cgdvar = cgdo - cgdl*VdseffCV; 789 | qdov = cgdvar*V(g,d); 790 | qdsov = cdso*V(d,s); 791 | qgp = qsov + qdov; 792 | qdp = - qdov + qdsov; 793 | qsp = - qsov - qdsov; 794 | qd = qdint + qdp; 795 | qs = qsint + qsp; 796 | qbdov = cbdo * V(b,d); 797 | qbsov = cbso * V(b,s); 798 | qbgov = cbgo * V(b,g); 799 | 800 | ////////// Gate Current Model ////////// 801 | if (gatemod == 1) begin 802 | t0 = V(gi, si)/(njgs*`KboQ*Tdev); 803 | t3 = igsdio + (Tdev/Tnom - 1.0)* ktgs; 804 | Igs = w*l*nf*abs(t3)*(lexp(t0)-1.0); 805 | t0 = V(gi, di)/(njgd*`KboQ*Tdev); 806 | t3 = igddio + (Tdev/Tnom - 1.0)* ktgd; 807 | Igd = w*l*nf*abs(t3)*(lexp(t0)-1.0); 808 | I(gi, si) <+ Igs; 809 | I(gi, di) <+ Igd; 810 | end 811 | 812 | ////////// Access Region Non-linear Resistance Model ////////// 813 | 814 | if (rdsmod == 1) begin 815 | ns0_t = ns0accs*(1.0 - kns0*(Tdev/Tnom-1.0)); 816 | ns0_t = hypmax(ns0_t, 1.0, 1.0e-3); 817 | qsacc = `P_Q*ns0_t*(1.0 + k0accs*vgopacc); 818 | vsataccs_t = vsataccs*pow((Tdev/Tnom),ats); //Vsat Temperature Dependence 819 | isatacc = w*nf*qsacc*vsataccs_t; 820 | u0accs_t = u0accs*pow((Tdev/Tnom),utes); //Mobility Temperature Dependence 821 | rs0 = lsg/(w*nf*qsacc*u0accs_t); 822 | t0 = pow(abs(Ids/isatacc),mexpaccs); 823 | t1 = 1.0 - t0; 824 | t2 = pow(t1,1.0/mexpaccs); 825 | rsbias = rs0/t2; 826 | rsc_t = rsc*(1.0+krsc*(Tdev/Tnom-1.0)); 827 | Rsource = rsc_t/(w*nf) + rsbias + rs_cap; 828 | ns0_t = ns0accd*(1.0 - kns0*(Tdev/Tnom-1.0)); 829 | ns0_t = hypmax(ns0_t, 1.0, 1.0e-3); 830 | qsacc = `P_Q*ns0_t*(1.0 + k0accd*vgopacc); 831 | isatacc = w*nf*qsacc*vsataccs_t; 832 | u0accd_t = u0accd*pow((Tdev/Tnom),uted); //Mobility Temperature Dependence 833 | rd0 = ldg/(w*nf*qsacc*u0accd_t); 834 | t0 = pow(abs(Ids/isatacc),mexpaccd); 835 | t1 = 1.0 - t0; 836 | t2 = pow(t1,1.0/mexpaccd); 837 | rdbias = rd0/t2; 838 | rdc_t = rdc*(1.0+krdc*(Tdev/Tnom-1.0)); 839 | Rdrain = rdc_t/(w*nf) + rdbias + Rtrap_t + ron_trap + rd_cap; 840 | gdpr = 1.0 / Rdrain; 841 | gspr = 1.0 / Rsource; 842 | I(d, `IntrinsicDrain_fp4) <+ gdpr*V(d, `IntrinsicDrain_fp4); 843 | I(si,s) <+ gspr*V(si,s); 844 | end else begin 845 | V(d, `IntrinsicDrain_fp4) <+ 0.0; 846 | V(s,si) <+ 0.0; 847 | end 848 | 849 | ////////// Noise Modeling ////////// 850 | 851 | ////////// Flicker Noise Model ////////// 852 | if (fnmod==1) begin 853 | Kr = l/((Vg0-psim+Vtv)*max(psisd,1.0e-12)); 854 | Pf = Vtv*`P_Q*`P_Q*`P_Q/(w*nf*l*l); 855 | FNint1 = noia*Vtv*Cg*(1.0/(max(qd,1.0e-22)))*(1.0-(qd/(max(qs,1.0e-22)))); 856 | FNint2 = (noia+noib*Vtv*Cg)*ln(max(qd,1.0e-22)/max(qs,1.0e-22)); 857 | FNint3 = (noib+noic*Vtv*Cg)*(qs-qd); 858 | FNint4 = (noic/2.0)*(qd*qd-qs*qs); 859 | FNat1Hz = Pf*(Ids*Ids)*(Kr/(Cg*Cg))*(FNint1+FNint2+FNint3+FNint4); //PSD of the flicker noise without the frequency component 860 | I(di,si) <+ flicker_noise(FNat1Hz, ef, "flicker"); 861 | end 862 | 863 | ////////// Thermal Noise Model ////////// 864 | if (tnmod==1) begin 865 | ThSid = (tnsc/(max(Ids,1e-10)*l*l))*(4.0*`KboQ*`P_Q*Tdev*`P_Q*w*nf*Cg*`P_Q*w*nf*Cg)*((mu_eff/vf)*(mu_eff/vf))*(Vg0*Vg0*psisd+((psid*psid*psid-psis*psis*psis)/3)-Vg0*(psid*psid-psis*psis)); //Channel Thermal Noise PSD 866 | I(di, si) <+ white_noise(ThSid, "thermal"); 867 | if (rdsmod==1) begin 868 | I(d, `IntrinsicDrain_fp4) <+ white_noise(4.0 * Vth * `P_Q * gdpr, "thermal"); 869 | I(s, si) <+ white_noise(4.0 * Vth * `P_Q * gspr, "thermal"); 870 | end 871 | end 872 | ////////// Shot Noise Model /////////// 873 | if (gatemod == 1) begin 874 | I(gi, si) <+ white_noise(2.0 * `P_Q * abs(Igs), "shot"); 875 | I(gi, di) <+ white_noise(2.0 * `P_Q * abs(Igd), "shot"); 876 | end 877 | ////////// FP1 Current Model ////////// 878 | `ifdef __FP1MOD__ 879 | if(fp1mod != 0) begin 880 | Vds_noswapfp1 = V(fp1,di); 881 | if (fp1mod == 1) begin 882 | Vgs_noswapfp1 = V(gi,di); 883 | Vgd_noswapfp1 = V(gi,fp1); 884 | end else begin 885 | Vgs_noswapfp1 = V(s,di); 886 | Vgd_noswapfp1 = V(s,fp1); 887 | end 888 | sigvdsfp1 = 1.0; 889 | if (Vds_noswapfp1 < 0.0) begin 890 | sigvdsfp1 = -1.0; 891 | Vds_fp1 = sigvdsfp1*Vds_noswapfp1 ; 892 | Vgs_fp1 = Vgd_noswapfp1 ; 893 | end else begin 894 | Vds_fp1 = Vds_noswapfp1 ; 895 | Vgs_fp1 = Vgs_noswapfp1 ; 896 | end 897 | 898 | Vdsx_fp1 = sqrt(Vds_fp1*Vds_fp1 + 0.01) - 0.1; 899 | cdsc = 1.0 + nfactorfp1 + cdscdfp1*Vdsx_fp1; //Sub-threshold Slope 900 | Vtv = `KboQ*Tdev*cdsc; 901 | Voff_dibl_temp = vofffp1 + (Tdev/Tnom - 1.0)*ktfp1 - (eta0fp1)*(Vdsx_fp1*vdscalefp1)/sqrt(Vdsx_fp1*Vdsx_fp1 + vdscalefp1*vdscalefp1); 902 | Cg_fp1 = epsilon/dfp1; 903 | `VG0(lfp1,w,Voff_dibl_temp,iminfp1,Vgs_fp1,Vtv,Vg0_fp1) 904 | `PSIS(Cg_fp1,Vg0_fp1,gamma0fp1,gamma1fp1,Vtv, beta,ALPHAN,ALPHAD,Cch,psis_fp1) 905 | `PSID(Tdev,Tnom,epsilon,delta,beta,ALPHAN,ALPHAD,Vtv,Cch,u0fp1,ute,vsatfp1,at,Cg_fp1,psis_fp1,Vg0_fp1,ua,ub,lfp1,Vds_fp1,gamma0fp1,gamma1fp1, mulf_tdev,Vdeff,psid_fp1) 906 | psim_fp1 = 0.5*(psis_fp1 + psid_fp1); 907 | psisd_fp1 = psid_fp1 - psis_fp1; 908 | `IDS(Vg0_fp1,psim_fp1,psisd_fp1,Cg_fp1,lfp1,Vdsx_fp1,w,nf,Vtv,mulf_tdev,Vdeff, Ids_fp1) 909 | I(fp1,di) <+ sigvdsfp1*Ids_fp1 + gdsmin*V(fp1,di); 910 | end else begin 911 | V(fp1,di) <+ 0.0; 912 | end 913 | 914 | ////////// FP1 Charge ////////// 915 | if(fp1mod != 0) begin 916 | `QGI(Vg0_fp1,psis_fp1,psid_fp1,psim_fp1,Cg_fp1,lfp1,qm0fp1,bdosfp1,adosfp1,dfp1,Vtv,w,nf, Cg_qme,qg_fp1) 917 | `QDI(Vg0_fp1,psim_fp1,psis_fp1,psid_fp1,psisd_fp1,lfp1,Vtv,w,nf,Cg_qme, qd_fp1) 918 | end else begin 919 | qg_fp1 = 0; 920 | qd_fp1 = 0; 921 | end 922 | qs_fp1 = -1.0*qg_fp1 -1.0*qd_fp1; 923 | if(sigvdsfp1 < 0.0) begin 924 | t1 = qs_fp1; 925 | qs_fp1 = qd_fp1; 926 | qd_fp1 = t1; 927 | end 928 | `endif 929 | 930 | ////////// FP2 Current Model ////////// 931 | `ifdef __FP2MOD__ 932 | if(fp2mod != 0) begin 933 | Vds_noswapfp2 = V(fp2,`IntrinsicDrain_fp1); 934 | if (fp2mod == 1) begin 935 | Vgs_noswapfp2 = V(gi,`IntrinsicDrain_fp1); 936 | Vgd_noswapfp2 = V(gi,fp2); 937 | end else begin 938 | Vgs_noswapfp2 = V(s,`IntrinsicDrain_fp1); 939 | Vgd_noswapfp2 = V(s,fp2); 940 | end 941 | sigvdsfp2 = 1.0; 942 | if (Vds_noswapfp2 < 0.0) begin 943 | sigvdsfp2 = -1.0; 944 | Vds_fp2 = sigvdsfp2*Vds_noswapfp2 ; 945 | Vgs_fp2 = Vgd_noswapfp2 ; 946 | end else begin 947 | Vds_fp2 = Vds_noswapfp2 ; 948 | Vgs_fp2 = Vgs_noswapfp2 ; 949 | end 950 | 951 | Vdsx_fp2 = sqrt(Vds_fp2*Vds_fp2 + 0.01) - 0.1; 952 | cdsc = 1.0 + nfactorfp2 + cdscdfp2*Vdsx_fp2; //Sub-threshold Slope 953 | Vtv = `KboQ*Tdev*cdsc; 954 | Voff_dibl_temp = vofffp2 - (Tdev/Tnom - 1.0)*ktfp2 - (eta0fp2)*(Vdsx_fp2*vdscalefp2)/sqrt(Vdsx_fp2*Vdsx_fp2 + vdscalefp2*vdscalefp2); 955 | Cg_fp2 = epsilon/(dfp2); 956 | `VG0(lfp2,w,Voff_dibl_temp,iminfp2,Vgs_fp2,Vtv,Vg0_fp2) 957 | `PSIS(Cg_fp2,Vg0_fp2,gamma0fp2,gamma1fp2,Vtv, beta,ALPHAN,ALPHAD,Cch,psis_fp2) 958 | `PSID(Tdev,Tnom,epsilon,delta,beta,ALPHAN,ALPHAD,Vtv,Cch,u0fp2,ute,vsatfp2,at,Cg_fp2,psis_fp2,Vg0_fp2,ua,ub,lfp2,Vds_fp2,gamma0fp2,gamma1fp2, mulf_tdev,Vdeff,psid_fp2) 959 | psim_fp2 = 0.5*(psis_fp2 + psid_fp2); 960 | psisd_fp2 = psid_fp2 - psis_fp2 ; 961 | `IDS(Vg0_fp2,psim_fp2,psisd_fp2,Cg_fp2,lfp2,Vdsx_fp2,w,nf,Vtv,mulf_tdev,Vdeff, Ids_fp2) 962 | I(fp2,`IntrinsicDrain_fp1) <+ sigvdsfp2*Ids_fp2 + gdsmin*V(fp2,`IntrinsicDrain_fp1); 963 | end else begin 964 | V(fp2,`IntrinsicDrain_fp1) <+ 0.0; 965 | end 966 | ////////// FP2 Charge Model ////////// 967 | if(fp2mod != 0) begin 968 | `QGI(Vg0_fp2,psis_fp2,psid_fp2,psim_fp2,Cg_fp2,lfp2,qm0fp2,bdosfp2,adosfp2,dfp2,Vtv,w,nf, Cg_qme,qg_fp2) 969 | `QDI(Vg0_fp2,psim_fp2,psis_fp2,psid_fp2,psisd_fp2,lfp2,Vtv,w,nf,Cg_qme, qd_fp2) 970 | end else begin 971 | qg_fp2 = 0; 972 | qd_fp2 = 0; 973 | end 974 | qs_fp2 = -1.0*qg_fp2 -1.0*qd_fp2; 975 | if(sigvdsfp2 < 0.0) begin 976 | t1 = qs_fp2; 977 | qs_fp2 = qd_fp2; 978 | qd_fp2 = t1; 979 | end 980 | `endif 981 | 982 | ////////// FP3 Current Model ////////// 983 | `ifdef __FP3MOD__ 984 | if(fp3mod != 0) begin 985 | Vds_noswapfp3 = V(fp3,`IntrinsicDrain_fp2); 986 | if (fp3mod == 1) begin 987 | Vgs_noswapfp3 = V(gi,`IntrinsicDrain_fp2); 988 | Vgd_noswapfp3 = V(gi,fp3); 989 | end else begin 990 | Vgs_noswapfp3 = V(s,`IntrinsicDrain_fp2); 991 | Vgd_noswapfp3 = V(s,fp3); 992 | end 993 | sigvdsfp3 = 1.0; 994 | if (Vds_noswapfp3 < 0.0) begin 995 | sigvdsfp3 = -1.0; 996 | Vds_fp3 = sigvdsfp3*Vds_noswapfp3 ; 997 | Vgs_fp3 = Vgd_noswapfp3 ; 998 | end else begin 999 | Vds_fp3 = Vds_noswapfp3 ; 1000 | Vgs_fp3 = Vgs_noswapfp3 ; 1001 | end 1002 | 1003 | Vdsx_fp3 = sqrt(Vds_fp3*Vds_fp3 + 0.01) - 0.1; 1004 | cdsc = 1.0 + nfactorfp3 + cdscdfp3*Vdsx_fp3; //Sub-threshold Slope 1005 | Vtv = `KboQ*Tdev*cdsc; 1006 | Voff_dibl_temp = vofffp3 - (Tdev/Tnom - 1.0)*ktfp3 - (eta0fp3)*(Vdsx_fp3*vdscalefp3)/sqrt(Vdsx_fp3*Vdsx_fp3 + vdscalefp3*vdscalefp3); 1007 | Cg_fp3 = epsilon/(dfp3); 1008 | `VG0(lfp3,w,Voff_dibl_temp,iminfp3,Vgs_fp3,Vtv,Vg0_fp3) 1009 | `PSIS(Cg_fp3,Vg0_fp3,gamma0fp3,gamma1fp3,Vtv, beta,ALPHAN,ALPHAD,Cch,psis_fp3) 1010 | `PSID(Tdev,Tnom,epsilon,delta,beta,ALPHAN,ALPHAD,Vtv,Cch,u0fp3,ute,vsatfp3,at,Cg_fp3,psis_fp3,Vg0_fp3,ua,ub,lfp3,Vds_fp3,gamma0fp3,gamma1fp3, mulf_tdev,Vdeff,psid_fp3) 1011 | psim_fp3 = 0.5*(psis_fp3 + psid_fp3); 1012 | psisd_fp3 = psid_fp3 - psis_fp3 ; 1013 | `IDS(Vg0_fp3,psim_fp3,psisd_fp3,Cg_fp3,lfp3,Vdsx_fp3,w,nf,Vtv,mulf_tdev,Vdeff, Ids_fp3) 1014 | I(fp3,`IntrinsicDrain_fp2) <+ sigvdsfp3*Ids_fp3 + gdsmin*V(fp3,`IntrinsicDrain_fp2); 1015 | end else begin 1016 | V(fp3,`IntrinsicDrain_fp2) <+ 0.0; 1017 | end 1018 | 1019 | ////////// FP3 Charge Model ////////// 1020 | if(fp3mod != 0) begin 1021 | `QGI(Vg0_fp3,psis_fp3,psid_fp3,psim_fp3,Cg_fp3,lfp3,qm0fp3,bdosfp3,adosfp3,dfp3,Vtv,w,nf, Cg_qme,qg_fp3) 1022 | `QDI(Vg0_fp3,psim_fp3,psis_fp3,psid_fp3,psisd_fp3,lfp3,Vtv,w,nf,Cg_qme, qd_fp3) 1023 | end else begin 1024 | qg_fp3 = 0; 1025 | qd_fp3 = 0; 1026 | end 1027 | qs_fp3 = -1.0*qg_fp3 -1.0*qd_fp3; 1028 | if(sigvdsfp3 < 0.0) begin 1029 | t1 = qs_fp3; 1030 | qs_fp3 = qd_fp3; 1031 | qd_fp3 = t1; 1032 | end 1033 | `endif 1034 | 1035 | ////////// FP4 Current Model ////////// 1036 | `ifdef __FP4MOD__ 1037 | if(fp4mod != 0) begin 1038 | Vds_noswapfp4 = V(fp4,`IntrinsicDrain_fp3); 1039 | if (fp4mod == 1) begin 1040 | Vgs_noswapfp4 = V(gi,`IntrinsicDrain_fp3); 1041 | Vgd_noswapfp4 = V(gi,fp4); 1042 | end else begin 1043 | Vgs_noswapfp4 = V(s,`IntrinsicDrain_fp3); 1044 | Vgd_noswapfp4 = V(s,fp4); 1045 | end 1046 | sigvdsfp4 = 1.0; 1047 | if (Vds_noswapfp4 < 0.0) begin 1048 | sigvdsfp4 = -1.0; 1049 | Vds_fp4 = sigvdsfp4*Vds_noswapfp4 ; 1050 | Vgs_fp4 = Vgd_noswapfp4 ; 1051 | end else begin 1052 | Vds_fp4 = Vds_noswapfp4 ; 1053 | Vgs_fp4 = Vgs_noswapfp4 ; 1054 | end 1055 | 1056 | Vdsx_fp4 = sqrt(Vds_fp4*Vds_fp4 + 0.01) - 0.1; 1057 | cdsc = 1.0 + nfactorfp4 + cdscdfp4*Vdsx_fp4; //Sub-threshold Slope 1058 | Vtv = `KboQ*Tdev*cdsc; 1059 | Voff_dibl_temp = vofffp4 - (Tdev/Tnom - 1.0)*ktfp4 - (eta0fp4)*(Vdsx_fp4*vdscalefp4)/sqrt(Vdsx_fp4*Vdsx_fp4 + vdscalefp4*vdscalefp4); 1060 | Cg_fp4 = epsilon/(dfp4); 1061 | `VG0(lfp4,w,Voff_dibl_temp,iminfp4,Vgs_fp4,Vtv,Vg0_fp4) 1062 | `PSIS(Cg_fp4,Vg0_fp4,gamma0fp4,gamma1fp4,Vtv, beta,ALPHAN,ALPHAD,Cch,psis_fp4) 1063 | `PSID(Tdev,Tnom,epsilon,delta,beta,ALPHAN,ALPHAD,Vtv,Cch,u0fp4,ute,vsatfp4,at,Cg_fp4,psis_fp4,Vg0_fp4,ua,ub,lfp4,Vds_fp4,gamma0fp4,gamma1fp4, mulf_tdev,Vdeff,psid_fp4) 1064 | psim_fp4 = 0.5*(psis_fp4 + psid_fp4); 1065 | psisd_fp4 = psid_fp4 - psis_fp4; 1066 | `IDS(Vg0_fp4,psim_fp4,psisd_fp4,Cg_fp4,lfp4,Vdsx_fp4,w,nf,Vtv,mulf_tdev,Vdeff, Ids_fp4) 1067 | I(fp4,`IntrinsicDrain_fp3) <+ sigvdsfp4*Ids_fp4 + gdsmin*V(fp4,`IntrinsicDrain_fp3); 1068 | end else begin 1069 | V(fp4,`IntrinsicDrain_fp3) <+ 0.0; 1070 | end 1071 | 1072 | ////////// FP4 Charge Model ////////// 1073 | if(fp4mod != 0) begin 1074 | `QGI(Vg0_fp4,psis_fp4,psid_fp4,psim_fp4,Cg_fp4,lfp4,qm0fp4,bdosfp4,adosfp4,dfp4,Vtv,w,nf, Cg_qme,qg_fp4) 1075 | `QDI(Vg0_fp4,psim_fp4,psis_fp4,psid_fp4,psisd_fp4,lfp4,Vtv,w,nf,Cg_qme, qd_fp4) 1076 | end else begin 1077 | qg_fp4 = 0; 1078 | qd_fp4 = 0; 1079 | end 1080 | qs_fp4 = -1.0*qg_fp4 -1.0*qd_fp4; 1081 | if(sigvdsfp4 < 0.0) begin 1082 | t1 = qs_fp4; 1083 | qs_fp4 = qd_fp4; 1084 | qd_fp4 = t1; 1085 | end 1086 | `endif 1087 | 1088 | ////////// Gate Resistance ////////// 1089 | if (rgatemod!=0) begin 1090 | Grgeltd = rshg * (xgw + w / 3.0 / ngcon)/ ( ngcon * nf * (l)); 1091 | if (Grgeltd > 0.0) begin 1092 | Grgeltd = 1.0 / Grgeltd; 1093 | end else begin 1094 | Grgeltd = 1.0e3; 1095 | end 1096 | I(g,gi) <+ Grgeltd * V(g,gi); 1097 | end else begin 1098 | V(g,gi) <+ 0.0; 1099 | end 1100 | 1101 | ////////// Capacitance Contributions ////////// 1102 | I(di,si) <+ ddt(qdint); 1103 | I(gi, si) <+ ddt(qgint); 1104 | I(g,s) <+ ddt(qsov); 1105 | I(g,d) <+ ddt(qdov); 1106 | I(d,s) <+ ddt(qdsov); 1107 | I(b,d) <+ ddt (qbdov); 1108 | I(b,s) <+ ddt (qbsov); 1109 | I(b,g) <+ ddt (qbgov); 1110 | I(b,si) <+ ddt(csubscalei*qgint); 1111 | `ifdef __FP1MOD__ 1112 | if (fp1mod!=0) begin 1113 | I(fp1,di) <+ddt(qd_fp1); 1114 | if (fp1mod == 1) begin 1115 | I(gi, di) <+ ddt(qg_fp1) ; 1116 | I(s,di) <+ ddt(qg_fp1)*cfp1scale ; 1117 | end else begin 1118 | I(s,di) <+ ddt(qg_fp1) ; 1119 | I(gi, di) <+ ddt(qg_fp1)*cfp1scale ; 1120 | end 1121 | I(b,di) <+ ddt(csubscale1*qg_fp1); 1122 | end 1123 | `endif 1124 | `ifdef __FP2MOD__ 1125 | if (fp2mod!=0) begin 1126 | I(fp2, `IntrinsicDrain_fp1) <+ddt(qd_fp2); 1127 | if (fp2mod == 1) begin 1128 | I(gi,`IntrinsicDrain_fp1)<+ ddt(qg_fp2); 1129 | I(s,`IntrinsicDrain_fp1)<+ cfp2scale*ddt(qg_fp2) ; 1130 | end else begin 1131 | I(s,`IntrinsicDrain_fp1)<+ ddt(qg_fp2); 1132 | I(gi,`IntrinsicDrain_fp1) <+ cfp2scale*ddt(qg_fp2) ; 1133 | end 1134 | I(b,fp1) <+ ddt(csubscale2*qg_fp2); 1135 | end 1136 | `endif 1137 | `ifdef __FP3MOD__ 1138 | if (fp3mod!=0) begin 1139 | I(fp3, `IntrinsicDrain_fp2) <+ddt(qd_fp3); 1140 | if (fp3mod == 1) begin 1141 | I(gi,`IntrinsicDrain_fp2)<+ ddt(qg_fp3); 1142 | I(s,`IntrinsicDrain_fp2)<+ ddt(qg_fp3)*cfp3scale; 1143 | end else begin 1144 | I(s,`IntrinsicDrain_fp2)<+ ddt(qg_fp3); 1145 | I(gi,`IntrinsicDrain_fp2)<+ ddt(qg_fp3)*cfp3scale; 1146 | end 1147 | I(b,fp2) <+ ddt(csubscale3*qg_fp3); 1148 | end 1149 | `endif 1150 | `ifdef __FP4MOD__ 1151 | if (fp4mod!=0) begin 1152 | I(fp4, `IntrinsicDrain_fp3) <+ddt(qd_fp4); 1153 | if (fp4mod == 1) begin 1154 | I(gi,`IntrinsicDrain_fp3)<+ ddt(qg_fp4); 1155 | I(s,`IntrinsicDrain_fp3)<+ ddt(qg_fp4)*cfp4scale; 1156 | end else begin 1157 | I(s,`IntrinsicDrain_fp3)<+ ddt(qg_fp4); 1158 | I(gi,`IntrinsicDrain_fp3)<+ ddt(qg_fp4)*cfp4scale; 1159 | end 1160 | I(b,fp3) <+ ddt(csubscale4*qg_fp4); 1161 | end 1162 | `endif 1163 | 1164 | ////////// Fringe Capacitance For Additional Tuning ////////// 1165 | qfr = cfgd0 - (cfgd + (Tdev/Tnom - 1.0)* ktcfgd) * V(d,s); 1166 | qfr = hypmax(qfr,1.0e-25,cfgdsm); 1167 | I(g,d) <+ddt(qfr); // 1168 | I(g,s) <+ ddt(cfgd*V(g,s)); // 1169 | qfr2 = (cfg-((Tdev/Tnom - 1.0)*ktcfg))*V(gi, s); 1170 | I(gi, s) <+ ddt(qfr2); // 1171 | qfr3 = cfd*V(s,d); 1172 | I(s,d) <+ ddt(qfr3); // 1173 | 1174 | ////////// Depletion Capacitance Model ////////// 1175 | t0 = (vbi - (Tdev/Tnom - 1.0)*ktvbi)*(1.0-lexp(-ln(aj)/mz)); 1176 | t1 = (t0-V(s,d))/Vth; 1177 | t2 = sqrt(dj*t1*t1+ 1.92); 1178 | t3 = (t1+t2)*0.5; 1179 | t4 = t0-Vth*t3; 1180 | t5 = t3/t2; 1181 | t6 = ln(1.0-t4/vbi); 1182 | t8 = cj0*(vbi - (Tdev/Tnom - 1.0)*ktvbi)*(1.0-lexp(t6*(1.0-mz)))/(1.0-mz); 1183 | Qdep = t8+aj*cj0*(V(s,d)-t4); 1184 | I(s,d) <+ ddt(Qdep); // 1185 | 1186 | ////////// Self-Heating Effect ////////// 1187 | if (shmod == 1 && rth0>0) begin 1188 | Pwr(ith) <+ -1.0*Ids*Vds-1.0*Ids_fp1*Vds_fp1-1.0*Ids_fp2*Vds_fp2-1.0*Ids_fp3*Vds_fp3-1.0*Ids_fp4*Vds_fp4; 1189 | Pwr(rth) <+ Temp(rth)/rth0; 1190 | Pwr(rth) <+ ddt(Temp(rth)*cth0); 1191 | end else begin 1192 | Temp(dt) <+ 0.0 ; 1193 | end 1194 | ///////// Output info variables 1195 | idisi = I(di,si); 1196 | vdisi = V(di,si); 1197 | vgisi = V(gi,si); 1198 | gmi = sigvds * ddx(Ids,V(gi)); 1199 | gmbi = sigvds * ddx(Ids,V(b)); 1200 | gdsi = sigvds * ddx(Ids,V(di)); 1201 | igs = Igs; 1202 | igd = Igd; 1203 | qgi = qgint; 1204 | qdi = qdint; 1205 | qsi = qsint; 1206 | qbi = csubscalei*qgint; 1207 | cggi = ddx(qgi,V(gi)); 1208 | cgsi = -ddx(qgi,V(si)); 1209 | cgdi = -ddx(qgi,V(di)); 1210 | cgbi = -ddx(qgi,V(b)); 1211 | cddi = ddx(qdi,V(di)); 1212 | cdgi = -ddx(qdi,V(gi)); 1213 | cdsi = -ddx(qdi,V(si)); 1214 | cdbi = -ddx(qdi,V(b)); 1215 | cssi = ddx(qsi,V(si)); 1216 | csgi = -ddx(qsi,V(gi)); 1217 | csdi = -ddx(qsi,V(di)); 1218 | csbi = -ddx(qsi,V(b)); 1219 | cbbi = ddx(qbi,V(b)); 1220 | cbgi = -ddx(qbi,V(gi)); 1221 | cbdi = -ddx(qbi,V(di)); 1222 | cbsi = -ddx(qbi,V(si)); 1223 | t_total_k = Tdev; 1224 | t_total_c = Tdev - `P_CELSIUS0; 1225 | t_delta_sh = Temp(dt); 1226 | rd = Rdrain; 1227 | rs = Rsource; 1228 | cgs = -ddx(qgint+qsov,V(s)); 1229 | cgd = -ddx(qgint+qdov,V(d)); 1230 | end 1231 | end 1232 | endmodule 1233 | -------------------------------------------------------------------------------- /videos/Links.txt: -------------------------------------------------------------------------------- 1 | https://www.youtube.com/watch?v=AHUZUjeTt9A 2 | 3 | https://www.youtube.com/watch?v=6qwt-NYMrN0 4 | 5 | https://www.youtube.com/watch?v=9ycwpLl9BQo 6 | 7 | https://www.youtube.com/watch?v=eOkeXbROlog 8 | 9 | https://www.youtube.com/watch?v=d2NxCNYQ_O0 10 | 11 | --------------------------------------------------------------------------------