From 719dd26c17a32c0a24882df1b06b26d2dbee58d6 Mon Sep 17 00:00:00 2001 From: Dietmar Warning Date: Wed, 15 Jan 2025 17:44:45 +0100 Subject: [PATCH 1/4] pyprozessor added Signed-off-by: Dietmar Warning --- ihp-sg13g2/libs.tech/klayout/python/pypreprocessor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ihp-sg13g2/libs.tech/klayout/python/pypreprocessor b/ihp-sg13g2/libs.tech/klayout/python/pypreprocessor index cf1ff9ba..6ddd5783 160000 --- a/ihp-sg13g2/libs.tech/klayout/python/pypreprocessor +++ b/ihp-sg13g2/libs.tech/klayout/python/pypreprocessor @@ -1 +1 @@ -Subproject commit cf1ff9bad0fb5338cf1c5b990b2b816b1ea01a64 +Subproject commit 6ddd5783365718c41eb69bce4428358ace4d1fa2 From cca441af96b36954f7e664be34d4d1c2f424de0b Mon Sep 17 00:00:00 2001 From: Dietmar Warning Date: Sun, 19 Jan 2025 09:56:56 +0100 Subject: [PATCH 2/4] poly resistors with r3_cmc model, fix for issue #318 noise bug because of additional Verilog-A model reorganization of directory structure and install process was introduced Signed-off-by: Dietmar Warning --- ihp-sg13g2/libs.tech/ngspice/.spiceinit | 3 +- .../libs.tech/ngspice/models/cornerRES.lib | 67 +- .../ngspice/models/resistors_mod.lib | 191 +- .../ngspice/models/resistors_mod_mismatch.lib | 227 ++ .../ngspice/models/resistors_parm.lib | 23 - .../ngspice/models/resistors_stat.lib | 10 +- .../openvaf/Common103_macrodefs.include | 168 - .../openvaf/JUNCAP200_InitModel.include | 406 --- .../openvaf/JUNCAP200_macrodefs.include | 471 --- .../ngspice/openvaf/JUNCAP200_parlist.include | 181 - .../openvaf/JUNCAP200_varlist1.include | 106 - .../openvaf/JUNCAP200_varlist2.include | 63 - .../openvaf/PSP103_SPCalculation.include | 350 -- .../ngspice/openvaf/PSP103_binning.include | 192 - .../ngspice/openvaf/PSP103_binpars.include | 353 -- .../ngspice/openvaf/PSP103_macrodefs.include | 428 --- .../ngspice/openvaf/PSP103_module.include | 3240 ----------------- .../libs.tech/ngspice/openvaf/README.md | 9 - .../libs.tech/ngspice/openvaf/juncap200.va | 339 -- .../libs.tech/ngspice/openvaf/psp103.va | 52 - ihp-sg13g2/libs.tech/qucs/install.py | 14 +- .../{xyce/adms => verilog-a}/README.md | 2 +- .../adms => verilog-a}/adms-compile-va.sh | 10 +- .../verilog-a/openvaf-compile-va.bat | 15 + .../libs.tech/verilog-a/openvaf-compile-va.sh | 12 + .../{xyce/adms => verilog-a}/psp103/Changelog | 0 .../psp103/Common103_macrodefs.include | 0 .../psp103/JUNCAP200_InitModel.include | 0 .../psp103/JUNCAP200_macrodefs.include | 0 .../psp103/JUNCAP200_parlist.include | 0 .../psp103/JUNCAP200_varlist1.include | 0 .../psp103/JUNCAP200_varlist2.include | 0 .../psp103}/PSP103_ChargesNQS.include | 0 .../psp103}/PSP103_InitNQS.include | 0 .../psp103/PSP103_SPCalculation.include | 0 .../psp103/PSP103_binning.include | 0 .../psp103/PSP103_binpars.include | 0 .../psp103/PSP103_macrodefs.include | 0 .../psp103/PSP103_module.include | 0 .../psp103}/PSP103_nqs_macrodefs.include | 0 .../{xyce/adms => verilog-a}/psp103/README.md | 0 .../libs.tech/verilog-a/psp103/discipline.h | 284 ++ .../adms => verilog-a}/psp103/juncap200.va | 0 .../{xyce/adms => verilog-a}/psp103/psp103.va | 0 .../psp103}/psp103_nqs.va | 0 .../openvaf => verilog-a/psp103}/psp103t.va | 0 .../psp103}/releasenotesPSP103p6.txt | 0 .../libs.tech/verilog-a/r3_cmc/Changelog | 5 + .../libs.tech/verilog-a/r3_cmc/LICENSE.txt | 11 + .../libs.tech/verilog-a/r3_cmc/NOTICE.txt | 7 + .../libs.tech/verilog-a/r3_cmc/discipline.h | 284 ++ .../libs.tech/verilog-a/r3_cmc/r3_cmc.va | 814 +++++ .../verilog-a/r3_cmc/r3_cmc_macros.include | 792 ++++ ihp-sg13g2/libs.tech/xschem/README.md | 2 +- ihp-sg13g2/libs.tech/xschem/install.py | 11 +- .../adms/psp103/PSP103_ChargesNQS.include | 316 -- .../xyce/adms/psp103/PSP103_InitNQS.include | 207 -- .../adms/psp103/PSP103_nqs_macrodefs.include | 125 - .../libs.tech/xyce/adms/psp103/psp103_nqs.va | 56 - .../libs.tech/xyce/adms/psp103/psp103t.va | 54 - .../xyce/adms/psp103/releasenotesPSP103p6.txt | 151 - 61 files changed, 2696 insertions(+), 7355 deletions(-) create mode 100644 ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib delete mode 100644 ihp-sg13g2/libs.tech/ngspice/models/resistors_parm.lib delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/Common103_macrodefs.include delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_InitModel.include delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_macrodefs.include delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_parlist.include delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_varlist1.include delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_varlist2.include delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_SPCalculation.include delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_binning.include delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_binpars.include delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_macrodefs.include delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_module.include delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/README.md delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/juncap200.va delete mode 100644 ihp-sg13g2/libs.tech/ngspice/openvaf/psp103.va rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/README.md (89%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/adms-compile-va.sh (67%) mode change 100755 => 100644 create mode 100644 ihp-sg13g2/libs.tech/verilog-a/openvaf-compile-va.bat create mode 100644 ihp-sg13g2/libs.tech/verilog-a/openvaf-compile-va.sh rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/Changelog (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/Common103_macrodefs.include (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/JUNCAP200_InitModel.include (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/JUNCAP200_macrodefs.include (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/JUNCAP200_parlist.include (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/JUNCAP200_varlist1.include (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/JUNCAP200_varlist2.include (100%) rename ihp-sg13g2/libs.tech/{ngspice/openvaf => verilog-a/psp103}/PSP103_ChargesNQS.include (100%) rename ihp-sg13g2/libs.tech/{ngspice/openvaf => verilog-a/psp103}/PSP103_InitNQS.include (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/PSP103_SPCalculation.include (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/PSP103_binning.include (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/PSP103_binpars.include (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/PSP103_macrodefs.include (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/PSP103_module.include (100%) rename ihp-sg13g2/libs.tech/{ngspice/openvaf => verilog-a/psp103}/PSP103_nqs_macrodefs.include (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/README.md (100%) create mode 100644 ihp-sg13g2/libs.tech/verilog-a/psp103/discipline.h rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/juncap200.va (100%) rename ihp-sg13g2/libs.tech/{xyce/adms => verilog-a}/psp103/psp103.va (100%) rename ihp-sg13g2/libs.tech/{ngspice/openvaf => verilog-a/psp103}/psp103_nqs.va (100%) rename ihp-sg13g2/libs.tech/{ngspice/openvaf => verilog-a/psp103}/psp103t.va (100%) rename ihp-sg13g2/libs.tech/{ngspice/openvaf => verilog-a/psp103}/releasenotesPSP103p6.txt (100%) create mode 100644 ihp-sg13g2/libs.tech/verilog-a/r3_cmc/Changelog create mode 100644 ihp-sg13g2/libs.tech/verilog-a/r3_cmc/LICENSE.txt create mode 100644 ihp-sg13g2/libs.tech/verilog-a/r3_cmc/NOTICE.txt create mode 100644 ihp-sg13g2/libs.tech/verilog-a/r3_cmc/discipline.h create mode 100644 ihp-sg13g2/libs.tech/verilog-a/r3_cmc/r3_cmc.va create mode 100644 ihp-sg13g2/libs.tech/verilog-a/r3_cmc/r3_cmc_macros.include delete mode 100644 ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_ChargesNQS.include delete mode 100644 ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_InitNQS.include delete mode 100644 ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_nqs_macrodefs.include delete mode 100644 ihp-sg13g2/libs.tech/xyce/adms/psp103/psp103_nqs.va delete mode 100644 ihp-sg13g2/libs.tech/xyce/adms/psp103/psp103t.va delete mode 100644 ihp-sg13g2/libs.tech/xyce/adms/psp103/releasenotesPSP103p6.txt diff --git a/ihp-sg13g2/libs.tech/ngspice/.spiceinit b/ihp-sg13g2/libs.tech/ngspice/.spiceinit index 2b2d043a..3f700efc 100644 --- a/ihp-sg13g2/libs.tech/ngspice/.spiceinit +++ b/ihp-sg13g2/libs.tech/ngspice/.spiceinit @@ -23,5 +23,6 @@ setcs sourcepath = ( $sourcepath $PDK_ROOT/$PDK/libs.tech/ngspice/models $PDK_R *set noinit * add OSDI -osdi '$PDK_ROOT/$PDK/libs.tech/ngspice/openvaf/psp103_nqs.osdi' +osdi '$PDK_ROOT/$PDK/libs.tech/verilog-a/psp103_nqs.osdi' +osdi '$PDK_ROOT/$PDK/libs.tech/verilog-a/r3_cmc.osdi' diff --git a/ihp-sg13g2/libs.tech/ngspice/models/cornerRES.lib b/ihp-sg13g2/libs.tech/ngspice/models/cornerRES.lib index 5d94cffa..7111ec9b 100644 --- a/ihp-sg13g2/libs.tech/ngspice/models/cornerRES.lib +++ b/ihp-sg13g2/libs.tech/ngspice/models/cornerRES.lib @@ -1,13 +1,13 @@ *####################################################################### * * Copyright 2023 IHP PDK Authors -* +* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at -* +* * https://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software *distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,19 +15,19 @@ * limitations under the License. * *####################################################################### -* Typical without statistical modeling -.LIB res_typ +* Typical without statistical modeling +.LIB res_typ .param rsh_rhigh = 1360 .param rsh_rppd = 260.0 .param rsh_rsil = 7.0 .param res_area = 1.0 .param res_rpara = 1.0 - + .include resistors_mod.lib .ENDL res_typ - + * Typical with statistical modeling -.LIB res_typ_stat +.LIB res_typ_stat .param rsh_rhigh_norm= 1360 .param rsh_rppd_norm= 260.0 .param rsh_rsil_norm= 7.0 @@ -38,19 +38,30 @@ .include resistors_mod.lib .ENDL res_typ_stat +* Typical with mismatch modeling +.LIB res_typ_mismatch + .param rsh_rhigh = 1360 + .param rsh_rppd = 260.0 + .param rsh_rsil = 7.0 + .param res_area = 1.0 + .param res_rpara = 1.0 + +.include resistors_mod_mismatch.lib +.ENDL res_typ + * Best Case without statistical modeling -.LIB res_bcs +.LIB res_bcs .param rsh_rhigh = 1020 .param rsh_rppd = 234.0 .param rsh_rsil = 6.02 .param res_area = 1.0 .param res_rpara = 1.0 - + .include resistors_mod.lib .ENDL res_bcs - + * Best Case with statistical modeling -.LIB res_bcs_stat +.LIB res_bcs_stat .param rsh_rhigh_norm= 1020 .param rsh_rppd_norm= 234.0 .param rsh_rsil_norm= 6.02 @@ -60,20 +71,31 @@ .include resistors_stat.lib .include resistors_mod.lib .ENDL res_bcs_stat - + +* Best Case with mismatch modeling +.LIB res_bcs_mismatch + .param rsh_rhigh = 1020 + .param rsh_rppd = 234.0 + .param rsh_rsil = 6.02 + .param res_area = 1.0 + .param res_rpara = 1.0 + +.include resistors_mod_mismatch.lib +.ENDL res_bcs + * Worst Case without statistical modeling -.LIB res_wcs +.LIB res_wcs .param rsh_rhigh = 1700 .param rsh_rppd = 286.0 .param rsh_rsil = 7.98 .param res_area = 1.0 .param res_rpara = 1.0 - + .include resistors_mod.lib .ENDL res_wcs - + * Worst Case with statistical modeling -.LIB res_wcs_stat +.LIB res_wcs_stat .param rsh_rhigh_norm= 1700 .param rsh_rppd_norm= 286.0 .param rsh_rsil_norm= 7.98 @@ -83,3 +105,14 @@ .include resistors_stat.lib .include resistors_mod.lib .ENDL res_wcs_stat + +* Worst Case with mismatch modeling +.LIB res_wcs_mismatch + .param rsh_rhigh = 1700 + .param rsh_rppd = 286.0 + .param rsh_rsil = 7.98 + .param res_area = 1.0 + .param res_rpara = 1.0 + +.include resistors_mod_mismatch.lib +.ENDL res_wcs diff --git a/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib index fdcf01a5..d7d707fa 100644 --- a/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib +++ b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib @@ -1,13 +1,13 @@ *####################################################################### * * Copyright 2023 IHP PDK Authors -* +* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at -* +* * https://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software *distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,59 +15,192 @@ * limitations under the License. * *####################################################################### - -.include resistors_parm.lib - + **ptap1 (TIE SUB) -.subckt ptap1 1 2 +.subckt ptap1 1 2 R1 1 2 R=262.847 .ends ptap1 **ntap1 (TIE WELL) -.subckt ntap1 1 2 +.subckt ntap1 1 2 R1 1 2 R=262.847 .ends ntap1 * Parasitic R/C models -* aluminum: prozess tol. res_rpara +* aluminum: prozess tol. res_rpara * value is taken from extraction routine -.subckt Rparasitic 1 2 +.subckt Rparasitic 1 2 .param R=0 w=0 l=0 TC1=0.00353 TC2=0 -R1 1 2 R=r*res_rpara TC1=TC1 TC2=TC2 +R1 1 2 R=r*res_rpara TC1=TC1 TC2=TC2 .ends Rparasitic .subckt rsil 1 3 -.param w=0.5e-6 l=0.5e-6 b=0 m=1 +.param w=0.5e-6 l=0.5e-6 b=0 m=1 trise=0 sw_et=0 ++postsim=0 +kappa=1.85 +ps=0.18e-6 ++weff=w+0.01e-6 +leff=(b+1)*l+(2/kappa*weff+ps)*b -+res_rzspec=2*rzspec/w -+weff=w+0.01e-6 -+rzspec=4.5e-6 -R1 1 2 res_rsil L=leff W=weff m=m ++rzspec=4.5e-6 ++res_rzspec=2*rzspec/w ++lhead=0.86e-6 ++cax=90e-18 ++cpx=25e-18 ++ax=175e-18*(1-1/(1.5*leff*1e6+1))/cax ++px=115e-18/cpx ++a0=0.5*(leff+lhead)*w-(postsim>0)*w*ax*1e-6 ++a=(a0>0)*a0 ++p0=leff+lhead+w-(postsim>0)*px*1e-6 ++p=(p0>0)*p0 ++rshspec=7 ++rqrc=4.5e-6 ++rz=rzspec/w*rsh_rsil-(postsim>0)*rqrc/w + +NR1 1 2 0 dt rmod_rsil L=leff W=weff m=m ++a1=a a2=a ++p1=p p2=p ++c1=1 c2=1 ++trise=trise ++sw_et=sw_et + R2 2 3 R=res_rzspec TC1=3100e-6 TC2=0.3e-6 m=m + +.model rmod_rsil r3_cmc ++rsh=rsh_rsil ++ecrit=1000 ++dfinf=1e-4 ++dp=1000 ++xw=0.01 ++rc=rz ++ca=cax ++cp=cpx ++tc1=3100e-6 ++tc2=0.3e-6 ++tc1rc=3100e-6 ++tc2rc=0.3e-6 ++gth0=1e-12 ++gtha=6e-6 ++gthp=2e-6 ++gthc=1e-12 ++cth0=0 ++cthp=0 ++ctha=594e-15 ++cthc=0 ++kfn=2.812e-12 ++afn=1.607 ++bfn=1.267 + .ends rsil -.subckt rhigh 1 3 -.param w=0.5e-6 l=0.96e-6 b=0 m=1 +.subckt rhigh 1 3 +.param w=0.5e-6 l=0.96e-6 b=0 trise=0 m=1 sw_et=0 ++postsim=0 +kappa=1.85 +ps=0.18e-6 ++weff=w-0.04e-6 +leff=(b+1)*l+(2/kappa*weff+ps)*b -+res_rzspec=2*rzspec/w -+weff=w-0.04e-6 -+rzspec=80e-6 -R1 1 2 res_rhigh L=leff W=weff m=m ++lhead=0.86e-6 ++rzspec=80e-6 ++res_rzspec=2*rzspec/w ++cax=90e-18 ++cpx=25e-18 ++ax=175e-18*(1-1/(1.5*leff*1e6+1))/cax ++px=115e-18/cpx ++a0=0.5*(leff+lhead)*w-(postsim>0)*w*ax*1e-6 ++a=(a0>0)*a0 ++p0=leff+lhead+w-(postsim>0)*px*1e-6 ++p=(p0>0)*p0 ++rshspec=1360 ++rqrc=4.5e-6 ++rz=rzspec/w*rsh_rhigh-(postsim>0)*rqrc/w + +NR1 1 2 0 dt rmod_rhigh L=leff W=weff m=m ++a1=a a2=a ++p1=p p2=p ++c1=1 c2=1 ++trise=trise ++sw_et=1 + R2 2 3 R=res_rzspec TC1=-2300e-6 TC2=2.1e-6 m=m + +.model rmod_rhigh r3_cmc ++rsh=rsh_rhigh ++ecrit=1000 ++dfinf=1e-4 ++dp=1000 ++xw=-0.04 ++rc=rz ++ca=cax ++cp=cpx ++tc1=-2300e-6 ++tc2=2.1e-6 ++tc1rc=-2300e-6 ++tc2rc=2.1e-6 ++gth0=1e-12 ++gtha=6e-6 ++gthp=2e-6 ++gthc=1e-12 ++cth0=0 ++cthp=0 ++ctha=594e-15 ++cthc=0 ++kfn=5.205e-10 ++afn=1.935 ++bfn=0.9086 + .ends rhigh -.subckt rppd 1 3 -.param w=0.5e-6 l=0.5e-6 b=0 m=1 +.subckt rppd 1 3 +.param w=0.5e-6 l=0.5e-6 b=0 ps=0.18e-6 trise=0 m=1 sw_et=0 ++postsim=0 +kappa=1.85 -+ps=0.18e-6 ++weff=w+0.006e-6 +leff=(b+1)*l+(2/kappa*weff+ps)*b ++lhead=0.86e-6 ++rzspec=35e-6 +res_rzspec=2*rzspec/w -+weff=w+0.006e-6 -+rzspec=35e-6 -R1 1 2 res_rppd L=leff W=weff m=m -R2 2 3 R=res_rzspec TC1=-950e-6 m=m ++cax=90e-18 ++cpx=25e-18 ++ax=175e-18*(1-1/(1.5*leff*1e6+1))/cax ++px=115e-18/cpx ++a0=0.5*(leff+lhead)*w-(postsim>0)*w*ax*1e-6 ++a=(a0>0)*a0 ++p0=leff+lhead+w-(postsim>0)*px*1e-6 ++p=(p0>0)*p0 ++rqrc=4.5e-6 ++rz=rzspec/w*rsh_rppd-(postsim>0)*rqrc/w + +NR1 1 2 0 dt res_rppd L=leff W=weff m=m ++a1=a a2=a ++p1=p p2=p ++c1=1 c2=1 ++trise=trise ++sw_et=sw_et + +R2 2 3 R=res_rzspec TC1=-950e-6 m=m + +.model res_rppd r3_cmc ++rsh=rsh_rppd ++ecrit=1000 ++dfinf=1e-4 ++dp=1000 ++xw=0.006 ++rc=rz ++ca=cax ++cp=cpx ++tc1=170e-6 ++tc2=0.4e-6 ++tc1rc=-950e-6 ++gth0=1e-12 ++gtha=6e-6 ++gthp=2e-6 ++gthc=1e-12 ++cth0=0 ++cthp=0 ++ctha=594e-15 ++cthc=0 ++kfn=4.601e-11 ++afn=1.886 ++bfn=0.9963 + .ends rppd diff --git a/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib new file mode 100644 index 00000000..e4c79ad2 --- /dev/null +++ b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib @@ -0,0 +1,227 @@ +*####################################################################### +* +* Copyright 2023 IHP PDK Authors +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* https://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +*distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*####################################################################### + +**ptap1 (TIE SUB) +.subckt ptap1 1 2 +R1 1 2 R=262.847 +.ends ptap1 + +**ntap1 (TIE WELL) +.subckt ntap1 1 2 +R1 1 2 R=262.847 +.ends ntap1 + +* Parasitic R/C models +* aluminum: prozess tol. res_rpara +* value is taken from extraction routine +.subckt Rparasitic 1 2 +.param R=0 w=0 l=0 TC1=0.00353 TC2=0 +R1 1 2 R=r*res_rpara TC1=TC1 TC2=TC2 +.ends Rparasitic + +.subckt rsil 1 3 +.param w=0.5e-6 l=0.5e-6 b=0 m=1 trise=0 sw_et=0 ++postsim=0 ++kappa=1.85 ++ps=0.18e-6 ++weff=w+0.01e-6 ++leff=(b+1)*l+(2/kappa*weff+ps)*b ++rzspec=4.5e-6 ++res_rzspec=2*rzspec/w ++lhead=0.86e-6 ++cax=90e-18 ++cpx=25e-18 ++ax=175e-18*(1-1/(1.5*leff*1e6+1))/cax ++px=115e-18/cpx ++a0=0.5*(leff+lhead)*w-(postsim>0)*w*ax*1e-6 ++a=(a0>0)*a0 ++p0=leff+lhead+w-(postsim>0)*px*1e-6 ++p=(p0>0)*p0 ++rshspec=7 ++rqrc=4.5e-6 ++rz=rzspec/w*rsh_rsil-(postsim>0)*rqrc/w + +NR1 1 2 0 dt rmod_rsil L=leff W=weff m=m ++a1=a a2=a ++p1=p p2=p ++c1=1 c2=1 ++trise=trise ++sw_et=sw_et ++sw_mman=1 ++nsmm_rsh='gauss(1, 1, 1)' ; number of standard deviations for rsh ++nsmm_w='gauss(1, 1, 1)' ; number of standard deviations for w ++nsmm_l='gauss(1, 1, 1)' ; number of standard deviations for l + +R2 2 3 R=res_rzspec TC1=3100e-6 TC2=0.3e-6 m=m + +.model rmod_rsil r3_cmc ++rsh=rsh_rsil ++ecrit=1000 ++dfinf=1e-4 ++dp=1000 ++xw=0.01 ++rc=rz ++ca=cax ++cp=cpx ++tc1=3100e-6 ++tc2=0.3e-6 ++tc1rc=3100e-6 ++tc2rc=0.3e-6 ++gth0=1e-12 ++gtha=6e-6 ++gthp=2e-6 ++gthc=1e-12 ++cth0=0 ++cthp=0 ++ctha=594e-15 ++cthc=0 ++kfn=2.812e-12 ++afn=1.607 ++bfn=1.267 ++smm_rsh=1.2 ; relative standard deviation for rsh [%] ++smm_w=0.01 ; absolute standard deviation for w [um] ++smm_l=0.01 ; absolute standard deviation for l [um] + +.ends rsil + +.subckt rhigh 1 3 +.param w=0.5e-6 l=0.96e-6 b=0 trise=0 m=1 sw_et=0 ++postsim=0 ++kappa=1.85 ++ps=0.18e-6 ++weff=w-0.04e-6 ++leff=(b+1)*l+(2/kappa*weff+ps)*b ++lhead=0.86e-6 ++rzspec=80e-6 ++res_rzspec=2*rzspec/w ++cax=90e-18 ++cpx=25e-18 ++ax=175e-18*(1-1/(1.5*leff*1e6+1))/cax ++px=115e-18/cpx ++a0=0.5*(leff+lhead)*w-(postsim>0)*w*ax*1e-6 ++a=(a0>0)*a0 ++p0=leff+lhead+w-(postsim>0)*px*1e-6 ++p=(p0>0)*p0 ++rshspec=1360 ++rqrc=4.5e-6 ++rz=rzspec/w*rsh_rhigh-(postsim>0)*rqrc/w + +NR1 1 2 0 dt rmod_rhigh L=leff W=weff m=m ++a1=a a2=a ++p1=p p2=p ++c1=1 c2=1 ++trise=trise ++sw_et=1 ++sw_mman=1 ++nsmm_rsh='gauss(1, 1, 1)' ; number of standard deviations for rsh ++nsmm_w='gauss(1, 1, 1)' ; number of standard deviations for w ++nsmm_l='gauss(1, 1, 1)' ; number of standard deviations for l + +R2 2 3 R=res_rzspec TC1=-2300e-6 TC2=2.1e-6 m=m + +.model rmod_rhigh r3_cmc ++rsh=rsh_rhigh ++ecrit=1000 ++dfinf=1e-4 ++dp=1000 ++xw=-0.04 ++rc=rz ++ca=cax ++cp=cpx ++tc1=-2300e-6 ++tc2=2.1e-6 ++tc1rc=-2300e-6 ++tc2rc=2.1e-6 ++gth0=1e-12 ++gtha=6e-6 ++gthp=2e-6 ++gthc=1e-12 ++cth0=0 ++cthp=0 ++ctha=594e-15 ++cthc=0 ++kfn=5.205e-10 ++afn=1.935 ++bfn=0.9086 ++smm_rsh=5 ; relative standard deviation for rsh [%] ++smm_w=0.01 ; absolute standard deviation for w [um] ++smm_l=0.01 ; absolute standard deviation for l [um] + +.ends rhigh + +.subckt rppd 1 3 +.param w=0.5e-6 l=0.5e-6 b=0 ps=0.18e-6 trise=0 m=1 sw_et=0 ++postsim=0 ++kappa=1.85 ++weff=w+0.006e-6 ++leff=(b+1)*l+(2/kappa*weff+ps)*b ++lhead=0.86e-6 ++rzspec=35e-6 ++res_rzspec=2*rzspec/w ++cax=90e-18 ++cpx=25e-18 ++ax=175e-18*(1-1/(1.5*leff*1e6+1))/cax ++px=115e-18/cpx ++a0=0.5*(leff+lhead)*w-(postsim>0)*w*ax*1e-6 ++a=(a0>0)*a0 ++p0=leff+lhead+w-(postsim>0)*px*1e-6 ++p=(p0>0)*p0 ++rqrc=4.5e-6 ++rz=rzspec/w*rsh_rppd-(postsim>0)*rqrc/w + +NR1 1 2 0 dt res_rppd L=leff W=weff m=m ++a1=a a2=a ++p1=p p2=p ++c1=1 c2=1 ++trise=trise ++sw_et=sw_et ++sw_mman=1 ++nsmm_rsh='gauss(1, 1, 1)' ; number of standard deviations for rsh ++nsmm_w='gauss(1, 1, 1)' ; number of standard deviations for w ++nsmm_l='gauss(1, 1, 1)' ; number of standard deviations for l + +R2 2 3 R=res_rzspec TC1=-950e-6 m=m + +.model res_rppd r3_cmc ++rsh=rsh_rppd ++ecrit=1000 ++dfinf=1e-4 ++dp=1000 ++xw=0.006 ++rc=rz ++ca=cax ++cp=cpx ++tc1=170e-6 ++tc2=0.4e-6 ++tc1rc=-950e-6 ++gth0=1e-12 ++gtha=6e-6 ++gthp=2e-6 ++gthc=1e-12 ++cth0=0 ++cthp=0 ++ctha=594e-15 ++cthc=0 ++kfn=4.601e-11 ++afn=1.886 ++bfn=0.9963 ++smm_rsh=1.5 ; relative standard deviation for rsh [%] ++smm_w=0.01 ; absolute standard deviation for w [um] ++smm_l=0.01 ; absolute standard deviation for l [um] + +.ends rppd diff --git a/ihp-sg13g2/libs.tech/ngspice/models/resistors_parm.lib b/ihp-sg13g2/libs.tech/ngspice/models/resistors_parm.lib deleted file mode 100644 index d1a999ff..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/models/resistors_parm.lib +++ /dev/null @@ -1,23 +0,0 @@ -*####################################################################### -* -* Copyright 2023 IHP PDK Authors -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* https://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -*distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*####################################################################### - -.MODEL res_rsil R (DEFW=0.5e-6 RSH=rsh_rsil TC1=3100e-6 TC2=0.3e-6 KF=2.812e-12 AF=1.607 EF=1.267) - -.MODEL res_rhigh R (DEFW=1e-6 RSH=rsh_rhigh TC1=-2300e-6 TC2=2.1e-6 KF=5.205e-10 AF=1.935 EF=0.9086) - -.MODEL res_rppd R (DEFW=0.5e-6 RSH=rsh_rppd TC1=170e-6 TC2=0.4e-6 KF=4.601e-11 AF=1.886 EF=0.9963) diff --git a/ihp-sg13g2/libs.tech/ngspice/models/resistors_stat.lib b/ihp-sg13g2/libs.tech/ngspice/models/resistors_stat.lib index 80ea6c6b..055acd45 100644 --- a/ihp-sg13g2/libs.tech/ngspice/models/resistors_stat.lib +++ b/ihp-sg13g2/libs.tech/ngspice/models/resistors_stat.lib @@ -17,8 +17,8 @@ *####################################################################### * ngspice MC parameters -.param rsh_rhigh = 'gauss(rsh_rhigh_norm, 0.0833, mc_ok)' -.param rsh_rsil = 'gauss(rsh_rsil_norm, 0.0467, mc_ok)' -.param rsh_rppd = 'gauss(rsh_rppd_norm, 0.033, mc_ok)' -.param res_area = 'gauss(res_area_norm, 0.033, mc_ok)' -.param res_rpara = 'gauss(res_rpara_norm, 0.067, mc_ok)' +.param rsh_rhigh = 'gauss(rsh_rhigh_norm, 0.0833, 1)' +.param rsh_rsil = 'gauss(rsh_rsil_norm, 0.0467, 1)' +.param rsh_rppd = 'gauss(rsh_rppd_norm, 0.033, 1)' +.param res_area = 'gauss(res_area_norm, 0.033, 1)' +.param res_rpara = 'gauss(res_rpara_norm, 0.067, 1)' diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/Common103_macrodefs.include b/ihp-sg13g2/libs.tech/ngspice/openvaf/Common103_macrodefs.include deleted file mode 100644 index 23f5cd85..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/Common103_macrodefs.include +++ /dev/null @@ -1,168 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: Common103_macrodefs.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and -// 2004-2011 Arizona State University Licensed under the Educational Community License, -// Version 2.0 (the "License"); you may not use this file except in compliance with the -// License. You may obtain a copy of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 103.6.0 (PSP), 200.5.0 (JUNCAP), December 2017 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - -////////////////////////////////////////////////////////////// -// -// General macros and constants for compact va-models -// -////////////////////////////////////////////////////////////// - -// Clipping functions -`define CLIP_LOW(val,min) ((val)>(min)?(val):(min)) -`define CLIP_HIGH(val,max) ((val)<(max)?(val):(max)) -`define CLIP_BOTH(val,min,max) ((val)>(min)?((val)<(max)?(val):(max)):(min)) - -// Min/Max functions -`define MAX(x,y) ((x)>(y)?(x):(y)) -`define MIN(x,y) ((x)<(y)?(x):(y)) - -// Mathematical constants -`define PI 3.1415926535897931 -`define SQRTPI 1.77245385090551603 - -// Physical constants -`define KELVINCONVERSION 273.15 -`define KBOL 1.3806505E-23 -`define QELE 1.6021918E-19 -`define HBAR 1.05457168E-34 -`define MELE 9.1093826E-31 -`define EPSO 8.8541878176E-12 -`define EPSRSI 11.8 - -// Other constants -`define oneThird 3.3333333333333333e-01 -`define twoThirds 6.6666666666666667e-01 - -// Constants needed in safe exponential function (called "expl") -`define se 4.6051701859880916e+02 -`define se05 2.3025850929940458e+02 -`define ke 1.0e-200 -`define ke05 1.0e-100 -`define keinv 1.0e200 -`define ke05inv 1.0e100 - -// P3 3rd order polynomial expansion of exp() -`define P3(u) (1.0 + (u) * (1.0 + 0.5 * ((u) * (1.0 + (u) * `oneThird)))) - -// expl exp() with 3rd order polynomial extrapolation for very low values (exp_low), -// very high values (exp_high), or both (expl) -`define expl(x, res) \ -if (abs(x) < `se05) begin\ - res = exp(x); \ -end else begin \ - if ((x) < 0.0) begin\ - res = `ke05 / `P3(-`se05 - (x)); \ - end else begin\ - res = `ke05inv * `P3((x) - `se05); \ - end \ -end - -`define expl_low(x, res) \ -if ((x) > -`se05) begin\ - res = exp(x); \ -end else begin\ - res = `ke05 / `P3(-`se05 - (x)); \ -end - -`define expl_high(x, res) \ -if ((x) < `se05) begin\ - res = exp(x); \ -end else begin \ - res = `ke05inv * `P3((x) - `se05); \ -end - -// Exchange function -`define swap(a, b) \ -temp = a; \ -a = b; \ -b = temp; - -// Parameter definition macros: "des" description argument is intended to -// be a short description, the "inf" information argument is intended to be -// a detailed description (e.g. for display as part of on-line help). -// -// MPR model parameter real -// MPI model parameter integer -// IPR instance parameter real -// IPI instance parameter integer -// OPP operating point parameter, includes units and description for printing -// OPM operating point parameter, scales with $mfactor -// OPD operating point parameter, scales with 1/$mfactor -// -// Instance parameters have the attribute *type="instance"* and note that -// compilers treat these as both instance and model parameters, with a -// specified instance value taking precedence over a specified model card value. -// -// There are some issues with passing range directives with some compilers, -// so for each parameter declaration there are multiple versions: -// cc closed lower bound, closed upper bound -// co closed lower bound, open upper bound -// cz closed lower bound of zero (no upper bound) -// oc open lower bound, closed upper bound -// oo open lower bound, open upper bound -// oz open lower bound of zero (no upper bound) -// nb no bounds -// sw switch (integer only, values 0=false and >0=true) -// ty switch (integer only, values -1=n-type and +1=p-type) -// - -`define ALIAS(alias,paramName) aliasparam alias = paramName; -`define OPP(nam,uni,des) (*units=uni, desc=des*) real nam; -`define OPM(nam,uni,des) (*units=uni, multiplicity="multiply", desc=des*) real nam; -`define OPD(nam,uni,des) (*units=uni, multiplicity="divide", desc=des*) real nam; -`define MPRcc(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter real nam=def from[lwr:upr]; -`define MPRco(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter real nam=def from[lwr:upr); -`define MPRcz(nam,def,uni, des) (*units=uni , desc=des*) parameter real nam=def from[ 0:inf); -`define MPRoc(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter real nam=def from(lwr:upr]; -`define MPRoo(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter real nam=def from(lwr:upr); -`define MPRoz(nam,def,uni, des) (*units=uni , desc=des*) parameter real nam=def from( 0:inf); -`define MPRnb(nam,def,uni, des) (*units=uni , desc=des*) parameter real nam=def; -`define MPIcc(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter integer nam=def from[lwr:upr]; -`define MPIco(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter integer nam=def from[lwr:upr); -`define MPIcz(nam,def,uni, des) (*units=uni , desc=des*) parameter integer nam=def from[ 0:inf); -`define MPIoc(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter integer nam=def from(lwr:upr]; -`define MPIoo(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter integer nam=def from(lwr:upr); -`define MPIoz(nam,def,uni, des) (*units=uni , desc=des*) parameter integer nam=def from( 0:inf); -`define MPInb(nam,def,uni, des) (*units=uni , desc=des*) parameter integer nam=def; -`define MPIsw(nam,def,uni, des) (*units=uni , desc=des*) parameter integer nam=def from[ 0:inf); -`define MPIty(nam,def,uni, des) (*units=uni , desc=des*) parameter integer nam=def from[ -1: 1] exclude 0; -`define IPRcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr]; -`define IPRco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr); -`define IPRcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[ 0:inf); -`define IPRoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr]; -`define IPRoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr); -`define IPRoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from( 0:inf); -`define IPRnb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def; -`define IPIcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr]; -`define IPIco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr); -`define IPIcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[ 0:inf); -`define IPIoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr]; -`define IPIoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr); -`define IPIoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from( 0:inf); -`define IPInb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def; -`define IPIsw(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[ 0:inf); diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_InitModel.include b/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_InitModel.include deleted file mode 100644 index ba5d6177..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_InitModel.include +++ /dev/null @@ -1,406 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: JUNCAP200_InitModel.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA) and 2012-2015 Delft University of Technology -// Licensed under the Educational Community License, Version 2.0 (the "License"); you -// may not use this file except in compliance with the License. You may obtain a copy -// of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 200.5.0, August 2016 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - - // -------------------------------------------------------------------------------------------------------------- - // Calculation of internal parameters which are independent on instance parameters - // -------------------------------------------------------------------------------------------------------------- - - TRJ_i = `CLIP_LOW( TRJ ,`TRJ_cliplow); - IMAX_i = `CLIP_LOW( IMAX ,`IMAX_cliplow); - FREV_i = `CLIP_BOTH(FREV ,`FREV_cliplow,`FREV_cliphigh); - - CJORBOT_i = `CLIP_LOW( CJORBOT ,`CJORBOT_cliplow); - CJORSTI_i = `CLIP_LOW( CJORSTI ,`CJORSTI_cliplow); - CJORGAT_i = `CLIP_LOW( CJORGAT ,`CJORGAT_cliplow); - VBIRBOT_i = `CLIP_LOW( VBIRBOT ,`VBIR_cliplow); - VBIRSTI_i = `CLIP_LOW( VBIRSTI ,`VBIR_cliplow); - VBIRGAT_i = `CLIP_LOW( VBIRGAT ,`VBIR_cliplow); - PBOT_i = `CLIP_BOTH(PBOT ,`P_cliplow,`P_cliphigh); - PSTI_i = `CLIP_BOTH(PSTI ,`P_cliplow,`P_cliphigh); - PGAT_i = `CLIP_BOTH(PGAT ,`P_cliplow,`P_cliphigh); - PHIGBOT_i = PHIGBOT; - PHIGSTI_i = PHIGSTI; - PHIGGAT_i = PHIGGAT; - IDSATRBOT_i = `CLIP_LOW( IDSATRBOT ,`IDSATR_cliplow); - IDSATRSTI_i = `CLIP_LOW( IDSATRSTI ,`IDSATR_cliplow); - IDSATRGAT_i = `CLIP_LOW( IDSATRGAT ,`IDSATR_cliplow); - CSRHBOT_i = `CLIP_LOW( CSRHBOT ,`CSRH_cliplow); - CSRHSTI_i = `CLIP_LOW( CSRHSTI ,`CSRH_cliplow); - CSRHGAT_i = `CLIP_LOW( CSRHGAT ,`CSRH_cliplow); - XJUNSTI_i = `CLIP_LOW( XJUNSTI ,`XJUN_cliplow); - XJUNGAT_i = `CLIP_LOW( XJUNGAT ,`XJUN_cliplow); - CTATBOT_i = `CLIP_LOW( CTATBOT ,`CTAT_cliplow); - CTATSTI_i = `CLIP_LOW( CTATSTI ,`CTAT_cliplow); - CTATGAT_i = `CLIP_LOW( CTATGAT ,`CTAT_cliplow); - MEFFTATBOT_i = `CLIP_LOW( MEFFTATBOT ,`MEFFTAT_cliplow); - MEFFTATSTI_i = `CLIP_LOW( MEFFTATSTI ,`MEFFTAT_cliplow); - MEFFTATGAT_i = `CLIP_LOW( MEFFTATGAT ,`MEFFTAT_cliplow); - CBBTBOT_i = `CLIP_LOW( CBBTBOT ,`CBBT_cliplow); - CBBTSTI_i = `CLIP_LOW( CBBTSTI ,`CBBT_cliplow); - CBBTGAT_i = `CLIP_LOW( CBBTGAT ,`CBBT_cliplow); - FBBTRBOT_i = FBBTRBOT; - FBBTRSTI_i = FBBTRSTI; - FBBTRGAT_i = FBBTRGAT; - STFBBTBOT_i = STFBBTBOT; - STFBBTSTI_i = STFBBTSTI; - STFBBTGAT_i = STFBBTGAT; - VBRBOT_i = `CLIP_LOW( VBRBOT ,`VBR_cliplow); - VBRSTI_i = `CLIP_LOW( VBRSTI ,`VBR_cliplow); - VBRGAT_i = `CLIP_LOW( VBRGAT ,`VBR_cliplow); - PBRBOT_i = `CLIP_LOW( PBRBOT ,`PBR_cliplow); - PBRSTI_i = `CLIP_LOW( PBRSTI ,`PBR_cliplow); - PBRGAT_i = `CLIP_LOW( PBRGAT ,`PBR_cliplow); - - SWJUNEXP_i = 0.0; - if (SWJUNEXP > 0.5) begin - SWJUNEXP_i = 1.0; - end else begin - SWJUNEXP_i = 0.0; - end - - VJUNREF_i = `CLIP_LOW( VJUNREF ,`VJUNREF_cliplow); - FJUNQ_i = `CLIP_LOW( FJUNQ ,`FJUNQ_cliplow); - - `ifdef JUNCAP_StandAlone - // do nothing - `else // JUNCAP_StandAlone - if (SWJUNASYM == 0.0) begin - CJORBOTD_i = CJORBOT_i; - CJORSTID_i = CJORSTI_i; - CJORGATD_i = CJORGAT_i; - VBIRBOTD_i = VBIRBOT_i; - VBIRSTID_i = VBIRSTI_i; - VBIRGATD_i = VBIRGAT_i; - PBOTD_i = PBOT_i; - PSTID_i = PSTI_i; - PGATD_i = PGAT_i; - PHIGBOTD_i = PHIGBOT_i; - PHIGSTID_i = PHIGSTI_i; - PHIGGATD_i = PHIGGAT_i; - IDSATRBOTD_i = IDSATRBOT_i; - IDSATRSTID_i = IDSATRSTI_i; - IDSATRGATD_i = IDSATRGAT_i; - CSRHBOTD_i = CSRHBOT_i; - CSRHSTID_i = CSRHSTI_i; - CSRHGATD_i = CSRHGAT_i; - XJUNSTID_i = XJUNSTI_i; - XJUNGATD_i = XJUNGAT_i; - CTATBOTD_i = CTATBOT_i; - CTATSTID_i = CTATSTI_i; - CTATGATD_i = CTATGAT_i; - MEFFTATBOTD_i = MEFFTATBOT_i; - MEFFTATSTID_i = MEFFTATSTI_i; - MEFFTATGATD_i = MEFFTATGAT_i; - CBBTBOTD_i = CBBTBOT_i; - CBBTSTID_i = CBBTSTI_i; - CBBTGATD_i = CBBTGAT_i; - FBBTRBOTD_i = FBBTRBOT_i; - FBBTRSTID_i = FBBTRSTI_i; - FBBTRGATD_i = FBBTRGAT_i; - STFBBTBOTD_i = STFBBTBOT_i; - STFBBTSTID_i = STFBBTSTI_i; - STFBBTGATD_i = STFBBTGAT_i; - VBRBOTD_i = VBRBOT_i; - VBRSTID_i = VBRSTI_i; - VBRGATD_i = VBRGAT_i; - PBRBOTD_i = PBRBOT_i; - PBRSTID_i = PBRSTI_i; - PBRGATD_i = PBRGAT_i; - VJUNREFD_i = VJUNREF_i; - FJUNQD_i = FJUNQ_i; - end else begin - CJORBOTD_i = `CLIP_LOW( CJORBOTD ,`CJORBOT_cliplow); - CJORSTID_i = `CLIP_LOW( CJORSTID ,`CJORSTI_cliplow); - CJORGATD_i = `CLIP_LOW( CJORGATD ,`CJORGAT_cliplow); - VBIRBOTD_i = `CLIP_LOW( VBIRBOTD ,`VBIR_cliplow); - VBIRSTID_i = `CLIP_LOW( VBIRSTID ,`VBIR_cliplow); - VBIRGATD_i = `CLIP_LOW( VBIRGATD ,`VBIR_cliplow); - PBOTD_i = `CLIP_BOTH(PBOTD ,`P_cliplow,`P_cliphigh); - PSTID_i = `CLIP_BOTH(PSTID ,`P_cliplow,`P_cliphigh); - PGATD_i = `CLIP_BOTH(PGATD ,`P_cliplow,`P_cliphigh); - PHIGBOTD_i = PHIGBOTD; - PHIGSTID_i = PHIGSTID; - PHIGGATD_i = PHIGGATD; - IDSATRBOTD_i = `CLIP_LOW( IDSATRBOTD ,`IDSATR_cliplow); - IDSATRSTID_i = `CLIP_LOW( IDSATRSTID ,`IDSATR_cliplow); - IDSATRGATD_i = `CLIP_LOW( IDSATRGATD ,`IDSATR_cliplow); - CSRHBOTD_i = `CLIP_LOW( CSRHBOTD ,`CSRH_cliplow); - CSRHSTID_i = `CLIP_LOW( CSRHSTID ,`CSRH_cliplow); - CSRHGATD_i = `CLIP_LOW( CSRHGATD ,`CSRH_cliplow); - XJUNSTID_i = `CLIP_LOW( XJUNSTID ,`XJUN_cliplow); - XJUNGATD_i = `CLIP_LOW( XJUNGATD ,`XJUN_cliplow); - CTATBOTD_i = `CLIP_LOW( CTATBOTD ,`CTAT_cliplow); - CTATSTID_i = `CLIP_LOW( CTATSTID ,`CTAT_cliplow); - CTATGATD_i = `CLIP_LOW( CTATGATD ,`CTAT_cliplow); - MEFFTATBOTD_i = `CLIP_LOW( MEFFTATBOTD,`MEFFTAT_cliplow); - MEFFTATSTID_i = `CLIP_LOW( MEFFTATSTID,`MEFFTAT_cliplow); - MEFFTATGATD_i = `CLIP_LOW( MEFFTATGATD,`MEFFTAT_cliplow); - CBBTBOTD_i = `CLIP_LOW( CBBTBOTD ,`CBBT_cliplow); - CBBTSTID_i = `CLIP_LOW( CBBTSTID ,`CBBT_cliplow); - CBBTGATD_i = `CLIP_LOW( CBBTGATD ,`CBBT_cliplow); - FBBTRBOTD_i = FBBTRBOTD; - FBBTRSTID_i = FBBTRSTID; - FBBTRGATD_i = FBBTRGATD; - STFBBTBOTD_i = STFBBTBOTD; - STFBBTSTID_i = STFBBTSTID; - STFBBTGATD_i = STFBBTGATD; - VBRBOTD_i = `CLIP_LOW( VBRBOTD ,`VBR_cliplow); - VBRSTID_i = `CLIP_LOW( VBRSTID ,`VBR_cliplow); - VBRGATD_i = `CLIP_LOW( VBRGATD ,`VBR_cliplow); - PBRBOTD_i = `CLIP_LOW( PBRBOTD ,`PBR_cliplow); - PBRSTID_i = `CLIP_LOW( PBRSTID ,`PBR_cliplow); - PBRGATD_i = `CLIP_LOW( PBRGATD ,`PBR_cliplow); - VJUNREFD_i = `CLIP_LOW( VJUNREFD ,`VJUNREF_cliplow); - FJUNQD_i = `CLIP_LOW( FJUNQD ,`FJUNQ_cliplow); - end - `endif // JUNCAP_StandAlone - - tkr = `KELVINCONVERSION + TRJ_i; - tkd = max($temperature + DTA, `KELVINCONVERSION + `MINTEMP); - auxt = tkd / tkr; - KBOL_over_QELE = `KBOL / `QELE; - phitr = KBOL_over_QELE * tkr; - phitrinv = 1.0 / phitr; - phitd = KBOL_over_QELE * tkd; - phitdinv = 1.0 / phitd; - - // bandgap voltages at reference temperature - deltaphigr = -(7.02e-4 * tkr * tkr) / (1108.0 + tkr); - phigrbot = PHIGBOT_i + deltaphigr; - phigrsti = PHIGSTI_i + deltaphigr; - phigrgat = PHIGGAT_i + deltaphigr; - - // bandgap voltages at device temperature - deltaphigd = -(7.02e-4 * tkd * tkd) / (1108.0 + tkd); - phigdbot = PHIGBOT_i + deltaphigd; - phigdsti = PHIGSTI_i + deltaphigd; - phigdgat = PHIGGAT_i + deltaphigd; - - // factors ftd for ideal-current model - ftdbot = (pow(auxt, 1.5)) * exp(0.5 * ((phigrbot * phitrinv) - (phigdbot * phitdinv))); - ftdsti = (pow(auxt, 1.5)) * exp(0.5 * ((phigrsti * phitrinv) - (phigdsti * phitdinv))); - ftdgat = (pow(auxt, 1.5)) * exp(0.5 * ((phigrgat * phitrinv) - (phigdgat * phitdinv))); - - // temperature-scaled saturation current for ideal-current model - idsatbot = IDSATRBOT_i * ftdbot * ftdbot; - idsatsti = IDSATRSTI_i * ftdsti * ftdsti; - idsatgat = IDSATRGAT_i * ftdgat * ftdgat; - - // built-in voltages before limiting - ubibot = VBIRBOT_i * auxt - 2.0 * phitd * ln(ftdbot); - ubisti = VBIRSTI_i * auxt - 2.0 * phitd * ln(ftdsti); - ubigat = VBIRGAT_i * auxt - 2.0 * phitd * ln(ftdgat); - - // built-in voltages limited to phitd - vbibot = ubibot + phitd * ln(1 + exp((`vbilow - ubibot) * phitdinv)); - vbisti = ubisti + phitd * ln(1 + exp((`vbilow - ubisti) * phitdinv)); - vbigat = ubigat + phitd * ln(1 + exp((`vbilow - ubigat) * phitdinv)); - - // inverse values of built-in voltages - vbiinvbot = 1.0 / vbibot; - vbiinvsti = 1.0 / vbisti; - vbiinvgat = 1.0 / vbigat; - - // one minus the grading coefficient - one_minus_PBOT = 1.0 - PBOT_i; - one_minus_PSTI = 1.0 - PSTI_i; - one_minus_PGAT = 1.0 - PGAT_i; - - // one over "one minus the grading coefficient" - one_over_one_minus_PBOT = 1.0 / one_minus_PBOT; - one_over_one_minus_PSTI = 1.0 / one_minus_PSTI; - one_over_one_minus_PGAT = 1.0 / one_minus_PGAT; - - // temperature-scaled zero-bias capacitance - cjobot = CJORBOT_i * pow((VBIRBOT_i * vbiinvbot), PBOT_i); - cjosti = CJORSTI_i * pow((VBIRSTI_i * vbiinvsti), PSTI_i); - cjogat = CJORGAT_i * pow((VBIRGAT_i * vbiinvgat), PGAT_i); - - // prefactor in physical part of charge model - qprefbot = cjobot * vbibot * one_over_one_minus_PBOT; - qprefsti = cjosti * vbisti * one_over_one_minus_PSTI; - qprefgat = cjogat * vbigat * one_over_one_minus_PGAT; - - // prefactor in mathematical extension of charge model - qpref2bot = `a * cjobot; - qpref2sti = `a * cjosti; - qpref2gat = `a * cjogat; - - // zero-bias depletion widths at reference temperature, needed in SRH and TAT model - wdepnulrbot = EPSSI / CJORBOT_i; - wdepnulrsti = XJUNSTI_i * EPSSI / CJORSTI_i; - wdepnulrgat = XJUNGAT_i * EPSSI / CJORGAT_i; - - // inverse values of "wdepnulr", used in BBT model - wdepnulrinvbot = 1.0 / wdepnulrbot; - wdepnulrinvsti = 1.0 / wdepnulrsti; - wdepnulrinvgat = 1.0 / wdepnulrgat; - - // inverse values of built-in voltages at reference temperature, needed in SRH and BBT model - VBIRBOTinv = 1.0 / VBIRBOT_i; - VBIRSTIinv = 1.0 / VBIRSTI_i; - VBIRGATinv = 1.0 / VBIRGAT_i; - - // some constants needed in erfc-approximation, needed in TAT model - perfc = (`SQRTPI * `aerfc); - berfc = ((-5.0 * (`aerfc) + 6.0 - pow((perfc), -2.0)) / 3.0); - cerfc = (1.0 - (`aerfc) - (berfc)); - - // half the bandgap energy, limited to values > phitd, needed in TAT model - deltaEbot = max(0.5 * phigdbot, phitd); - deltaEsti = max(0.5 * phigdsti, phitd); - deltaEgat = max(0.5 * phigdgat, phitd); - - // values of atat, needed in TAT model - atatbot = deltaEbot * phitdinv; - atatsti = deltaEsti * phitdinv; - atatgat = deltaEgat * phitdinv; - - // values of btatpart, needed in TAT model - btatpartbot = sqrt(32.0 * MEFFTATBOT_i * `MELE * `QELE * (deltaEbot * deltaEbot * deltaEbot)) / (3.0 * `HBAR); - btatpartsti = sqrt(32.0 * MEFFTATSTI_i * `MELE * `QELE * (deltaEsti * deltaEsti * deltaEsti)) / (3.0 * `HBAR); - btatpartgat = sqrt(32.0 * MEFFTATGAT_i * `MELE * `QELE * (deltaEgat * deltaEgat * deltaEgat)) / (3.0 * `HBAR); - - // temperature-scaled values of FBBT, needed in BBT model - fbbtbot = FBBTRBOT_i * (1.0 + STFBBTBOT_i * (tkd - tkr)); - fbbtsti = FBBTRSTI_i * (1.0 + STFBBTSTI_i * (tkd - tkr)); - fbbtgat = FBBTRGAT_i * (1.0 + STFBBTGAT_i * (tkd - tkr)); - fbbtbot = `CLIP_LOW(fbbtbot, 0.0); - fbbtsti = `CLIP_LOW(fbbtsti, 0.0); - fbbtgat = `CLIP_LOW(fbbtgat, 0.0); - - // values of fstop, needed in avalanche/breakdown model - alphaav = 1.0 - 1.0 / FREV_i; - fstopbot = 1.0 / (1.0 - pow(alphaav, PBRBOT_i)); - fstopsti = 1.0 / (1.0 - pow(alphaav, PBRSTI_i)); - fstopgat = 1.0 / (1.0 - pow(alphaav, PBRGAT_i)); - - // inverse values of breakdown voltages, needed in avalanche/breakdown model - VBRinvbot = 1.0 / VBRBOT_i; - VBRinvsti = 1.0 / VBRSTI_i; - VBRinvgat = 1.0 / VBRGAT_i; - - // slopes for linear extrapolation close to and beyond breakdown, needed in avalanche/breakdown model - slopebot = -(fstopbot * fstopbot * pow(alphaav, (PBRBOT_i - 1.0))) * PBRBOT_i * VBRinvbot; - slopesti = -(fstopsti * fstopsti * pow(alphaav, (PBRSTI_i - 1.0))) * PBRSTI_i * VBRinvsti; - slopegat = -(fstopgat * fstopgat * pow(alphaav, (PBRGAT_i - 1.0))) * PBRGAT_i * VBRinvgat; - - `ifdef JUNCAP_StandAlone - // do nothing - `else // JUNCAP_StandAlone - phigrbot_d = PHIGBOTD_i + deltaphigr; - phigrsti_d = PHIGSTID_i + deltaphigr; - phigrgat_d = PHIGGATD_i + deltaphigr; - - phigdbot_d = PHIGBOTD_i + deltaphigd; - phigdsti_d = PHIGSTID_i + deltaphigd; - phigdgat_d = PHIGGATD_i + deltaphigd; - - ftdbot_d = (pow(auxt, 1.5)) * exp(0.5 * ((phigrbot_d * phitrinv) - (phigdbot_d * phitdinv))); - ftdsti_d = (pow(auxt, 1.5)) * exp(0.5 * ((phigrsti_d * phitrinv) - (phigdsti_d * phitdinv))); - ftdgat_d = (pow(auxt, 1.5)) * exp(0.5 * ((phigrgat_d * phitrinv) - (phigdgat_d * phitdinv))); - - idsatbot_d = IDSATRBOTD_i * ftdbot_d * ftdbot_d; - idsatsti_d = IDSATRSTID_i * ftdsti_d * ftdsti_d; - idsatgat_d = IDSATRGATD_i * ftdgat_d * ftdgat_d; - - ubibot_d = VBIRBOTD_i * auxt - 2.0 * phitd * ln(ftdbot_d); - ubisti_d = VBIRSTID_i * auxt - 2.0 * phitd * ln(ftdsti_d); - ubigat_d = VBIRGATD_i * auxt - 2.0 * phitd * ln(ftdgat_d); - - vbibot_d = ubibot_d + phitd * ln(1.0 + exp((`vbilow - ubibot_d) * phitdinv)); - vbisti_d = ubisti_d + phitd * ln(1.0 + exp((`vbilow - ubisti_d) * phitdinv)); - vbigat_d = ubigat_d + phitd * ln(1.0 + exp((`vbilow - ubigat_d) * phitdinv)); - - vbiinvbot_d = 1.0 / vbibot_d; - vbiinvsti_d = 1.0 / vbisti_d; - vbiinvgat_d = 1.0 / vbigat_d; - - one_minus_PBOT_d = 1.0 - PBOTD_i; - one_minus_PSTI_d = 1.0 - PSTID_i; - one_minus_PGAT_d = 1.0 - PGATD_i; - - one_over_one_minus_PBOT_d = 1.0 / one_minus_PBOT_d; - one_over_one_minus_PSTI_d = 1.0 / one_minus_PSTI_d; - one_over_one_minus_PGAT_d = 1.0 / one_minus_PGAT_d; - - cjobot_d = CJORBOTD_i * pow((VBIRBOTD_i * vbiinvbot_d), PBOTD_i); - cjosti_d = CJORSTID_i * pow((VBIRSTID_i * vbiinvsti_d), PSTID_i); - cjogat_d = CJORGATD_i * pow((VBIRGATD_i * vbiinvgat_d), PGATD_i); - - qprefbot_d = cjobot_d * vbibot_d * one_over_one_minus_PBOT_d; - qprefsti_d = cjosti_d * vbisti_d * one_over_one_minus_PSTI_d; - qprefgat_d = cjogat_d * vbigat_d * one_over_one_minus_PGAT_d; - - qpref2bot_d = `a * cjobot_d; - qpref2sti_d = `a * cjosti_d; - qpref2gat_d = `a * cjogat_d; - - wdepnulrbot_d = EPSSI / CJORBOTD_i; - wdepnulrsti_d = XJUNSTID_i * EPSSI / CJORSTID_i; - wdepnulrgat_d = XJUNGATD_i * EPSSI / CJORGATD_i; - - wdepnulrinvbot_d = 1.0 / wdepnulrbot_d; - wdepnulrinvsti_d = 1.0 / wdepnulrsti_d; - wdepnulrinvgat_d = 1.0 / wdepnulrgat_d; - - VBIRBOTinv_d = 1.0 / VBIRBOTD_i; - VBIRSTIinv_d = 1.0 / VBIRSTID_i; - VBIRGATinv_d = 1.0 / VBIRGATD_i; - - deltaEbot_d = max(0.5 * phigdbot_d, phitd); - deltaEsti_d = max(0.5 * phigdsti_d, phitd); - deltaEgat_d = max(0.5 * phigdgat_d, phitd); - - atatbot_d = deltaEbot_d * phitdinv; - atatsti_d = deltaEsti_d * phitdinv; - atatgat_d = deltaEgat_d * phitdinv; - - btatpartbot_d = sqrt(32.0 * MEFFTATBOTD_i * `MELE * `QELE * (deltaEbot_d * deltaEbot_d * deltaEbot_d)) / (3.0 * `HBAR); - btatpartsti_d = sqrt(32.0 * MEFFTATSTID_i * `MELE * `QELE * (deltaEsti_d * deltaEsti_d * deltaEsti_d)) / (3.0 * `HBAR); - btatpartgat_d = sqrt(32.0 * MEFFTATGATD_i * `MELE * `QELE * (deltaEgat_d * deltaEgat_d * deltaEgat_d)) / (3.0 * `HBAR); - - fbbtbot_d = FBBTRBOTD_i * (1.0 + STFBBTBOTD_i * (tkd - tkr)); - fbbtsti_d = FBBTRSTID_i * (1.0 + STFBBTSTID_i * (tkd - tkr)); - fbbtgat_d = FBBTRGATD_i * (1.0 + STFBBTGATD_i * (tkd - tkr)); - fbbtbot_d = `CLIP_LOW(fbbtbot_d, 0.0); - fbbtsti_d = `CLIP_LOW(fbbtsti_d, 0.0); - fbbtgat_d = `CLIP_LOW(fbbtgat_d, 0.0); - - fstopbot_d = 1.0 / (1.0 - pow(alphaav, PBRBOTD_i)); - fstopsti_d = 1.0 / (1.0 - pow(alphaav, PBRSTID_i)); - fstopgat_d = 1.0 / (1.0 - pow(alphaav, PBRGATD_i)); - - VBRinvbot_d = 1.0 / VBRBOTD_i; - VBRinvsti_d = 1.0 / VBRSTID_i; - VBRinvgat_d = 1.0 / VBRGATD_i; - - slopebot_d = -(fstopbot_d * fstopbot_d * pow(alphaav, (PBRBOTD_i - 1.0))) * PBRBOTD_i * VBRinvbot_d; - slopesti_d = -(fstopsti_d * fstopsti_d * pow(alphaav, (PBRSTID_i - 1.0))) * PBRSTID_i * VBRinvsti_d; - slopegat_d = -(fstopgat_d * fstopgat_d * pow(alphaav, (PBRGATD_i - 1.0))) * PBRGATD_i * VBRinvgat_d; - `endif // JUNCAP_StandAlone diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_macrodefs.include b/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_macrodefs.include deleted file mode 100644 index 42e4a1ae..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_macrodefs.include +++ /dev/null @@ -1,471 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: JUNCAP200_macrodefs.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA) and 2012-2015 Delft University of Technology -// Licensed under the Educational Community License, Version 2.0 (the "License"); you -// may not use this file except in compliance with the License. You may obtain a copy -// of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 200.5.0, August 2016 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - -/////////////////////////////////////////// -// -// Macros and constants used in JUNCAP2 -// -/////////////////////////////////////////// - -// Other constants -`define MINTEMP -2.5e2 -`define vbilow 5.0e-2 -`define a 2.0 -`define epsch 0.1 -`define dvbi 5.0e-2 -`define epsav 1.0e-6 -`define vbrmax 1.0e3 -`define vmaxlarge 1.0e8 -`define aerfc 0.29214664 -`define twothirds 0.666666666666667 - -// Clipping values -`define levelnumber 2.0e2 -`define AB_cliplow 0.0 -`define LS_cliplow 0.0 -`define LG_cliplow 0.0 -`define MULT_cliplow 0.0 -`define TRJ_cliplow `MINTEMP -`define IMAX_cliplow 1.0e-12 -`define FREV_cliplow 1.0e1 -`define FREV_cliphigh 1.0e10 -`define CJORBOT_cliplow 1.0e-12 -`define CJORSTI_cliplow 1.0e-18 -`define CJORGAT_cliplow 1.0e-18 -`define VBIR_cliplow `vbilow -`define P_cliplow 5.0e-2 -`define P_cliphigh 0.95 -`define IDSATR_cliplow 0.0 -`define CSRH_cliplow 0.0 -`define XJUN_cliplow 1.0e-9 -`define CTAT_cliplow 0.0 -`define MEFFTAT_cliplow 1.0e-2 -`define CBBT_cliplow 0.0 -`define VBR_cliplow 0.1 -`define PBR_cliplow 0.1 -`define VJUNREF_cliplow 0.5 -`define FJUNQ_cliplow 0.0 - - -///////////////////////////////////////////////////////////////////////////// -// -// Macro definitions. -// -// Note that because at present locally scoped variables -// can only be in named blocks, the intermediate variables -// used in the macros below must be explicitly declared -// as variables. -// -///////////////////////////////////////////////////////////////////////////// - -// Variable declarations of variables that need to be *local* in juncap-express initialization - -`define LocalGlobalVars \ -/* declaration of variables needed in macro "calcerfcexpmtat" */ \ -real ysq, terfc, erfcpos; \ - \ -/* declaration of variables needed in hypfunction 5 */ \ -real h1, h2, h2d, h3, h4, h5; \ - \ -/* declaration of variables calculated outside macro "juncapfunction", voltage-dependent part */ \ -real idmult, vj, z, zinv, two_psistar, vjlim, vjsrh, vbbt, vav; \ - \ -/* declaration of variables used within macro "juncapfunction" */ \ -real tmp, id; \ -real isrh, vbi_minus_vjsrh, wsrhstep, dwsrh, wsrh, wdep, asrh; \ -real itat, btat, twoatatoverthreebtat, umaxbeforelimiting, umax, sqrtumax, umaxpoweronepointfive; \ -real wgamma, wtat, ktat, ltat, mtat, xerfc, erfctimesexpmtat, gammamax; \ -real ibbt, Fmaxr; \ -real fbreakdown; - -// Instance parameter dependent initialization -`define JuncapInitInstance(AB_i, LS_i, LG_i, idsatbot, idsatsti, idsatgat, vbibot, vbisti, vbigat, PBOT_i, PSTI_i, PGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) \ -if (idsatbot * AB_i > 0.0) begin \ - vmaxbot = phitd * ln(IMAX_i / (idsatbot * AB_i) + 1.0); \ -end else begin \ - vmaxbot = `vmaxlarge; \ -end \ -if (idsatsti * LS_i > 0.0) begin \ - vmaxsti = phitd * ln(IMAX_i / (idsatsti * LS_i) + 1.0); \ -end else begin \ - vmaxsti = `vmaxlarge; \ -end \ -if (idsatgat * LG_i > 0.0) begin \ - vmaxgat = phitd * ln(IMAX_i / (idsatgat * LG_i) + 1.0); \ -end else begin \ - vmaxgat = `vmaxlarge; \ -end \ -VMAX = min(min(vmaxbot, vmaxsti), vmaxgat); \ -`expl(VMAX * phitdinv, exp_VMAX_over_phitd) \ - \ -/* determination of minimum value of the relevant built-in voltages */ \ -/* and determination of limiting value of conditioned voltage for BBT calculation */ \ -vbibot2 = vbibot; \ -vbisti2 = vbisti; \ -vbigat2 = vbigat; \ -pbot2 = PBOT_i; \ -psti2 = PSTI_i; \ -pgat2 = PGAT_i; \ -vbibot2r = VBIRBOT_i; \ -vbisti2r = VBIRSTI_i; \ -vbigat2r = VBIRGAT_i; \ -if (AB_i == 0.0) begin \ - vbibot2 = vbisti + vbigat; \ - pbot2 = 0.9 * min(PSTI_i, PGAT_i); \ - vbibot2r = VBIRSTI_i + VBIRGAT_i; \ -end \ -if (LS_i == 0.0) begin \ - vbisti2 = vbibot + vbigat; \ - psti2 = 0.9 * min(PBOT_i, PGAT_i); \ - vbisti2r = VBIRBOT_i + VBIRGAT_i; \ -end \ -if (LG_i == 0.0) begin \ - vbigat2 = vbibot + vbisti; \ - pgat2 = 0.9 * min(PBOT_i, PSTI_i); \ - vbigat2r = VBIRBOT_i + VBIRSTI_i; \ -end \ -vbimin = min(min(vbibot2, vbisti2), vbigat2); \ -vch = vbimin * `epsch; \ -pmax = max(max(pbot2, psti2), pgat2); \ -vfmin = vbimin * (1.0 - (pow(`a, (-1.0 / (pmax))))); \ -vbbtlim = min(min(vbibot2r, vbisti2r), vbigat2r) - `dvbi; - - -// Special power-functions - -`define mypower(x,power,result) \ -if (power == 0.5) begin \ - result = sqrt(x); \ -end else begin \ - result = pow(x, power); \ -end - -`define mypower2(x,power,result) \ -if (power == -1.0) begin \ - result = 1.0 / (x); \ -end else begin \ - result = pow(x, power); \ -end - -`define mypower3(x,power,result) \ -if (power == 4.0) begin \ - result = (x) * (x) * (x) * (x); \ -end else begin \ - result = pow(abs(x), power); \ -end - -// Smoothing functions -`define hypfunction2(x,x0,eps,hyp2) \ -hyp2 = 0.5 * ((x) + (x0) - sqrt(((x) - (x0)) * ((x) - (x0)) + 4.0 * (eps) * (eps))); - -`define hypfunction5(x,x0,eps,hyp5) \ -h1 = 4.0 * (eps) * (eps); \ -h2 = (eps) / (x0); \ -h2d = (x) + (eps) * h2; \ -h3 = (x0) + h2d; \ -h4 = (x0) - h2d; \ -h5 = sqrt(h4 * h4 + h1); \ -hyp5 = 2.0 * ((x) * (x0) / (h3 + h5)); - - -// A special function used to calculate TAT-currents, -// including an approximation of the erfc-function - -`define calcerfcexpmtat(y,m,result) \ -ysq = y * y; \ -if (y > 0.0) begin \ - terfc = 1.0 / (1.0 + perfc * y); \ -end else begin \ - terfc = 1.0 / (1.0 - perfc * y); \ -end \ -`expl_low(-ysq + m, tmp) \ -erfcpos = (`aerfc * terfc + berfc * (terfc * terfc) + cerfc * (terfc * terfc * terfc)) * tmp; \ -if (y > 0.0) begin \ - result = erfcpos; \ -end else begin\ - `expl_low(m, tmp) \ - result = 2.0 * tmp - erfcpos; \ -end - -// This is the main function of the JUNCAP2-model. It returns the current and charge -// for a single diode -`define juncapfunction(VAK,qpref,qpref2,vbiinv,one_minus_P,idsat,CSRH,CTAT,vbi,wdepnulr,VBIRinv,P,ftd,btatpart,atat,one_over_one_minus_P,CBBT,VBIR,wdepnulrinv,fbbt,VBR,VBRinv,PBR,fstop,slope,Ijprime,Qjprime) \ -`mypower((1.0 - vj * vbiinv), one_minus_P, tmp) \ -Qjprime = qpref * (1.0 - tmp) + qpref2 * (VAK - vj); \ -id = idsat * idmult; \ -if ((CSRH == 0.0) && (CTAT == 0.0)) begin \ - isrh = 0.0; \ -end else begin \ - vbi_minus_vjsrh = vbi-vjsrh; \ - wsrhstep = 1.0 - sqrt(1.0 - two_psistar / vbi_minus_vjsrh); \ - if (P == 0.5) begin \ - dwsrh = 0.0; \ - end else begin \ - dwsrh = ((wsrhstep * wsrhstep * ln(wsrhstep) / (1.0 - wsrhstep)) + wsrhstep) * (1.0 - 2.0 * P); \ - end \ - wsrh = wsrhstep + dwsrh; \ - `mypower(vbi_minus_vjsrh * VBIRinv, P, tmp) \ - wdep = wdepnulr * tmp; \ - asrh = ftd * ((zinv - 1.0) * wdep); \ - isrh = CSRH * (asrh * wsrh); \ -end \ -if (CTAT == 0.0) begin \ - itat = 0.0; \ -end else begin \ - btat = btatpart * ((wdep * one_minus_P) / vbi_minus_vjsrh); \ - twoatatoverthreebtat = (`twothirds * atat) / btat; \ - umaxbeforelimiting = twoatatoverthreebtat * twoatatoverthreebtat; \ - umax = sqrt(umaxbeforelimiting * umaxbeforelimiting / (umaxbeforelimiting * umaxbeforelimiting + 1.0)); \ - sqrtumax = sqrt(abs(umax)); \ - umaxpoweronepointfive = umax * sqrtumax; \ - `mypower2((1.0 + btat * umaxpoweronepointfive), (-P * one_over_one_minus_P), wgamma) \ - wtat = wsrh * wgamma / (wsrh + wgamma); \ - ktat = sqrt(0.375 * (btat / sqrtumax)); \ - ltat = 2.0 * (twoatatoverthreebtat * sqrtumax) - umax; \ - mtat = atat * twoatatoverthreebtat * sqrtumax - atat * umax + 0.5 * (btat * umaxpoweronepointfive); \ - xerfc = (ltat - 1.0) * ktat; \ - `calcerfcexpmtat(xerfc, mtat, erfctimesexpmtat) \ - gammamax = `SQRTPI * 0.5 * (atat * erfctimesexpmtat / ktat); \ - itat = CTAT * (asrh * gammamax * wtat); \ -end \ -if (CBBT == 0.0) begin \ - ibbt = 0.0; \ -end else begin \ - `mypower(((VBIR - vbbt) * VBIRinv), P, tmp) \ - Fmaxr = one_over_one_minus_P * ((VBIR - vbbt) * wdepnulrinv / tmp); \ - `expl(-fbbt / Fmaxr, tmp) \ - ibbt = CBBT * (VAK * Fmaxr * Fmaxr * tmp); \ -end \ -if (VBR > `vbrmax) begin \ - fbreakdown = 1.0; \ -end else begin \ - if (vav > -alphaav * VBR) begin \ - `mypower3(vav * VBRinv, PBR, tmp) \ - fbreakdown = 1.0 / (1.0 - tmp); \ - end else begin \ - fbreakdown = fstop + (vav + alphaav * VBR) * slope; \ - end \ -end \ -Ijprime = (id + isrh + itat + ibbt) * fbreakdown; - - -// The following code is written as a macro because the naming of the instance parameters is -// different for JUNCAP2 stand-alone and JUNCAP2-in-PSP: AB, LS, LG for JUNCAP2 stand-alone, -// ABSOURCE, LSSOURCE, LGSOURCE for source junction in PSP and ABDRAIN, LSDRAIN, LGDRAIN for -// drain junction in PSP -`define juncapcommon(V, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \ -vbbt = 0.0; \ -two_psistar = 0.0; \ -if ( !( ((AB_i) == 0.0) && ((LS_i) == 0.0) && ((LG_i) == 0.0) ) ) begin \ - `hypfunction5(V, vfmin, vch, vj) \ - if (V < VMAX) begin \ - `expl(0.5 * (V * phitdinv), zinv) \ - idmult = zinv * zinv; \ - end else begin \ - idmult = (1.0 + (V - VMAX) * phitdinv) * exp_VMAX_over_phitd; \ - zinv = sqrt(idmult); \ - end \ - idmult = idmult - 1.0; \ - z = 1.0 / zinv; \ - if (V > 0.0) begin \ - two_psistar = 2.0 * (phitd * ln(2.0 + z + sqrt((z + 1.0) * (z + 3.0)))); \ - end else begin \ - two_psistar = -V + 2.0 * (phitd * ln(2.0 * zinv + 1.0 + sqrt((1.0 + zinv) * (1.0 + 3.0 * zinv)))); \ - end \ - vjlim = vbimin - two_psistar; \ - `hypfunction2(V, vjlim, phitd, vjsrh) \ - `hypfunction2(V, vbbtlim, phitr, vbbt) \ - `hypfunction2(V, 0.0, `epsav, vav) \ -end \ -if ((AB_i) == 0.0) begin \ - ijunbot = 0.0; \ - qjunbot = 0.0; \ -end else begin \ - `juncapfunction(V, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, ijunbot, qjunbot) \ -end \ -if ((LS_i) == 0.0) begin \ - ijunsti = 0.0; \ - qjunsti = 0.0; \ -end else begin \ - `juncapfunction(V, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, ijunsti, qjunsti) \ -end \ -if ((LG_i) == 0.0) begin \ - ijungat = 0.0; \ - qjungat = 0.0; \ -end else begin \ - `juncapfunction(V, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, ijungat, qjungat) \ -end - -//============================================================================================================ -// JUNCAP-express -// -// The macros below are used in the express-version of JUNCAP2 -//============================================================================================================ - -`define relerr 1.0e-3 -`define P1(x) ((x) + 1.0) - -`define expll(x, xlow, expxlow, xhigh, expxhigh) \ -((x) < (xlow)) ? (expxlow) / `P1((xlow) - (x)) : (((x) > (xhigh)) ? (expxhigh) * `P1((x) - (xhigh)) : exp(x)) - - -// The "JuncapExpressInit"-macro below is split into three parts, as some verilog-A compilers cannot handle -// macros beyond a certain size. Moreover, it is useful to limit the list of input and output variables. - -// Part 1 -`define JuncapExpressInit1(AB_i, LS_i, LG_i, VJUNREF_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) \ -FRACNA = 0.4; \ -FRACNB = 0.65; \ -FRACI = 0.8; \ -/* Sample voltages */ \ -V1 = -FRACNA * VJUNREF_i; \ -V2 = -FRACNB * VJUNREF_i; \ -V3 = -FRACI * VJUNREF_i; \ -V4 = 0.1; \ -V5 = 0.2; \ -/* evaluate full JUNCAP-model at five voltages */ \ -`juncapcommon(V1, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \ -I1 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; \ -`juncapcommon(V2, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \ -I2 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; \ -`juncapcommon(V3, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \ -I3 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; - -// Part 2 -`define JuncapExpressInit2(AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) \ -/* forward currents */ \ -`juncapcommon(V4, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \ -I4 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; \ -`juncapcommon(V5, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \ -I5 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; - -// Part 3 -`define JuncapExpressInit3(AB_i, LS_i, LG_i, idsatbot, idsatsti, idsatgat, ISATFOR1, MFOR1, ISATFOR2, MFOR2, ISATREV, MREV, m0flag) \ -/* compute internal parameters from these five (I,V)-values */ \ -ISATFOR1 = AB_i * idsatbot + LS_i * idsatsti + LG_i * idsatgat; \ -I4_cor = I4 - ISATFOR1 * (exp(V4 * phitdinv * MFOR1) - 1.0); \ -I5_cor = I5 - ISATFOR1 * (exp(V5 * phitdinv * MFOR1) - 1.0); \ -if ( !( ((AB_i) == 0.0) && ((LS_i) == 0.0) && ((LG_i) == 0.0) ) ) begin \ - if ((I4 > 0.0) && (I5 > 0.0)) begin \ - if ((((I4_cor / I4) > `relerr) || ((I5_cor / I5) > `relerr)) && (I4_cor > 0.0) && (I5_cor > 0.0)) begin \ - alphaje = I4_cor / I5_cor; \ - MFOR2 = phitd * ln(alphaje) / (V4 - V5); \ - ISATFOR2 = I4_cor / (exp(V4 * phitdinv * MFOR2) - 1.0); \ - end \ - end \ - I1_cor = I1 - ISATFOR1 * (exp(V1 * phitdinv * MFOR1) - 1.0) - ISATFOR2 * (exp(V1 * phitdinv * MFOR2) - 1.0); \ - I2_cor = I2 - ISATFOR1 * (exp(V2 * phitdinv * MFOR1) - 1.0) - ISATFOR2 * (exp(V2 * phitdinv * MFOR2) - 1.0); \ - I3_cor = I3 - ISATFOR1 * (exp(V3 * phitdinv * MFOR1) - 1.0) - ISATFOR2 * (exp(V3 * phitdinv * MFOR2) - 1.0); \ - if ((I1 < 0.0) && (I2 < 0.0) && (I3 < 0.0)) begin \ - if ((((I1_cor / I1) > `relerr) || ((I2_cor / I2) > `relerr) || ((I3_cor / I3) > `relerr)) \ - && (I1_cor < 0.0) && (I2_cor < 0.0) && (I3_cor < 0.0)) begin \ - alphaje = I1_cor / I2_cor; \ - m0_rev = -phitd * ln(alphaje) / (V1 - V2); /* zeroth order approximation */ \ - tt0 = V2 / (V2 - V1); \ - tt1 = phitd * (alphaje - 1.0) * (pow(alphaje, tt0) - 1.0); \ - tt0 = V1 / (V1 - V2); \ - tt2 = pow(alphaje, tt0) * (V2 - V1) + alphaje * V1 - V2; \ - mcor_rev = tt1 / tt2; /* first order Newton correction */ \ - MREV = m0_rev + mcor_rev; \ - if (abs(V3 * phitdinv * MREV) < 1.0e-6) begin \ - /* Taylor approximation needed */ \ - /* Note: ISATREV and MREV have different meaning in this situation!! */ \ - m0flag = 1.0; \ - ISATREV = I3_cor * (1.0 / V3 + 0.5 * phitdinv * MREV); \ - MREV = -0.5 * I3_cor * MREV * phitdinv / V3; \ - end else begin \ - m0flag = 0.0; \ - ISATREV = -I3_cor / (exp(-V3 * phitdinv * MREV) - 1.0); \ - end \ - end \ - end \ -end - -// Part 4 -`define JuncapExpressInit4(AB_i, LS_i, LG_i, FJUNQ_i, cjobot, cjosti, cjogat, zflagbot, zflagsti, zflaggat) \ -/* charge model initialization */ \ -zfrac = FJUNQ_i * (AB_i * cjobot + LS_i * cjosti + LG_i * cjogat); \ -if ((AB_i * cjobot) <= zfrac) begin \ - zflagbot = 0.0; \ -end \ -if ((LS_i * cjosti) <= zfrac) begin \ - zflagsti = 0.0; \ -end \ -if ((LG_i * cjogat) <= zfrac) begin \ - zflaggat = 0.0; \ -end - -// Part 5 -`define JuncapExpressInit5(AB_i, LS_i, LG_i, ISATFOR1, ISATFOR2, ISATREV, xhighf1, expxhf1, xhighf2, expxhf2, xhighr, expxhr) \ -/* calculate limits beyond which exponentials are linearly extrapolated */ \ -if ( !( ((AB_i) == 0.0) && ((LS_i) == 0.0) && ((LG_i) == 0.0) ) ) begin \ - xhighf1 = ln(0.5 * IMAX_i / (ISATFOR1 + 1.0e-21)); \ - xhighf2 = ln(0.5 * IMAX_i / (ISATFOR2 + 1.0e-21)); \ - xhighr = ln(0.5 * IMAX_i / (abs(ISATREV) + 1.0e-21)); \ -end \ -xhighf1 = min(xhighf1, `se05); \ -expxhf1 = exp(xhighf1); \ -xhighf2 = min(xhighf2, `se05); \ -expxhf2 = exp(xhighf2); \ -xhighr = min(xhighr, `se05); \ -expxhr = exp(xhighr); - -`define JuncapExpressCurrent(V, MFOR1, ISATFOR1, MFOR2, ISATFOR2, MREV, ISATREV, m0flag, xhighf1, expxhf1, xhighf2, expxhf2, xhighr, expxhr, ijun) \ -tm0 = V * phitdinv * MFOR1; \ -tm1 = `expll(tm0, -`se05, `ke05, xhighf1, expxhf1); \ -ijunfor1 = ISATFOR1 * (tm1 - 1.0); \ -tm0 = V * phitdinv * MFOR2; \ -tm1 = `expll(tm0, -`se05, `ke05, xhighf2, expxhf2); \ -ijunfor2 = ISATFOR2 * (tm1 - 1.0); \ -ijunrev = 0.0; \ -if (m0flag > 0.0) begin \ - ijunrev = V * (ISATREV + V * MREV); \ -end else begin \ - tm0 = -V * phitdinv * MREV; \ - tm1 = `expll(tm0, -`se05, `ke05, xhighr, expxhr); \ - ijunrev = -ISATREV * (tm1 - 1.0); \ -end \ -ijun = ijunfor1 + ijunfor2 + ijunrev; - -`define JuncapExpressCharge(V, AB_i, LS_i, LG_i, qprefbot, qprefsti, qprefgat, qpref2bot, qpref2sti, qpref2gat, vbiinvbot, vbiinvsti, vbiinvgat, one_minus_PBOT, one_minus_PSTI, one_minus_PGAT, vfmin, vch, zflagbot, zflagsti, zflaggat, qjunbot, qjunsti, qjungat) \ -tmpv = 0.0; \ -vjv = 0.0; \ -`hypfunction5(V, vfmin, vch, vjv) \ -if (zflagbot > 0.5) begin \ - `mypower((1.0 - vjv * vbiinvbot), one_minus_PBOT, tmpv) \ - qjunbot = qprefbot * (1.0 - tmpv) + qpref2bot * (V - vjv); \ -end \ -if (zflagsti > 0.5) begin \ - `mypower((1.0 - vjv * vbiinvsti), one_minus_PSTI, tmpv) \ - qjunsti = qprefsti * (1.0 - tmpv) + qpref2sti * (V - vjv); \ -end \ -if (zflaggat > 0.5) begin \ - `mypower((1.0 - vjv * vbiinvgat), one_minus_PGAT, tmpv) \ - qjungat = qprefgat * (1.0 - tmpv) + qpref2gat * (V - vjv); \ -end - diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_parlist.include b/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_parlist.include deleted file mode 100644 index a8db84c3..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_parlist.include +++ /dev/null @@ -1,181 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: JUNCAP200_parlist.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA) and 2012-2015 Delft University of Technology -// Licensed under the Educational Community License, Version 2.0 (the "License"); you -// may not use this file except in compliance with the License. You may obtain a copy -// of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 200.5.0, August 2016 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - - // -------------------------------------------------------------------------------------------------------------- - // JUNCAP2 - Reduced parameter list - // -------------------------------------------------------------------------------------------------------------- - - `MPRco(IMAX ,1000.0 ,"A" ,`IMAX_cliplow ,inf ,"Maximum current up to which forward current behaves exponentially") - `MPRco(TRJ ,21.0 ,"C" ,`TRJ_cliplow ,inf ,"Reference temperature") - `MPRcc(FREV ,1.0e3 ,"" ,`FREV_cliplow ,`FREV_cliphigh ,"Coefficient for reverse breakdown current limitation") - - // Parameters for source-bulk junction - `ifdef JUNCAP_StandAlone - `MPRco(CJORBOT ,1.0e-3 ,"Fm^-2" ,`CJORBOT_cliplow ,inf ,"Zero-bias capacitance per unit-of-area of bottom component") - `MPRco(CJORSTI ,1.0e-9 ,"Fm^-1" ,`CJORSTI_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of STI-edge component") - `MPRco(CJORGAT ,1.0e-9 ,"Fm^-1" ,`CJORGAT_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of gate-edge component") - `MPRco(VBIRBOT ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of bottom component") - `MPRco(VBIRSTI ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of STI-edge component") - `MPRco(VBIRGAT ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of gate-edge component") - `MPRcc(PBOT ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of bottom component") - `MPRcc(PSTI ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of STI-edge component") - `MPRcc(PGAT ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of gate-edge component") - `MPRnb(PHIGBOT ,1.16 ,"V" ,"Zero-temperature bandgap voltage of bottom component") - `MPRnb(PHIGSTI ,1.16 ,"V" ,"Zero-temperature bandgap voltage of STI-edge component") - `MPRnb(PHIGGAT ,1.16 ,"V" ,"Zero-temperature bandgap voltage of gate-edge component") - `MPRco(IDSATRBOT ,1.0e-12 ,"Am^-2" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of bottom component") - `MPRco(IDSATRSTI ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of STI-edge component") - `MPRco(IDSATRGAT ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of gate-edge component") - `MPRco(CSRHBOT ,1.0e2 ,"Am^-3" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of bottom component") - `MPRco(CSRHSTI ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of STI-edge component") - `MPRco(CSRHGAT ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of gate-edge component") - `MPRco(XJUNSTI ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of STI-edge component") - `MPRco(XJUNGAT ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of gate-edge component") - `MPRco(CTATBOT ,1.0e2 ,"Am^-3" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of bottom component") - `MPRco(CTATSTI ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of STI-edge component") - `MPRco(CTATGAT ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of gate-edge component") - `MPRco(MEFFTATBOT ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of bottom component") - `MPRco(MEFFTATSTI ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component") - `MPRco(MEFFTATGAT ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component") - `MPRco(CBBTBOT ,1.0e-12 ,"AV^-3" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of bottom component") - `MPRco(CBBTSTI ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of STI-edge component") - `MPRco(CBBTGAT ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of gate-edge component") - `MPRnb(FBBTRBOT ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of bottom component") - `MPRnb(FBBTRSTI ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of STI-edge component") - `MPRnb(FBBTRGAT ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of gate-edge component") - `MPRnb(STFBBTBOT ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of bottom component") - `MPRnb(STFBBTSTI ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of STI-edge component") - `MPRnb(STFBBTGAT ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of gate-edge component") - `MPRco(VBRBOT ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of bottom component") - `MPRco(VBRSTI ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of STI-edge component") - `MPRco(VBRGAT ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of gate-edge component") - `MPRco(PBRBOT ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of bottom component") - `MPRco(PBRSTI ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of STI-edge component") - `MPRco(PBRGAT ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of gate-edge component") - `else // JUNCAP_StandAlone - `MPRco(CJORBOT ,1.0e-3 ,"Fm^-2" ,`CJORBOT_cliplow ,inf ,"Zero-bias capacitance per unit-of-area of bottom component for source-bulk junction") - `MPRco(CJORSTI ,1.0e-9 ,"Fm^-1" ,`CJORSTI_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of STI-edge component for source-bulk junction") - `MPRco(CJORGAT ,1.0e-9 ,"Fm^-1" ,`CJORGAT_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of gate-edge component for source-bulk junction") - `MPRco(VBIRBOT ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of bottom component for source-bulk junction") - `MPRco(VBIRSTI ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of STI-edge component for source-bulk junction") - `MPRco(VBIRGAT ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of gate-edge component for source-bulk junction") - `MPRcc(PBOT ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of bottom component for source-bulk junction") - `MPRcc(PSTI ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of STI-edge component for source-bulk junction") - `MPRcc(PGAT ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of gate-edge component for source-bulk junction") - `MPRnb(PHIGBOT ,1.16 ,"V" ,"Zero-temperature bandgap voltage of bottom component for source-bulk junction") - `MPRnb(PHIGSTI ,1.16 ,"V" ,"Zero-temperature bandgap voltage of STI-edge component for source-bulk junction") - `MPRnb(PHIGGAT ,1.16 ,"V" ,"Zero-temperature bandgap voltage of gate-edge component for source-bulk junction") - `MPRco(IDSATRBOT ,1.0e-12 ,"Am^-2" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of bottom component for source-bulk junction") - `MPRco(IDSATRSTI ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of STI-edge component for source-bulk junction") - `MPRco(IDSATRGAT ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of gate-edge component for source-bulk junction") - `MPRco(CSRHBOT ,1.0e2 ,"Am^-3" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of bottom component for source-bulk junction") - `MPRco(CSRHSTI ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of STI-edge component for source-bulk junction") - `MPRco(CSRHGAT ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of gate-edge component for source-bulk junction") - `MPRco(XJUNSTI ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of STI-edge component for source-bulk junction") - `MPRco(XJUNGAT ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of gate-edge component for source-bulk junction") - `MPRco(CTATBOT ,1.0e2 ,"Am^-3" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of bottom component for source-bulk junction") - `MPRco(CTATSTI ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of STI-edge component for source-bulk junction") - `MPRco(CTATGAT ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of gate-edge component for source-bulk junction") - `MPRco(MEFFTATBOT ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of bottom component for source-bulk junction") - `MPRco(MEFFTATSTI ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component for source-bulk junction") - `MPRco(MEFFTATGAT ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component for source-bulk junction") - `MPRco(CBBTBOT ,1.0e-12 ,"AV^-3" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of bottom component for source-bulk junction") - `MPRco(CBBTSTI ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of STI-edge component for source-bulk junction") - `MPRco(CBBTGAT ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of gate-edge component for source-bulk junction") - `MPRnb(FBBTRBOT ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of bottom component for source-bulk junction") - `MPRnb(FBBTRSTI ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of STI-edge component for source-bulk junction") - `MPRnb(FBBTRGAT ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of gate-edge component for source-bulk junction") - `MPRnb(STFBBTBOT ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of bottom component for source-bulk junction") - `MPRnb(STFBBTSTI ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of STI-edge component for source-bulk junction") - `MPRnb(STFBBTGAT ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of gate-edge component for source-bulk junction") - `MPRco(VBRBOT ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of bottom component for source-bulk junction") - `MPRco(VBRSTI ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of STI-edge component for source-bulk junction") - `MPRco(VBRGAT ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of gate-edge component for source-bulk junction") - `MPRco(PBRBOT ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of bottom component for source-bulk junction") - `MPRco(PBRSTI ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of STI-edge component for source-bulk junction") - `MPRco(PBRGAT ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of gate-edge component for source-bulk junction") - `endif // JUNCAP_StandAlone - - // Parameters for drain-bulk junction - `ifdef JUNCAP_StandAlone - // do nothing - `else // JUNCAP_StandAlone - `MPRco(CJORBOTD ,1.0e-3 ,"Fm^-2" ,`CJORBOT_cliplow ,inf ,"Zero-bias capacitance per unit-of-area of bottom component for drain-bulk junction") - `MPRco(CJORSTID ,1.0e-9 ,"Fm^-1" ,`CJORSTI_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of STI-edge component for drain-bulk junction") - `MPRco(CJORGATD ,1.0e-9 ,"Fm^-1" ,`CJORGAT_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of gate-edge component for drain-bulk junction") - `MPRco(VBIRBOTD ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of bottom component for drain-bulk junction") - `MPRco(VBIRSTID ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of STI-edge component for drain-bulk junction") - `MPRco(VBIRGATD ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of gate-edge component for drain-bulk junction") - `MPRcc(PBOTD ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of bottom component for drain-bulk junction") - `MPRcc(PSTID ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of STI-edge component for drain-bulk junction") - `MPRcc(PGATD ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of gate-edge component for drain-bulk junction") - `MPRnb(PHIGBOTD ,1.16 ,"V" ,"Zero-temperature bandgap voltage of bottom component for drain-bulk junction") - `MPRnb(PHIGSTID ,1.16 ,"V" ,"Zero-temperature bandgap voltage of STI-edge component for drain-bulk junction") - `MPRnb(PHIGGATD ,1.16 ,"V" ,"Zero-temperature bandgap voltage of gate-edge component for drain-bulk junction") - `MPRco(IDSATRBOTD ,1.0e-12 ,"Am^-2" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of bottom component for drain-bulk junction") - `MPRco(IDSATRSTID ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of STI-edge component for drain-bulk junction") - `MPRco(IDSATRGATD ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of gate-edge component for drain-bulk junction") - `MPRco(CSRHBOTD ,1.0e2 ,"Am^-3" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of bottom component for drain-bulk junction") - `MPRco(CSRHSTID ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of STI-edge component for drain-bulk junction") - `MPRco(CSRHGATD ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of gate-edge component for drain-bulk junction") - `MPRco(XJUNSTID ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of STI-edge component for drain-bulk junction") - `MPRco(XJUNGATD ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of gate-edge component for drain-bulk junction") - `MPRco(CTATBOTD ,1.0e2 ,"Am^-3" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of bottom component for drain-bulk junction") - `MPRco(CTATSTID ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of STI-edge component for drain-bulk junction") - `MPRco(CTATGATD ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of gate-edge component for drain-bulk junction") - `MPRco(MEFFTATBOTD ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of bottom component for drain-bulk junction") - `MPRco(MEFFTATSTID ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component for drain-bulk junction") - `MPRco(MEFFTATGATD ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component for drain-bulk junction") - `MPRco(CBBTBOTD ,1.0e-12 ,"AV^-3" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of bottom component for drain-bulk junction") - `MPRco(CBBTSTID ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of STI-edge component for drain-bulk junction") - `MPRco(CBBTGATD ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of gate-edge component for drain-bulk junction") - `MPRnb(FBBTRBOTD ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of bottom component for drain-bulk junction") - `MPRnb(FBBTRSTID ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of STI-edge component for drain-bulk junction") - `MPRnb(FBBTRGATD ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of gate-edge component for drain-bulk junction") - `MPRnb(STFBBTBOTD ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of bottom component for drain-bulk junction") - `MPRnb(STFBBTSTID ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of STI-edge component for drain-bulk junction") - `MPRnb(STFBBTGATD ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of gate-edge component for drain-bulk junction") - `MPRco(VBRBOTD ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of bottom component for drain-bulk junction") - `MPRco(VBRSTID ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of STI-edge component for drain-bulk junction") - `MPRco(VBRGATD ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of gate-edge component for drain-bulk junction") - `MPRco(PBRBOTD ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of bottom component for drain-bulk junction") - `MPRco(PBRSTID ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of STI-edge component for drain-bulk junction") - `MPRco(PBRGATD ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of gate-edge component for drain-bulk junction") - `endif // JUNCAP_StandAlone - - // JUNCAP2-express parameters - `MPRcc(SWJUNEXP ,0.0 ,"" ,0.0 ,1.0 ,"Flag for JUNCAP-express; 0=full model, 1=express model") - `ifdef JUNCAP_StandAlone - `MPRco(VJUNREF ,2.5 ,"V" ,`VJUNREF_cliplow ,inf ,"Typical maximum junction voltage; usually about 2*VSUP") - `MPRco(FJUNQ ,0.03 ,"" ,`FJUNQ_cliplow ,inf ,"Fraction below which junction capacitance components are considered negligible") - `else // JUNCAP_StandAlone - `MPRco(VJUNREF ,2.5 ,"V" ,`VJUNREF_cliplow ,inf ,"Typical maximum source-bulk junction voltage; usually about 2*VSUP") - `MPRco(FJUNQ ,0.03 ,"" ,`FJUNQ_cliplow ,inf ,"Fraction below which source-bulk junction capacitance components are considered negligible") - `MPRco(VJUNREFD ,2.5 ,"V" ,`VJUNREF_cliplow ,inf ,"Typical maximum drain-bulk junction voltage; usually about 2*VSUP") - `MPRco(FJUNQD ,0.03 ,"" ,`FJUNQ_cliplow ,inf ,"Fraction below which drain-bulk junction capacitance components are considered negligible") - `endif // JUNCAP_StandAlone diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_varlist1.include b/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_varlist1.include deleted file mode 100644 index 9dce6064..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_varlist1.include +++ /dev/null @@ -1,106 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: JUNCAP200_varlist1.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA) and 2012-2015 Delft University of Technology -// Licensed under the Educational Community License, Version 2.0 (the "License"); you -// may not use this file except in compliance with the License. You may obtain a copy -// of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 200.5.0, August 2016 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - - // declaration of clipped parameters - real TRJ_i, IMAX_i, FREV_i; - real CJORBOT_i, CJORSTI_i, CJORGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i; - real PBOT_i, PSTI_i, PGAT_i, PHIGBOT_i, PHIGSTI_i, PHIGGAT_i; - real IDSATRBOT_i, IDSATRSTI_i, IDSATRGAT_i, XJUNSTI_i, XJUNGAT_i; - real CSRHBOT_i, CSRHSTI_i, CSRHGAT_i, CTATBOT_i, CTATSTI_i, CTATGAT_i; - real MEFFTATBOT_i, MEFFTATSTI_i, MEFFTATGAT_i; - real CBBTBOT_i, CBBTSTI_i, CBBTGAT_i, FBBTRBOT_i, FBBTRSTI_i, FBBTRGAT_i; - real STFBBTBOT_i, STFBBTSTI_i, STFBBTGAT_i; - real VBRBOT_i, VBRSTI_i, VBRGAT_i, PBRBOT_i, PBRSTI_i, PBRGAT_i; - - real SWJUNEXP_i, VJUNREF_i, FJUNQ_i; - - // declaration of variables calculated outside macro "juncapfunction", voltage-independent part - real tkr, tkd, auxt, KBOL_over_QELE, phitr, phitrinv, phitd, phitdinv; - real perfc, berfc, cerfc; - real deltaphigr, deltaphigd, pmax; - - real phigrbot, phigrsti, phigrgat, phigdbot, phigdsti, phigdgat; - real ftdbot, ftdsti, ftdgat, idsatbot, idsatsti, idsatgat; - real ubibot, ubisti, ubigat, vbibot, vbisti, vbigat; - real vbibot2, vbisti2, vbigat2, pbot2, psti2, pgat2, vbibot2r, vbisti2r, vbigat2r; - real vbiinvbot, vbiinvsti, vbiinvgat; - real one_minus_PBOT, one_minus_PSTI, one_minus_PGAT; - real one_over_one_minus_PBOT, one_over_one_minus_PSTI, one_over_one_minus_PGAT; - real cjobot, cjosti, cjogat; - real qprefbot, qprefsti, qprefgat, qpref2bot, qpref2sti, qpref2gat; - real wdepnulrbot, wdepnulrsti, wdepnulrgat, wdepnulrinvbot, wdepnulrinvsti, wdepnulrinvgat; - real VBIRBOTinv, VBIRSTIinv, VBIRGATinv; - real deltaEbot, deltaEsti, deltaEgat, atatbot, atatsti, atatgat; - real btatpartbot, btatpartsti, btatpartgat; - real fbbtbot, fbbtsti, fbbtgat; - real alphaav, fstopbot, fstopsti, fstopgat, VBRinvbot, VBRinvsti, VBRinvgat; - real slopebot, slopesti, slopegat; - real vmaxbot, vmaxsti, vmaxgat; - - // JUNCAP-Express variables - real I1, I2, I3, I4, I5; - real I1_cor, I2_cor, I3_cor, I4_cor, I5_cor; - real V1, V2, V3, V4, V5; - real alphaje, m0_rev, mcor_rev; - real tt0, tt1, tt2, tm0, tm1; - real FRACNA, FRACNB, FRACI; - real zfrac; - real ijunfor1, ijunfor2, ijunrev; - - `ifdef JUNCAP_StandAlone - // do nothing - `else // JUNCAP_StandAlone - real CJORBOTD_i, CJORSTID_i, CJORGATD_i, VBIRBOTD_i, VBIRSTID_i, VBIRGATD_i; - real PBOTD_i, PSTID_i, PGATD_i, PHIGBOTD_i, PHIGSTID_i, PHIGGATD_i; - real IDSATRBOTD_i, IDSATRSTID_i, IDSATRGATD_i, XJUNSTID_i, XJUNGATD_i; - real CSRHBOTD_i, CSRHSTID_i, CSRHGATD_i, CTATBOTD_i, CTATSTID_i, CTATGATD_i; - real MEFFTATBOTD_i, MEFFTATSTID_i, MEFFTATGATD_i; - real CBBTBOTD_i, CBBTSTID_i, CBBTGATD_i, FBBTRBOTD_i, FBBTRSTID_i, FBBTRGATD_i; - real STFBBTBOTD_i, STFBBTSTID_i, STFBBTGATD_i; - real VBRBOTD_i, VBRSTID_i, VBRGATD_i, PBRBOTD_i, PBRSTID_i, PBRGATD_i; - - real VJUNREFD_i, FJUNQD_i; - - real phigrbot_d, phigrsti_d, phigrgat_d, phigdbot_d, phigdsti_d, phigdgat_d; - real ftdbot_d, ftdsti_d, ftdgat_d, idsatbot_d, idsatsti_d, idsatgat_d; - real ubibot_d, ubisti_d, ubigat_d, vbibot_d, vbisti_d, vbigat_d; - real vbiinvbot_d, vbiinvsti_d, vbiinvgat_d; - real one_minus_PBOT_d, one_minus_PSTI_d, one_minus_PGAT_d; - real one_over_one_minus_PBOT_d, one_over_one_minus_PSTI_d, one_over_one_minus_PGAT_d; - real cjobot_d, cjosti_d, cjogat_d; - real qprefbot_d, qprefsti_d, qprefgat_d, qpref2bot_d, qpref2sti_d, qpref2gat_d; - real wdepnulrbot_d, wdepnulrsti_d, wdepnulrgat_d, wdepnulrinvbot_d, wdepnulrinvsti_d, wdepnulrinvgat_d; - real VBIRBOTinv_d, VBIRSTIinv_d, VBIRGATinv_d; - real deltaEbot_d, deltaEsti_d, deltaEgat_d, atatbot_d, atatsti_d, atatgat_d; - real btatpartbot_d, btatpartsti_d, btatpartgat_d; - real fbbtbot_d, fbbtsti_d, fbbtgat_d; - real fstopbot_d, fstopsti_d, fstopgat_d, VBRinvbot_d, VBRinvsti_d, VBRinvgat_d; - real slopebot_d, slopesti_d, slopegat_d; - `endif // JUNCAP_StandAlone - - `LocalGlobalVars diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_varlist2.include b/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_varlist2.include deleted file mode 100644 index c0685e36..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/JUNCAP200_varlist2.include +++ /dev/null @@ -1,63 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: JUNCAP200_varlist2.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA) and 2012-2015 Delft University of Technology -// Licensed under the Educational Community License, Version 2.0 (the "License"); you -// may not use this file except in compliance with the License. You may obtain a copy -// of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 200.5.0, August 2016 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - //================================================================ - // Variables that are different for source and drain side junction - // and have a scope larger than a single macro-call - //================================================================ - - `ifdef JUNCAP_StandAlone - real AB_i, LS_i, LG_i; - real zflagbot, zflagsti, zflaggat; - real VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim; - - // JUNCAP-express variables - real xhighf1, expxhf1, xhighf2, expxhf2, xhighr, expxhr; - - // JUNCAP2-express intermediate parameters - real ISATFOR1, MFOR1, ISATFOR2, MFOR2, ISATREV, MREV, m0flag; - `else // JUNCAP_StandAlone - real ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, AS_i, PS_i; - real zflagbot_s, zflagsti_s, zflaggat_s; - real VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s; - - // JUNCAP-express variables - real xhighf1_s, expxhf1_s, xhighf2_s, expxhf2_s, xhighr_s, expxhr_s, m0flag_s; - - // JUNCAP2-express intermediate parameters - real ISATFOR1_s, MFOR1_s, ISATFOR2_s, MFOR2_s, ISATREV_s, MREV_s; - - real ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, AD_i, PD_i; - real zflagbot_d, zflagsti_d, zflaggat_d; - real VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d; - - // JUNCAP-express variables - real xhighf1_d, expxhf1_d, xhighf2_d, expxhf2_d, xhighr_d, expxhr_d, m0flag_d; - - // JUNCAP2-express intermediate parameters - real ISATFOR1_d, MFOR1_d, ISATFOR2_d, MFOR2_d, ISATREV_d, MREV_d; - `endif // JUNCAP_StandAlone diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_SPCalculation.include b/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_SPCalculation.include deleted file mode 100644 index 8a1ba119..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_SPCalculation.include +++ /dev/null @@ -1,350 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: PSP103_SPCalculation.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and -// 2004-2011 Arizona State University Licensed under the Educational Community License, -// Version 2.0 (the "License"); you may not use this file except in compliance with the -// License. You may obtain a copy of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 103.6.0 (PSP), 200.5.0 (JUNCAP), December 2017 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - -// Initialisation of some variables - alpha = 0.0; - GdL = 1.0; - dL = 0.0; - qbm = 0.0; - dps = 0.0; - qim = 0.0; - qim1 = 0.0; - H = 1.0; - s1 = 0.0; - eta_p = 1.0; - Gvsat = 1.0; - Gvsatinv = 1.0; - SP_S_x1 = 0.0; - x_s = 0.0; - sqm = 0.0; - xitsb = 0.0; - rhob = 0.0; - Gmob = 1.0; - Gmob_dL = 1.0; - Udse = 0.0; - thesat1 = 0.0; - xgm = 0.0; - -// Bias definition - Vgbstar = Vgs + Vsbstar; - Vgb1 = Vgbstar - VFB_T; - Vsbx = Vsbstar + 0.5 * (Vds - Vdsx); - if (CFD_i < 1.0e-10) begin - Vdsp = Vdsx; - end else begin - Vdsp = 2.0 * (sqrt(1.0 + CFD_i * Vdsx) - 1.0) / CFD_i; - end - delVg = CF_i * Vdsp * (1.0 + CFB_i * Vsbx); // DIBL - dphit1 = PSCE_i * (1.0 + PSCED_i * Vdsx) * (1.0 + PSCEB_i * Vsbx); // SCE on subthreshold slope - Vgb1 = Vgb1 + delVg; - -// Bias dependent body factor - if (DNSUB_i > 0.0) begin - Dnsub = DNSUB_i * `MAXA(0.0, Vgs + Vsb - VNSUB_i, NSLP_i); - Gf = G_0 * sqrt(1.0 + Dnsub); - end else begin - Gf = G_0; - end - Gf2 = Gf * Gf; - inv_Gf2 = 1.0 / Gf2; - -// Bias dependence of interface states - dCTG = 1.0; - if (CTG_i > 0.0) begin - xgct = 2.0 * Vgb1 * inv_phit; - temp1 = Gf2 + xgct; - temp2 = `MAXA((temp1 + xgct), 0.0, 5.0); - xsct0 = 0.5 * (temp1 - Gf * sqrt(temp2)); - xbct = phib * inv_phit; - xsbstar = Vsbx * inv_phit; - temp1 = xbct + xsbstar + 2.0; - xsct = `MINA(xsct0, temp1, 5.0); - temp2 = CTG_T * (xsct - (1.0 + CTB_i) * (0.5 * xbct + xsbstar)); - `expl_low(temp2, dCTG) - end - ct_fact = 1.0 + CT_T * dCTG; - phit1 = phit * ct_fact * (1.0 + dphit1); - inv_phit1 = 1.0 / phit1; - xg = Vgb1 * inv_phit1; - -// Surface potential at source side - xi = 1.0 + Gf * `invSqrt2; - inv_xi = 1.0 / xi; - Ux = Vsbstar * inv_phit1; - xn_s = phib * inv_phit1 + Ux; - if (xn_s < `se) - delta_ns = exp(-xn_s); - else - delta_ns = `ke / `P3(xn_s - `se); - margin = 1.0e-5 * xi; - - `sp_s(x_s, xg, xn_s, delta_ns) - x_d = x_s; - x_m = x_s; - x_ds = 0.0; - -// Core PSP current calculation - Vdsat_lim = 3.912023005 * phit1; - if (xg <= 0.0) begin - qis = 0.0; - xgm = xg - x_s; - Voxm = xgm * phit1; - qeff1 = Voxm; - Vdsat = Vdsat_lim; - Vdse = Vds; - end else begin // (xg > 0) - delta_1s = 0.0; - temp = 1.0 / (2.0 + x_s * x_s); - xi0s = x_s * x_s * temp; - xi1s = 4.0 * (x_s * temp * temp); - xi2s = (8.0 * temp - 12.0 * xi0s) * temp * temp; - if (x_s < `se05) begin - delta_1s = exp(x_s); - Es = exp(-x_s); - delta_1s = delta_ns * delta_1s; - end else if (x_s > (xn_s - `se05)) begin - delta_1s = exp(x_s - xn_s); - Es = delta_ns / delta_1s; - end else begin - delta_1s = `ke05 / `P3(xn_s - x_s - `se05); - Es = `ke05 / `P3(x_s - `se05); - end - Ds = delta_1s - delta_ns * (x_s + 1.0 + xi0s); - if (x_s < 1.0e-5) begin - Ps = 0.5 * (x_s * x_s * (1.0 - `oneThird * (x_s * (1.0 - 0.25 * x_s)))); - Ds = `oneSixth * (delta_ns * x_s * x_s * x_s * (1.0 + 1.75 * x_s)); - temp = sqrt(1.0 - `oneThird * (x_s * (1.0 - 0.25 * x_s))); - sqm = `invSqrt2 * (x_s * temp); - alpha = 1.0 + Gf * `invSqrt2 * (1.0 - 0.5 * x_s + `oneSixth * (x_s * x_s)) / temp; - end else begin - Ps = x_s - 1.0 + Es; - sqm = sqrt(Ps); - alpha = 1.0 + 0.5 * (Gf * (1.0 - Es) / sqm); - end - Em = Es; - Ed = Em; - Dm = Ds; - Dd = Dm; - - // Drain saturation voltage - Rxcor = (1.0 + 0.2 * XCOR_T * Vsbx) / (1.0 + XCOR_T * Vsbx); - if (Ds > `ke05) begin - xgs = Gf * sqrt(Ps + Ds); - qis = Gf2 * Ds * phit1 / (xgs + Gf * sqm); - qbs = sqm * Gf * phit1; - if (RSB_i < 0.0) begin - rhob = 1.0 / (1.0 - RSB_i * Vsbx); - end else begin - rhob = 1.0 + RSB_i * Vsbx; - end - if (RSG_i < 0.0) begin - temp = 1.0 - RSG_i * qis; - end else begin - temp = 1.0 / (1.0 + RSG_i * qis); - end - GR = THER_i * (rhob * temp * qis); - Eeffm = E_eff0 * (qbs + eta_mu * qis); - temp1 = ln(Ps / (Ps + Ds + 1.0e-14)); - Mutmp = pow(Eeffm * MUE_T, THEMU_T) + CS_T * exp(0.5 * THECS_T * temp1); - Gmob = (1.0 + Mutmp + GR) * Rxcor; - if (THESATB_i < 0.0) begin - xitsb = 1.0 / (1.0 - THESATB_i * Vsbx); - end else begin - xitsb = 1.0 + THESATB_i * Vsbx; - end - temp2 = qis * xitsb; - wsat = 100.0 * (temp2 / (100.0 + temp2)); - if (THESATG_i < 0.0) begin - temp = 1.0 / (1.0 - THESATG_i * wsat); - end else begin - temp = 1.0 + THESATG_i * wsat; - end - thesat1 = THESAT_T * (temp / Gmob); - phi_inf = qis / alpha + phit1; - ysat = thesat1 * phi_inf * `invSqrt2; - if (CHNL_TYPE==`PMOS) begin - ysat = ysat / sqrt(1.0 + ysat); - end - za = 2.0 / (1.0 + sqrt(1.0 + 4.0 * ysat)); - temp1 = za * ysat; - Phi_0 = phi_inf * za * (1.0 + 0.86 * (temp1 * (1.0 - temp1 * za) / (1.0 + 4.0 * (temp1 * temp1 * za)))); - asat = xgs + 0.5 * Gf2; - Phi_2 = 0.98 * (Gf2 * Ds * phit1 / (asat + sqrt(asat * asat - Gf2 * Ds * 0.98))); - Phi_0_2 = Phi_0 + Phi_2; - Phi0_Phi2 = 2.0 * (Phi_0 * Phi_2); - Phi_sat = Phi0_Phi2 / (Phi_0_2 + sqrt(Phi_0_2 * Phi_0_2 - 1.98 * Phi0_Phi2)); - Vdsat = Phi_sat - phit1 * ln(1.0 + Phi_sat * (Phi_sat - 2.0 * asat * phit1) * inv_Gf2 / (phit1 * phit1 * Ds)); - end else begin - Vdsat = Vdsat_lim; - end - temp = pow(Vds / Vdsat, AX_i); - Vdse = Vds * pow(1.0 + temp, -inv_AX); - - // Surface potential at drain side - Udse = Vdse * inv_phit1; - xn_d = xn_s + Udse; - if (Udse < `se) begin - k_ds = exp(-Udse); - end else begin - k_ds = `ke / `P3(Udse - `se); - end - delta_nd = delta_ns * k_ds; - - `sp_s_d(x_d, xg, xn_d, delta_nd) - x_ds = x_d - x_s; - - // Approximations for extremely small x_ds: capacitance calculation - if (x_ds < 1.0e-10) begin - pC = 2.0 * (xg - x_s) + Gf2 * (1.0 - Es + delta_1s * k_ds - delta_nd * (1.0 + xi1s)); - qC = Gf2 * (1.0 - k_ds) * Ds; - temp = 2.0 - Gf2 * (Es + delta_1s * k_ds - delta_nd * xi2s); - temp = pC * pC - 2.0 * (temp * qC); - x_ds = 2.0 * (qC / (pC + sqrt(temp))); - x_d = x_s + x_ds; - end - dps = x_ds * phit1; - - xi0d = x_d * x_d / (2.0 + x_d * x_d); - if (x_d < `se05) begin - Ed = exp(-x_d); - if (x_d < 1.0e-5) begin - Dd = `oneSixth * delta_nd * x_d * x_d * x_d * (1.0 + 1.75 * x_d); - end else begin - Dd = delta_nd * (1.0 / Ed - x_d - 1.0 - xi0d); - end - end else begin - if (x_d > (xn_d - `se05)) begin - temp = exp(x_d - xn_d); - Ed = delta_nd / temp; - Dd = temp - delta_nd * (x_d + 1.0 + xi0d); - end else begin - Ed = `ke05 / `P3(x_d - `se05); - temp = `ke05 / `P3(xn_d - x_d - `se05); - Dd = temp - delta_nd * (x_d + 1.0 + xi0d); - end - end - - // Mid-point surface potential - x_m = 0.5 * (x_s + x_d); - Em = 0.0; - temp = Ed * Es; - if (temp > 0.0) begin - Em = sqrt(temp); - end - D_bar = 0.5 * (Ds + Dd); - Dm = D_bar + 0.125 * (x_ds * x_ds * (Em - 2.0 * inv_Gf2)); - - if (x_m < 1.0e-5) begin - Pm = 0.5 * (x_m * x_m * (1.0 - `oneThird * (x_m * (1.0 - 0.25 * x_m)))); - xgm = Gf * sqrt(Dm + Pm); - - // Polysilicon depletion - if (kp > 0.0) begin - eta_p = 1.0 / sqrt(1.0 + kp * xgm); - end // (kp > 0.0) - temp = sqrt(1.0 - `oneThird * (x_m * (1.0 - 0.25 * x_m))); - sqm = `invSqrt2 * (x_m * temp); - alpha = eta_p + `invSqrt2 * (Gf * (1.0 - 0.5 * x_m + `oneSixth * (x_m * x_m)) / temp); - end else begin - Pm = x_m - 1.0 + Em; - xgm = Gf * sqrt(Dm + Pm); - - // Polysilicon depletion - if (kp > 0.0) begin - d0 = 1.0 - Em + 2.0 * (xgm * inv_Gf2); - eta_p = 1.0 / sqrt(1.0 + kp * xgm); - temp = eta_p / (eta_p + 1.0); - x_pm = kp * (temp * temp * Gf2 * Dm); - p_pd = 2.0 * (xgm - x_pm) + Gf2 * (1.0 - Em + Dm); - q_pd = x_pm * (x_pm - 2.0 * xgm); - xi_pd = 1.0 - 0.5 * (Gf2 * (Em + Dm)); - u_pd = q_pd * p_pd / (p_pd * p_pd - xi_pd * q_pd); - x_m = x_m + u_pd; - km = exp(u_pd); - Em = Em / km; - Dm = Dm * km; - Pm = x_m - 1.0 + Em; - xgm = Gf * sqrt(Dm + Pm); - km0 = 1.0 - Em + 2.0 * (xgm * eta_p * inv_Gf2); - x_ds = x_ds * km * (d0 + D_bar) / (km0 + km * D_bar); - dps = x_ds * phit1; - end // (kp > 0.0) - sqm = sqrt(Pm); - alpha = eta_p + 0.5 * (Gf * (1.0 - Em) / sqm); - end - - // Potential midpoint inversion charge - qim = phit1 * (Gf2 * Dm / (xgm + Gf * sqm)); - qim1 = qim + phit1 * alpha; - qbm = sqm * Gf * phit1; - - // Series resistance - if (RSG_i < 0.0) begin - temp = 1.0 - RSG_i * qim; - end else begin - temp = 1.0 / (1.0 + RSG_i * qim); - end - GR = THER_i * (rhob * temp * qim); - - // Mobility reduction - qeff = qbm + eta_mu * qim; - qeff1 = qbm + eta_mu1 * qim; - Eeffm = E_eff0 * qeff; - temp1 = ln(Pm / (Pm + Dm + 1.0e-14)); - Mutmp = pow(Eeffm * MUE_T, THEMU_T) + CS_T * exp(0.5 * THECS_T * temp1); - Gmob = (1.0 + Mutmp + GR) * Rxcor; - - // Channel length modulation - s1 = ln((1.0 + (Vds - dps) * inv_VP) / (1.0 + (Vdse - dps) * inv_VP)); - dL = ALP_i * s1; - GdL = 1.0 / (1.0 + dL + dL * dL); - - // Velocity saturation - temp2 = qim * xitsb; - wsat = 100.0 * (temp2 / (100.0 + temp2)); - Gmob_dL = Gmob * GdL; - if (THESATG_i < 0.0) begin - temp = 1.0 / (1.0 - THESATG_i * wsat); - end else begin - temp = 1.0 + THESATG_i * wsat; - end - thesat1 = THESAT_T * (temp / Gmob_dL); - zsat = thesat1 * thesat1 * dps * dps; - if (CHNL_TYPE == `PMOS) begin - zsat = zsat / (1.0 + thesat1 * dps); - end - Gvsat = 0.5 * (Gmob_dL * (1.0 + sqrt(1.0 + 2.0 * zsat))); - Gvsatinv = 1.0 / Gvsat; - - // Variables for calculation of intrinsic charges and gate current - Voxm = xgm * phit1; - temp = Gmob_dL * Gvsatinv; - alpha1 = alpha * (1.0 + 0.5 * (zsat * temp * temp)); - H = temp * qim1 / alpha1; - - end // (xg > 0) diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_binning.include b/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_binning.include deleted file mode 100644 index cc4a30b9..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_binning.include +++ /dev/null @@ -1,192 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: PSP103_binning.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and -// 2004-2011 Arizona State University Licensed under the Educational Community License, -// Version 2.0 (the "License"); you may not use this file except in compliance with the -// License. You may obtain a copy of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 103.6.0 (PSP), 200.5.0 (JUNCAP), December 2017 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - // auxiliary variables - iLEWE = iLE * iWE; - iiLE = LE / `LEN; - iiWE = WE / `WEN; - iiLEWE = iiLE * iiWE; - iiiLEWE = iiWE / iiLE; - - // auxiliary variables for COX only - iiLEcv = LEcv / `LEN; - iiWEcv = WEcv / `WEN; - iiLEWEcv = iiLEcv * iiWEcv; - - // auxiliary variables for CGOV only - iLEcv = `LEN / LEcv; - iiiLEWEcv = iiWEcv / iiLEcv; - - // auxiliary variables for CGBOV only - iiLcv = Lcv / `LEN; - iiWcv = Wcv / `WEN; - iiLWcv = iiLcv * iiWcv; - - // auxiliary variables for CFR only - iLcv = `LEN / Lcv; - iiiLWcv = iiWcv / iiLcv; - - // Process parameters - VFB_p = POVFB + iLE * PLVFB + iWE * PWVFB + iLEWE * PLWVFB; - STVFB_p = POSTVFB + iLE * PLSTVFB + iWE * PWSTVFB + iLEWE * PLWSTVFB; - ST2VFB_p = POST2VFB; - TOX_p = POTOX; - EPSROX_p = POEPSROX; - NEFF_p = PONEFF + iLE * PLNEFF + iWE * PWNEFF + iLEWE * PLWNEFF; - FACNEFFAC_p = POFACNEFFAC + iLE * PLFACNEFFAC + iWE * PWFACNEFFAC + iLEWE * PLWFACNEFFAC; - GFACNUD_p = POGFACNUD + PLGFACNUD * iLE + PWGFACNUD * iWE + PLWGFACNUD * iLE * iWE; - VSBNUD_p = POVSBNUD; - DVSBNUD_p = PODVSBNUD; - VNSUB_p = POVNSUB; - NSLP_p = PONSLP; - DNSUB_p = PODNSUB; - DPHIB_p = PODPHIB + iLE * PLDPHIB + iWE * PWDPHIB + iLEWE * PLWDPHIB; - DELVTAC_p = PODELVTAC + iLE * PLDELVTAC + iWE * PWDELVTAC + iLEWE * PLWDELVTAC; - NP_p = PONP + iLE * PLNP + iWE * PWNP + iLEWE * PLWNP; - TOXOV_p = POTOXOV; - TOXOVD_p = POTOXOVD; - NOV_p = PONOV + iLE * PLNOV + iWE * PWNOV + iLEWE * PLWNOV; - NOVD_p = PONOVD + iLE * PLNOVD + iWE * PWNOVD + iLEWE * PLWNOVD; - - // Interface states parameters - CT_p = POCT + iLE * PLCT + iWE * PWCT + iLEWE * PLWCT; - CTG_p = POCTG; - CTB_p = POCTB; - STCT_p = POSTCT; - - // DIBL parameters - CF_p = POCF + iLE * PLCF + iWE * PWCF + iLEWE * PLWCF; - CFD_p = POCFD; - CFB_p = POCFB; - - // Subthreshold slope parameters of short channel transistor - PSCE_p = POPSCE + iLE * PLPSCE + iWE * PWPSCE + iLEWE * PLWPSCE; - PSCEB_p = POPSCEB; - PSCED_p = POPSCED; - - // Mobility parameters - BETN_p = iiWE * iLE * (POBETN + iLE * PLBETN + iWE * PWBETN + iLEWE * PLWBETN); - STBET_p = POSTBET + iLE * PLSTBET + iWE * PWSTBET + iLEWE * PLWSTBET; - MUE_p = POMUE + iLE * PLMUE + iWE * PWMUE + iLEWE * PLWMUE; - STMUE_p = POSTMUE; - THEMU_p = POTHEMU; - STTHEMU_p = POSTTHEMU; - CS_p = POCS + iLE * PLCS + iWE * PWCS + iLEWE * PLWCS; - STCS_p = POSTCS; - THECS_p = POTHECS; - STTHECS_p = POSTTHECS; - XCOR_p = POXCOR + iLE * PLXCOR + iWE * PWXCOR + iLEWE * PLWXCOR; - STXCOR_p = POSTXCOR; - FETA_p = POFETA; - - // Series resistance parameters - RS_p = PORS + iLE * PLRS + iWE * PWRS + iLEWE * PLWRS; - STRS_p = POSTRS; - RSB_p = PORSB; - RSG_p = PORSG; - - // Velocity saturation parameters - THESAT_p = POTHESAT + iLE * PLTHESAT + iWE * PWTHESAT + iLEWE * PLWTHESAT; - STTHESAT_p = POSTTHESAT + iLE * PLSTTHESAT + iWE * PWSTTHESAT + iLEWE * PLWSTTHESAT; - THESATB_p = POTHESATB + iLE * PLTHESATB + iWE * PWTHESATB + iLEWE * PLWTHESATB; - THESATG_p = POTHESATG + iLE * PLTHESATG + iWE * PWTHESATG + iLEWE * PLWTHESATG; - - // Saturation voltage parameters - AX_p = POAX + iLE * PLAX + iWE * PWAX + iLEWE * PLWAX; - - // Channel length modulation (CLM) parameters - ALP_p = POALP + iLE * PLALP + iWE * PWALP + iLEWE * PLWALP; - ALP1_p = POALP1 + iLE * PLALP1 + iWE * PWALP1 + iLEWE * PLWALP1; - ALP2_p = POALP2 + iLE * PLALP2 + iWE * PWALP2 + iLEWE * PLWALP2; - VP_p = POVP; - - // Impact ionization parameters - A1_p = POA1 + iLE * PLA1 + iWE * PWA1 + iLEWE * PLWA1; - A2_p = POA2; - STA2_p = POSTA2; - A3_p = POA3 + iLE * PLA3 + iWE * PWA3 + iLEWE * PLWA3; - A4_p = POA4 + iLE * PLA4 + iWE * PWA4 + iLEWE * PLWA4; - GCO_p = POGCO; - - // Gate current parameters - IGINV_p = POIGINV + iiLE * PLIGINV + iiWE * PWIGINV + iiLEWE * PLWIGINV; - IGOV_p = POIGOV + iLE * PLIGOV + iiWE * PWIGOV + iiiLEWE * PLWIGOV; - IGOVD_p = POIGOVD + iLE * PLIGOVD + iiWE * PWIGOVD + iiiLEWE * PLWIGOVD; - STIG_p = POSTIG; - GC2_p = POGC2; - GC3_p = POGC3; - CHIB_p = POCHIB; - - // Gate-induced drain leakage (GIDL) parameters - AGIDL_p = POAGIDL + iLE * PLAGIDL + iiWE * PWAGIDL + iiiLEWE * PLWAGIDL; - AGIDLD_p = POAGIDLD + iLE * PLAGIDLD + iiWE * PWAGIDLD + iiiLEWE * PLWAGIDLD; - BGIDL_p = POBGIDL; - BGIDLD_p = POBGIDLD; - STBGIDL_p = POSTBGIDL; - STBGIDLD_p = POSTBGIDLD; - CGIDL_p = POCGIDL; - CGIDLD_p = POCGIDLD; - - // Charge model parameters - COX_p = POCOX + iiLEcv * PLCOX + iiWEcv * PWCOX + iiLEWEcv * PLWCOX; - CGOV_p = POCGOV + iLEcv * PLCGOV + iiWEcv * PWCGOV + iiiLEWEcv * PLWCGOV; - CGOVD_p = POCGOVD + iLEcv * PLCGOVD + iiWEcv * PWCGOVD + iiiLEWEcv * PLWCGOVD; - CGBOV_p = POCGBOV + iiLcv * PLCGBOV + iiWcv * PWCGBOV + iiLWcv * PLWCGBOV; - CFR_p = POCFR + iLcv * PLCFR + iiWcv * PWCFR + iiiLWcv * PLWCFR; - CFRD_p = POCFRD + iLcv * PLCFRD + iiWcv * PWCFRD + iiiLWcv * PLWCFRD; - - // Noise model parameters - FNT_p = POFNT; - FNTEXC_p = iLE * iLE * (POFNTEXC + iLE * PLFNTEXC + iWE * PWFNTEXC + iLEWE * PLWFNTEXC); - NFA_p = PONFA + iLE * PLNFA + iWE * PWNFA + iLEWE * PLWNFA; - NFB_p = PONFB + iLE * PLNFB + iWE * PWNFB + iLEWE * PLWNFB; - NFC_p = PONFC + iLE * PLNFC + iWE * PWNFC + iLEWE * PLWNFC; - EF_p = POEF; - - // Edge transistor: PSP 103.4 - VFBEDGE_p = POVFBEDGE; - STVFBEDGE_p = POSTVFBEDGE + iLE * PLSTVFBEDGE + iWE * PWSTVFBEDGE + iLEWE * PLWSTVFBEDGE; - DPHIBEDGE_p = PODPHIBEDGE + iLE * PLDPHIBEDGE + iWE * PWDPHIBEDGE + iLEWE * PLWDPHIBEDGE; - NEFFEDGE_p = PONEFFEDGE + iLE * PLNEFFEDGE + iWE * PWNEFFEDGE + iLEWE * PLWNEFFEDGE; - CTEDGE_p = POCTEDGE + iLE * PLCTEDGE + iWE * PWCTEDGE + iLEWE * PLWCTEDGE; - BETNEDGE_p = iLE * (POBETNEDGE + iLE * PLBETNEDGE + iWE * PWBETNEDGE + iLEWE * PLWBETNEDGE); - STBETEDGE_p = POSTBETEDGE + iLE * PLSTBETEDGE + iWE * PWSTBETEDGE + iLEWE * PLWSTBETEDGE; - PSCEEDGE_p = POPSCEEDGE + iLE * PLPSCEEDGE + iWE * PWPSCEEDGE + iLEWE * PLWPSCEEDGE; - PSCEBEDGE_p = POPSCEBEDGE; - PSCEDEDGE_p = POPSCEDEDGE; - CFEDGE_p = POCFEDGE + iLE * PLCFEDGE + iWE * PWCFEDGE + iLEWE * PLWCFEDGE; - CFDEDGE_p = POCFDEDGE; - CFBEDGE_p = POCFBEDGE; - FNTEDGE_p = POFNTEDGE; - NFAEDGE_p = PONFAEDGE + iLE * PLNFAEDGE + iWE * PWNFAEDGE + iLEWE * PLWNFAEDGE; - NFBEDGE_p = PONFBEDGE + iLE * PLNFBEDGE + iWE * PWNFBEDGE + iLEWE * PLWNFBEDGE; - NFCEDGE_p = PONFCEDGE + iLE * PLNFCEDGE + iWE * PWNFCEDGE + iLEWE * PLWNFCEDGE; - EFEDGE_p = POEFEDGE; - - // Well proximity effect parameters - KVTHOWE = POKVTHOWE + iLE * PLKVTHOWE + iWE * PWKVTHOWE + iLEWE * PLWKVTHOWE; - KUOWE = POKUOWE + iLE * PLKUOWE + iWE * PWKUOWE + iLEWE * PLWKUOWE; diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_binpars.include b/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_binpars.include deleted file mode 100644 index 538409d8..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_binpars.include +++ /dev/null @@ -1,353 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: PSP103_binpars.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and -// 2004-2011 Arizona State University Licensed under the Educational Community License, -// Version 2.0 (the "License"); you may not use this file except in compliance with the -// License. You may obtain a copy of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 103.6.0 (PSP), 200.5.0 (JUNCAP), December 2017 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - - - // -------------------------------------------------------------------------------------------------------------- - // PSP global model parameters (binning) - // -------------------------------------------------------------------------------------------------------------- - - // Process parameters - `MPRnb(POVFB ,-1.0 ,"V" ,"Coefficient for the geometry independent part of VFB") - `MPRnb(PLVFB ,0.0 ,"V" ,"Coefficient for the length dependence of VFB") - `MPRnb(PWVFB ,0.0 ,"V" ,"Coefficient for the width dependence of VFB") - `MPRnb(PLWVFB ,0.0 ,"V" ,"Coefficient for the length times width dependence of VFB") - `MPRnb(POSTVFB ,5.0e-4 ,"V/K" ,"Coefficient for the geometry independent part of STVFB") - `MPRnb(PLSTVFB ,0.0 ,"V/K" ,"Coefficient for the length dependence of STVFB") - `MPRnb(PWSTVFB ,0.0 ,"V/K" ,"Coefficient for the width dependence of STVFB") - `MPRnb(PLWSTVFB ,0.0 ,"V/K" ,"Coefficient for the length times width dependence of STVFB") - `MPRnb(POST2VFB ,0.0 ,"K^-1" ,"Coefficient for the geometry independent part of ST2VFB") - `MPRnb(POTOX ,2.0e-9 ,"m" ,"Coefficient for the geometry independent part of TOX") - `MPRnb(POEPSROX ,3.9 ,"" ,"Coefficient for the geometry independent part of EPSOX") - `MPRnb(PONEFF ,5.0e23 ,"m^-3" ,"Coefficient for the geometry independent part of NEFF") - `MPRnb(PLNEFF ,0.0 ,"m^-3" ,"Coefficient for the length dependence of NEFF") - `MPRnb(PWNEFF ,0.0 ,"m^-3" ,"Coefficient for the width dependence of NEFF") - `MPRnb(PLWNEFF ,0.0 ,"m^-3" ,"Coefficient for the length times width dependence of NEFF") - `MPRnb(POFACNEFFAC ,1.0 ,"" ,"Coefficient for the geometry independent part of FACNEFFAC") - `MPRnb(PLFACNEFFAC ,0.0 ,"" ,"Coefficient for the length dependence of FACNEFFAC") - `MPRnb(PWFACNEFFAC ,0.0 ,"" ,"Coefficient for the width dependence of FACNEFFAC") - `MPRnb(PLWFACNEFFAC ,0.0 ,"" ,"Coefficient for the length times width dependence of FACNEFFAC") - `MPRnb(POGFACNUD ,1.0 ,"" ,"Coefficient for the geometry independent part of GFACNUD") - `MPRnb(PLGFACNUD ,0.0 ,"" ,"Coefficient for the length dependence of GFACNUD") - `MPRnb(PWGFACNUD ,0.0 ,"" ,"Coefficient for the width dependence of GFACNUD") - `MPRnb(PLWGFACNUD ,0.0 ,"" ,"Coefficient for the length times width dependence of GFACNUD") - `MPRnb(POVSBNUD ,0.0 ,"V" ,"Coefficient for the geometry independent part of VSBNUD") - `MPRnb(PODVSBNUD ,1.0 ,"V" ,"Coefficient for the geometry independent part of DVSBNUD") - `MPRnb(POVNSUB ,0.0 ,"V" ,"Coefficient for the geometry independent part of VNSUB") - `MPRnb(PONSLP ,0.05 ,"V" ,"Coefficient for the geometry independent part of NSLP") - `MPRnb(PODNSUB ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of DNSUB") - `MPRnb(PODPHIB ,0.0 ,"V" ,"Coefficient for the geometry independent part of DPHIB") - `MPRnb(PLDPHIB ,0.0 ,"V" ,"Coefficient for the length dependence of DPHIB") - `MPRnb(PWDPHIB ,0.0 ,"V" ,"Coefficient for the width dependence of DPHIB") - `MPRnb(PLWDPHIB ,0.0 ,"V" ,"Coefficient for the length times width dependence of DPHIB") - `MPRnb(PODELVTAC ,0.0 ,"V" ,"Coefficient for the geometry independent part of DELVTAC") - `MPRnb(PLDELVTAC ,0.0 ,"V" ,"Coefficient for the length dependence of DELVTAC") - `MPRnb(PWDELVTAC ,0.0 ,"V" ,"Coefficient for the width dependence of DELVTAC") - `MPRnb(PLWDELVTAC ,0.0 ,"V" ,"Coefficient for the length times width dependence of DELVTAC") - `MPRnb(PONP ,1.0e26 ,"m^-3" ,"Coefficient for the geometry independent part of NP") - `MPRnb(PLNP ,0.0 ,"m^-3" ,"Coefficient for the length dependence of NP") - `MPRnb(PWNP ,0.0 ,"m^-3" ,"Coefficient for the width dependence of NP") - `MPRnb(PLWNP ,0.0 ,"m^-3" ,"Coefficient for the length times width dependence of NP") - `MPRnb(POTOXOV ,2.0e-09 ,"m" ,"Coefficient for the geometry independent part of TOXOV") - `MPRnb(POTOXOVD ,2.0e-09 ,"m" ,"Coefficient for the geometry independent part of TOXOV for drain side") - `MPRnb(PONOV ,5.0e25 ,"m^-3" ,"Coefficient for the geometry independent part of NOV") - `MPRnb(PLNOV ,0.0 ,"m^-3" ,"Coefficient for the length dependence of NOV") - `MPRnb(PWNOV ,0.0 ,"m^-3" ,"Coefficient for the width dependence of NOV") - `MPRnb(PLWNOV ,0.0 ,"m^-3" ,"Coefficient for the length times width dependence of NOV") - `MPRnb(PONOVD ,5.0e25 ,"m^-3" ,"Coefficient for the geometry independent part of NOV for drain side") - `MPRnb(PLNOVD ,0.0 ,"m^-3" ,"Coefficient for the length dependence of NOV for drain side") - `MPRnb(PWNOVD ,0.0 ,"m^-3" ,"Coefficient for the width dependence of NOV for drain side") - `MPRnb(PLWNOVD ,0.0 ,"m^-3" ,"Coefficient for the length times width dependence of NOV for drain side") - - // Interface states parameters - `MPRnb(POCT ,0.0 ,"" ,"Coefficient for the geometry independent part of CT") - `MPRnb(PLCT ,0.0 ,"" ,"Coefficient for the length dependence of CT") - `MPRnb(PWCT ,0.0 ,"" ,"Coefficient for the width dependence of CT") - `MPRnb(PLWCT ,0.0 ,"" ,"Coefficient for the length times width dependence of CT") - `MPRnb(POCTG ,0.0 ,"" ,"Coefficient for the geometry independent part of CTG") - `MPRnb(POCTB ,0.0 ,"" ,"Coefficient for the geometry independent part of CTB") - `MPRnb(POSTCT ,1.0 ,"" ,"Coefficient for the geometry independent part of STCT") - - // DIBL parameters - `MPRnb(POCF ,0.0 ,"" ,"Coefficient for the geometry independent part of CF") - `MPRnb(PLCF ,0.0 ,"" ,"Coefficient for the length dependence of CF") - `MPRnb(PWCF ,0.0 ,"" ,"Coefficient for the width dependence of CF") - `MPRnb(PLWCF ,0.0 ,"" ,"Coefficient for the length times width dependence of CF") - `MPRnb(POCFD ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of CFD") - `MPRnb(POCFB ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of CFB") - - // Subthreshold slope parameters of short channel transistor - `MPRnb(POPSCE ,0.0 ,"" ,"Coefficient for the geometry independent part of PSCE") - `MPRnb(PLPSCE ,0.0 ,"" ,"Coefficient for the length dependence of PSCE") - `MPRnb(PWPSCE ,0.0 ,"" ,"Coefficient for the width dependence of PSCE") - `MPRnb(PLWPSCE ,0.0 ,"" ,"Coefficient for the length times width dependence of PSCE") - `MPRnb(POPSCEB ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of PSCEB") - `MPRnb(POPSCED ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of PSCED") - - // Mobility parameters - `MPRnb(POBETN ,7.0e-2 ,"m^2/V/s" ,"Coefficient for the geometry independent part of BETN") - `MPRnb(PLBETN ,0.0 ,"m^2/V/s" ,"Coefficient for the length dependence of BETN") - `MPRnb(PWBETN ,0.0 ,"m^2/V/s" ,"Coefficient for the width dependence of BETN") - `MPRnb(PLWBETN ,0.0 ,"m^2/V/s" ,"Coefficient for the length times width dependence of BETN") - `MPRnb(POSTBET ,1.0 ,"" ,"Coefficient for the geometry independent part of STBET") - `MPRnb(PLSTBET ,0.0 ,"" ,"Coefficient for the length dependence of STBET") - `MPRnb(PWSTBET ,0.0 ,"" ,"Coefficient for the width dependence of STBET") - `MPRnb(PLWSTBET ,0.0 ,"" ,"Coefficient for the length times width dependence of STBET") - `MPRnb(POMUE ,0.5 ,"m/V" ,"Coefficient for the geometry independent part of MUE") - `MPRnb(PLMUE ,0.0 ,"m/V" ,"Coefficient for the length dependence of MUE") - `MPRnb(PWMUE ,0.0 ,"m/V" ,"Coefficient for the width dependence of MUE") - `MPRnb(PLWMUE ,0.0 ,"m/V" ,"Coefficient for the length times width dependence of MUE") - `MPRnb(POSTMUE ,0.0 ,"" ,"Coefficient for the geometry independent part of STMUE") - `MPRnb(POTHEMU ,1.5 ,"" ,"Coefficient for the geometry independent part of THEMU") - `MPRnb(POSTTHEMU ,1.5 ,"" ,"Coefficient for the geometry independent part of STTHEMU") - `MPRnb(POCS ,0.0 ,"" ,"Coefficient for the geometry independent part of CS") - `MPRnb(PLCS ,0.0 ,"" ,"Coefficient for the length dependence of CS") - `MPRnb(PWCS ,0.0 ,"" ,"Coefficient for the width dependence of CS") - `MPRnb(PLWCS ,0.0 ,"" ,"Coefficient for the length times width dependence of CS") - `MPRnb(POSTCS ,0.0 ,"" ,"Coefficient for the geometry independent part of STCS") - `MPRnb(POTHECS ,2.0 ,"" ,"Coefficient for the geometry independent part of THECS") - `MPRnb(POSTTHECS ,0.0 ,"" ,"Coefficient for the geometry independent part of STHTECS") - `MPRnb(POXCOR ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of XCOR") - `MPRnb(PLXCOR ,0.0 ,"V^-1" ,"Coefficient for the length dependence of XCOR") - `MPRnb(PWXCOR ,0.0 ,"V^-1" ,"Coefficient for the width dependence of XCOR") - `MPRnb(PLWXCOR ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of XCOR") - `MPRnb(POSTXCOR ,0.0 ,"" ,"Coefficient for the geometry independent part of STXCOR") - `MPRnb(POFETA ,1.0 ,"" ,"Coefficient for the geometry independent part of FETA") - - // Series resistance parameters - `MPRnb(PORS ,30.0 ,"Ohm" ,"Coefficient for the geometry independent part of RS") - `MPRnb(PLRS ,0.0 ,"Ohm" ,"Coefficient for the length dependence of RS") - `MPRnb(PWRS ,0.0 ,"Ohm" ,"Coefficient for the width dependence of RS") - `MPRnb(PLWRS ,0.0 ,"Ohm" ,"Coefficient for the length times width dependence of RS") - `MPRnb(POSTRS ,1.0 ,"" ,"Coefficient for the geometry independent part of STRS") - `MPRnb(PORSB ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of RSB") - `MPRnb(PORSG ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of RSG") - - // Velocity saturation parameters - `MPRnb(POTHESAT ,1.0 ,"V^-1" ,"Coefficient for the geometry independent part of THESAT") - `MPRnb(PLTHESAT ,0.0 ,"V^-1" ,"Coefficient for the length dependence of THESAT") - `MPRnb(PWTHESAT ,0.0 ,"V^-1" ,"Coefficient for the width dependence of THESAT") - `MPRnb(PLWTHESAT ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of THESAT") - `MPRnb(POSTTHESAT ,1.0 ,"" ,"Coefficient for the geometry independent part of STTHESAT") - `MPRnb(PLSTTHESAT ,0.0 ,"" ,"Coefficient for the length dependence of STTHESAT") - `MPRnb(PWSTTHESAT ,0.0 ,"" ,"Coefficient for the width dependence of STTHESAT") - `MPRnb(PLWSTTHESAT ,0.0 ,"" ,"Coefficient for the length times width dependence of STTHESAT") - `MPRnb(POTHESATB ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of THESATB") - `MPRnb(PLTHESATB ,0.0 ,"V^-1" ,"Coefficient for the length dependence of THESATB") - `MPRnb(PWTHESATB ,0.0 ,"V^-1" ,"Coefficient for the width dependence of THESATB") - `MPRnb(PLWTHESATB ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of THESATB") - `MPRnb(POTHESATG ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of THESATG") - `MPRnb(PLTHESATG ,0.0 ,"V^-1" ,"Coefficient for the length dependence of THESATG") - `MPRnb(PWTHESATG ,0.0 ,"V^-1" ,"Coefficient for the width dependence of THESATG") - `MPRnb(PLWTHESATG ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of THESATG") - - // Saturation voltage parameters - `MPRnb(POAX ,3.0 ,"" ,"Coefficient for the geometry independent part of AX") - `MPRnb(PLAX ,0.0 ,"" ,"Coefficient for the length dependence of AX") - `MPRnb(PWAX ,0.0 ,"" ,"Coefficient for the width dependence of AX") - `MPRnb(PLWAX ,0.0 ,"" ,"Coefficient for the length times width dependence of AX") - - // Channel length modulation (CLM) parameters - `MPRnb(POALP ,1.0e-2 ,"" ,"Coefficient for the geometry independent part of ALP") - `MPRnb(PLALP ,0.0 ,"" ,"Coefficient for the length dependence of ALP") - `MPRnb(PWALP ,0.0 ,"" ,"Coefficient for the width dependence of ALP") - `MPRnb(PLWALP ,0.0 ,"" ,"Coefficient for the length times width dependence of ALP") - `MPRnb(POALP1 ,0.0 ,"V" ,"Coefficient for the geometry independent part of ALP1") - `MPRnb(PLALP1 ,0.0 ,"V" ,"Coefficient for the length dependence of ALP1") - `MPRnb(PWALP1 ,0.0 ,"V" ,"Coefficient for the width dependence of ALP1") - `MPRnb(PLWALP1 ,0.0 ,"V" ,"Coefficient for the length times width dependence of ALP1") - `MPRnb(POALP2 ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of ALP2") - `MPRnb(PLALP2 ,0.0 ,"V^-1" ,"Coefficient for the length dependence of ALP2") - `MPRnb(PWALP2 ,0.0 ,"V^-1" ,"Coefficient for the width dependence of ALP2") - `MPRnb(PLWALP2 ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of ALP2") - `MPRnb(POVP ,0.05 ,"V" ,"Coefficient for the geometry independent part of VP") - - // Impact ionization parameters - `MPRnb(POA1 ,1.0 ,"" ,"Coefficient for the geometry independent part of A1") - `MPRnb(PLA1 ,0.0 ,"" ,"Coefficient for the length dependence of A1") - `MPRnb(PWA1 ,0.0 ,"" ,"Coefficient for the width dependence of A1") - `MPRnb(PLWA1 ,0.0 ,"" ,"Coefficient for the length times width dependence of A1") - `MPRnb(POA2 ,10.0 ,"V" ,"Coefficient for the geometry independent part of A2") - `MPRnb(POSTA2 ,0.0 ,"V" ,"Coefficient for the geometry independent part of STA2") - `MPRnb(POA3 ,1.0 ,"" ,"Coefficient for the geometry independent part of A3") - `MPRnb(PLA3 ,0.0 ,"" ,"Coefficient for the length dependence of A3") - `MPRnb(PWA3 ,0.0 ,"" ,"Coefficient for the width dependence of A3") - `MPRnb(PLWA3 ,0.0 ,"" ,"Coefficient for the length times width dependence of A3") - `MPRnb(POA4 ,0.0 ,"V^-0.5" ,"Coefficient for the geometry independent part of A4") - `MPRnb(PLA4 ,0.0 ,"V^-0.5" ,"Coefficient for the length dependence of A4") - `MPRnb(PWA4 ,0.0 ,"V^-0.5" ,"Coefficient for the width dependence of A4") - `MPRnb(PLWA4 ,0.0 ,"V^-0.5" ,"Coefficient for the length times width dependence of A4") - `MPRnb(POGCO ,0.0 ,"" ,"Coefficient for the geometry independent part of GCO") - - // Gate current parameters - `MPRnb(POIGINV ,0.0 ,"A" ,"Coefficient for the geometry independent part of IGINV") - `MPRnb(PLIGINV ,0.0 ,"A" ,"Coefficient for the length dependence of IGINV") - `MPRnb(PWIGINV ,0.0 ,"A" ,"Coefficient for the width dependence of IGINV") - `MPRnb(PLWIGINV ,0.0 ,"A" ,"Coefficient for the length times width dependence of IGINV") - `MPRnb(POIGOV ,0.0 ,"A" ,"Coefficient for the geometry independent part of IGOV") - `MPRnb(PLIGOV ,0.0 ,"A" ,"Coefficient for the length dependence of IGOV") - `MPRnb(PWIGOV ,0.0 ,"A" ,"Coefficient for the width dependence of IGOV") - `MPRnb(PLWIGOV ,0.0 ,"A" ,"Coefficient for the length times width dependence of IGOV") - `MPRnb(POIGOVD ,0.0 ,"A" ,"Coefficient for the geometry independent part of IGOV for drain side") - `MPRnb(PLIGOVD ,0.0 ,"A" ,"Coefficient for the length dependence of IGOV for drain side") - `MPRnb(PWIGOVD ,0.0 ,"A" ,"Coefficient for the width dependence of IGOV for drain side") - `MPRnb(PLWIGOVD ,0.0 ,"A" ,"Coefficient for the length times width dependence of IGOV for drain side") - `MPRnb(POSTIG ,2.0 ,"" ,"Coefficient for the geometry independent part of STIG") - `MPRnb(POGC2 ,0.375 ,"" ,"Coefficient for the geometry independent part of GC2") - `MPRnb(POGC3 ,0.063 ,"" ,"Coefficient for the geometry independent part of GC3") - `MPRnb(POCHIB ,3.1 ,"V" ,"Coefficient for the geometry independent part of CHIB") - - // Gate-induced drain leakage (GIDL) parameters - `MPRnb(POAGIDL ,0.0 ,"A/V^3" ,"Coefficient for the geometry independent part of AGIDL") - `MPRnb(PLAGIDL ,0.0 ,"A/V^3" ,"Coefficient for the length dependence of AGIDL") - `MPRnb(PWAGIDL ,0.0 ,"A/V^3" ,"Coefficient for the width dependence of AGIDL") - `MPRnb(PLWAGIDL ,0.0 ,"A/V^3" ,"Coefficient for the length times width dependence of AGIDL") - `MPRnb(POAGIDLD ,0.0 ,"A/V^3" ,"Coefficient for the geometry independent part of AGIDL for drain side") - `MPRnb(PLAGIDLD ,0.0 ,"A/V^3" ,"Coefficient for the length dependence of AGIDL for drain side") - `MPRnb(PWAGIDLD ,0.0 ,"A/V^3" ,"Coefficient for the width dependence of AGIDL for drain side") - `MPRnb(PLWAGIDLD ,0.0 ,"A/V^3" ,"Coefficient for the length times width dependence of AGIDL for drain side") - `MPRnb(POBGIDL ,41.0 ,"V" ,"Coefficient for the geometry independent part of BGIDL") - `MPRnb(POBGIDLD ,41.0 ,"V" ,"Coefficient for the geometry independent part of BGIDL for drain side") - `MPRnb(POSTBGIDL ,0.0 ,"V/K" ,"Coefficient for the geometry independent part of STBGIDL") - `MPRnb(POSTBGIDLD ,0.0 ,"V/K" ,"Coefficient for the geometry independent part of STBGIDL for drain side") - `MPRnb(POCGIDL ,0.0 ,"" ,"Coefficient for the geometry independent part of CGIDL") - `MPRnb(POCGIDLD ,0.0 ,"" ,"Coefficient for the geometry independent part of CGIDL for drain side") - - // Charge model parameters - `MPRnb(POCOX ,1.0e-14 ,"F" ,"Coefficient for the geometry independent part of COX") - `MPRnb(PLCOX ,0.0 ,"F" ,"Coefficient for the length dependence of COX") - `MPRnb(PWCOX ,0.0 ,"F" ,"Coefficient for the width dependence of COX") - `MPRnb(PLWCOX ,0.0 ,"F" ,"Coefficient for the length times width dependence of COX") - `MPRnb(POCGOV ,1.0e-15 ,"F" ,"Coefficient for the geometry independent part of CGOV") - `MPRnb(PLCGOV ,0.0 ,"F" ,"Coefficient for the length dependence of CGOV") - `MPRnb(PWCGOV ,0.0 ,"F" ,"Coefficient for the width dependence of CGOV") - `MPRnb(PLWCGOV ,0.0 ,"F" ,"Coefficient for the length times width dependence of CGOV") - `MPRnb(POCGOVD ,1.0e-15 ,"F" ,"Coefficient for the geometry independent part of CGOV for drain side") - `MPRnb(PLCGOVD ,0.0 ,"F" ,"Coefficient for the length dependence of CGOV for drain side") - `MPRnb(PWCGOVD ,0.0 ,"F" ,"Coefficient for the width dependence of CGOV for drain side") - `MPRnb(PLWCGOVD ,0.0 ,"F" ,"Coefficient for the length times width dependence of CGOV for drain side") - `MPRnb(POCGBOV ,0.0 ,"F" ,"Coefficient for the geometry independent part of CGBOV") - `MPRnb(PLCGBOV ,0.0 ,"F" ,"Coefficient for the length dependence of CGBOV") - `MPRnb(PWCGBOV ,0.0 ,"F" ,"Coefficient for the width dependence of CGBOV") - `MPRnb(PLWCGBOV ,0.0 ,"F" ,"Coefficient for the length times width dependence of CGBOV") - `MPRnb(POCFR ,0.0 ,"F" ,"Coefficient for the geometry independent part of CFR") - `MPRnb(PLCFR ,0.0 ,"F" ,"Coefficient for the length dependence of CFR") - `MPRnb(PWCFR ,0.0 ,"F" ,"Coefficient for the width dependence of CFR") - `MPRnb(PLWCFR ,0.0 ,"F" ,"Coefficient for the length times width dependence of CFR") - `MPRnb(POCFRD ,0.0 ,"F" ,"Coefficient for the geometry independent part of CFR for drain side") - `MPRnb(PLCFRD ,0.0 ,"F" ,"Coefficient for the length dependence of CFR for drain side") - `MPRnb(PWCFRD ,0.0 ,"F" ,"Coefficient for the width dependence of CFR for drain side") - `MPRnb(PLWCFRD ,0.0 ,"F" ,"Coefficient for the length times width dependence of CFR for drain side") - - // Noise model parameters - `MPRnb(POFNT ,1.0 ,"" ,"Coefficient for the geometry independent part of FNT") - `MPRnb(POFNTEXC ,0.0 ,"" ,"Coefficient for the geometry independent part of FNTEXC") - `MPRnb(PLFNTEXC ,0.0 ,"" ,"Coefficient for the length dependence of FNTEXC") - `MPRnb(PWFNTEXC ,0.0 ,"" ,"Coefficient for the width dependence of FNTEXC") - `MPRnb(PLWFNTEXC ,0.0 ,"" ,"Coefficient for the length times width dependence of FNTEXC") - `MPRnb(PONFA ,8.0e22 ,"V^-1/m^4" ,"Coefficient for the geometry independent part of NFA") - `MPRnb(PLNFA ,0.0 ,"V^-1/m^4" ,"Coefficient for the length dependence of NFA") - `MPRnb(PWNFA ,0.0 ,"V^-1/m^4" ,"Coefficient for the width dependence of NFA") - `MPRnb(PLWNFA ,0.0 ,"V^-1/m^4" ,"Coefficient for the length times width dependence of NFA") - `MPRnb(PONFB ,3.0e7 ,"V^-1/m^2" ,"Coefficient for the geometry independent part of NFB") - `MPRnb(PLNFB ,0.0 ,"V^-1/m^2" ,"Coefficient for the length dependence of NFB") - `MPRnb(PWNFB ,0.0 ,"V^-1/m^2" ,"Coefficient for the width dependence of NFB") - `MPRnb(PLWNFB ,0.0 ,"V^-1/m^2" ,"Coefficient for the length times width dependence of NFB") - `MPRnb(PONFC ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of NFC") - `MPRnb(PLNFC ,0.0 ,"V^-1" ,"Coefficient for the length dependence of NFC") - `MPRnb(PWNFC ,0.0 ,"V^-1" ,"Coefficient for the width dependence of NFC") - `MPRnb(PLWNFC ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of NFC") - `MPRnb(POEF ,1.0 ,"" ,"Coefficient for the flicker noise frequency exponent") - - // Edge transistor parameters: PSP 103.4 - `MPRnb(POVFBEDGE ,-1.0 ,"V" ,"Coefficient for the geometry independent part of VFBEDGE") - `MPRnb(POSTVFBEDGE ,0.0 ,"V/K" ,"Coefficient for the geometry independent part of STVFBEDGE") - `MPRnb(PLSTVFBEDGE ,0.0 ,"V/K" ,"Coefficient for the length dependence of STVFBEDGE") - `MPRnb(PWSTVFBEDGE ,0.0 ,"V/K" ,"Coefficient for the width dependence of STVFBEDGE") - `MPRnb(PLWSTVFBEDGE ,0.0 ,"V/K" ,"Coefficient for the length times width dependence of STVFBEDGE") - `MPRnb(PODPHIBEDGE ,0.0 ,"V" ,"Coefficient for the geometry independent part of DPHIBEDGE") - `MPRnb(PLDPHIBEDGE ,0.0 ,"V" ,"Coefficient for the length dependence of DPHIBEDGE") - `MPRnb(PWDPHIBEDGE ,0.0 ,"V" ,"Coefficient for the width dependence of DPHIBEDGE") - `MPRnb(PLWDPHIBEDGE ,0.0 ,"V" ,"Coefficient for the length times width dependence of DPHIBEDGE") - `MPRnb(PONEFFEDGE ,5.0e23 ,"m^-3" ,"Coefficient for the geometry independent part of NEFFEDGE") - `MPRnb(PLNEFFEDGE ,0.0 ,"m^-3" ,"Coefficient for the length dependence of NEFFEDGE") - `MPRnb(PWNEFFEDGE ,0.0 ,"m^-3" ,"Coefficient for the width dependence of NEFFEDGE") - `MPRnb(PLWNEFFEDGE ,0.0 ,"m^-3" ,"Coefficient for the length times width dependence of NEFFEDGE") - `MPRnb(POCTEDGE ,0.0 ,"" ,"Coefficient for the geometry independent part of CTEDGE") - `MPRnb(PLCTEDGE ,0.0 ,"" ,"Coefficient for the length dependence of CTEDGE") - `MPRnb(PWCTEDGE ,0.0 ,"" ,"Coefficient for the width dependence of CTEDGE") - `MPRnb(PLWCTEDGE ,0.0 ,"" ,"Coefficient for the length times width dependence of CTEDGE") - `MPRnb(POBETNEDGE ,5.0e-4 ,"m^2/V/s" ,"Coefficient for the geometry independent part of BETNEDGE") - `MPRnb(PLBETNEDGE ,0.0 ,"m^2/V/s" ,"Coefficient for the length dependence of BETNEDGE") - `MPRnb(PWBETNEDGE ,0.0 ,"m^2/V/s" ,"Coefficient for the width dependence of BETNEDGE") - `MPRnb(PLWBETNEDGE ,0.0 ,"m^2/V/s" ,"Coefficient for the length times width dependence of BETNEDGE") - `MPRnb(POSTBETEDGE ,1.0 ,"" ,"Coefficient for the geometry independent part of STBETEDGE") - `MPRnb(PLSTBETEDGE ,0.0 ,"" ,"Coefficient for the length dependence of STBETEDGE") - `MPRnb(PWSTBETEDGE ,0.0 ,"" ,"Coefficient for the width dependence of STBETEDGE") - `MPRnb(PLWSTBETEDGE ,0.0 ,"" ,"Coefficient for the length times width dependence of STBETEDGE") - `MPRnb(POPSCEEDGE ,0.0 ,"" ,"Coefficient for the geometry independent part of PSCEEDGE") - `MPRnb(PLPSCEEDGE ,0.0 ,"" ,"Coefficient for the length dependence of PSCEEDGE") - `MPRnb(PWPSCEEDGE ,0.0 ,"" ,"Coefficient for the width dependence of PSCEEDGE") - `MPRnb(PLWPSCEEDGE ,0.0 ,"" ,"Coefficient for the length times width dependence of PSCEEDGE") - `MPRnb(POPSCEBEDGE ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of PSCEBEDGE") - `MPRnb(POPSCEDEDGE ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of PSCEDEDGE") - `MPRnb(POCFEDGE ,0.0 ,"" ,"Coefficient for the geometry independent part of CFEDGE") - `MPRnb(PLCFEDGE ,0.0 ,"" ,"Coefficient for the length dependence of CFEDGE") - `MPRnb(PWCFEDGE ,0.0 ,"" ,"Coefficient for the width dependence of CFEDGE") - `MPRnb(PLWCFEDGE ,0.0 ,"" ,"Coefficient for the length times width dependence of CFEDGE") - `MPRnb(POCFDEDGE ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of CFDEDGE") - `MPRnb(POCFBEDGE ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of CFBEDGE") - `MPRnb(POFNTEDGE ,1.0 ,"" ,"Coefficient for the geometry independent part of FNTEDGE") - `MPRnb(PONFAEDGE ,8.0e22 ,"V^-1/m^4" ,"Coefficient for the geometry independent part of NFAEDGE") - `MPRnb(PLNFAEDGE ,0.0 ,"V^-1/m^4" ,"Coefficient for the length dependence of NFAEDGE") - `MPRnb(PWNFAEDGE ,0.0 ,"V^-1/m^4" ,"Coefficient for the width dependence of NFAEDGE") - `MPRnb(PLWNFAEDGE ,0.0 ,"V^-1/m^4" ,"Coefficient for the length times width dependence of NFAEDGE") - `MPRnb(PONFBEDGE ,3.0e7 ,"V^-1/m^2" ,"Coefficient for the geometry independent part of NFBEDGE") - `MPRnb(PLNFBEDGE ,0.0 ,"V^-1/m^2" ,"Coefficient for the length dependence of NFBEDGE") - `MPRnb(PWNFBEDGE ,0.0 ,"V^-1/m^2" ,"Coefficient for the width dependence of NFBEDGE") - `MPRnb(PLWNFBEDGE ,0.0 ,"V^-1/m^2" ,"Coefficient for the length times width dependence of NFBEDGE") - `MPRnb(PONFCEDGE ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of NFCEDGE") - `MPRnb(PLNFCEDGE ,0.0 ,"V^-1" ,"Coefficient for the length dependence of NFCEDGE") - `MPRnb(PWNFCEDGE ,0.0 ,"V^-1" ,"Coefficient for the width dependence of NFCEDGE") - `MPRnb(PLWNFCEDGE ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of NFCEDGE") - `MPRnb(POEFEDGE ,1.0 ,"" ,"Coefficient for the geometry independent part of EFEDGE") - - // Well proximity effect parameters - `MPRnb(POKVTHOWE ,0.0 ,"" ,"Coefficient for the geometry independent part of KVTHOWE") - `MPRnb(PLKVTHOWE ,0.0 ,"" ,"Coefficient for the length dependence part of KVTHOWE") - `MPRnb(PWKVTHOWE ,0.0 ,"" ,"Coefficient for the width dependence part of KVTHOWE") - `MPRnb(PLWKVTHOWE ,0.0 ,"" ,"Coefficient for the length times width dependence part of KVTHOWE") - `MPRnb(POKUOWE ,0.0 ,"" ,"Coefficient for the geometry independent part of KUOWE") - `MPRnb(PLKUOWE ,0.0 ,"" ,"Coefficient for the length dependence part of KUOWE") - `MPRnb(PWKUOWE ,0.0 ,"" ,"Coefficient for the width dependence part of KUOWE") - `MPRnb(PLWKUOWE ,0.0 ,"" ,"Coefficient for the length times width dependence part of KUOWE") - - // `Dummy' parameters for binning-set labeling - `MPRnb(LMIN ,0 ,"m" ,"Dummy parameter to label binning set") - `MPRnb(LMAX ,1.0 ,"m" ,"Dummy parameter to label binning set") - `MPRnb(WMIN ,0.0 ,"m" ,"Dummy parameter to label binning set") - `MPRnb(WMAX ,1.0 ,"m" ,"Dummy parameter to label binning set") diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_macrodefs.include b/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_macrodefs.include deleted file mode 100644 index affc536f..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_macrodefs.include +++ /dev/null @@ -1,428 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: PSP103_macrodefs.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and -// 2004-2011 Arizona State University Licensed under the Educational Community License, -// Version 2.0 (the "License"); you may not use this file except in compliance with the -// License. You may obtain a copy of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 103.6.0 (PSP), 200.5.0 (JUNCAP), December 2017 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - -///////////////////////////////////////////// -// -// Macros and constants used in PSP -// -///////////////////////////////////////////// - -// Explicit Gmin -`define GMIN 1E-15 - -`define PMOS -1 -`define NMOS +1 - -// Some functions -`define MINA(x,y,a) 0.5*((x)+(y)-sqrt(((x)-(y))*((x)-(y))+(a))) -`define MAXA(x,y,a) 0.5*((x)+(y)+sqrt(((x)-(y))*((x)-(y))+(a))) - -`define MNE(x,y,a,mne) \ -tme1 = 4.0 - (a); \ -tme2 = (x) + (y); \ -mne = 2.0 / tme1 * (tme2 - sqrt(tme2 * tme2 - tme1 * (x) * (y))); - -`define MXE(x,y,a,mxe) \ -tme1 = 4.0 - (a); \ -tme2 = (x) + (y); \ -mxe = 2.0 / tme1 * (tme2 + sqrt(tme2 * tme2 - tme1 * (x) * (y))); - -// Physical constants -`define QMN 5.951993 -`define QMP 7.448711 - -// Other constants (PSP-mos) -`define DELTA1 0.02 -`define invSqrt2 7.0710678118654746e-01 -`define oneSixth 1.6666666666666667e-01 -`define LEN 1.0e-6 -`define WEN 1.0e-6 - - -///////////////////////////////////////////////////////////////////////////// -// -// Macro definitions. -// -// Note that because at present locally scoped variables -// can only be in named blocks, the intermediate variables -// used in the macros below must be explicitly declared -// as variables in the main code. -// -///////////////////////////////////////////////////////////////////////////// - - -// sigma function used in surface potential and other calculations -// -------------------------------------------------------------------------------------------------------------- -// Note: one call uses expressions for arguments so parentheses around the arguments in the expressions are necessary -`define sigma(a,c,tau,eta,y) \ - nu = (a) + (c); \ - mutau = nu * nu + (tau) * (0.5 * ((c) * (c)) - (a)); \ - y = (eta) + (a) * nu * (tau) / (mutau + (nu / mutau) * (tau) * (tau) * (c) * ((c) * (c) * `oneThird - (a))); - -// modified version of sigma function, which takes 4 arguments -// -------------------------------------------------------------------------------------------------------------- -`define sigma2(a,b,c,tau,eta,y) \ - nu = (a) + (c); \ - mutau = (nu) * (nu) + (tau) * (0.5 * ((c) * (c)) - (a) * (b)); \ - y = (eta) + (a) * nu * (tau) / (mutau + (nu / mutau) * (tau) * (tau) * (c) * ((c) * (c) * `oneThird - (a) * (b))); - -// sp_s function: surface potential calculation -// -------------------------------------------------------------------------------------------------------------- -`define sp_s(sp,xg,xn,delta) \ - if (abs(xg) <= margin) begin \ - SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \ - sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \ - end else begin \ - if (xg < -margin) begin \ - SP_S_yg = -xg; \ - SP_S_ysub = 1.25 * (SP_S_yg * inv_xi); \ - SP_S_eta = 0.5 * (SP_S_ysub + 10 - sqrt((SP_S_ysub - 6.0) * (SP_S_ysub - 6.0) + 64.0)); \ - SP_S_temp = SP_S_yg - SP_S_eta; \ - SP_S_a = SP_S_temp * SP_S_temp + Gf2*(SP_S_eta + 1.0);\ - SP_S_c = 2.0 * SP_S_temp - Gf2; \ - SP_S_tau = -SP_S_eta + ln(SP_S_a * inv_Gf2); \ - `sigma(SP_S_a, SP_S_c, SP_S_tau, SP_S_eta, SP_S_y0) \ - `expl_high(SP_S_y0, SP_S_delta0) \ - SP_S_delta1 = exp(-SP_S_x0); \ - SP_S_temp = 1.0 / (2.0 + SP_S_y0 * SP_S_y0); \ - SP_S_xi0 = SP_S_y0 * SP_S_y0 * SP_S_temp; \ - SP_S_xi1 = 4.0 * (SP_S_y0 * SP_S_temp * SP_S_temp); \ - SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \ - SP_S_temp = SP_S_yg - SP_S_y0; \ - SP_S_temp1 = (delta) * SP_S_delta1; \ - SP_S_pC = 2.0 * SP_S_temp + Gf2 * (SP_S_delta0 - 1.0 - SP_S_temp1 + (delta) * (1.0 - SP_S_xi1)); \ - SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta0 - SP_S_y0 - 1.0 + SP_S_temp1 + (delta) * (SP_S_y0 - 1.0 - SP_S_xi0)); \ - SP_S_temp = 2.0 - Gf2 * (SP_S_delta0 + SP_S_temp1 - (delta) * SP_S_xi2); \ - SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \ - sp = -SP_S_y0 - 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \ - end else begin \ - SP_xg1 = 1.0 / (1.25 + Gf * 7.324648775608221e-001); \ - SP_S_A_fac= (xi * 1.25 * SP_xg1 - 1.0) * SP_xg1; \ - SP_S_xbar = xg * inv_xi * (1.0 + SP_S_A_fac * xg); \ - `expl_low(-SP_S_xbar, SP_S_temp) \ - SP_S_w = 1.0 - SP_S_temp; \ - SP_S_x1 = xg + Gf2 * 0.5 - Gf * sqrt(xg + Gf2 * 0.25 - SP_S_w); \ - SP_S_bx = (xn) + 3.0; \ - SP_S_eta = `MINA(SP_S_x1, SP_S_bx, 5.0) - 0.5 * (SP_S_bx - sqrt(SP_S_bx * SP_S_bx + 5.0)); \ - SP_S_temp = xg - SP_S_eta; \ - SP_S_temp1= exp(-SP_S_eta); \ - SP_S_temp2= 1.0 / (2.0 + SP_S_eta * SP_S_eta); \ - SP_S_xi0 = SP_S_eta * SP_S_eta * SP_S_temp2; \ - SP_S_xi1 = 4.0 * (SP_S_eta * SP_S_temp2 * SP_S_temp2); \ - SP_S_xi2 = (8.0 * SP_S_temp2 - 12.0 * SP_S_xi0) * SP_S_temp2 * SP_S_temp2; \ - SP_S_a = max(1.0e-40, SP_S_temp * SP_S_temp - Gf2 * (SP_S_temp1 + SP_S_eta - 1.0 - (delta) * (SP_S_eta + 1.0 + SP_S_xi0))); \ - SP_S_b = 1.0 - 0.5 * (Gf2 * (SP_S_temp1 - (delta) * SP_S_xi2)); \ - SP_S_c = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_temp1 - (delta) * (1.0 + SP_S_xi1)); \ - SP_S_tau = (xn) - SP_S_eta + ln(SP_S_a / Gf2); \ - `sigma2(SP_S_a, SP_S_b, SP_S_c, SP_S_tau, SP_S_eta, SP_S_x0) \ - if (SP_S_x0 < `se05) begin \ - SP_S_delta0 = exp(SP_S_x0); \ - SP_S_delta1 = exp(-SP_S_x0); \ - SP_S_delta0 = (delta) * SP_S_delta0; \ - end else begin \ - if (SP_S_x0 > (xn) - `se05) begin \ - SP_S_delta0 = exp(SP_S_x0 - (xn)); \ - SP_S_delta1 = (delta) / SP_S_delta0; \ - end else begin \ - SP_S_delta0 = `ke05 / `P3((xn) - SP_S_x0 - `se05); \ - SP_S_delta1 = `ke05 / `P3(SP_S_x0 - `se05); \ - end \ - end \ - SP_S_temp = 1.0 / (2.0 + SP_S_x0 * SP_S_x0); \ - SP_S_xi0 = SP_S_x0 * SP_S_x0 * SP_S_temp; \ - SP_S_xi1 = 4.0 * (SP_S_x0 * SP_S_temp * SP_S_temp); \ - SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \ - SP_S_temp = xg - SP_S_x0; \ - SP_S_pC = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_delta1 + SP_S_delta0 - (delta) * (1.0 + SP_S_xi1)); \ - SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta1 + SP_S_x0 - 1.0 + SP_S_delta0 - (delta) * (SP_S_x0 + 1.0 + SP_S_xi0)); \ - SP_S_temp = 2.0 - Gf2 * (SP_S_delta1 + SP_S_delta0 - (delta) * SP_S_xi2); \ - SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \ - sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \ - end \ - end - -// sp_s_d function: surface potential calculation at drain (subset of function sp_s) -// -------------------------------------------------------------------------------------------------------------- -`define sp_s_d(sp,xg,xn,delta) \ - if (abs(xg) <= margin) begin \ - SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \ - sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \ - end else begin \ - SP_S_bx = (xn) + 3; \ - SP_S_eta = `MINA(SP_S_x1, SP_S_bx, 5.0) - 0.5 * (SP_S_bx - sqrt(SP_S_bx * SP_S_bx + 5.0)); \ - SP_S_temp = xg - SP_S_eta; \ - SP_S_temp1= exp(-SP_S_eta); \ - SP_S_temp2= 1.0 / (2.0 + SP_S_eta * SP_S_eta); \ - SP_S_xi0 = SP_S_eta * SP_S_eta * SP_S_temp2; \ - SP_S_xi1 = 4.0 * (SP_S_eta * SP_S_temp2 * SP_S_temp2); \ - SP_S_xi2 = (8.0 * SP_S_temp2 - 12.0 * SP_S_xi0) * SP_S_temp2 * SP_S_temp2; \ - SP_S_a = max(1.0e-40, SP_S_temp * SP_S_temp - Gf2 * (SP_S_temp1 + SP_S_eta - 1.0 - (delta) * (SP_S_eta + 1.0 + SP_S_xi0))); \ - SP_S_b = 1.0 - 0.5 * (Gf2 * (SP_S_temp1 - (delta) * SP_S_xi2)); \ - SP_S_c = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_temp1 - (delta) * (1.0 + SP_S_xi1)); \ - SP_S_tau = (xn) - SP_S_eta + ln(SP_S_a / Gf2); \ - `sigma2(SP_S_a, SP_S_b, SP_S_c, SP_S_tau, SP_S_eta, SP_S_x0) \ - if (SP_S_x0 < `se05) begin \ - SP_S_delta0 = exp(SP_S_x0); \ - SP_S_delta1 = exp(-SP_S_x0); \ - SP_S_delta0 = (delta) * SP_S_delta0; \ - end else begin \ - if (SP_S_x0 > (xn) - `se05) begin \ - SP_S_delta0 = exp(SP_S_x0 - (xn)); \ - SP_S_delta1 = (delta) / SP_S_delta0; \ - end else begin \ - SP_S_delta0 = `ke05 / `P3((xn) - SP_S_x0 - `se05); \ - SP_S_delta1 = `ke05 / `P3(SP_S_x0 - `se05); \ - end \ - end \ - SP_S_temp = 1.0 / (2.0 + SP_S_x0 * SP_S_x0); \ - SP_S_xi0 = SP_S_x0 * SP_S_x0 * SP_S_temp; \ - SP_S_xi1 = 4.0 * (SP_S_x0 * SP_S_temp * SP_S_temp); \ - SP_S_xi2 = (8.0 * SP_S_temp-12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \ - SP_S_temp = xg - SP_S_x0; \ - SP_S_pC = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_delta1 + SP_S_delta0 - (delta) * (1.0 + SP_S_xi1)); \ - SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta1 + SP_S_x0 - 1.0 + SP_S_delta0 - (delta) * (SP_S_x0 + 1.0 + SP_S_xi0)); \ - SP_S_temp = 2.0 - Gf2*(SP_S_delta1+SP_S_delta0-(delta)*SP_S_xi2); \ - SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \ - sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp)));\ - end - -// sp_ovInit function: surface potential calculation for the overlap regions initialization -// -------------------------------------------------------------------------------------------------------------- -`define sp_ovInit(GOV, GOV2, SP_OV_eps2, SP_OV_a, SP_OV_delta1) \ - inv_GOV = 1.0 / GOV; \ - SP_OV_eps = 3.1 * GOV + 8.5; \ - SP_OV_eps2 = SP_OV_eps * SP_OV_eps; \ - SP_OV_delta = 0.5 * SP_OV_eps; \ - if (inv_GOV < 0.06) begin \ - SP_OV_a = 64.0 * inv_GOV; \ - end else begin \ - if (inv_GOV <= 0.45) begin \ - SP_OV_a = 22.0 * inv_GOV + 3.0; \ - end else begin \ - if (inv_GOV <= 1.6) begin \ - SP_OV_a = -7.2 * inv_GOV + 15.5; \ - end else begin \ - SP_OV_a = GOV; \ - end \ - end \ - end \ - SP_OV_delta1 = SP_OV_delta + GOV2 * 0.5 - GOV * sqrt(SP_OV_delta + GOV2 * 0.25 + SP_OV_a); - -// qi_edge charge calculation for the edge transistor -// -------------------------------------------------------------------------------------------------------------- -`define qi_edge(qieff_edge,xg_edge,xn_edge) \ - Q_EDGE_xsth = xbedge + xn_edge; \ - Q_EDGE_xth0 = Q_EDGE_xsth + Gfedge * sqrt(Q_EDGE_xsth); \ - Q_EDGE_xth = Q_EDGE_xth0 + dxthedge; \ - Q_EDGE_n = 1.0 + Gfedge / (2.0 * sqrt(Q_EDGE_xsth)); \ - Q_EDGE_n_inv = 1.0 / Q_EDGE_n; \ - Q_EDGE_xgt = xg_edge - Q_EDGE_xth; \ - if (Q_EDGE_xgt > -12.0) begin \ - Q_EDGE_xgt0 = Q_EDGE_xgt + lnGfedge2 - 1.0; \ - Q_EDGE_xgt0e = 0.5 * (Q_EDGE_xgt0 + sqrt(Q_EDGE_xgt0 * Q_EDGE_xgt0 + 10.0)); \ - Q_EDGE_qi0si = Q_EDGE_xgt - Q_EDGE_n * ln(Q_EDGE_xgt0e) + lnGfedge2; \ - Q_EDGE_qi0 = 0.5 * (Q_EDGE_qi0si + sqrt(Q_EDGE_qi0si * Q_EDGE_qi0si + 2.0)); \ - `expl_high((Q_EDGE_xgt - Q_EDGE_qi0), Q_EDGE_exp_x) \ - Q_EDGE_d0 = Gfedge2 * Q_EDGE_exp_x; \ - Q_EDGE_d0p = pow(Q_EDGE_d0, Q_EDGE_n_inv); \ - Q_EDGE_sqerr = Q_EDGE_n * Q_EDGE_n + (2.0 * (Q_EDGE_qi0 + Q_EDGE_n) - Q_EDGE_d0p) * Q_EDGE_d0p; \ - Q_EDGE_errq = Q_EDGE_n * ((sqrt(Q_EDGE_sqerr) - Q_EDGE_n) / Q_EDGE_d0p - 1.0); \ - qieff_edge = Q_EDGE_qi0 - Q_EDGE_errq; \ - end else begin \ - `expl_low((Q_EDGE_n_inv * (Q_EDGE_xgt + lnGfedge2)), qieff_edge) \ - end - -// CollapsableR macro: used for parasitic resistances -// -------------------------------------------------------------------------------------------------------------- -// Note: if R=0, the Verilog-A compiler should recognize that the corresponding nodes can be collapsed -`define CollapsableR(G, R, SN, N1, N2, Rname) \ - if ((R) > 0.0) begin \ - I(N1, N2) <+ MULT_i * (G) * V(N1, N2); \ - /* line below can be removed if compiler issue occurs */ \ - I(N1, N2) <+ white_noise(MULT_i * SN, Rname); \ - end else begin \ - V(N1, N2) <+ 0.0; \ - end - -// Local variable declaration (used in SPcalc_dc/SPcalc_ac sections, PSP103_SPCalculation.include and SP macro) -// -------------------------------------------------------------------------------------------------------------- -`define SPcalcLocalVarDecl \ - real phib, G_0, Vsbstar; \ - real Vsbx, xg, Dnsub, Gf, Gf2, inv_Gf2, xi, inv_xi, Ux, xn_s, delta_ns, margin, x_s, delta_1s, xi0s, xi1s; \ - real xi2s, Es, Ds, Ps, Rxcor, xgs, qis, qbs, rhob, GR, Eeffm, Mutmp, Gmob, xitsb, wsat, thesat1, phi_inf; \ - real ysat, za, Phi_0, asat, Phi_2, Phi_0_2, Phi0_Phi2, Phi_sat, Vdse, Udse, xn_d, k_ds, delta_nd, x_d, x_ds; \ - real pC, qC, dps, xi0d, Ed, Dd, x_m, Em, D_bar, Dm, Pm, xgm, eta_p, sqm, alpha, d0, x_pm, p_pd, q_pd, xi_pd; \ - real u_pd, km, km0, qim, qim1, qbm, qeff, qeff1, s1, dL, GdL, Gmob_dL, zsat, Gvsat, Gvsatinv, Voxm, alpha1, H; \ - real SP_S_temp, SP_S_temp1, SP_S_temp2; \ - real SP_S_yg, SP_S_ysub, SP_S_eta, SP_S_a, SP_S_c, SP_S_tau, SP_S_y0, SP_S_delta0, SP_S_delta1, SP_S_xi0; \ - real SP_S_xi1, SP_S_xi2, SP_S_pC, SP_S_qC, SP_xg1, SP_S_A_fac, SP_S_xbar, SP_S_w, SP_S_x1, SP_S_bx, SP_S_b; \ - real SP_S_x0; - -// TempInitialize macro: initialize the temperature dependent variables -// -------------------------------------------------------------------------------------------------------------- -`define TempInitialize \ - TKD_sq = TKD * TKD; \ - delT = TKD - TKR; \ - rTn = TKR / TKD; \ - ln_rTn = ln(rTn); \ - phit = TKD * `KBOL / `QELE; \ - inv_phit = 1.0 / phit; \ - Eg = 1.179 - 9.025e-5 * TKD - 3.05e-7 * TKD_sq; \ - phibFac = (1.045 + 4.5e-4 * TKD) * (0.523 + 1.4e-3 * TKD - 1.48e-6 * TKD_sq) * TKD_sq / 9.0E4; \ - phibFac = `MAX(phibFac, 1.0E-3); \ - \ - /* parameter for white noise of parasitic resistances */ \ - nt0 = 4.0 * `KBOL * TKD; - -// TempScaling macro: calculation of temperature dependent variables -// -------------------------------------------------------------------------------------------------------------- -`define TempScaling \ - phib_dc = Eg + DPHIB_i + 2.0 * phit * ln(NEFF_i * pow(phibFac, -0.75) * 4.0e-26); \ - phib_dc = `MAX(phib_dc, 5.0E-2); \ - G_0_dc = sqrt(2.0 * `QELE * NEFF_i * EPSSI * inv_phit) / CoxPrime; \ - \ - /* Poly-silicon depletion */ \ - kp = 0.0; \ - np = 0.0; \ - if (NP_i > 0.0) begin \ - arg2max = 8.0e7 / tox_sq; \ - np = `MAX(NP_i, arg2max); \ - np = `MAX(5.0e24, np); \ - kp = 2.0 * CoxPrime * CoxPrime * phit / (`QELE * np * EPSSI); \ - end \ - \ - /* QM corrections */ \ - qlim2 = 100.0 * phit * phit; \ - if (QMC_i > 0.0) begin \ - qb0 = sqrt(phit * G_0_dc * G_0_dc * phib_dc); \ - dphibq = 0.75 * qq * pow(qb0, `twoThirds); \ - phib_dc = phib_dc + dphibq; \ - G_0_dc = G_0_dc * (1.0 + 2.0 * `twoThirds * dphibq / qb0); \ - end \ - sqrt_phib_dc = sqrt(phib_dc); \ - phix_dc = 0.95 * phib_dc; \ - aphi_dc = 0.0025 * phib_dc * phib_dc; \ - bphi_dc = aphi_dc; \ - phix2 = 0.5 * sqrt(bphi_dc); \ - phix1_dc = `MINA(phix_dc - phix2, 0.0, aphi_dc); \ - alpha_b = 0.5 * (phib_dc + Eg); \ - us1 = sqrt(VSBNUD_i + phib_dc) - sqrt_phib_dc; \ - us21 = sqrt(VSBNUD_i + DVSBNUD_i + phib_dc) - sqrt_phib_dc - us1; \ - \ - /* Additional variables for separate surface potential calculation for CV */ \ - phib_ac = Eg + DPHIB_i + DELVTAC_i + 2.0 * phit * ln(NEFFAC_i * pow(phibFac, -0.75) * 4.0e-26); \ - phib_ac = `MAX(phib_ac, 5.0E-2); \ - G_0_ac = sqrt(2.0 * `QELE * NEFFAC_i * EPSSI * inv_phit) / CoxPrime; \ - \ - if (QMC_i > 0.0) begin \ - qb0 = sqrt(phit * G_0_ac * G_0_ac * phib_ac); \ - dphibq = 0.75 * qq * pow(qb0, `twoThirds); \ - phib_ac = phib_ac + dphibq; \ - G_0_ac = G_0_ac * (1.0 + 2.0 * `twoThirds * dphibq / qb0); \ - end \ - \ - phix_ac = 0.95 * phib_ac; \ - aphi_ac = 0.0025 * phib_ac * phib_ac; \ - bphi_ac = aphi_ac; \ - phix2 = 0.5 * sqrt(bphi_ac); \ - phix1_ac = `MINA(phix_ac - phix2, 0.0, aphi_ac); \ - \ - /* Temperature scaling of parameters*/ \ - VFB_T = VFB_i + STVFB_i * delT * (1.0 + ST2VFB_i * delT)+ DELVTO_i; \ - \ - /* Interface states parameters*/ \ - tf_ct = exp(STCT_i * ln_rTn); \ - CT_T = CT_i * tf_ct; \ - CTG_T = CTG_i / rTn; \ - \ - /* Mobility parameters */ \ - tf_bet = exp(STBET_i * ln_rTn); \ - BETN_T = BETN_i * tf_bet; \ - BET_i = FACTUO_i * BETN_T * CoxPrime; \ - THEMU_T = THEMU_i * exp(STTHEMU_i * ln_rTn); \ - tf_mue = exp(STMUE_i * ln_rTn); \ - MUE_T = MUE_i * tf_mue; \ - THECS_T = THECS_i * exp(STTHECS_i * ln_rTn); \ - tf_cs = exp(STCS_i * ln_rTn); \ - CS_T = CS_i * tf_cs; \ - tf_xcor = exp(STXCOR_i * ln_rTn); \ - XCOR_T = XCOR_i * tf_xcor; \ - \ - /* Series resistance */ \ - tf_ther = exp(STRS_i * ln_rTn); \ - RS_T = RS_i * tf_ther; \ - THER_i = 2.0 * BET_i * RS_T; \ - \ - /* Velocity saturation */ \ - tf_thesat = exp(STTHESAT_i * ln_rTn); \ - THESAT_T = THESAT_i * tf_thesat; \ - \ - /* Impact ionization */ \ - A2_T = A2_i * exp(-STA2_i * ln_rTn); \ - \ - /* Noise */ \ - nt = FNT_i * 4.0 * `KBOL * TKD; \ - Sfl_prefac = phit * phit * BET_i / Cox_over_q; \ - \ - /* Edge transistor */ \ - if ((SWEDGE_i != 0.0) && (BETNEDGE_i > 0.0)) begin \ - VFBEDGE_T = VFBEDGE_i + STVFBEDGE_i * delT + DELVTOEDGE_i; \ - tf_betedge = exp(STBETEDGE_i * ln_rTn); \ - BETNEDGE_T = BETNEDGE_i * tf_betedge; \ - BETEDGE_i = FACTUOEDGE_i * BETNEDGE_T * CoxPrime; \ - phit0edge = phit * (1.0 + CTEDGE_i * rTn); \ - phibedge = Eg + DPHIBEDGE_i + 2.0 * phit0edge * ln(NEFFEDGE_i * pow(phibFac, -0.75) * 4.0e-26); \ - phibedge = `MAX(phibedge, 5.0E-2); \ - Gfedge = sqrt(2.0 * `QELE * NEFFEDGE_i * EPSSI * inv_phit) / CoxPrime; \ - Gfedge2 = Gfedge * Gfedge; \ - lnGfedge2 = ln(Gfedge2); \ - phixedge = 0.95 * phibedge; \ - aphiedge = 0.0025 * phibedge * phibedge; \ - bphiedge = aphiedge; \ - phix2edge = 0.5 * sqrt(bphiedge); \ - phix1edge = `MINA(phixedge - phix2edge, 0.0, aphiedge); \ - Sfl_prefac_edge = phit * phit * BETEDGE_i / Cox_over_q; \ - ntedge = FNTEDGE_i * 4.0 * `KBOL * TKD; \ - end else begin \ - VFBEDGE_T = 0.0; \ - tf_betedge = 1.0; \ - BETNEDGE_T = 0.0; \ - BETEDGE_i = 0.0; \ - phit0edge = phit; \ - phibedge = 0.0; \ - Gfedge = 1.0; \ - Gfedge2 = 1.0; \ - lnGfedge2 = 0.0; \ - phixedge = 0.0; \ - aphiedge = 0.0; \ - bphiedge = 0.0; \ - phix2edge = 0.0; \ - phix1edge = 0.0; \ - Sfl_prefac_edge = 0.0; \ - ntedge = 1.0; \ - end diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_module.include b/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_module.include deleted file mode 100644 index b536ff03..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_module.include +++ /dev/null @@ -1,3240 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: PSP103_module.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and -// 2004-2011 Arizona State University Licensed under the Educational Community License, -// Version 2.0 (the "License"); you may not use this file except in compliance with the -// License. You may obtain a copy of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 103.6.0 (PSP), 200.5.0 (JUNCAP), December 2017 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - // -------------------------------------------------------------------------------------------------------------- - // Node definitions - // -------------------------------------------------------------------------------------------------------------- - - `ifdef SelfHeating - inout D, G, S, B, DT; - `else // SelfHeating - inout D, G, S, B; - `endif // SelfHeating - electrical D; - electrical G; - electrical S; - electrical B; - `ifdef SelfHeating - thermal DT; - branch (DT) br_rth, br_ith; - `endif // SelfHeating - - // Internal nodes and branches for correlated drain and gate noise - electrical NOI; - branch (NOI) NOII; - branch (NOI) NOIR; - branch (NOI) NOIC; - - // Internal nodes for gate and bulk resistors - electrical GP; - electrical SI; - electrical DI; - electrical BP; - electrical BI; - electrical BS; - electrical BD; - - // Internal nodes and branches for spline collocation (NQS) - `ifdef NQSmodel - electrical INT1; - electrical INT2; - electrical INT3; - electrical INT4; - electrical INT5; - electrical INT6; - electrical INT7; - electrical INT8; - electrical INT9; - branch(INT1) SPLINE1; - branch(INT2) SPLINE2; - branch(INT3) SPLINE3; - branch(INT4) SPLINE4; - branch(INT5) SPLINE5; - branch(INT6) SPLINE6; - branch(INT7) SPLINE7; - branch(INT8) SPLINE8; - branch(INT9) SPLINE9; - branch(INT1) RES1; - branch(INT2) RES2; - branch(INT3) RES3; - branch(INT4) RES4; - branch(INT5) RES5; - branch(INT6) RES6; - branch(INT7) RES7; - branch(INT8) RES8; - branch(INT9) RES9; - `endif // NQSmodel - - // -------------------------------------------------------------------------------------------------------------- - // Special model parameters and switch parameters - // -------------------------------------------------------------------------------------------------------------- - - // Special model parameters, some are also simulator global variables - `MPInb(LEVEL ,103 ,"" ,"Model level") - `MPIty(TYPE ,1 ,"" ,"Channel type parameter, +1=NMOS -1=PMOS") - `MPRco(TR ,21.0 ,"C" ,-273.0 ,inf ,"nominal (reference) temperature") - - // Switch parameters that turn models or effects on or off - `MPIcc(SWGEO ,1 ,"" ,0 ,2 ,"Flag for geometrical model, 0=local, 1=global, 2=binning") - `MPIcc(SWIGATE ,0 ,"" ,0 ,1 ,"Flag for gate current, 0=turn off IG") - `MPIcc(SWIMPACT ,0 ,"" ,0 ,1 ,"Flag for impact ionization current, 0=turn off II") - `MPIcc(SWGIDL ,0 ,"" ,0 ,1 ,"Flag for GIDL current, 0=turn off IGIDL") - `MPIcc(SWJUNCAP ,0 ,"" ,0 ,3 ,"Flag for juncap, 0=turn off juncap") - `MPIcc(SWJUNASYM ,0 ,"" ,0 ,1 ,"Flag for asymmetric junctions; 0=symmetric, 1=asymmetric") - `MPIcc(SWNUD ,0 ,"" ,0 ,2 ,"Flag for NUD-effect; 0=off, 1=on, 2=on+CV-correction") - `MPIcc(SWEDGE ,0 ,"" ,0 ,1 ,"Flag for drain current of edge transistors; 0=off, 1=on") - `MPIcc(SWDELVTAC ,0 ,"" ,0 ,1 ,"Flag for separate capacitance calculation; 0=off, 1=on") - `MPIcc(SWIGN ,1 ,"" ,0 ,1 ,"Flag for induced gate noise; 0=off, 1=on") - `ifdef NQSmodel - `MPIcc(SWNQS ,0 ,"" ,0 ,9 ,"Flag for NQS, 0=off, 1, 2, 3, 5, or 9=number of collocation points") - `endif // NQSmodel - `MPRcz(QMC ,1.0 ,"" ,"Quantum-mechanical correction factor") - - // -------------------------------------------------------------------------------------------------------------- - // Instance parameters - // -------------------------------------------------------------------------------------------------------------- - - // Instance parameters for global and binning models only - `IPRco(L ,1.0e-5 ,"m" ,1.0e-9 ,inf ,"Design length") - `IPRco(W ,1.0e-5 ,"m" ,1.0e-9 ,inf ,"Design width") - `IPRnb(SA ,0.0 ,"m" ,"Distance between OD-edge and poly from one side") - `IPRnb(SB ,0.0 ,"m" ,"Distance between OD-edge and poly from other side") - `IPRnb(SD ,0.0 ,"m" ,"Distance between neighbouring fingers") - `IPRcz(SCA ,0.0 ,"" ,"Integral of the first distribution function for scattered well dopants") - `IPRcz(SCB ,0.0 ,"" ,"Integral of the second distribution function for scattered well dopants") - `IPRcz(SCC ,0.0 ,"" ,"Integral of the third distribution function for scattered well dopants") - `IPRnb(SC ,0.0 ,"m" ,"Distance between OD-edge and nearest well edge") - `IPRco(NF ,1.0 ,"" ,1.0 ,inf ,"Number of fingers") - `IPRcc(NGCON ,1.0 ,"" ,1.0 ,2.0 ,"Number of gate contacts") - `IPRnb(XGW ,1.0e-7 ,"m" ,"Distance from the gate contact to the channel edge") - `IPRnb(NRS ,0.0 ,"" ,"Number of squares of source diffusion") - `IPRnb(NRD ,0.0 ,"" ,"Number of squares of drain diffusion") - - // Instance parameters for local model only - `IPRco(JW ,1.0e-6 ,"m" ,`LG_cliplow ,inf ,"Gate-edge length of source/drain junction") - - // Instance parameters for global, binning, and local models - `IPRnb(DELVTO ,0.0 ,"V" ,"Threshold voltage shift parameter") - `IPRcz(FACTUO ,1.0 ,"" ,"Zero-field mobility pre-factor") - `IPRnb(DELVTOEDGE ,0.0 ,"V" ,"Threshold voltage shift parameter of edge transistor") - `IPRcz(FACTUOEDGE ,1.0 ,"" ,"Zero-field mobility pre-factor of edge transistor") - `IPRco(ABSOURCE ,1.0e-12 ,"m^2" ,`AB_cliplow ,inf ,"Bottom area of source junction") - `IPRco(LSSOURCE ,1.0e-6 ,"m" ,`LS_cliplow ,inf ,"STI-edge length of source junction") - `IPRco(LGSOURCE ,1.0e-6 ,"m" ,`LG_cliplow ,inf ,"Gate-edge length of source junction") - `IPRco(ABDRAIN ,1.0e-12 ,"m^2" ,`AB_cliplow ,inf ,"Bottom area of drain junction") - `IPRco(LSDRAIN ,1.0e-6 ,"m" ,`LS_cliplow ,inf ,"STI-edge length of drain junction") - `IPRco(LGDRAIN ,1.0e-6 ,"m" ,`LG_cliplow ,inf ,"Gate-edge length of drain junction") - `IPRco(AS ,1.0e-12 ,"m^2" ,`AB_cliplow ,inf ,"Bottom area of source junction") - `IPRco(PS ,1.0e-6 ,"m" ,`LS_cliplow ,inf ,"Perimeter of source junction") - `IPRco(AD ,1.0e-12 ,"m^2" ,`AB_cliplow ,inf ,"Bottom area of drain junction") - `IPRco(PD ,1.0e-6 ,"m" ,`LS_cliplow ,inf ,"Perimeter of drain junction") - `IPRco(MULT ,1.0 ,"" ,0.0 ,inf ,"Number of devices in parallel") - - // -------------------------------------------------------------------------------------------------------------- - // PSP local model parameters - // -------------------------------------------------------------------------------------------------------------- - - // Process parameters - `MPRnb(VFB ,-1.0 ,"V" ,"Flat band voltage at TR") - `MPRnb(STVFB ,5.0e-4 ,"V/K" ,"Temperature dependence of VFB") - `MPRnb(ST2VFB ,0.0 ,"K^-1" ,"Quadratic temperature dependence of VFB") - `MPRco(TOX ,2.0e-09 ,"m" ,1.0e-10 ,inf ,"Gate oxide thickness") - `MPRco(EPSROX ,3.9 ,"" ,1.0 ,inf ,"Relative permittivity of gate dielectric") - `MPRcc(NEFF ,5.0e23 ,"m^-3" ,1.0e20 ,1.0e26 ,"Effective substrate doping") - `MPRcz(FACNEFFAC ,1.0 ,"" ,"Pre-factor for effective substrate doping in separate charge calculation") - `MPRco(GFACNUD ,1.0 ,"" ,0.01 ,inf ,"Body-factor change due to NUD-effect") - `MPRcz(VSBNUD ,0.0 ,"V" ,"Lower Vsb value for NUD-effect") - `MPRco(DVSBNUD ,1.0 ,"V" ,0.1 ,inf ,"Vsb-range for NUD-effect") - `MPRnb(VNSUB ,0.0 ,"V" ,"Effective doping bias-dependence parameter") - `MPRco(NSLP ,0.05 ,"V" ,1.0e-3 ,inf ,"Effective doping bias-dependence parameter") - `MPRcc(DNSUB ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Effective doping bias-dependence parameter") - `MPRnb(DPHIB ,0.0 ,"V" ,"Offset parameter for PHIB") - `MPRnb(DELVTAC ,0.0 ,"V" ,"Offset parameter for PHIB in separate charge calculation") - `MPRcz(NP ,1.0e26 ,"m^-3" ,"Gate poly-silicon doping") - `MPRco(TOXOV ,2.0e-09 ,"m" ,1.0e-10 ,inf ,"Overlap oxide thickness") - `MPRco(TOXOVD ,2.0e-09 ,"m" ,1.0e-10 ,inf ,"Overlap oxide thickness for drain side") - `MPRcc(NOV ,5.0e25 ,"m^-3" ,1.0e23 ,1.0e27 ,"Effective doping of overlap region") - `MPRcc(NOVD ,5.0e25 ,"m^-3" ,1.0e23 ,1.0e27 ,"Effective doping of overlap region for drain side") - - // Interface states parameters: PSP 103.6 - `MPRcz(CT ,0.0 ,"" ,"Interface states factor") - `MPRcz(CTG ,0.0 ,"" ,"Gate voltage dependence of interface states factor") - `MPRnb(CTB ,0.0 ,"" ,"Bulk voltage dependence of interface states factor") - `MPRnb(STCT ,1.0 ,"" ,"Geometry-independent temperature dependence of CT") - - // DIBL parameters - `MPRcz(CF ,0.0 ,"" ,"DIBL-parameter") - `MPRcz(CFD ,0.0 ,"V^-1" ,"Drain voltage dependence of CF") - `MPRcc(CFB ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Back bias dependence of CF") - - // Subthreshold slope parameters of short channel transistor - `MPRcz(PSCE ,0.0 ,"" ,"Subthreshold slope coefficient for short channel transistor") - `MPRcc(PSCEB ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of subthreshold slope coefficient for short channel transistor") - `MPRcz(PSCED ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of subthreshold slope coefficient for short channel transistor") - - // Mobility parameters - `MPRcz(BETN ,7.0e-2 ,"m^2/V/s" ,"Channel aspect ratio times zero-field mobility") - `MPRnb(STBET ,1.0 ,"" ,"Temperature dependence of BETN") - `MPRcz(MUE ,0.5 ,"m/V" ,"Mobility reduction coefficient at TR") - `MPRnb(STMUE ,0.0 ,"" ,"Temperature dependence of MUE") - `MPRcz(THEMU ,1.5 ,"" ,"Mobility reduction exponent at TR") - `MPRnb(STTHEMU ,1.5 ,"" ,"Temperature dependence of THEMU") - `MPRcz(CS ,0.0 ,"" ,"Coulomb scattering parameter at TR") - `MPRnb(STCS ,0.0 ,"" ,"Temperature dependence of CS") - `MPRcz(THECS ,2.0 ,"" ,"Coulomb scattering exponent at TR") - `MPRnb(STTHECS ,0.0 ,"" ,"Temperature dependence of THECS") - `MPRcz(XCOR ,0.0 ,"V^-1" ,"Non-universality factor") - `MPRnb(STXCOR ,0.0 ,"" ,"Temperature dependence of XCOR") - `MPRcz(FETA ,1.0 ,"" ,"Effective field parameter") - - // Series-resistance parameters (for resistance modeling as part of intrinsic mobility reduction) - `MPRcz(RS ,30.0 ,"Ohm" ,"Series resistance at TR") - `MPRnb(STRS ,1.0 ,"" ,"Temperature dependence of RS") - `MPRcc(RSB ,0.0 ,"V^-1" ,-0.5 ,1.0 ,"Back-bias dependence of series resistance") - `MPRco(RSG ,0.0 ,"V^-1" ,-0.5 ,inf ,"Gate-bias dependence of series resistance") - - // Velocity saturation parameters - `MPRcz(THESAT ,1.0 ,"V^-1" ,"Velocity saturation parameter at TR") - `MPRnb(STTHESAT ,1.0 ,"" ,"Temperature dependence of THESAT") - `MPRcc(THESATB ,0.0 ,"V^-1" ,-0.5 ,1.0 ,"Back-bias dependence of velocity saturation") - `MPRco(THESATG ,0.0 ,"V^-1" ,-0.5 ,inf ,"Gate-bias dependence of velocity saturation") - - // Saturation voltage parameters - `MPRco(AX ,3.0 ,"" ,2.0 ,inf ,"Linear/saturation transition factor") - - // Channel length modulation (CLM) parameters - `MPRcz(ALP ,0.01 ,"" ,"CLM pre-factor") - `MPRcz(ALP1 ,0.0 ,"V" ,"CLM enhancement factor above threshold") - `MPRcz(ALP2 ,0.0 ,"V^-1" ,"CLM enhancement factor below threshold") - `MPRco(VP ,0.05 ,"V" ,1.0e-10 ,inf ,"CLM logarithm dependence factor") - - // Impact ionization (II) parameters - `MPRcz(A1 ,1.0 ,"" ,"Impact-ionization pre-factor") - `MPRcz(A2 ,10.0 ,"V" ,"Impact-ionization exponent at TR") - `MPRnb(STA2 ,0.0 ,"V" ,"Temperature dependence of A2") - `MPRcz(A3 ,1.0 ,"" ,"Saturation-voltage dependence of impact-ionization") - `MPRcz(A4 ,0.0 ,"V^-0.5" ,"Back-bias dependence of impact-ionization") - - // Gate current parameters - `MPRcc(GCO ,0.0 ,"" ,-10.0 ,10.0 ,"Gate tunnelling energy adjustment") - `MPRcz(IGINV ,0.0 ,"A" ,"Gate channel current pre-factor") - `MPRcz(IGOV ,0.0 ,"A" ,"Gate overlap current pre-factor") - `MPRcz(IGOVD ,0.0 ,"A" ,"Gate overlap current pre-factor for drain side") - `MPRnb(STIG ,2.0 ,"" ,"Temperature dependence of IGINV and IGOV") - `MPRcc(GC2 ,0.375 ,"" ,0.0 ,10.0 ,"Gate current slope factor") - `MPRcc(GC3 ,0.063 ,"" ,-2.0 ,2.0 ,"Gate current curvature factor") - `MPRco(CHIB ,3.1 ,"V" ,1.0 ,inf ,"Tunnelling barrier height") - - // Gate Induced Drain/Source Leakage (GIDL) parameters - `MPRcz(AGIDL ,0.0 ,"A/V^3" ,"GIDL pre-factor") - `MPRcz(AGIDLD ,0.0 ,"A/V^3" ,"GIDL pre-factor for drain side") - `MPRcz(BGIDL ,41.0 ,"V" ,"GIDL probability factor at TR") - `MPRcz(BGIDLD ,41.0 ,"V" ,"GIDL probability factor at TR for drain side") - `MPRnb(STBGIDL ,0.0 ,"V/K" ,"Temperature dependence of BGIDL") - `MPRnb(STBGIDLD ,0.0 ,"V/K" ,"Temperature dependence of BGIDL for drain side") - `MPRnb(CGIDL ,0.0 ,"" ,"Back-bias dependence of GIDL") - `MPRnb(CGIDLD ,0.0 ,"" ,"Back-bias dependence of GIDL for drain side") - - // Charge model parameters - `MPRcz(COX ,1.0e-14 ,"F" ,"Oxide capacitance for intrinsic channel") - `MPRcz(CGOV ,1.0e-15 ,"F" ,"Oxide capacitance for gate-drain/source overlap") - `MPRcz(CGOVD ,1.0e-15 ,"F" ,"Oxide capacitance for gate-drain overlap") - `MPRcz(CGBOV ,0.0 ,"F" ,"Oxide capacitance for gate-bulk overlap") - `MPRcz(CFR ,0.0 ,"F" ,"Outer fringe capacitance") - `MPRcz(CFRD ,0.0 ,"F" ,"Outer fringe capacitance for drain side") - - // Noise parameters - `MPRcz(FNT ,1.0 ,"" ,"Thermal noise coefficient") - `MPRcz(FNTEXC ,0.0 ,"" ,"Excess noise coefficient") - `MPRcz(NFA ,8.0e22 ,"V^-1/m^4" ,"First coefficient of flicker noise") - `MPRcz(NFB ,3.0e07 ,"V^-1/m^2" ,"Second coefficient of flicker noise") - `MPRcz(NFC ,0.0 ,"V^-1" ,"Third coefficient of flicker noise") - `MPRcz(EF ,1.0 ,"" ,"Flicker noise frequency exponent") - - // Edge transistor parameters: PSP 103.4 - `MPRnb(VFBEDGE ,-1.0 ,"V" ,"Flat band voltage of edge transistors at TR") - `MPRnb(STVFBEDGE ,5.0e-4 ,"V/K" ,"Temperature dependence of VFBEDGE") - `MPRnb(DPHIBEDGE ,0.0 ,"V" ,"Offset parameter for PHIB of edge transistors") - `MPRcc(NEFFEDGE ,5.0e23 ,"m^-3" ,1.0e20 ,1.0e26 ,"Effective substrate doping of edge transistors") - `MPRcz(CTEDGE ,0.0 ,"" ,"Interface states factor of edge transistors") - `MPRcz(BETNEDGE ,5.0e-4 ,"m^2/V/s" ,"Channel aspect ratio times zero-field mobility of edge transistor") - `MPRnb(STBETEDGE ,1.0 ,"" ,"Temperature dependence of BETNEDGE") - `MPRcz(PSCEEDGE ,0.0 ,"" ,"Subthreshold slope coefficient for short channel edge transistors") - `MPRcc(PSCEBEDGE ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of subthreshold slope coefficient for short channel edge transistors") - `MPRcz(PSCEDEDGE ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of subthreshold slope coefficient for short channel edge transistors") - `MPRcz(CFEDGE ,0.0 ,"" ,"DIBL parameter of edge transistors") - `MPRcz(CFDEDGE ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of DIBL-parameter of edge transistors") - `MPRcc(CFBEDGE ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of DIBL-parameter of edge transistors") - `MPRcz(FNTEDGE ,1.0 ,"" ,"Thermal noise coefficient of edge transistors") - `MPRcz(NFAEDGE ,8.0e22 ,"V^-1/m^4" ,"First coefficient of flicker noise of edge transistors") - `MPRcz(NFBEDGE ,3.0e07 ,"V^-1/m^2" ,"Second coefficient of flicker noise of edge transistors") - `MPRcz(NFCEDGE ,0.0 ,"V^-1" ,"Third coefficient of flicker noise of edge transistors") - `MPRcz(EFEDGE ,1.0 ,"" ,"Flicker noise frequency exponent of edge transistors") - - // NQS parameters - `ifdef NQSmodel - `MPRcz(MUNQS ,1.0 ,"" ,"Relative mobility for NQS modelling") - `endif // NQSmodel - - // Parasitic resistance parameters - `MPRcz(RG ,0.0 ,"Ohm" ,"Gate resistance") - `MPRcz(RSE ,0.0 ,"Ohm" ,"External source resistance") - `MPRcz(RDE ,0.0 ,"Ohm" ,"External drain resistance") - `MPRcz(RBULK ,0.0 ,"Ohm" ,"Bulk resistance between node BP and BI") - `MPRcz(RWELL ,0.0 ,"Ohm" ,"Well resistance between node BI and B") - `MPRcz(RJUNS ,0.0 ,"Ohm" ,"Source-side bulk resistance between node BI and BS") - `MPRcz(RJUND ,0.0 ,"Ohm" ,"Drain-side bulk resistance between node BI and BD") - - // Self heating effect parameters - `ifdef SelfHeating - `MPRcz(RTH ,0.0 ,"K/W" ,"Thermal resistance") - `MPRcz(CTH ,0.0 ,"J/K" ,"Thermal capacitance") - `MPRnb(STRTH ,0.0 ,"" ,"Temperature sensitivity of RTH") - `endif // SelfHeating - - // -------------------------------------------------------------------------------------------------------------- - // PSP global model parameters (binning) - // -------------------------------------------------------------------------------------------------------------- - - `include "PSP103_binpars.include" - - // -------------------------------------------------------------------------------------------------------------- - // PSP global model parameters - // -------------------------------------------------------------------------------------------------------------- - - // Process Parameters - `MPRnb(LVARO ,0.0 ,"m" ,"Geom. independent difference between actual and programmed gate length") - `MPRnb(LVARL ,0.0 ,"" ,"Length dependence of LVAR") - `MPRnb(LVARW ,0.0 ,"" ,"Width dependence of LVAR") - `MPRnb(LAP ,0.0 ,"m" ,"Effective channel length reduction per side") - `MPRnb(WVARO ,0.0 ,"m" ,"Geom. independent difference between actual and programmed field-oxide opening") - `MPRnb(WVARL ,0.0 ,"" ,"Length dependence of WVAR") - `MPRnb(WVARW ,0.0 ,"" ,"Width dependence of WVAR") - `MPRnb(WOT ,0.0 ,"m" ,"Effective channel width reduction per side") - `MPRnb(DLQ ,0.0 ,"m" ,"Effective channel length reduction for CV") - `MPRnb(DWQ ,0.0 ,"m" ,"Effective channel width reduction for CV") - `MPRnb(VFBO ,-1.0 ,"V" ,"Geometry-independent flat-band voltage at TR") - `MPRnb(VFBL ,0.0 ,"V" ,"Length dependence of flat-band voltage") - `MPRnb(VFBW ,0.0 ,"V" ,"Width dependence of flat-band voltage") - `MPRnb(VFBLW ,0.0 ,"V" ,"Area dependence of flat-band voltage") - `MPRnb(STVFBO ,5.0e-4 ,"V/K" ,"Geometry-independent temperature dependence of VFB") - `MPRnb(STVFBL ,0.0 ,"V/K" ,"Length dependence of temperature dependence of VFB") - `MPRnb(STVFBW ,0.0 ,"V/K" ,"Width dependence of temperature dependence of VFB") - `MPRnb(STVFBLW ,0.0 ,"V/K" ,"Area dependence of temperature dependence of VFB") - `MPRnb(ST2VFBO ,0.0 ,"K^-1" ,"Quadratic temperature dependence of VFB") - `MPRco(TOXO ,2.0e-9 ,"m" ,1.0e-10 ,inf ,"Gate oxide thickness") - `MPRco(EPSROXO ,3.9 ,"" ,1.0 ,inf ,"Relative permittivity of gate dielectric") - `MPRco(NSUBO ,3.0e23 ,"m^-3" ,1.0e20 ,inf ,"Geometry independent substrate doping") - `MPRnb(NSUBW ,0.0 ,"" ,"Width dependence of background doping NSUBO due to segregation") - `MPRco(WSEG ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Char. length of segregation of background doping NSUBO") - `MPRcz(NPCK ,1.0e24 ,"m^-3" ,"Pocket doping level") - `MPRnb(NPCKW ,0.0 ,"" ,"Width dependence of pocket doping NPCK due to segregation") - `MPRco(WSEGP ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Char. length of segregation of pocket doping NPCK") - `MPRco(LPCK ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Char. length of lateral doping profile") - `MPRnb(LPCKW ,0.0 ,"" ,"Width dependence of char. length of lateral doping profile") - `MPRnb(FOL1 ,0.0 ,"" ,"First length dependence coefficient for short channel body effect") - `MPRnb(FOL2 ,0.0 ,"" ,"Second length dependence coefficient for short channel body effect") - `MPRnb(FACNEFFACO ,1.0 ,"" ,"Geom. independent pre-factor for effective substrate doping in separate charge calculation") - `MPRnb(FACNEFFACL ,0.0 ,"" ,"Length dependence of FACNEFFAC") - `MPRnb(FACNEFFACW ,0.0 ,"" ,"Width dependence of FACNEFFAC") - `MPRnb(FACNEFFACLW ,0.0 ,"" ,"Area dependence of FACNEFFAC") - `MPRnb(GFACNUDO ,1.0 ,"" ,"Geom. independent body-factor change due to NUD-effect") - `MPRnb(GFACNUDL ,0.0 ,"" ,"Length dependence of GFACNUD") - `MPRnb(GFACNUDLEXP ,1.0 ,"" ,"Exponent for length dependence of GFACNUD") - `MPRnb(GFACNUDW ,0.0 ,"" ,"Width dependence of GFACNUD") - `MPRnb(GFACNUDLW ,0.0 ,"" ,"Area dependence of GFACNUD") - `MPRnb(VSBNUDO ,0.0 ,"V" ,"Lower Vsb value for NUD-effect") - `MPRnb(DVSBNUDO ,1.0 ,"V" ,"Vsb range for NUD-effect") - `MPRnb(VNSUBO ,0.0 ,"V" ,"Effective doping bias-dependence parameter") - `MPRnb(NSLPO ,0.05 ,"V" ,"Effective doping bias-dependence parameter") - `MPRnb(DNSUBO ,0.0 ,"V^-1" ,"Effective doping bias-dependence parameter") - `MPRnb(DPHIBO ,0.0 ,"V" ,"Geometry independent offset of PHIB") - `MPRnb(DPHIBL ,0.0 ,"V" ,"Length dependence offset of PHIB") - `MPRnb(DPHIBLEXP ,1.0 ,"" ,"Exponent for length dependence of offset of PHIB") - `MPRnb(DPHIBW ,0.0 ,"V" ,"Width dependence of offset of PHIB") - `MPRnb(DPHIBLW ,0.0 ,"V" ,"Area dependence of offset of PHIB") - `MPRnb(DELVTACO ,0.0 ,"V" ,"Geom. independent offset parameter for PHIB in separate charge calculation") - `MPRnb(DELVTACL ,0.0 ,"V" ,"Length dependence of DELVTAC") - `MPRnb(DELVTACLEXP ,1.0 ,"" ,"Exponent for length dependence of offset of DELVTAC") - `MPRnb(DELVTACW ,0.0 ,"V" ,"Width dependence of DELVTAC") - `MPRnb(DELVTACLW ,0.0 ,"V" ,"Area dependence of DELVTAC") - `MPRnb(NPO ,1.0e26 ,"m^-3" ,"Geometry-independent gate poly-silicon doping") - `MPRnb(NPL ,0.0 ,"" ,"Length dependence of gate poly-silicon doping") - `MPRco(TOXOVO ,2.0e-9 ,"m" ,1.0e-10 ,inf ,"Overlap oxide thickness") - `MPRco(TOXOVDO ,2.0e-9 ,"m" ,1.0e-10 ,inf ,"Overlap oxide thickness for drain side") - `MPRcz(LOV ,0.0 ,"m" ,"Overlap length for gate/drain and gate/source overlap capacitance") - `MPRcz(LOVD ,0.0 ,"m" ,"Overlap length for gate/drain overlap capacitance") - `MPRnb(NOVO ,5e25 ,"m^-3" ,"Effective doping of overlap region") - `MPRnb(NOVDO ,5e25 ,"m^-3" ,"Effective doping of overlap region for drain side") - - // Interface states parameters: PSP 103.6 - `MPRnb(CTO ,0.0 ,"" ,"Geometry-independent interface states factor") - `MPRnb(CTL ,0.0 ,"" ,"Length dependence of interface states factor") - `MPRnb(CTLEXP ,1.0 ,"" ,"Exponent for length dependence of interface states factor") - `MPRnb(CTW ,0.0 ,"" ,"Width dependence of interface states factor") - `MPRnb(CTLW ,0.0 ,"" ,"Area dependence of interface states factor") - `MPRcz(CTGO ,0.0 ,"" ,"Gate voltage dependence of interface states factor") - `MPRnb(CTBO ,0.0 ,"" ,"Bulk voltage dependence of interface states factor") - `MPRnb(STCTO ,1.0 ,"" ,"Geometry-independent temperature dependence of CT") - - // DIBL Parameters - `MPRnb(CFL ,0.0 ,"" ,"Length dependence of DIBL-parameter") - `MPRnb(CFLEXP ,2.0 ,"" ,"Exponent for length dependence of CF") - `MPRnb(CFW ,0.0 ,"" ,"Width dependence of CF") - `MPRcz(CFDO ,0.0 ,"V^-1" ,"Drain voltage dependence of CF") - `MPRnb(CFBO ,0.0 ,"V^-1" ,"Back-bias dependence of CF") - - // Subthreshold slope parameters of short channel transistor - `MPRnb(PSCEL ,0.0 ,"" ,"Length dependence of subthreshold slope coefficient for short channel transistor") - `MPRnb(PSCELEXP ,2.0 ,"" ,"Exponent for length dependence of subthreshold slope coefficient for short channel transistor") - `MPRnb(PSCEW ,0.0 ,"" ,"Exponent for length dependence of subthreshold slope coefficient for short channel transistor") - `MPRcc(PSCEBO ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of subthreshold slope coefficient for short channel transistor") - `MPRcz(PSCEDO ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of subthreshold slope coefficient for short channel transistor") - - // Mobility Parameters - `MPRcz(UO ,5.0e-2 ,"m^2/V/s" ,"Zero-field mobility at TR") - `MPRnb(FBET1 ,0.0 ,"" ,"Relative mobility decrease due to first lateral profile") - `MPRnb(FBET1W ,0.0 ,"" ,"Width dependence of relative mobility decrease due to first lateral profile") - `MPRco(LP1 ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Mobility-related characteristic length of first lateral profile") - `MPRnb(LP1W ,0.0 ,"" ,"Width dependence of mobility-related characteristic length of first lateral profile") - `MPRnb(FBET2 ,0.0 ,"" ,"Relative mobility decrease due to second lateral profile") - `MPRco(LP2 ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Mobility-related characteristic length of second lateral profile") - `MPRnb(BETW1 ,0.0 ,"" ,"First higher-order width scaling coefficient of BETN") - `MPRnb(BETW2 ,0.0 ,"" ,"Second higher-order width scaling coefficient of BETN") - `MPRco(WBET ,1.0e-9 ,"m" ,1.0e-10 ,inf ,"Characteristic width for width scaling of BETN") - `MPRnb(STBETO ,1.0 ,"" ,"Geometry independent temperature dependence of BETN") - `MPRnb(STBETL ,0.0 ,"" ,"Length dependence of temperature dependence of BETN") - `MPRnb(STBETW ,0.0 ,"" ,"Width dependence of temperature dependence of BETN") - `MPRnb(STBETLW ,0.0 ,"" ,"Area dependence of temperature dependence of BETN") - `MPRnb(MUEO ,0.5 ,"m/V" ,"Geometry independent mobility reduction coefficient at TR") - `MPRnb(MUEW ,0.0 ,"" ,"Width dependence of mobility reduction coefficient at TR") - `MPRnb(STMUEO ,0.0 ,"" ,"Temperature dependence of MUE") - `MPRnb(THEMUO ,1.5 ,"" ,"Mobility reduction exponent at TR") - `MPRnb(STTHEMUO ,1.5 ,"" ,"Temperature dependence of THEMU") - `MPRnb(CSO ,0.0 ,"" ,"Geometry independent coulomb scattering parameter at TR") - `MPRnb(CSL ,0.0 ,"" ,"Length dependence of CS") - `MPRnb(CSLEXP ,1.0 ,"" ,"Exponent for length dependence of CS") - `MPRnb(CSW ,0.0 ,"" ,"Width dependence of CS") - `MPRnb(CSLW ,0.0 ,"" ,"Area dependence of CS") - `MPRnb(STCSO ,0.0 ,"" ,"Temperature dependence of CS") - `MPRcz(THECSO ,2.0 ,"" ,"Coulomb scattering exponent at TR") - `MPRnb(STTHECSO ,0.0 ,"" ,"Temperature dependence of THECS") - `MPRnb(XCORO ,0.0 ,"V^-1" ,"Geometry independent non-universality parameter") - `MPRnb(XCORL ,0.0 ,"" ,"Length dependence of non-universality parameter") - `MPRnb(XCORW ,0.0 ,"" ,"Width dependence of non-universality parameter") - `MPRnb(XCORLW ,0.0 ,"" ,"Area dependence of non-universality parameter") - `MPRnb(STXCORO ,0.0 ,"" ,"Temperature dependence of XCOR") - `MPRnb(FETAO ,1.0 ,"" ,"Effective field parameter") - - // Series Resistance - `MPRnb(RSW1 ,50.0 ,"Ohm" ,"Source/drain series resistance for 1 um wide channel at TR") - `MPRnb(RSW2 ,0.0 ,"" ,"Higher-order width scaling of RS") - `MPRnb(STRSO ,1.0 ,"" ,"Temperature dependence of RS") - `MPRnb(RSBO ,0.0 ,"V^-1" ,"Back-bias dependence of series resistance") - `MPRnb(RSGO ,0.0 ,"V^-1" ,"Gate-bias dependence of series resistance") - - // Velocity Saturation - `MPRnb(THESATO ,0.0 ,"V^-1" ,"Geometry independent velocity saturation parameter at TR") - `MPRnb(THESATL ,0.05 ,"V^-1" ,"Length dependence of THESAT") - `MPRnb(THESATLEXP ,1.0 ,"" ,"Exponent for length dependence of THESAT") - `MPRnb(THESATW ,0.0 ,"" ,"Width dependence of velocity saturation parameter") - `MPRnb(THESATLW ,0.0 ,"" ,"Area dependence of velocity saturation parameter") - `MPRnb(STTHESATO ,1.0 ,"" ,"Geometry independent temperature dependence of THESAT") - `MPRnb(STTHESATL ,0.0 ,"" ,"Length dependence of temperature dependence of THESAT") - `MPRnb(STTHESATW ,0.0 ,"" ,"Width dependence of temperature dependence of THESAT") - `MPRnb(STTHESATLW ,0.0 ,"" ,"Area dependence of temperature dependence of THESAT") - `MPRnb(THESATBO ,0.0 ,"V^-1" ,"Back-bias dependence of velocity saturation") - `MPRnb(THESATGO ,0.0 ,"V^-1" ,"Gate-bias dependence of velocity saturation") - - // Saturation Voltage - `MPRnb(AXO ,18.0 ,"" ,"Geometry independent linear/saturation transition factor") - `MPRcz(AXL ,0.4 ,"" ,"Length dependence of AX") - - // Channel Length Modulation - `MPRnb(ALPL ,5.0e-4 ,"" ,"Length dependence of ALP") - `MPRnb(ALPLEXP ,1.0 ,"" ,"Exponent for length dependence of ALP") - `MPRnb(ALPW ,0.0 ,"" ,"Width dependence of ALP") - `MPRnb(ALP1L1 ,0.0 ,"V" ,"Length dependence of CLM enhancement factor above threshold") - `MPRnb(ALP1LEXP ,0.5 ,"" ,"Exponent for length dependence of ALP1") - `MPRcz(ALP1L2 ,0.0 ,"" ,"Second_order length dependence of ALP1") - `MPRnb(ALP1W ,0.0 ,"" ,"Width dependence of ALP1") - `MPRnb(ALP2L1 ,0.0 ,"V^-1" ,"Length dependence of CLM enhancement factor below threshold") - `MPRnb(ALP2LEXP ,0.5 ,"" ,"Exponent for length dependence of ALP2") - `MPRcz(ALP2L2 ,0.0 ,"" ,"Second_order length dependence of ALP2") - `MPRnb(ALP2W ,0.0 ,"" ,"Width dependence of ALP2") - `MPRnb(VPO ,0.05 ,"V" ,"CLM logarithmic dependence parameter") - - // Weak-avalanche parameters - `MPRnb(A1O ,1.0 ,"" ,"Geometry independent impact-ionization pre-factor") - `MPRnb(A1L ,0.0 ,"" ,"Length dependence of A1") - `MPRnb(A1W ,0.0 ,"" ,"Width dependence of A1") - `MPRnb(A2O ,10.0 ,"V" ,"Impact-ionization exponent at TR") - `MPRnb(STA2O ,0.0 ,"V" ,"Temperature dependence of A2") - `MPRnb(A3O ,1.0 ,"" ,"Geometry independent saturation-voltage dependence of II") - `MPRnb(A3L ,0.0 ,"" ,"Length dependence of A3") - `MPRnb(A3W ,0.0 ,"" ,"Width dependence of A3") - `MPRnb(A4O ,0.0 ,"V^-0.5" ,"Geometry independent back-bias dependence of II") - `MPRnb(A4L ,0.0 ,"" ,"Length dependence of A4") - `MPRnb(A4W ,0.0 ,"" ,"Width dependence of A4") - - // Gate current parameters - `MPRnb(GCOO ,0.0 ,"" ,"Gate tunnelling energy adjustment") - `MPRnb(IGINVLW ,0.0 ,"A" ,"Gate channel current pre-factor for 1 um^2 channel area") - `MPRnb(IGOVW ,0.0 ,"A" ,"Gate overlap current pre-factor for 1 um wide channel") - `MPRnb(IGOVDW ,0.0 ,"A" ,"Gate overlap current pre-factor for 1 um wide channel for drain side") - `MPRnb(STIGO ,2.0 ,"" ,"Temperature dependence of IGINV and IGOV") - `MPRnb(GC2O ,0.375 ,"" ,"Gate current slope factor") - `MPRnb(GC3O ,0.063 ,"" ,"Gate current curvature factor") - `MPRnb(CHIBO ,3.1 ,"V" ,"Tunnelling barrier height") - - // Gate-induced drain leakage parameters - `MPRnb(AGIDLW ,0.0 ,"A/V^3" ,"Width dependence of GIDL pre-factor") - `MPRnb(AGIDLDW ,0.0 ,"A/V^3" ,"Width dependence of GIDL pre-factor for drain side") - `MPRnb(BGIDLO ,41.0 ,"V" ,"GIDL probability factor at TR") - `MPRnb(BGIDLDO ,41.0 ,"V" ,"GIDL probability factor at TR for drain side") - `MPRnb(STBGIDLO ,0.0 ,"V/K" ,"Temperature dependence of BGIDL") - `MPRnb(STBGIDLDO ,0.0 ,"V/K" ,"Temperature dependence of BGIDL for drain side") - `MPRnb(CGIDLO ,0.0 ,"" ,"Back-bias dependence of GIDL") - `MPRnb(CGIDLDO ,0.0 ,"" ,"Back-bias dependence of GIDL for drain side") - - // Charge Model Parameters - `MPRnb(CGBOVL ,0.0 ,"F" ,"Oxide capacitance for gate-bulk overlap for 1 um long channel") - `MPRnb(CFRW ,0.0 ,"F" ,"Outer fringe capacitance for 1 um wide channel") - `MPRnb(CFRDW ,0.0 ,"F" ,"Outer fringe capacitance for 1 um wide channel for drain side") - - // Noise Model Parameters - `MPRnb(FNTO ,1.0 ,"" ,"Thermal noise coefficient") - `MPRcz(FNTEXCL ,0.0 ,"" ,"Length dependence coefficient of excess noise") - `MPRnb(NFALW ,8.0e22 ,"V^-1/m^4" ,"First coefficient of flicker noise for 1 um^2 channel area") - `MPRnb(NFBLW ,3.0e7 ,"V^-1/m^2" ,"Second coefficient of flicker noise for 1 um^2 channel area") - `MPRnb(NFCLW ,0.0 ,"V^-1" ,"Third coefficient of flicker noise for 1 um^2 channel area") - `MPRnb(EFO ,1.0 ,"" ,"Flicker noise frequency exponent") - `MPRnb(LINTNOI ,0.0 ,"m" ,"Length offset for flicker noise") - `MPRnb(ALPNOI ,2.0 ,"" ,"Exponent for length offset for flicker noise") - - // Edge transistor parameters: PSP 103.4 - `MPRcz(WEDGE ,1.0e-8 ,"m" ,"Electrical width of edge transistor per side") - `MPRcz(WEDGEW ,0.0 ,"" ,"Width dependence of edge WEDGE") - `MPRnb(VFBEDGEO ,-1.0 ,"V" ,"Geometry-independent flat-band voltage of edge transistors at TR") - `MPRnb(STVFBEDGEO ,5.0e-4 ,"V/K" ,"Geometry-independent temperature dependence of VFBEDGE") - `MPRnb(STVFBEDGEL ,0.0 ,"V/K" ,"Length dependence of temperature dependence of VFBEDGE") - `MPRnb(STVFBEDGEW ,0.0 ,"V/K" ,"Width dependence of temperature dependence of VFBEDGE") - `MPRnb(STVFBEDGELW ,0.0 ,"V/K" ,"Area dependence of temperature dependence of VFBEDGE") - `MPRnb(DPHIBEDGEO ,0.0 ,"V" ,"Geometry independent of edge transistor PHIB offset") - `MPRnb(DPHIBEDGEL ,0.0 ,"V" ,"Length dependence of edge transistor PHIB offset") - `MPRnb(DPHIBEDGELEXP ,1.0 ,"" ,"Exponent for length dependence of edge transistor PHIB offset") - `MPRnb(DPHIBEDGEW ,0.0 ,"V" ,"Width dependence of edge transistor PHIB offset") - `MPRnb(DPHIBEDGELW ,0.0 ,"V" ,"Area dependence of edge transistor PHIB offset") - `MPRco(NSUBEDGEO ,5.0e23 ,"m^-3" ,1.0e20 ,inf ,"Geometry independent substrate doping of edge transistors") - `MPRnb(NSUBEDGEL ,0.0 ,"" ,"Length dependence of edge transistor substrate doping") - `MPRnb(NSUBEDGELEXP ,1.0 ,"" ,"Exponent for length dependence of edge transistor substrate doping") - `MPRnb(NSUBEDGEW ,0.0 ,"" ,"Width dependence of edge transistor substrate doping") - `MPRnb(NSUBEDGELW ,0.0 ,"" ,"Area dependence of edge transistor substrate doping") - `MPRnb(CTEDGEO ,0.0 ,"" ,"Geometry-independent interface states factor of edge transistors") - `MPRnb(CTEDGEL ,0.0 ,"" ,"Length dependence of interface states factor of edge transistors") - `MPRnb(CTEDGELEXP ,1.0 ,"" ,"Exponent for length dependence of interface states factor of edge transistors") - `MPRnb(FBETEDGE ,0.0 ,"" ,"Length dependence of edge transistor mobility") - `MPRco(LPEDGE ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Exponent for length dependence of edge transistor mobility") - `MPRnb(BETEDGEW ,0.0 ,"" ,"Width scaling coefficient of edge transistor mobility") - `MPRnb(STBETEDGEO ,1.0 ,"" ,"Geometry independent temperature dependence of BETNEDGE") - `MPRnb(STBETEDGEL ,0.0 ,"" ,"Length dependence of temperature dependence of BETNEDGE") - `MPRnb(STBETEDGEW ,0.0 ,"" ,"Width dependence of temperature dependence of BETNEDGE") - `MPRnb(STBETEDGELW ,0.0 ,"" ,"Area dependence of temperature dependence of BETNEDGE") - `MPRnb(PSCEEDGEL ,0.0 ,"" ,"Length dependence of subthreshold slope coefficient for short channel edge transistors") - `MPRnb(PSCEEDGELEXP ,2.0 ,"" ,"Exponent for length dependence of subthreshold slope coefficient for short channel edge transistors") - `MPRnb(PSCEEDGEW ,0.0 ,"" ,"Exponent for length dependence of subthreshold slope coefficient for short channel edge transistor") - `MPRcc(PSCEBEDGEO ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of subthreshold slope coefficient for short channel edge transistors") - `MPRcz(PSCEDEDGEO ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of subthreshold slope coefficient for short channel edge transistors") - `MPRnb(CFEDGEL ,0.0 ,"" ,"Length dependence of DIBL-parameter of edge transistors") - `MPRnb(CFEDGELEXP ,2.0 ,"" ,"Exponent for length dependence of DIBL-parameter of edge transistors") - `MPRnb(CFEDGEW ,0.0 ,"" ,"Width dependence of DIBL-parameter of edge transistors") - `MPRcz(CFDEDGEO ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of DIBL-parameter of edge transistors") - `MPRcc(CFBEDGEO ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of DIBL-parameter of edge transistors") - `MPRnb(FNTEDGEO ,1.0 ,"" ,"Thermal noise coefficient") - `MPRnb(NFAEDGELW ,8.0e22 ,"V^-1/m^4" ,"First coefficient of flicker noise for 1 um^2 channel area") - `MPRnb(NFBEDGELW ,3.0e7 ,"V^-1/m^2" ,"Second coefficient of flicker noise for 1 um^2 channel area") - `MPRnb(NFCEDGELW ,0.0 ,"V^-1" ,"Third coefficient of flicker noise for 1 um^2 channel area") - `MPRnb(EFEDGEO ,1.0 ,"" ,"Flicker noise frequency exponent") - - // Well proximity effect Parameters - `MPRnb(KVTHOWEO ,0.0 ,"" ,"Geometrical independent threshold shift parameter") - `MPRnb(KVTHOWEL ,0.0 ,"" ,"Length dependent threshold shift parameter") - `MPRnb(KVTHOWEW ,0.0 ,"" ,"Width dependent threshold shift parameter") - `MPRnb(KVTHOWELW ,0.0 ,"" ,"Area dependent threshold shift parameter") - `MPRnb(KUOWEO ,0.0 ,"" ,"Geometrical independent mobility degradation factor") - `MPRnb(KUOWEL ,0.0 ,"" ,"Length dependent mobility degradation factor") - `MPRnb(KUOWEW ,0.0 ,"" ,"Width dependent mobility degradation factor") - `MPRnb(KUOWELW ,0.0 ,"" ,"Area dependent mobility degradation factor") - - // -------------------------------------------------------------------------------------------------------------- - // Parameters that occur in both global and binning model - // -------------------------------------------------------------------------------------------------------------- - - // NQS parameters - `ifdef NQSmodel - `MPRnb(MUNQSO ,1.0 ,"" ,"Relative mobility for NQS modelling") - `endif // NQSmodel - - // Parasitic resistance parameters - `MPRnb(RGO ,0.0 ,"Ohm" ,"Gate resistance") - `MPRcz(RINT ,0.0 ,"Ohm m^2" ,"Contact resistance between silicide and ploy") - `MPRcz(RVPOLY ,0.0 ,"Ohm m^2" ,"Vertical poly resistance") - `MPRcz(RSHG ,0.0 ,"Ohm/sq" ,"Gate electrode diffusion sheet resistance") - `MPRnb(DLSIL ,0.0 ,"m" ,"Silicide extension over the physical gate length") - `MPRnb(RSH ,0.0 ,"Ohm/sq" ,"Sheet resistance of source diffusion") - `MPRnb(RSHD ,0.0 ,"Ohm/sq" ,"Sheet resistance of drain diffusion") - `MPRnb(RBULKO ,0.0 ,"Ohm" ,"Bulk resistance between node BP and BI") - `MPRnb(RWELLO ,0.0 ,"Ohm" ,"Well resistance between node BI and B") - `MPRnb(RJUNSO ,0.0 ,"Ohm" ,"Source-side bulk resistance between node BI and BS") - `MPRnb(RJUNDO ,0.0 ,"Ohm" ,"Drain-side bulk resistance between node BI and BD") - - // Self heating effect parameters - `ifdef SelfHeating - `MPRnb(RTHO ,0.0 ,"K/W" ,"Geometry independent part of thermal resistance") - `MPRnb(RTHW1 ,0.0 ,"K/W" ,"Width dependence of thermal resistance") - `MPRnb(RTHW2 ,0.0 ,"" ,"Offset in width dependence of thermal resistance") - `MPRnb(RTHLW ,0.0 ,"" ,"Length-correction to width dependence of thermal resistance") - `MPRnb(CTHO ,0.0 ,"J/K" ,"Geometry independent part of thermal capacitance") - `MPRnb(CTHW1 ,0.0 ,"J/K" ,"Width dependence of thermal capacitance") - `MPRnb(CTHW2 ,0.0 ,"" ,"Offset in width dependence of thermal capacitance") - `MPRnb(CTHLW ,0.0 ,"" ,"Length-correction to width dependence of thermal capacitance") - `MPRnb(STRTHO ,0.0 ,"" ,"Temperature sensitivity of RTH") - `endif // SelfHeating - - // Stress Model Parameters - `MPRcc(SAREF ,1.0e-6 ,"m" ,1.0e-9 ,inf ,"Reference distance between OD-edge and poly from one side") - `MPRcc(SBREF ,1.0e-6 ,"m" ,1.0e-9 ,inf ,"Reference distance between OD-edge and poly from other side") - `MPRnb(WLOD ,0.0 ,"m" ,"Width parameter") - `MPRnb(KUO ,0.0 ,"m" ,"Mobility degradation/enhancement coefficient") - `MPRcc(KVSAT ,0.0 ,"m" ,-1.0 ,1.0 ,"Saturation velocity degradation/enhancement coefficient") - `MPRnb(TKUO ,0.0 ,"" ,"Temperature dependence of KUO") - `MPRnb(LKUO ,0.0 ,"m^LLODKUO" ,"Length dependence of KUO") - `MPRnb(WKUO ,0.0 ,"m^WLODKUO" ,"Width dependence of KUO") - `MPRnb(PKUO ,0.0 ,"m^(LLODKUO+WLODKUO)" ,"Cross-term dependence of KUO") - `MPRcz(LLODKUO ,0.0 ,"" ,"Length parameter for UO stress effect") - `MPRcz(WLODKUO ,0.0 ,"" ,"Width parameter for UO stress effect") - `MPRnb(KVTHO ,0.0 ,"Vm" ,"Threshold shift parameter") - `MPRnb(LKVTHO ,0.0 ,"m^LLODVTH" ,"Length dependence of KVTHO") - `MPRnb(WKVTHO ,0.0 ,"m^WLODVTH" ,"Width dependence of KVTHO") - `MPRnb(PKVTHO ,0.0 ,"m^(LLODVTH+WLODVTH)" ,"Cross-term dependence of KVTHO") - `MPRcz(LLODVTH ,0.0 ,"" ,"Length parameter for VTH-stress effect") - `MPRcz(WLODVTH ,0.0 ,"" ,"Width parameter for VTH-stress effect") - `MPRnb(STETAO ,0.0 ,"m" ,"Eta0 shift factor related to VTHO change") - `MPRcz(LODETAO ,1.0 ,"" ,"Eta0 shift modification factor for stress effect") - - // Well proximity effect Parameters - `MPRcz(SCREF ,1.0e-6 ,"m" ,"Distance between OD-edge and well edge of a reference device") - `MPRnb(WEB ,0.0 ,"" ,"Coefficient for SCB") - `MPRnb(WEC ,0.0 ,"" ,"Coefficient for SCC") - - // -------------------------------------------------------------------------------------------------------------- - // JUNCAP Parameters - // -------------------------------------------------------------------------------------------------------------- - `include "JUNCAP200_parlist.include" - - // -------------------------------------------------------------------------------------------------------------- - // Other Parameters - // -------------------------------------------------------------------------------------------------------------- - `IPRnb(DTA ,0.0 ,"K" ,"Temperature offset w.r.t. ambient temperature") - - // -------------------------------------------------------------------------------------------------------------- - // Variables - // -------------------------------------------------------------------------------------------------------------- - - // Variables for switch (initial_model parts) - integer CHNL_TYPE, SWGEO_i, SWIGATE_i, SWIMPACT_i, SWGIDL_i, SWJUNCAP_i, SWJUNASYM_i, SWNUD_i, SWEDGE_i, SWDELVTAC_i, SWIGN_i; - - // Instance local variables - real NF_i, invNF, L_i, W_i, SA_i, SB_i, SD_i, SC_i, XGW_i, JW_i, SCA_i, SCB_i, SCC_i, NGCON_i, MULT_i, FACTUO_i, DELVTO_i; - real FACTUOEDGE_i, DELVTOEDGE_i; - - // Instance local variables for juncap - real ABS_i, LSS_i, LGS_i, ABD_i, LSD_i, LGD_i, jwcorr, jww; - - // Variables of clipped global model parameters - real TOXO_i, EPSROXO_i, NSUBO_i, WSEG_i, NPCK_i, WSEGP_i, LPCK_i, TOXOVO_i, TOXOVDO_i, LOV_i, LOVD_i, LP1_i, LP2_i, WBET_i; - real AXL_i, ALP1L2_i, ALP2L2_i, SAREF_i, SBREF_i, KVSAT_i, LLODKUO_i, WLODKUO_i, LLODVTH_i, WLODVTH_i, LODETAO_i, SCREF_i; - real WEB_i, WEC_i, RSHG_i, RSH_i, RSHD_i, RINT_i, RVPOLY_i, NSUBEDGEO_i, LPEDGE_i; - - // Variables of local model parameters - real VFB_p, STVFB_p, ST2VFB_p, TOX_p, EPSROX_p, NEFF_p, FACNEFFAC_p, GFACNUD_p, VSBNUD_p, DVSBNUD_p, VNSUB_p, NSLP_p, DNSUB_p; - real DPHIB_p, DELVTAC_p, NP_p, CT_p, CTG_p, CTB_p, STCT_p, TOXOV_p, TOXOVD_p, NOV_p, NOVD_p, PSCE_p, PSCED_p, PSCEB_p, CF_p; - real CFD_p, CFB_p, BETN_p, STBET_p, MUE_p, STMUE_p, THEMU_p, STTHEMU_p, CS_p, STCS_p, THECS_p, STTHECS_p, XCOR_p, STXCOR_p; - real FETA_p, RS_p, STRS_p, RSB_p, RSG_p, THESAT_p, STTHESAT_p, THESATB_p, THESATG_p, AX_p, ALP_p, ALP1_p, ALP2_p, VP_p, A1_p; - real A2_p, STA2_p, A3_p, A4_p, GCO_p, IGINV_p, IGOV_p, IGOVD_p, STIG_p, GC2_p, GC3_p, CHIB_p, AGIDL_p, AGIDLD_p, BGIDL_p, BGIDLD_p; - real STBGIDL_p, STBGIDLD_p, CGIDL_p, CGIDLD_p, COX_p, CGOV_p, CGOVD_p, CGBOV_p, CFR_p, CFRD_p, FNT_p, FNTEXC_p, NFA_p, NFB_p, NFC_p; - real EF_p, VFBEDGE_p, STVFBEDGE_p, DPHIBEDGE_p, NEFFEDGE_p, CTEDGE_p, BETNEDGE_p, STBETEDGE_p, PSCEEDGE_p, PSCEBEDGE_p, PSCEDEDGE_p; - real CFEDGE_p, CFDEDGE_p, CFBEDGE_p, FNTEDGE_p, NFAEDGE_p, NFBEDGE_p, NFCEDGE_p, EFEDGE_p, RG_p, RSE_p, RDE_p, RWELL_p, RBULK_p; - real RJUNS_p, RJUND_p; - `ifdef SelfHeating - real RTH_p, CTH_p, STRTH_p; - `endif // SelfHeating - `ifdef NQSmodel - real MUNQS_p; - `endif // NQSmodel - - // Variables of clipped local model parameters - real TR_i, QMC_i, VFB_i, STVFB_i, ST2VFB_i, STCT_i, TOX_i, EPSROX_i, NEFF_i, FACNEFFAC_i, GFACNUD_i, VSBNUD_i, DVSBNUD_i, VNSUB_i, NSLP_i; - real DNSUB_i, DPHIB_i, DELVTAC_i, NP_i, CT_i, CTG_i, CTB_i, TOXOV_i, TOXOVD_i, NOV_i, NOVD_i, CF_i, CFD_i, CFB_i, PSCE_i, PSCEB_i, PSCED_i; - real BETN_i, STBET_i, MUE_i, STMUE_i, THEMU_i, STTHEMU_i, CS_i, STCS_i, THECS_i, STTHECS_i, XCOR_i, STXCOR_i, FETA_i, RS_i, STRS_i; - real RSB_i, RSG_i, THESAT_i, STTHESAT_i, THESATB_i, THESATG_i, AX_i, ALP_i, ALP1_i, ALP2_i, VP_i, A1_i, A2_i, STA2_i, A3_i, A4_i; - real GCO_i, IGINV_i, IGOV_i, IGOVD_i, STIG_i, GC2_i, GC3_i, CHIB_i, AGIDL_i, AGIDLD_i, BGIDL_i, BGIDLD_i, STBGIDL_i, STBGIDLD_i; - real CGIDL_i, CGIDLD_i, COX_i, CGOV_i, CGOVD_i, CGBOV_i, CFR_i, CFRD_i, FNT_i, FNTEXC_i, NFA_i, NFB_i, NFC_i, EF_i, VFBEDGE_i; - real STVFBEDGE_i, DPHIBEDGE_i, NEFFEDGE_i, CTEDGE_i, BETNEDGE_i, STBETEDGE_i, PSCEEDGE_i, PSCEBEDGE_i, PSCEDEDGE_i, CFEDGE_i; - real CFDEDGE_i, CFBEDGE_i, FNTEDGE_i, NFAEDGE_i, NFBEDGE_i, NFCEDGE_i, EFEDGE_i, RG_i, RSE_i, RDE_i, RBULK_i, RJUNS_i, RJUND_i; - real RWELL_i; - `ifdef SelfHeating - real RTH_i, CTH_i, STRTH_i; - `endif // SelfHeating - `ifdef NQSmodel - real MUNQS_i; - `endif // NQSmodel - - // Variables for scaling rules - real iL, iW, delLPS, delWOD, LE, WE, LEcv, WEcv, Lcv, Wcv, iLE, iWE, L_f, L_slif, W_f, XGWE, NSUB0e, NPCKe, LPCKe, AA, BB, NSUB; - real FBET1e, LP1e, GPE, GWE, tmpx, Lnoi, Lred, WE_edge, iWE_edge, GPE_edge, KVTHOWE, KUOWE; - `ifdef SelfHeating - real deltaRth; - `endif // SelfHeating - - // Variables for binning-rules - real iLEWE, iiLE, iiWE, iiLEWE, iiiLEWE, iLEcv, iiLEcv, iiWEcv, iiLEWEcv, iiiLEWEcv, iLcv, iiLcv, iiWcv, iiLWcv, iiiLWcv; - - // Variables for general temperature scaling - real TKR, TKA, rTa, delTa, phita, inv_phita, TKD, TKD_sq, delT, rTn, ln_rTn, inv_phit, Eg, phibFac; - - // JUNCAP2 variables - `include "JUNCAP200_varlist1.include" - `include "JUNCAP200_varlist2.include" - - // Local parameters after temperature scaling and variables used in self heating effect - real VFB_T, CT_T, CTG_T, BETN_T, MUE_T, THEMU_T, CS_T, THECS_T, XCOR_T, RS_T, BGIDL_T, BGIDLD_T, A2_T, VFBEDGE_T, BETNEDGE_T; - `ifdef SelfHeating - real RTH_T; - `else // SelfHeating - // in the self heating model, these variables are declared locally in the evaluate block - real phit, BET_i, BETEDGE_i, nt0, nt, THESAT_T, Sfl_prefac, phit0edge, Gfedge2, lnGfedge2, Sfl_prefac_edge; - real ntedge; - `endif // SelfHeating - - // Variables for channel temperature scaling (including self heating effect) - real phib_dc, G_0_dc, kp, np, arg2max, qlim2, qb0, dphibq, sqrt_phib_dc, phix_dc, aphi_dc, bphi_dc, phix2, phix1_dc, alpha_b; - real us1, us21, phib_ac, G_0_ac, phix_ac, aphi_ac, bphi_ac, phix1_ac, tf_ct, tf_bet, tf_mue, tf_cs, tf_xcor, tf_ther, THER_i, tf_thesat; - real tf_betedge, phibedge, Gfedge, phixedge, aphiedge, bphiedge, phix2edge, phix1edge; - - // Variables used in instance initializing - real EPSSI, EPSOX, CoxPrime, tox_sq, Cox_over_q, NEFFAC_i, qq, E_eff0, eta_mu, eta_mu1, inv_AX, inv_VP, CoxovPrime, CoxovPrime_d, GOV_s; - real GOV_d, GOV2_s, GOV2_d, SP_OV_eps2_s, SP_OV_a_s, SP_OV_delta1_s, SP_OV_eps2_d, SP_OV_a_d, SP_OV_delta1_d, inv_CHIB, B_fact, BCH; - real BOV, BOV_d, GCQ, tf_ig, AGIDLs, AGIDLDs, BGIDLs, BGIDLDs, fac_exc, ggate, gsource, gdrain, gbulk, gjuns, gjund, gwell; - - // Variables for bias affectation - real Vgs, Vds, Vsb, Vdb, Vgb, Vjun_s, Vjun_d, VgsPrime, VsbPrime, VdbPrime, VgdPrime; - real Vdsx; - - // Global variables used in PSP103_SPCalculation.include - real Vgbstar, Vgb1, Vdsp, delVg, Vdsat_lim, Vdsat; - - // Global variables used in current and charge calculations - real xgs_ov, xgd_ov, Vsbstar_dc, Vsbstar_dc_tmp, Vmb, us, usnew, Vmbnew, qeff1_dc, Voxm_dc, GdL_dc, eta_p_dc, Gvsat_dc, Gmob_dL_dc, x_ds_dc; - real x_m_dc, Gf_dc, Vdsat_dc, Udse_dc, SP_OV_xg, xs_ov, xd_ov, Vovs, Vovd, zg, TP, Fs1, Fs2, Fs3, Fs, Vm, Dch, arg2mina, psi_t, arg1; - real Dsi, Dgate, Igc0, igc, igcd_h, u0, x, u0_div_H, Bg, Ag, xsq, inv_x, ex, inv_ex, Sg, Igc, Igb, Vtovd, Igidl, Vtovs, Igisl; - real delVsat, Vsbstar_ac, xg_ac, qeff1_ac, Voxm_ac, alpha_ac, dps_ac, qim_ac, GdL_ac, H_ac, QG, QI, QD, QB, Fj, Fj2; - real QCLM, Qg, Qd, Qb, Qs, Qgs_ov, Qgd_ov, Qgb_ov, Qfgs, Qfgd, rgatenoise, rsourcenoise, rdrainnoise, rbulknoise, rwellnoise, rjundnoise; - real rjunsnoise; - - // Global variables used in macros - real tme1, tme2; - real inv_GOV, SP_OV_eps, SP_OV_delta, mutau, nu; - real Q_EDGE_xsth, Q_EDGE_xth0, Q_EDGE_xth, Q_EDGE_n, Q_EDGE_n_inv, Q_EDGE_xgt, Q_EDGE_xgt0, Q_EDGE_xgt0e, Q_EDGE_qi0si, Q_EDGE_qi0; - real Q_EDGE_exp_x, Q_EDGE_d0, Q_EDGE_d0p, Q_EDGE_sqerr, Q_EDGE_errq; - - // Global variables used in noise section - real N1, Nm1, Delta_N1, Sfl, t1, sqt2, t2, r, lc, lcinv2, g_ideal, mid, temp2_exc, wsat_exc, temp_exc, thesat1_exc, zsat_exc, Gvsat_exc; - real gfac, Sidexc, sqid, mig, migid0, migid, CGeff, sqig, c_igid, shot_igcsx, shot_igcdx, shot_igsov, shot_igdov, shot_iavl, jnoisex_s, jnoisex_d; - real shot_igs, shot_igd, anoisedge, N1edge, Nm1edge, Delta_N1edge, H0edge, t1edge, sqt2edge, t2edge, redge, lcedge, lcinv2edge; - real g_idealedge; - - // Variables used in NQS-calculations - `ifdef NQSmodel - integer SWNQS_i; - real Gf_ac, xgm_dc, thesat1_dc, xgm_ac, x_m_ac, thesat1_ac, margin_dc, margin_ac; - real Qp1_0, Qp2_0, Qp3_0, Qp4_0, Qp5_0, Qp6_0, Qp7_0, Qp8_0, Qp9_0, fk1, fk2, fk3, fk4, fk5, fk6, fk7, fk8, fk9, phi_p1, phi_p2, phi_p3; - real phi_p4, phi_p5, phi_p6, phi_p7, phi_p8, phi_p9, Qp1, Qp2, Qp3, Qp4, Qp5, Qp6, Qp7, Qp8, Qp9, Qp0, QpN, QG_NQS, QS_NQS, QD_NQS, pd; - real Gp, Gp2, a_factrp, marginp, x_sp, x_dp, zsat_nqs, dfQi, fQi, dQis, dQis_1, d2Qis, dQbs, dQy, d2Qy, dpsy2, ym, inorm, Tnorm, Qb_tmp; - real QbSIGN, r_nqs, vnorm, vnorm_inv, NQS_xg1, NQS_yg, NQS_z, NQS_eta, NQS_a, NQS_c, NQS_tau, NQS_D0, NQS_xi, NQS_p, NQS_q, NQS_temp; - real NQS_A_fac, NQS_xbar, NQS_w, NQS_x0, NQS_u, NQS_y0, xphi, fk0, thesat2, Fvsat, temp3, temp4, temp5, temp6, temp7, temp8, temp9; - `endif // NQSmodel - - // -------------------------------------------------------------------------------------------------------------- - // Variables for operating point info - // -------------------------------------------------------------------------------------------------------------- - real id_op, is, ig, ib, P_D, facvsb, facvsb0, sig1k, vth_i, vts_i, ids_i; - `OPP(ctype ,"" ,"Flag for channel type") - `OPP(sdint ,"" ,"Flag for source-drain interchange") - `OPP(ise ,"A" ,"Total source current") - `OPP(ige ,"A" ,"Total gate current") - `OPP(ide ,"A" ,"Total drain current") - `OPP(ibe ,"A" ,"Total bulk current") - `OPP(ids ,"A" ,"Drain current, excl. edge transistor currents, avalanche, tunnel, GISL, GIDL, and junction currents") - `OPP(idb ,"A" ,"Drain to bulk current") - `OPP(isb ,"A" ,"Source to bulk current") - `OPP(igs ,"A" ,"Gate-source tunneling current") - `OPP(igd ,"A" ,"Gate-drain tunneling current") - `OPP(igb ,"A" ,"Gate-bulk tunneling current") - `OPP(idedge ,"A" ,"Drain current of edge transistors") - `OPP(igcs ,"A" ,"Gate-channel tunneling current (source component)") - `OPP(igcd ,"A" ,"Gate-channel tunneling current (drain component)") - `OPP(iavl ,"A" ,"Substrate current due to weak avelanche") - `OPP(igisl ,"A" ,"Gate-induced source leakage current") - `OPP(igidl ,"A" ,"Gate-induced drain leakage current") - `OPP(ijs ,"A" ,"Total source junction current") - `OPP(ijsbot ,"A" ,"Source junction current (bottom component)") - `OPP(ijsgat ,"A" ,"Source junction current (gate-edge component)") - `OPP(ijssti ,"A" ,"Source junction current (STI-edge component)") - `OPP(ijd ,"A" ,"Total drain junction current") - `OPP(ijdbot ,"A" ,"Drain junction current (bottom component)") - `OPP(ijdgat ,"A" ,"Drain junction current (gate-edge component)") - `OPP(ijdsti ,"A" ,"Drain junction current (STI-edge component)") - `OPP(vds ,"V" ,"Drain-source voltage") - `OPP(vgs ,"V" ,"Gate-source voltage") - `OPP(vsb ,"V" ,"Source-bulk voltage") - `OPP(vto ,"V" ,"Zero-bias threshold voltage") - `OPP(vts ,"V" ,"Threshold voltage including back bias effects") - `OPP(vth ,"V" ,"Threshold voltage including back bias and drain bias effects") - `OPP(vgt ,"V" ,"Effective gate drive voltage including back bias and drain bias effects") - `OPP(vdss ,"V" ,"Drain saturation voltage at actual bias") - `OPP(vsat ,"" ,"Saturation limit") - `ifdef OPderiv - `OPP(gm ,"1/Ohm" ,"Transconductance") - `OPP(gmb ,"1/Ohm" ,"Substrate transconductance") - `OPP(gds ,"1/Ohm" ,"Output conductance") - `OPP(gjs ,"1/Ohm" ,"Source junction conductance") - `OPP(gjd ,"1/Ohm" ,"Drain junction conductance") - `OPP(cdd ,"F" ,"Drain capacitance") - `OPP(cdg ,"F" ,"Drain-gate capacitance") - `OPP(cds ,"F" ,"Drain-source capacitance") - `OPP(cdb ,"F" ,"Drain-bulk capacitance") - `OPP(cgd ,"F" ,"Gate-drain capacitance") - `OPP(cgg ,"F" ,"Gate capacitance") - `OPP(cgs ,"F" ,"Gate-source capacitance") - `OPP(cgb ,"F" ,"Gate-bulk capacitance") - `OPP(csd ,"F" ,"Source-drain capacitance") - `OPP(csg ,"F" ,"Source-gate capacitance") - `OPP(css ,"F" ,"Source capacitance") - `OPP(csb ,"F" ,"Source-bulk capacitance") - `OPP(cbd ,"F" ,"Bulk-drain capacitance") - `OPP(cbg ,"F" ,"Bulk-gate capacitance") - `OPP(cbs ,"F" ,"Bulk-source capacitance") - `OPP(cbb ,"F" ,"Bulk capacitance") - `OPP(cgsol ,"F" ,"Total gate-source overlap capacitance") - `OPP(cgdol ,"F" ,"Total gate-drain overlap capacitance") - `OPP(cjs ,"F" ,"Total source junction capacitance") - `OPP(cjsbot ,"F" ,"Source junction capacitance (bottom component)") - `OPP(cjsgat ,"F" ,"Source junction capacitance (gate-edge component)") - `OPP(cjssti ,"F" ,"Source junction capacitance (STI-edge component)") - `OPP(cjd ,"F" ,"Total drain junction capacitance") - `OPP(cjdbot ,"F" ,"Drain junction capacitance (bottom component)") - `OPP(cjdgat ,"F" ,"Drain junction capacitance (gate-edge component)") - `OPP(cjdsti ,"F" ,"Drain junction capacitance (STI-edge component)") - `endif // OPderiv - `OPP(weff ,"m" ,"Effective channel width for geometrical models") - `OPP(leff ,"m" ,"Effective channel length for geometrical models") - `ifdef OPderiv - `OPP(u ,"" ,"Transistor gain") - `OPP(rout ,"Ohm" ,"Small-signal output resistance") - `OPP(vearly ,"V" ,"Equivalent Early voltage") - `OPP(beff ,"A/V^2" ,"Gain factor") - `OPP(fug ,"Hz" ,"Unity gain frequency at actual bias") - `OPP(rg ,"Ohm" ,"Gate resistance") - `OPP(sfl ,"A^2/Hz" ,"Flicker noise current spectral density at 1 Hz") - `OPP(sqrtsff ,"V/sqrt(Hz)" ,"Input-referred RMS white noise voltage spectral density at 1 kHz") - `OPP(sqrtsfw ,"V/sqrt(Hz)" ,"Input-referred RMS white noise voltage spectral density") - `OPP(sid ,"A^2/Hz" ,"White noise current spectral density") - `OPP(sig ,"A^2/Hz" ,"Induced gate noise current spectral density at 1 Hz") - `OPP(cigid ,"" ,"Imaginary part of correlation coefficient between Sig and Sid") - `OPP(fknee ,"Hz" ,"Cross-over frequency above which white noise is dominant") - `OPP(sigs ,"A^2/Hz" ,"Gate-source current noise spectral density") - `OPP(sigd ,"A^2/Hz" ,"Gate-drain current noise spectral density") - `OPP(siavl ,"A^2/Hz" ,"Impact ionization current noise spectral density") - `OPP(ssi ,"A^2/Hz" ,"Total source junction current noise spectral density") - `OPP(sdi ,"A^2/Hz" ,"Total drain junction current noise spectral density") - `OPP(sfledge ,"A^2/Hz" ,"Flicker noise current spectral density at 1 Hz of edge transistors") - `OPP(sidedge ,"A^2/Hz" ,"White noise current spectral density of edge transistors") - `endif // OPderiv - // local parameters after scaling, T-scaling, and clipping - `OPP(lp_vfb ,"V" ,"Local parameter VFB after T-scaling and clipping") - `OPP(lp_stvfb ,"V/K" ,"Local parameter STVFB after clipping") - `OPP(lp_st2vfb ,"K^-1" ,"Local parameter ST2VFB after clipping") - `OPP(lp_tox ,"m" ,"Local parameter TOX after clipping") - `OPP(lp_epsrox ,"" ,"Local parameter EPSROX after clipping") - `OPP(lp_neff ,"m^-3" ,"Local parameter NEFF after clipping") - `OPP(lp_facneffac ,"" ,"Local parameter FACNEFFAC after clipping") - `OPP(lp_gfacnud ,"" ,"Local parameter GFACNUD after clipping") - `OPP(lp_vsbnud ,"V" ,"Local parameter VSBNUD after clipping") - `OPP(lp_dvsbnud ,"V" ,"Local parameter DVSBNUD after clipping") - `OPP(lp_vnsub ,"V" ,"Local parameter VNSUB after clipping") - `OPP(lp_nslp ,"V" ,"Local parameter NSLP after clipping") - `OPP(lp_dnsub ,"V^-1" ,"Local parameter DNSUB after clipping") - `OPP(lp_dphib ,"V" ,"Local parameter DPHIB after clipping") - `OPP(lp_delvtac ,"V" ,"Local parameter DELVTAC after clipping") - `OPP(lp_np ,"m^-3" ,"Local parameter NP after clipping") - `OPP(lp_toxov ,"m" ,"Local parameter TOXOV after clipping") - `OPP(lp_toxovd ,"m" ,"Local parameter TOXOVD after clipping") - `OPP(lp_nov ,"m^-3" ,"Local parameter NOV after clipping") - `OPP(lp_novd ,"m^-3" ,"Local parameter NOVD after clipping") - `OPP(lp_ct ,"" ,"Local parameter CT after clipping") - `OPP(lp_ctg ,"" ,"Local parameter CTG after clipping") - `OPP(lp_ctb ,"" ,"Local parameter CTB after clipping") - `OPP(lp_stct ,"" ,"Local parameter STCT after clipping") - `OPP(lp_cf ,"" ,"Local parameter CF after clipping") - `OPP(lp_cfd ,"V^-1" ,"Local parameter CFD after clipping") - `OPP(lp_cfb ,"V^-1" ,"Local parameter CFB after clipping") - `OPP(lp_psce ,"" ,"Local parameter PSCE after clipping") - `OPP(lp_psceb ,"V^-1" ,"Local parameter PSCEB after clipping") - `OPP(lp_psced ,"V^-1" ,"Local parameter PSCED after clipping") - `OPP(lp_betn ,"m^2/(V s)" ,"Local parameter BETN after T-scaling and clipping") - `OPP(lp_stbet ,"" ,"Local parameter STBET after clipping") - `OPP(lp_mue ,"m/V" ,"Local parameter MUE after T-scaling and clipping") - `OPP(lp_stmue ,"" ,"Local parameter STMUE after clipping") - `OPP(lp_themu ,"" ,"Local parameter THEMU after T-scaling and clipping") - `OPP(lp_stthemu ,"" ,"Local parameter STTHEMU after clipping") - `OPP(lp_cs ,"" ,"Local parameter CS after T-scaling and clipping") - `OPP(lp_stcs ,"" ,"Local parameter STCS after clipping") - `OPP(lp_thecs ,"" ,"Local parameter THECS after T-scaling and clipping") - `OPP(lp_stthecs ,"" ,"Local parameter STTHECS after clipping") - `OPP(lp_xcor ,"V^-1" ,"Local parameter XCOR after T-scaling and clipping") - `OPP(lp_stxcor ,"" ,"Local parameter STXCOR after clipping") - `OPP(lp_feta ,"" ,"Local parameter FETA after clipping") - `OPP(lp_rs ,"Ohm" ,"Local parameter RS after T-scaling and clipping") - `OPP(lp_strs ,"" ,"Local parameter STRS after clipping") - `OPP(lp_rsb ,"V^-1" ,"Local parameter RSB after clipping") - `OPP(lp_rsg ,"V^-1" ,"Local parameter RSG after clipping") - `OPP(lp_thesat ,"V^-1" ,"Local parameter THESAT after T-scaling and clipping") - `OPP(lp_stthesat ,"" ,"Local parameter STTHESAT after clipping") - `OPP(lp_thesatb ,"V^-1" ,"Local parameter THESATB after clipping") - `OPP(lp_thesatg ,"V^-1" ,"Local parameter THESATG after clipping") - `OPP(lp_ax ,"" ,"Local parameter AX after clipping") - `OPP(lp_alp ,"" ,"Local parameter ALP after clipping") - `OPP(lp_alp1 ,"V" ,"Local parameter ALP1 after clipping") - `OPP(lp_alp2 ,"V^-1" ,"Local parameter ALP2 after clipping") - `OPP(lp_vp ,"V" ,"Local parameter VP after clipping") - `OPP(lp_a1 ,"" ,"Local parameter A1 after clipping") - `OPP(lp_a2 ,"V" ,"Local parameter A2 after T-scaling and clipping") - `OPP(lp_sta2 ,"" ,"Local parameter STA2 after clipping") - `OPP(lp_a3 ,"" ,"Local parameter A3 after clipping") - `OPP(lp_a4 ,"1/sqrt(V)" ,"Local parameter A4 after clipping") - `OPP(lp_gco ,"" ,"Local parameter GCO after clipping") - `OPP(lp_iginv ,"A" ,"Local parameter IGINV after T-scaling and clipping") - `OPP(lp_igov ,"A" ,"Local parameter IGOV after T-scaling and clipping") - `OPP(lp_igovd ,"A" ,"Local parameter IGOVD after T-scaling and clipping") - `OPP(lp_stig ,"" ,"Local parameter STIG after clipping") - `OPP(lp_gc2 ,"" ,"Local parameter GC2 after clipping") - `OPP(lp_gc3 ,"" ,"Local parameter GC3 after clipping") - `OPP(lp_chib ,"V" ,"Local parameter CHIB after clipping") - `OPP(lp_agidl ,"A/V^3" ,"Local parameter AGIDL after clipping") - `OPP(lp_agidld ,"A/V^3" ,"Local parameter AGIDLD after clipping") - `OPP(lp_bgidl ,"V" ,"Local parameter BGIDL after T-scaling and clipping") - `OPP(lp_bgidld ,"V" ,"Local parameter BGIDLD after T-scaling and clipping") - `OPP(lp_stbgidl ,"V/K" ,"Local parameter STBGIDL after clipping") - `OPP(lp_stbgidld ,"V/K" ,"Local parameter STBGIDLD after clipping") - `OPP(lp_cgidl ,"" ,"Local parameter CGIDL after clipping") - `OPP(lp_cgidld ,"" ,"Local parameter CGIDLD after clipping") - `OPP(lp_cox ,"F" ,"Local parameter COX after clipping") - `OPP(lp_cgov ,"F" ,"Local parameter CGOV after clipping") - `OPP(lp_cgovd ,"F" ,"Local parameter CGOVD after clipping") - `OPP(lp_cgbov ,"F" ,"Local parameter CGBOV after clipping") - `OPP(lp_cfr ,"F" ,"Local parameter CFR after clipping") - `OPP(lp_cfrd ,"F" ,"Local parameter CFRD after clipping") - `OPP(lp_fnt ,"" ,"Local parameter FNT after clipping") - `OPP(lp_fntexc ,"" ,"Local parameter FNTEXC after clipping") - `OPP(lp_nfa ,"1/(V m^4)" ,"Local parameter NFA after clipping") - `OPP(lp_nfb ,"1/(V m^4)" ,"Local parameter NFB after clipping") - `OPP(lp_nfc ,"V^-1" ,"Local parameter NFC after clipping") - `OPP(lp_ef ,"" ,"Local parameter EF after clipping") - `OPP(lp_vfbedge ,"V" ,"Local parameter VFBEDGE after T-scaling and clipping") - `OPP(lp_stvfbedge ,"V/K" ,"Local parameter STVFBEDGE after clipping") - `OPP(lp_dphibedge ,"V" ,"Local parameter DPHIBEDGE after clipping") - `OPP(lp_neffedge ,"m^-3" ,"Local parameter NEFFEDGE after clipping") - `OPP(lp_ctedge ,"" ,"Local parameter CTEDGE after clipping") - `OPP(lp_betnedge ,"m^2/V/s" ,"Local parameter BETNEDGE after T-scaling and clipping") - `OPP(lp_stbetedge ,"" ,"Local parameter STBETEDGE after clipping") - `OPP(lp_psceedge ,"" ,"Local parameter PSCEEDGE after clipping") - `OPP(lp_pscebedge ,"V^-1" ,"Local parameter PSCEBEDGE after clipping") - `OPP(lp_pscededge ,"V^-1" ,"Local parameter PSCEDEDGE after clipping") - `OPP(lp_cfedge ,"V" ,"Local parameter CFEDGE after clipping") - `OPP(lp_cfdedge ,"V^-1" ,"Local parameter CFDEDGE after clipping") - `OPP(lp_cfbedge ,"V^-1" ,"Local parameter CFBEDGE after clipping") - `OPP(lp_fntedge ,"" ,"Local parameter FNTEDGE after clipping") - `OPP(lp_nfaedge ,"1/(V m^4)" ,"Local parameter NFAEDGE after clipping") - `OPP(lp_nfbedge ,"1/(V m^4)" ,"Local parameter NFBEDGE after clipping") - `OPP(lp_nfcedge ,"V^-1" ,"Local parameter NFCEDGE after clipping") - `OPP(lp_efedge ,"" ,"Local parameter EFEDGE after clipping") - `OPP(lp_rg ,"Ohm" ,"Local parameter RG after clipping") - `OPP(lp_rse ,"Ohm" ,"Local parameter RSE after clipping") - `OPP(lp_rde ,"Ohm" ,"Local parameter RDE after clipping") - `OPP(lp_rbulk ,"Ohm" ,"Local parameter RBULK after clipping") - `OPP(lp_rwell ,"Ohm" ,"Local parameter RWELL after clipping") - `OPP(lp_rjuns ,"Ohm" ,"Local parameter RJUNS after clipping") - `OPP(lp_rjund ,"Ohm" ,"Local parameter RJUND after clipping") - `ifdef SelfHeating - `OPP(lp_rth ,"K/W" ,"Local parameter RTH after T-scaling and clipping") - `OPP(lp_cth ,"J/K" ,"Local parameter CTH after clipping") - `OPP(lp_strth ,"" ,"Local parameter STRTH after clipping") - `OPP(pdiss ,"W" ,"Power dissipation") - `OPP(dtsh ,"K" ,"Temperature rise due to self heating") - `endif // SelfHeating - `OPP(tk ,"K" ,"Device Temperature") - `OPP(cjosbot ,"F" ,"Bottom component of total zero-bias source junction capacitance at device temperature") - `OPP(cjossti ,"F" ,"STI-edge component of total zero-bias source junction capacitance at device temperature") - `OPP(cjosgat ,"F" ,"Gate-edge component of total zero-bias source junction capacitance at device temperature") - `OPP(vbisbot ,"V" ,"Built-in voltage of source-side bottom junction at device temperature") - `OPP(vbissti ,"V" ,"Built-in voltage of source-side STI-edge junction at device temperature") - `OPP(vbisgat ,"V" ,"Built-in voltage of source-side gate-edge junction at device temperature") - `OPP(idsatsbot ,"A" ,"Total source-side bottom junction saturation current") - `OPP(idsatssti ,"A" ,"Total source-side STI-edge junction saturation current") - `OPP(idsatsgat ,"A" ,"Total source-side gate-edge junction saturation current") - `OPP(cjosbotd ,"F" ,"Bottom component of total zero-bias drain junction capacitance at device temperature") - `OPP(cjosstid ,"F" ,"STI-edge component of total zero-bias drain junction capacitance at device temperature") - `OPP(cjosgatd ,"F" ,"Gate-edge component of total zero-bias drain junction capacitance at device temperature") - `OPP(vbisbotd ,"V" ,"Built-in voltage of drain-side bottom junction at device temperature") - `OPP(vbisstid ,"V" ,"Built-in voltage of drain-side STI-edge junction at device temperature") - `OPP(vbisgatd ,"V" ,"Built-in voltage of drain-side gate-edge junction at device temperature") - `OPP(idsatsbotd ,"A" ,"Total drain-side bottom junction saturation current") - `OPP(idsatsstid ,"A" ,"Total drain-side STI-edge junction saturation current") - `OPP(idsatsgatd ,"A" ,"Total drain-side gate-edge junction saturation current") - `ifdef NQSmodel - `OPP(lp_munqs ,"" ,"Local parameter MUNQS after clipping") - `endif // NQSmodel - -// -------------------------------------------------------------------------------------------------------------- -// Analog block with all calculations and contribs -// -------------------------------------------------------------------------------------------------------------- - analog begin - - // -------------------------------------------------------------------------------------------------------------- - // Definition of bias/instance independent model variables - // -------------------------------------------------------------------------------------------------------------- - begin : initial_model - - // Clipping and rounding of switch parameters - if (TYPE >= 0) begin - CHNL_TYPE = `NMOS; - end else begin - CHNL_TYPE = `PMOS; - end - EPSSI = `EPSO * `EPSRSI; - SWGEO_i = floor(`CLIP_BOTH(SWGEO, 0.0, 2.0) + 0.5); - SWIGATE_i = floor(`CLIP_BOTH(SWIGATE, 0.0, 1.0) + 0.5); - SWIMPACT_i = floor(`CLIP_BOTH(SWIMPACT, 0.0, 1.0) + 0.5); - SWGIDL_i = floor(`CLIP_BOTH(SWGIDL, 0.0, 1.0) + 0.5); - SWJUNCAP_i = floor(`CLIP_BOTH(SWJUNCAP, 0.0, 3.0) + 0.5); - SWJUNASYM_i = floor(`CLIP_BOTH(SWJUNASYM, 0.0, 1.0) + 0.5); - SWNUD_i = floor(`CLIP_BOTH(SWNUD, 0.0, 2.0) + 0.5); - SWEDGE_i = floor(`CLIP_BOTH(SWEDGE, 0.0, 1.0) + 0.5); - SWDELVTAC_i = floor(`CLIP_BOTH(SWDELVTAC, 0.0, 1.0) + 0.5); - SWIGN_i = floor(`CLIP_BOTH(SWIGN, 0.0, 1.0) + 0.5); - QMC_i = `CLIP_LOW(QMC, 0.0); - `ifdef NQSmodel - if (SWNQS < 0.5) begin - SWNQS_i = 0; - end else begin - if (SWNQS < 1.5) begin - SWNQS_i = 1; - end else begin - if (SWNQS < 2.5) begin - SWNQS_i = 2; - end else begin - if (SWNQS < 4.0) begin - SWNQS_i = 3; - end else begin - if (SWNQS < 7.0) begin - SWNQS_i = 5; - end else begin - SWNQS_i = 9; - end - end - end - end - end - inorm = 1.0e-12; - r_nqs = 1.0e3; - vnorm = 10.0; - vnorm_inv = 1.0 / vnorm; - `endif // NQSmodel - - // Clipping of global model parameters - TOXO_i = `CLIP_LOW(TOXO, 1.0e-10); - EPSROXO_i = `CLIP_LOW(EPSROXO, 1.0); - NSUBO_i = `CLIP_LOW(NSUBO, 1.0e20); - WSEG_i = `CLIP_LOW(WSEG, 1.0e-10); - NPCK_i = `CLIP_LOW(NPCK, 0.0); - WSEGP_i = `CLIP_LOW(WSEGP, 1.0e-10); - LPCK_i = `CLIP_LOW(LPCK, 1.0e-10); - TOXOVO_i = `CLIP_LOW(TOXOVO, 1.0e-10); - TOXOVDO_i = `CLIP_LOW(TOXOVDO, 1.0e-10); - LOV_i = `CLIP_LOW(LOV, 0.0); - LOVD_i = `CLIP_LOW(LOVD, 0.0); - LP1_i = `CLIP_LOW(LP1, 1.0e-10); - LP2_i = `CLIP_LOW(LP2, 1.0e-10); - WBET_i = `CLIP_LOW(WBET, 1.0e-10); - AXL_i = `CLIP_LOW(AXL, 0.0); - ALP1L2_i = `CLIP_LOW(ALP1L2, 0.0); - ALP2L2_i = `CLIP_LOW(ALP2L2, 0.0); - SAREF_i = `CLIP_LOW(SAREF, 1.0e-9); - SBREF_i = `CLIP_LOW(SBREF, 1.0e-9); - KVSAT_i = `CLIP_BOTH(KVSAT, -1.0, 1.0); - LLODKUO_i = `CLIP_LOW(LLODKUO, 0.0); - WLODKUO_i = `CLIP_LOW(WLODKUO, 0.0); - LLODVTH_i = `CLIP_LOW(LLODVTH, 0.0); - WLODVTH_i = `CLIP_LOW(WLODVTH, 0.0); - LODETAO_i = `CLIP_LOW(LODETAO, 0.0); - SCREF_i = `CLIP_LOW(SCREF, 0.0); - WEB_i = WEB; - WEC_i = WEC; - RSHG_i = `CLIP_LOW(RSHG, 0.0); - RSH_i = `CLIP_LOW(RSH, 0.0); - RSHD_i = `CLIP_LOW(RSHD, 0.0); - RINT_i = `CLIP_LOW(RINT, 0.0); - RVPOLY_i = `CLIP_LOW(RVPOLY, 0.0); - NSUBEDGEO_i = `CLIP_LOW(NSUBEDGEO, 1.0e20); - LPEDGE_i = `CLIP_LOW(LPEDGE, 1.0e-10); - - // Transistor temperature - TR_i = `CLIP_LOW(TR, -273.0); - TKR = `KELVINCONVERSION + TR_i; - TKA = $temperature + DTA; - rTa = TKA / TKR; - delTa = TKA - TKR; - phita = TKA * `KBOL / `QELE; - inv_phita = 1.0 / phita; - `ifdef SelfHeating - // do nothing - `else // SelfHeating - TKD = TKA; - `TempInitialize - `endif // SelfHeating - - // JUNCAP2 - `include "JUNCAP200_InitModel.include" - - end // initial_model - - // -------------------------------------------------------------------------------------------------------------- - // Definition of instance dependent and bias independent variables - // -------------------------------------------------------------------------------------------------------------- - begin : initial_instance - - // Declaration of local variables - real Invsa, Invsb, Invsaref, Invsbref, Kstressu0, rhobeta, rhobetaref, Kstressvth0; - real temp0, temp00, templ, tempw, Lx, Wx, loop, tmpa, tmpb; - - // Instance variables - NF_i = 1.0; - invNF = 1.0; - LE = 0.0; - WE = 0.0; - L_i = L; - W_i = W; - SA_i = SA; - SB_i = SB; - SD_i = SD; - SC_i = SC; - XGW_i = XGW; - ABSOURCE_i = ABSOURCE; - LSSOURCE_i = LSSOURCE; - LGSOURCE_i = LGSOURCE; - ABDRAIN_i = ABDRAIN; - LSDRAIN_i = LSDRAIN; - LGDRAIN_i = LGDRAIN; - AS_i = AS; - PS_i = PS; - AD_i = AD; - PD_i = PD; - JW_i = JW; - - // Clipping of the instance parameters - if ((SWGEO_i == 1) || (SWGEO_i == 2)) begin - NF_i = `CLIP_LOW(NF, 1.0); - NF_i = floor(NF_i + 0.5); // round to nearest integer - invNF = 1.0 / NF_i; - end - L_i = `CLIP_LOW(L_i, 1.0e-9); - W_i = `CLIP_LOW(W_i * invNF, 1.0e-9); - SCA_i = `CLIP_LOW(SCA, 0.0); - SCB_i = `CLIP_LOW(SCB, 0.0); - SCC_i = `CLIP_LOW(SCC, 0.0); - NGCON_i = (NGCON < 1.5) ? 1.0 : 2.0; - - // Geometrical device variables - // Transistor geometry - - iL = `LEN / L_i; - iW = `WEN / W_i; - delLPS = LVARO * (1.0 + LVARL * iL) * (1.0 + LVARW * iW); - delWOD = WVARO * (1.0 + WVARL * iL) * (1.0 + WVARW * iW); - if (SWGEO_i == 2) begin - delLPS = LVARO * (1.0 + LVARL * iL); - delWOD = WVARO * (1.0 + WVARW * iW); - end - LE = `CLIP_LOW(L_i + delLPS - 2.0 * LAP, 1.0e-9); - WE = `CLIP_LOW(W_i + delWOD - 2.0 * WOT, 1.0e-9); - LEcv = `CLIP_LOW(L_i + delLPS - 2.0 * LAP + DLQ, 1.0e-9); - WEcv = `CLIP_LOW(W_i + delWOD - 2.0 * WOT + DWQ, 1.0e-9); - Lcv = `CLIP_LOW(L_i + delLPS + DLQ, 1.0e-9); - Wcv = `CLIP_LOW(W_i + delWOD + DWQ, 1.0e-9); - iLE = `LEN / LE; - iWE = `WEN / WE; - - // Geometry for multi-finger devices - L_f = `CLIP_LOW(L_i + delLPS, 1.0e-9); - L_slif = `CLIP_LOW(L_f + DLSIL, 1.0e-9); - W_f = `CLIP_LOW(W_i + delWOD, 1.0e-9); - XGWE = `CLIP_LOW(XGW_i - 0.5 * delWOD, 1.0e-9); - - // Local model parameters - VFB_p = VFB; - STVFB_p = STVFB; - ST2VFB_p = ST2VFB; - TOX_p = TOX; - EPSROX_p = EPSROX; - NEFF_p = NEFF; - FACNEFFAC_p = FACNEFFAC; - GFACNUD_p = GFACNUD; - VSBNUD_p = VSBNUD; - DVSBNUD_p = DVSBNUD; - VNSUB_p = VNSUB; - NSLP_p = NSLP; - DNSUB_p = DNSUB; - DPHIB_p = DPHIB; - DELVTAC_p = DELVTAC; - NP_p = NP; - TOXOV_p = TOXOV; - TOXOVD_p = TOXOVD; - NOV_p = NOV; - NOVD_p = NOVD; - CT_p = CT; - CTG_p = CTG; - CTB_p = CTB; - STCT_p = STCT; - PSCE_p = PSCE; - PSCED_p = PSCED; - PSCEB_p = PSCEB; - CF_p = CF; - CFD_p = CFD; - CFB_p = CFB; - BETN_p = BETN; - STBET_p = STBET; - MUE_p = MUE; - STMUE_p = STMUE; - THEMU_p = THEMU; - STTHEMU_p = STTHEMU; - CS_p = CS; - STCS_p = STCS; - THECS_p = THECS; - STTHECS_p = STTHECS; - XCOR_p = XCOR; - STXCOR_p = STXCOR; - FETA_p = FETA; - RS_p = RS; - STRS_p = STRS; - RSB_p = RSB; - RSG_p = RSG; - THESAT_p = THESAT; - STTHESAT_p = STTHESAT; - THESATB_p = THESATB; - THESATG_p = THESATG; - AX_p = AX; - ALP_p = ALP; - ALP1_p = ALP1; - ALP2_p = ALP2; - VP_p = VP; - A1_p = A1; - A2_p = A2; - STA2_p = STA2; - A3_p = A3; - A4_p = A4; - GCO_p = GCO; - IGINV_p = IGINV; - IGOV_p = IGOV; - IGOVD_p = IGOVD; - STIG_p = STIG; - GC2_p = GC2; - GC3_p = GC3; - CHIB_p = CHIB; - AGIDL_p = AGIDL; - AGIDLD_p = AGIDLD; - BGIDL_p = BGIDL; - BGIDLD_p = BGIDLD; - STBGIDL_p = STBGIDL; - STBGIDLD_p = STBGIDLD; - CGIDL_p = CGIDL; - CGIDLD_p = CGIDLD; - COX_p = COX; - CGOV_p = CGOV; - CGOVD_p = CGOVD; - CGBOV_p = CGBOV; - CFR_p = CFR; - CFRD_p = CFRD; - FNT_p = FNT; - FNTEXC_p = FNTEXC; - NFA_p = NFA; - NFB_p = NFB; - NFC_p = NFC; - EF_p = EF; - VFBEDGE_p = VFBEDGE; - STVFBEDGE_p = STVFBEDGE; - DPHIBEDGE_p = DPHIBEDGE; - NEFFEDGE_p = NEFFEDGE; - CTEDGE_p = CTEDGE; - BETNEDGE_p = BETNEDGE; - STBETEDGE_p = STBETEDGE; - PSCEEDGE_p = PSCEEDGE; - PSCEBEDGE_p = PSCEBEDGE; - PSCEDEDGE_p = PSCEDEDGE; - CFEDGE_p = CFEDGE; - CFDEDGE_p = CFDEDGE; - CFBEDGE_p = CFBEDGE; - FNTEDGE_p = FNTEDGE; - NFAEDGE_p = NFAEDGE; - NFBEDGE_p = NFBEDGE; - NFCEDGE_p = NFCEDGE; - EFEDGE_p = EFEDGE; - RG_p = RG; - RSE_p = RSE; - RDE_p = RDE; - RWELL_p = RWELL; - RBULK_p = RBULK; - RJUNS_p = RJUNS; - RJUND_p = RJUND; - `ifdef SelfHeating - RTH_p = RTH; - CTH_p = CTH; - STRTH_p = STRTH; - `endif // SelfHeating - `ifdef NQSmodel - MUNQS_p = MUNQS; - `endif // NQSmodel - - // Geometry scaling with physical scaling rules - if (SWGEO_i == 1) begin - // Process parameters - VFB_p = VFBO + VFBL * iLE + VFBW * iWE + VFBLW * iLE * iWE; - STVFB_p = STVFBO + STVFBL * iLE + STVFBW * iWE + STVFBLW * iLE * iWE; - ST2VFB_p = ST2VFBO; - TOX_p = TOXO; - EPSROX_p = EPSROXO; - NSUB0e = NSUBO_i * `MAX(( 1.0 + NSUBW * iWE * ln( 1.0 + WE / WSEG_i )), 1.0e-03); - NPCKe = NPCK_i * `MAX(( 1.0 + NPCKW * iWE * ln( 1.0 + WE / WSEGP_i )), 1.0e-03); - LPCKe = LPCK_i * `MAX(( 1.0 + LPCKW * iWE * ln( 1.0 + WE / WSEGP_i )), 1.0e-03); - if (LE > (2.0 * LPCKe)) begin - AA = 7.5e10; - BB = sqrt(NSUB0e + 0.5 * NPCKe) - sqrt(NSUB0e); - NSUB = sqrt(NSUB0e) + AA * ln(1.0 + 2.0 * LPCKe / LE * (exp(BB / AA) - 1.0)); - NSUB = NSUB * NSUB; - end else begin - if (LE >= LPCKe) begin - NSUB = NSUB0e + NPCKe * LPCKe / LE; - end else begin // LE < LPCK - NSUB = NSUB0e + NPCKe * (2.0 - LE / LPCKe); - end - end - NEFF_p = NSUB * (1.0 - FOL1 * iLE - FOL2 * iLE * iLE); - FACNEFFAC_p = FACNEFFACO + FACNEFFACL * iLE + FACNEFFACW * iWE + FACNEFFACLW * iLE * iWE; - GFACNUD_p = GFACNUDO + GFACNUDL * pow(iLE, GFACNUDLEXP) + GFACNUDW * iWE + GFACNUDLW * iLE * iWE; - VSBNUD_p = VSBNUDO; - DVSBNUD_p = DVSBNUDO; - VNSUB_p = VNSUBO; - NSLP_p = NSLPO; - DNSUB_p = DNSUBO; - DPHIB_p = DPHIBO + DPHIBL * pow(iLE, DPHIBLEXP) + DPHIBW * iWE + DPHIBLW * iLE * iWE; - DELVTAC_p = DELVTACO + DELVTACL * pow(iLE, DELVTACLEXP) + DELVTACW * iWE + DELVTACLW * iLE * iWE; - NP_p = NPO * `MAX(1.0e-6, (1.0 + NPL * iLE)); - TOXOV_p = TOXOVO; - TOXOVD_p = TOXOVDO; - NOV_p = NOVO; - NOVD_p = NOVDO; - - // Interface states parameters - CT_p = (CTO + CTL * pow(iLE, CTLEXP)) * (1.0 + CTW * iWE) * (1.0 + CTLW * iLE * iWE); - CTG_p = CTGO; - CTB_p = CTBO; - STCT_p = STCTO; - - // DIBL parameters - CF_p = CFL * pow(iLE, CFLEXP) * (1.0 + CFW * iWE); - CFD_p = CFDO; - CFB_p = CFBO; - - // Subthreshold slope parameters of short channel transistor - PSCE_p = PSCEL * pow(iLE, PSCELEXP) * (1.0 + PSCEW * iWE); - PSCED_p = PSCEDO; - PSCEB_p = PSCEBO; - - // Mobility parameters - FBET1e = FBET1 * (1.0 + FBET1W * iWE); - LP1e = LP1_i * `MAX(1.0 + LP1W * iWE, 1.0e-03); - GPE = 1.0 + FBET1e * LP1e / LE * (1.0 - exp(-LE / LP1e)) + FBET2 * LP2_i / LE * (1.0 - exp(-LE / LP2_i)); - GPE = `MAX(GPE, 1.0e-15); - GWE = 1.0 + BETW1 * iWE + BETW2 * iWE * ln(1.0 + WE / WBET_i); - BETN_p = UO * WE / (GPE * LE) * GWE; - STBET_p = STBETO + STBETL * iLE + STBETW * iWE + STBETLW * iLE * iWE; - MUE_p = MUEO * (1.0 + MUEW * iWE); - STMUE_p = STMUEO; - THEMU_p = THEMUO; - STTHEMU_p = STTHEMUO; - CS_p = (CSO + CSL * pow(iLE, CSLEXP)) * (1.0 + CSW * iWE) * (1.0 + CSLW * iLE * iWE); - STCS_p = STCSO; - THECS_p = THECSO; - STTHECS_p = STTHECSO; - XCOR_p = XCORO * (1.0 + XCORL * iLE) * (1.0 + XCORW * iWE) * (1.0 + XCORLW * iLE * iWE); - STXCOR_p = STXCORO; - FETA_p = FETAO; - - // Series resistance - RS_p = RSW1 * iWE * (1.0 + RSW2 * iWE); - STRS_p = STRSO; - RSB_p = RSBO; - RSG_p = RSGO; - - // Velocity saturation - THESAT_p = (THESATO + THESATL* GWE / GPE * pow(iLE, THESATLEXP)) * (1.0 + THESATW * iWE) * (1.0 + THESATLW * iLE * iWE); - STTHESAT_p = STTHESATO + STTHESATL * iLE + STTHESATW * iWE + STTHESATLW * iLE * iWE; - THESATB_p = THESATBO; - THESATG_p = THESATGO; - - // Saturation voltage - AX_p = AXO / (1.0 + AXL_i * iLE); - - // Channel length modulation - ALP_p = ALPL * pow(iLE, ALPLEXP) * (1.0 + ALPW * iWE); - tmpx = pow(iLE, ALP1LEXP); - ALP1_p = ALP1L1 * tmpx * (1.0 + ALP1W * iWE) / (1.0 + ALP1L2_i * iLE * tmpx); - tmpx = pow(iLE, ALP2LEXP); - ALP2_p = ALP2L1 * tmpx * (1.0 + ALP2W * iWE) / (1.0 + ALP2L2_i * iLE * tmpx); - VP_p = VPO; - - // Impact ionization - A1_p = A1O * (1.0 + A1L * iLE) * (1.0 + A1W * iWE); - A2_p = A2O; - STA2_p = STA2O; - A3_p = A3O * (1.0 + A3L * iLE) * (1.0 + A3W * iWE); - A4_p = A4O * (1.0 + A4L * iLE) * (1.0 + A4W * iWE); - - // Gate current - GCO_p = GCOO; - IGINV_p = IGINVLW / (iWE * iLE); - IGOV_p = IGOVW * LOV_i / (`LEN * iWE); - IGOVD_p = IGOVDW * LOVD_i / (`LEN * iWE); - STIG_p = STIGO; - GC2_p = GC2O; - GC3_p = GC3O; - CHIB_p = CHIBO; - - // GIDL - AGIDL_p = AGIDLW * LOV_i / (`LEN * iWE); - AGIDLD_p = AGIDLDW * LOVD_i / (`LEN * iWE); - BGIDL_p = BGIDLO; - BGIDLD_p = BGIDLDO; - STBGIDL_p = STBGIDLO; - STBGIDLD_p = STBGIDLDO; - CGIDL_p = CGIDLO; - CGIDLD_p = CGIDLDO; - - // Charge model parameters - COX_p = `EPSO * EPSROXO_i * WEcv * LEcv / TOXO_i; - CGOV_p = `EPSO * EPSROXO_i * WEcv * LOV_i / TOXOVO_i; - CGOVD_p = `EPSO * EPSROXO_i * WEcv * LOVD_i / TOXOVDO_i; - CGBOV_p = CGBOVL * Lcv / `LEN; - CFR_p = CFRW * Wcv / `WEN; - CFRD_p = CFRDW * Wcv / `WEN; - - // Noise model parameters - temp0 = 1.0 - 2.0 * LINTNOI * iLE / `LEN; - Lnoi = `MAX(temp0, 1.0e-3); - Lred = 1.0 / pow(Lnoi, ALPNOI); - FNT_p = FNTO; - FNTEXC_p = FNTEXCL * BETN_p * BETN_p * iWE * iWE; - NFA_p = Lred * iWE * iLE * NFALW; - NFB_p = Lred * iWE * iLE * NFBLW; - NFC_p = Lred * iWE * iLE * NFCLW; - EF_p = EFO; - - // Edge transistors: PSP 103.4 - WE_edge = 2.0 * WEDGE + WEDGEW * WE; - iWE_edge = `WEN / WE_edge; - VFBEDGE_p = VFBEDGEO; - STVFBEDGE_p = STVFBEDGEO + STVFBEDGEL * iLE + STVFBEDGEW * iWE + STVFBEDGELW * iLE * iWE; - DPHIBEDGE_p = DPHIBEDGEO + DPHIBEDGEL * pow(iLE, DPHIBEDGELEXP) + DPHIBEDGEW * iWE + DPHIBEDGELW * iLE * iWE; - NEFFEDGE_p = NSUBEDGEO_i * (1.0 + NSUBEDGEL * pow(iLE, NSUBEDGELEXP)) * ( 1.0 + NSUBEDGEW * iWE) * ( 1.0 + NSUBEDGELW * iLE * iWE); - CTEDGE_p = CTEDGEO + CTEDGEL * pow(iLE, CTEDGELEXP); - GPE_edge = 1.0 + FBETEDGE * LPEDGE_i / LE * (1.0 - exp(-LE / LPEDGE_i)); - GPE_edge = `MAX(GPE_edge, 1.0e-15); - BETNEDGE_p = UO * WE_edge / (GPE_edge * LE) * (1.0 + BETEDGEW * iWE); - STBETEDGE_p = STBETEDGEO + STBETEDGEL * iLE + STBETEDGEW * iWE + STBETEDGELW * iLE * iWE; - PSCEEDGE_p = PSCEEDGEL * pow(iLE, PSCEEDGELEXP) * (1.0 + PSCEEDGEW * iWE); - PSCEBEDGE_p = PSCEBEDGEO; - PSCEDEDGE_p = PSCEDEDGEO; - CFEDGE_p = CFEDGEL * pow(iLE, CFEDGELEXP) * (1.0 + CFEDGEW * iWE); - CFDEDGE_p = CFDEDGEO; - CFBEDGE_p = CFBEDGEO; - FNTEDGE_p = FNTEDGEO; - NFAEDGE_p = iWE_edge * iLE * NFAEDGELW; - NFBEDGE_p = iWE_edge * iLE * NFBEDGELW; - NFCEDGE_p = iWE_edge * iLE * NFCEDGELW; - EFEDGE_p = EFEDGEO; - end - - // Well proximity effect parameters - KVTHOWE = KVTHOWEO + KVTHOWEL * iLE + KVTHOWEW * iWE + KVTHOWELW * iLE * iWE; - KUOWE = KUOWEO + KUOWEL * iLE + KUOWEW * iWE + KUOWELW * iLE * iWE; - - // Geometry scaling with binning scaling rules - if (SWGEO_i == 2) begin - `include "PSP103_binning.include" - end - - // Parasitic resistance parameters - if ((SWGEO_i == 1) || (SWGEO_i == 2)) begin - RG_p = RSHG_i * (`oneThird * W_f / NGCON_i + XGWE) / (NGCON_i * L_slif) + (RINT_i + RVPOLY_i) / (W_f * L_f) + NF_i * RGO; - if (SWJUNASYM == 0) begin - RSHD_i = RSH_i; - end - RSE_p = NRS * RSH_i; - RDE_p = NRD * RSHD_i; - RWELL_p = NF_i * RWELLO; - RBULK_p = NF_i * RBULKO; - RJUNS_p = NF_i * RJUNSO; - RJUND_p = NF_i * RJUNDO; - - // Self heating effect parameters - `ifdef SelfHeating - deltaRth = RTHW2 + WE / `WEN * (1.0 + RTHLW * LE / `LEN); - deltaRth = `MAX(deltaRth, 1.0e-6); - RTH_p = RTHO + RTHW1 / deltaRth; - CTH_p = CTHO + CTHW1 * (CTHW2 + WE / `WEN * (1.0 + CTHLW * LE / `LEN)); - STRTH_p = STRTHO; - `endif // SelfHeating - - // NQS parameters - `ifdef NQSmodel - MUNQS_p = MUNQSO; - `endif // NQSmodel - - // Mechanical stress model - tmpa = 0.0; - tmpb = 0.0; - loop = 0.0; - if ((SA_i > 0.0) && (SB_i > 0.0) && ((NF_i == 1.0) || ((NF_i > 1.0) && (SD_i > 0.0)))) begin - while (loop < (NF_i - 0.5)) begin - tmpa = tmpa + 1.0 / (SA_i + 0.5 * L_i + loop * (SD_i + L_i)); - tmpb = tmpb + 1.0 / (SB_i + 0.5 * L_i + loop * (SD_i + L_i)); - loop = loop + 1.0; - end - Invsa = tmpa * invNF; - Invsb = tmpb * invNF; - Invsaref = 1.0 / (SAREF_i + 0.5 * L_i); - Invsbref = 1.0 / (SBREF_i + 0.5 * L_i); - Lx = `MAX(L_i + delLPS, 1.0e-9); - Wx = `MAX(W_i + delWOD + WLOD, 1.0e-9); - templ = 1.0 / pow(Lx, LLODKUO_i); - tempw = 1.0 / pow(Wx, WLODKUO_i); - Kstressu0 = (1.0 + LKUO * templ + WKUO * tempw + PKUO * templ * tempw) * (1.0 + TKUO * (rTa - 1.0)); - rhobeta = KUO * (Invsa + Invsb) / Kstressu0; - rhobetaref = KUO * (Invsaref + Invsbref) / Kstressu0; - templ = 1.0 / pow(Lx, LLODVTH_i); - tempw = 1.0 / pow(Wx, WLODVTH_i); - Kstressvth0 = 1.0 + LKVTHO * templ + WKVTHO * tempw + PKVTHO * templ * tempw; - temp0 = Invsa + Invsb - Invsaref - Invsbref; - // Parameter adaptations - BETN_p = BETN_p * (1.0 + rhobeta) / (1.0 + rhobetaref); - THESAT_p = THESAT_p * (1.0 + rhobeta) * (1.0 + KVSAT_i * rhobetaref) / ((1.0 + rhobetaref) * (1.0 + KVSAT_i * rhobeta)); - VFB_p = VFB_p + KVTHO * temp0 / Kstressvth0; - CF_p = CF_p + STETAO * temp0 / pow(Kstressvth0, LODETAO_i); - BETNEDGE_p = BETNEDGE_p * (1.0 + rhobeta) / (1.0 + rhobetaref); - VFBEDGE_p = VFBEDGE_p + KVTHO * temp0 / Kstressvth0; - CFEDGE_p = CFEDGE_p + STETAO * temp0 / pow(Kstressvth0, LODETAO_i); - end - - // Well proximity effect equations - if ((SCA_i > 0.0) || (SCB_i > 0.0) || (SCC_i > 0.0) || (SC_i > 0.0)) begin - if ((SCA_i == 0.0) && (SCB_i == 0.0) && (SCC_i == 0.0)) begin - temp0 = SC_i + W_i; - temp00 = 1.0 / SCREF_i; - SCA_i = SCREF_i * SCREF_i / (SC_i * temp0); - SCB_i = ((0.1 * SC_i + 0.01 * SCREF_i) * exp(-10.0 * SC_i * temp00) - (0.1 * temp0 + 0.01 * SCREF_i) * exp(-10.0 * temp0 * temp00)) / W_i; - SCC_i = ((0.05 * SC_i + 0.0025 * SCREF_i) * exp(-20.0 * SC_i * temp00) - (0.05 * temp0 + 0.0025 * SCREF_i) * exp(-20.0 * temp0 * temp00)) / W_i; - end - // Parameter adaptations - temp0 = SCA_i + WEB_i * SCB_i + WEC_i * SCC_i; - VFB_p = VFB_p + KVTHOWE * temp0; - BETN_p = BETN_p * (1.0 + KUOWE * temp0); - VFBEDGE_p = VFBEDGE_p + KVTHOWE * temp0; - BETNEDGE_p = BETNEDGE_p * (1.0 + KUOWE * temp0); - end - end - - // Internal parameters (including temperature scaling) - // Clipping of the local model parameters - VFB_i = VFB_p; - STVFB_i = STVFB_p; - ST2VFB_i = ST2VFB_p; - TOX_i = `CLIP_LOW(TOX_p, 1.0e-10); - EPSROX_i = `CLIP_LOW(EPSROX_p, 1.0); - NEFF_i = `CLIP_BOTH(NEFF_p, 1.0e20, 1.0e26); - FACNEFFAC_i = `CLIP_LOW(FACNEFFAC_p, 0.0); - GFACNUD_i = `CLIP_LOW(GFACNUD_p, 0.01); - VSBNUD_i = `CLIP_LOW(VSBNUD_p, 0.0); - DVSBNUD_i = `CLIP_LOW(DVSBNUD_p, 0.1); - VNSUB_i = VNSUB_p; - NSLP_i = `CLIP_LOW(NSLP_p, 1.0e-3); - DNSUB_i = `CLIP_BOTH(DNSUB_p, 0.0, 1.0); - DPHIB_i = DPHIB_p; - DELVTAC_i = DELVTAC_p; - NP_i = `CLIP_LOW(NP_p, 0.0); - TOXOV_i = `CLIP_LOW(TOXOV_p, 1.0e-10); - TOXOVD_i = `CLIP_LOW(TOXOVD_p, 1.0e-10); - NOV_i = `CLIP_BOTH(NOV_p, 1.0e23, 1.0e27); - NOVD_i = `CLIP_BOTH(NOVD_p, 1.0e23, 1.0e27); - CT_i = `CLIP_LOW(CT_p, 0.0); - CTG_i = `CLIP_LOW(CTG_p, 0.0); - CTB_i = CTB_p; - STCT_i = STCT_p; - CF_i = `CLIP_LOW(CF_p, 0.0); - CFD_i = `CLIP_LOW(CFD_p, 0.0); - CFB_i = `CLIP_BOTH(CFB_p, 0.0, 1.0); - PSCE_i = `CLIP_LOW(PSCE_p, 0.0); - PSCEB_i = `CLIP_BOTH(PSCEB_p, 0.0, 1.0); - PSCED_i = `CLIP_LOW(PSCED_p, 0.0); - BETN_i = `CLIP_LOW(BETN_p, 0.0); - STBET_i = STBET_p; - MUE_i = `CLIP_LOW(MUE_p, 0.0); - STMUE_i = STMUE_p; - THEMU_i = `CLIP_LOW(THEMU_p, 0.0); - STTHEMU_i = STTHEMU_p; - CS_i = `CLIP_LOW(CS_p, 0.0); - STCS_i = STCS_p; - THECS_i = `CLIP_LOW(THECS_p, 0.0); - STTHECS_i = STTHECS_p; - XCOR_i = `CLIP_LOW(XCOR_p, 0.0); - STXCOR_i = STXCOR_p; - FETA_i = `CLIP_LOW(FETA_p, 0.0); - RS_i = `CLIP_LOW(RS_p, 0.0); - STRS_i = STRS_p; - RSB_i = `CLIP_BOTH(RSB_p, -0.5, 1.0); - RSG_i = `CLIP_LOW(RSG_p, -0.5); - THESAT_i = `CLIP_LOW(THESAT_p, 0.0); - STTHESAT_i = STTHESAT_p; - THESATB_i = `CLIP_BOTH(THESATB_p, -0.5, 1.0); - THESATG_i = `CLIP_LOW(THESATG_p, -0.5); - AX_i = `CLIP_LOW(AX_p, 2.0); - ALP_i = `CLIP_LOW(ALP_p, 0.0); - ALP1_i = `CLIP_LOW(ALP1_p, 0.0); - ALP2_i = `CLIP_LOW(ALP2_p, 0.0); - VP_i = `CLIP_LOW(VP_p, 1.0e-10); - A1_i = `CLIP_LOW(A1_p, 0.0); - A2_i = `CLIP_LOW(A2_p, 0.0); - STA2_i = STA2_p; - A3_i = `CLIP_LOW(A3_p, 0.0); - A4_i = `CLIP_LOW(A4_p, 0.0); - GCO_i = `CLIP_BOTH(GCO_p, -10.0, 10.0); - IGINV_i = `CLIP_LOW(IGINV_p, 0.0); - IGOV_i = `CLIP_LOW(IGOV_p, 0.0); - IGOVD_i = `CLIP_LOW(IGOVD_p, 0.0); - STIG_i = STIG_p; - GC2_i = `CLIP_BOTH(GC2_p, 0.0, 10.0); - GC3_i = `CLIP_BOTH(GC3_p, -10.0, 10.0); - CHIB_i = `CLIP_LOW(CHIB_p, 1.0); - AGIDL_i = `CLIP_LOW(AGIDL_p, 0.0); - AGIDLD_i = `CLIP_LOW(AGIDLD_p, 0.0); - BGIDL_i = `CLIP_LOW(BGIDL_p, 0.0); - BGIDLD_i = `CLIP_LOW(BGIDLD_p, 0.0); - STBGIDL_i = STBGIDL_p; - STBGIDLD_i = STBGIDLD_p; - CGIDL_i = CGIDL_p; - CGIDLD_i = CGIDLD_p; - COX_i = `CLIP_LOW(COX_p, 0.0); - CGOV_i = `CLIP_LOW(CGOV_p, 0.0); - CGOVD_i = `CLIP_LOW(CGOVD_p, 0.0); - CGBOV_i = `CLIP_LOW(CGBOV_p, 0.0); - CFR_i = `CLIP_LOW(CFR_p, 0.0); - CFRD_i = `CLIP_LOW(CFRD_p, 0.0); - FNT_i = `CLIP_LOW(FNT_p, 0.0); - FNTEXC_i = `CLIP_LOW(FNTEXC_p, 0.0); - NFA_i = `CLIP_LOW(NFA_p, 0.0); - NFB_i = `CLIP_LOW(NFB_p, 0.0); - NFC_i = `CLIP_LOW(NFC_p, 0.0); - EF_i = `CLIP_LOW(EF_p, 0.0); - VFBEDGE_i = VFBEDGE_p; - STVFBEDGE_i = STVFBEDGE_p; - DPHIBEDGE_i = DPHIBEDGE_p; - NEFFEDGE_i = `CLIP_BOTH(NEFFEDGE_p, 1.0e20, 1.0e26); - CTEDGE_i = `CLIP_LOW(CTEDGE_p, 0.0); - BETNEDGE_i = `CLIP_LOW(BETNEDGE_p, 0.0); - STBETEDGE_i = STBETEDGE_p; - PSCEEDGE_i = `CLIP_LOW(PSCEEDGE_p, 0.0); - PSCEBEDGE_i = `CLIP_BOTH(PSCEBEDGE_p, 0.0, 1.0); - PSCEDEDGE_i = `CLIP_LOW(PSCEDEDGE_p, 0.0); - CFEDGE_i = `CLIP_LOW(CFEDGE_p, 0.0); - CFDEDGE_i = `CLIP_LOW(CFDEDGE_p, 0.0); - CFBEDGE_i = `CLIP_BOTH(CFBEDGE_p, 0.0, 1.0); - FNTEDGE_i = `CLIP_LOW(FNTEDGE_p, 0.0); - NFAEDGE_i = `CLIP_LOW(NFAEDGE_p, 0.0); - NFBEDGE_i = `CLIP_LOW(NFBEDGE_p, 0.0); - NFCEDGE_i = `CLIP_LOW(NFCEDGE_p, 0.0); - EFEDGE_i = `CLIP_LOW(EFEDGE_p, 0.0); - RG_i = `CLIP_LOW(RG_p, 0.0); - RSE_i = `CLIP_LOW(RSE_p, 0.0); - RDE_i = `CLIP_LOW(RDE_p, 0.0); - RBULK_i = `CLIP_LOW(RBULK_p, 0.0); - RJUNS_i = `CLIP_LOW(RJUNS_p, 0.0); - RJUND_i = `CLIP_LOW(RJUND_p, 0.0); - RWELL_i = `CLIP_LOW(RWELL_p, 0.0); - `ifdef SelfHeating - RTH_i = `CLIP_LOW(RTH_p, 1.0e-4); - CTH_i = `CLIP_LOW(CTH_p, 0.0); - STRTH_i = STRTH_p; - `endif // SelfHeating - MULT_i = `CLIP_LOW(MULT * NF_i, 0.0); // Note: NF_i is set to 1 for local model - FACTUO_i = `CLIP_LOW(FACTUO, 0.0); - DELVTO_i = DELVTO; - FACTUOEDGE_i = `CLIP_LOW(FACTUOEDGE, 0.0); - DELVTOEDGE_i = DELVTOEDGE; - `ifdef NQSmodel - MUNQS_i = `CLIP_LOW(MUNQS_p, 0.0); - `endif // NQSmodel - - // Ignore drain-side values in case of symmetric junctions - if (SWJUNASYM_i == 0) begin - TOXOVD_i = TOXOV_i; - NOVD_i = NOV_i; - AGIDLD_i = AGIDL_i; - BGIDLD_i = BGIDL_i; - STBGIDLD_i = STBGIDL_i; - CGIDLD_i = CGIDL_i; - IGOVD_i = IGOV_i; - CGOVD_i = CGOV_i; - CFRD_i = CFR_i; - end - - // Local process parameters - EPSOX = `EPSO * EPSROX_i; - CoxPrime = EPSOX / TOX_i; - tox_sq = TOX_i * TOX_i; - Cox_over_q = CoxPrime / `QELE; - NEFFAC_i = FACNEFFAC_i * NEFF_i; - NEFFAC_i = `CLIP_BOTH(NEFFAC_i, 1.0e20, 1.0e26); - - // QM corrections: initially calculated in PSP103_macrodefs.include (PSP103.3) - qq = 0.0; - if (QMC_i > 0.0) begin - qq = 0.4 * `QMN * QMC_i * pow(CoxPrime, `twoThirds); - if (CHNL_TYPE==`PMOS) begin - qq = `QMP / `QMN * qq; - end - end - - // Electrical field parameters - E_eff0 = 1.0e-8 * CoxPrime / EPSSI; - eta_mu = 0.5 * FETA_i; - eta_mu1 = 0.5; - if (CHNL_TYPE == `PMOS) begin - eta_mu = `oneThird * FETA_i; - eta_mu1 = `oneThird; - end - - // Linear-saturation transition parameter - inv_AX = 1.0 / AX_i; - - // CLM parameter - inv_VP = 1.0 / VP_i; - - // Gate overlap - CoxovPrime = EPSOX / TOXOV_i; - CoxovPrime_d = EPSOX / TOXOVD_i; - GOV_s = sqrt(2.0 * `QELE * NOV_i * EPSSI * inv_phita) / CoxovPrime; - GOV_d = sqrt(2.0 * `QELE * NOVD_i * EPSSI * inv_phita) / CoxovPrime_d; - GOV2_s = GOV_s * GOV_s; - GOV2_d = GOV_d * GOV_d; - `sp_ovInit(GOV_s, GOV2_s, SP_OV_eps2_s, SP_OV_a_s, SP_OV_delta1_s) - `sp_ovInit(GOV_d, GOV2_d, SP_OV_eps2_d, SP_OV_a_d, SP_OV_delta1_d) - - // Temperature scaling variables - `ifdef SelfHeating - // do nothing - `else // SelfHeating - // Initialize variables of edge transistor - `TempScaling - `endif // SelfHeating - - // Gate to channel leakage parameters - inv_CHIB = 1.0 / CHIB_i; - B_fact = 4.0 * `oneThird * sqrt(2.0 * `QELE * `MELE * CHIB_i) / `HBAR; - BCH = B_fact * TOX_i; - BOV = B_fact * TOXOV_i; - BOV_d = B_fact * TOXOVD_i; - GCQ = 0.0; - if (GC3_i < 0) begin - GCQ = -0.495 * GC2_i / GC3_i; - end - tf_ig = pow(rTa, STIG_i); - IGINV_i = IGINV_i * tf_ig; - IGOV_i = IGOV_i * tf_ig; - IGOVD_i = IGOVD_i * tf_ig; - - // GIDL parameters - AGIDLs = AGIDL_i * 4.0e-18 / (TOXOV_i * TOXOV_i); - AGIDLDs = AGIDLD_i * 4.0e-18 / (TOXOVD_i * TOXOVD_i); - B_fact = `MAX(1.0 + STBGIDL_i * delTa, 0.0); - BGIDL_T = BGIDL_i * B_fact; - BGIDLs = BGIDL_T * TOXOV_i * 5.0e8; - B_fact = `MAX(1.0 + STBGIDLD_i * delTa, 0.0); - BGIDLD_T = BGIDLD_i * B_fact; - BGIDLDs = BGIDLD_T * TOXOVD_i * 5.0e8; - - // Self Heating parameters - `ifdef SelfHeating - RTH_T = RTH_i * pow(rTa, STRTH_i); - `endif // SelfHeating - - // Noise model parameters - fac_exc = `MELE * 1.0e9 * FNTEXC_i; - - // Conductance of parasitic resistance - if (RG_i > 0.0) begin - ggate = 1.0 / RG_i; - end else begin - ggate = 0.0; - end - if (RSE_i > 0.0) begin - gsource = 1.0 / RSE_i; - end else begin - gsource = 0.0; - end - if (RDE_i > 0.0) begin - gdrain = 1.0 / RDE_i; - end else begin - gdrain = 0.0; - end - if (RBULK_i > 0.0) begin - gbulk = 1.0 / RBULK_i; - end else begin - gbulk = 0.0; - end - if (RJUNS_i > 0.0) begin - gjuns = 1.0 / RJUNS_i; - end else begin - gjuns = 0.0; - end - if (RJUND_i > 0.0) begin - gjund = 1.0 / RJUND_i; - end else begin - gjund = 0.0; - end - if (RWELL_i > 0.0) begin - gwell = 1.0 / RWELL_i; - end else begin - gwell = 0.0; - end - - // JUNCAP instance parameters - ABS_i = 0.0; - LSS_i = 0.0; - LGS_i = 0.0; - ABD_i = 0.0; - LSD_i = 0.0; - LGD_i = 0.0; - jwcorr = 0.0; - jww = WE; - if (SWGEO_i == 0) begin - jww = `CLIP_LOW(JW_i, `LG_cliplow); - end - if (SWJUNCAP_i == 3) begin - jwcorr = 1.0; - end - ABS_i = ABSOURCE_i * invNF; - LSS_i = LSSOURCE_i * invNF; - LGS_i = LGSOURCE_i * invNF; - ABD_i = ABDRAIN_i * invNF; - LSD_i = LSDRAIN_i * invNF; - LGD_i = LGDRAIN_i * invNF; - if ((SWJUNCAP_i == 2) || (SWJUNCAP_i == 3)) begin - ABS_i = AS_i * invNF; - LSS_i = PS_i * invNF - jwcorr * jww; - LGS_i = jww; - ABD_i = AD_i * invNF; - LSD_i = PD_i * invNF - jwcorr * jww; - LGD_i = jww; - end - if ((SWJUNCAP_i == 1) || (SWJUNCAP_i == 2) || (SWJUNCAP_i == 3)) begin - ABSOURCE_i = `CLIP_LOW(ABS_i, `AB_cliplow); - LSSOURCE_i = `CLIP_LOW(LSS_i, `LS_cliplow); - LGSOURCE_i = `CLIP_LOW(LGS_i, `LG_cliplow); - ABDRAIN_i = `CLIP_LOW(ABD_i, `AB_cliplow); - LSDRAIN_i = `CLIP_LOW(LSD_i, `LS_cliplow); - LGDRAIN_i = `CLIP_LOW(LGD_i, `LG_cliplow); - end else begin - ABSOURCE_i = 0.0; - LSSOURCE_i = 0.0; - LGSOURCE_i = 0.0; - ABDRAIN_i = 0.0; - LSDRAIN_i = 0.0; - LGDRAIN_i = 0.0; - end - - // Initialization of JUNCAP (global) variables; required for some verilog-A compilers - vbimin_s = 0.0; - vbimin_d = 0.0; - vfmin_s = 0.0; - vfmin_d = 0.0; - vch_s = 0.0; - vch_d = 0.0; - vbbtlim_s = 0.0; - vbbtlim_d = 0.0; - VMAX_s = 0.0; - VMAX_d = 0.0; - exp_VMAX_over_phitd_s = 0.0; - exp_VMAX_over_phitd_d = 0.0; - ISATFOR1_s = 0.0; - ISATFOR1_d = 0.0; - MFOR1_s = 1.0; - MFOR1_d = 1.0; - ISATFOR2_s = 0.0; - ISATFOR2_d = 0.0; - MFOR2_s = 1.0; - MFOR2_d = 1.0; - ISATREV_s = 0.0; - ISATREV_d = 0.0; - MREV_s = 1.0; - MREV_d = 1.0; - m0flag_s = 0.0; - m0flag_d = 0.0; - xhighf1_s = 0.0; - xhighf1_d = 0.0; - expxhf1_s = 0.0; - expxhf1_d = 0.0; - xhighf2_s = 0.0; - xhighf2_d = 0.0; - expxhf2_s = 0.0; - expxhf2_d = 0.0; - xhighr_s = 0.0; - xhighr_d = 0.0; - expxhr_s = 0.0; - expxhr_d = 0.0; - zflagbot_s = 1.0; - zflagbot_d = 1.0; - zflagsti_s = 1.0; - zflagsti_d = 1.0; - zflaggat_s = 1.0; - zflaggat_d = 1.0; - m0_rev = 0.0; - mcor_rev = 0.0; - I1_cor = 0.0; - I2_cor = 0.0; - I3_cor = 0.0; - I4_cor = 0.0; - I5_cor = 0.0; - tt0 = 0.0; - tt1 = 0.0; - tt2 = 0.0; - zfrac = 0.0; - alphaje = 0.0; - - if (SWJUNCAP_i > 0) begin - `JuncapInitInstance(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, idsatbot, idsatsti, idsatgat, vbibot, vbisti, vbigat, PBOT_i, PSTI_i, PGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s) - `JuncapInitInstance(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, idsatbot_d, idsatsti_d, idsatgat_d, vbibot_d, vbisti_d, vbigat_d, PBOTD_i, PSTID_i, PGATD_i, VBIRBOTD_i, VBIRSTID_i, VBIRGATD_i, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d) - - if (SWJUNEXP_i == 1) begin : JUNCAPexpressInit - // Local variable declaration - `LocalGlobalVars - - // results computed here are not used elsewhere - real ijunbot, ijunsti, ijungat, qjunbot, qjunsti, qjungat; - - // Initialization of (local) variables; required for some verilog-A compilers - ysq = 0.0; - terfc = 0.0; - erfcpos = 0.0; - h1 = 0.0; - h2 = 0.0; - h2d = 0.0; - h3 = 0.0; - h4 = 0.0; - h5 = 0.0; - idmult = 0.0; - vj = 0.0; - z = 0.0; - zinv = 0.0; - two_psistar = 0.0; - vjlim = 0.0; - vjsrh = 0.0; - vbbt = 0.0; - vav = 0.0; - tmp = 0.0; - id = 0.0; - isrh = 0.0; - vbi_minus_vjsrh = 0.0; - wsrhstep = 0.0; - dwsrh = 0.0; - wsrh = 0.0; - wdep = 0.0; - asrh = 0.0; - itat = 0.0; - btat = 0.0; - twoatatoverthreebtat = 0.0; - umaxbeforelimiting = 0.0; - umax = 0.0; - sqrtumax = 0.0; - umaxpoweronepointfive = 0.0; - wgamma = 0.0; - wtat = 0.0; - ktat = 0.0; - ltat = 0.0; - mtat = 0.0; - xerfc = 0.0; - erfctimesexpmtat = 0.0; - gammamax = 0.0; - ibbt = 0.0; - Fmaxr = 0.0; - fbreakdown = 0.0; - qjunbot = 0.0; - qjunsti = 0.0; - qjungat = 0.0; - - // Computation of JUNCAP-express internal parameters - `JuncapExpressInit1(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, VJUNREF_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s) - `JuncapExpressInit2(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s) - `JuncapExpressInit3(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, idsatbot, idsatsti, idsatgat, ISATFOR1_s, MFOR1_s, ISATFOR2_s, MFOR2_s, ISATREV_s, MREV_s, m0flag_s) - `JuncapExpressInit4(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, FJUNQ_i, cjobot, cjosti, cjogat, zflagbot_s, zflagsti_s, zflaggat_s) - `JuncapExpressInit5(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, ISATFOR1_s, ISATFOR2_s, ISATREV_s, xhighf1_s, expxhf1_s, xhighf2_s, expxhf2_s, xhighr_s, expxhr_s) - - `JuncapExpressInit1(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, VJUNREFD_i, qprefbot_d, qpref2bot_d, vbiinvbot_d, one_minus_PBOT_d, idsatbot_d, CSRHBOTD_i, CTATBOTD_i, vbibot_d, wdepnulrbot_d, VBIRBOTinv_d, PBOTD_i, ftdbot_d, btatpartbot_d, atatbot_d, one_over_one_minus_PBOT_d, CBBTBOTD_i, VBIRBOTD_i, wdepnulrinvbot_d, fbbtbot_d, VBRBOTD_i, VBRinvbot_d, PBRBOTD_i, fstopbot_d, slopebot_d, qprefsti_d, qpref2sti_d, vbiinvsti_d, one_minus_PSTI_d, idsatsti_d, CSRHSTID_i, CTATSTID_i, vbisti_d, wdepnulrsti_d, VBIRSTIinv_d, PSTID_i, ftdsti_d, btatpartsti_d, atatsti_d, one_over_one_minus_PSTI_d, CBBTSTID_i, VBIRSTID_i, wdepnulrinvsti_d, fbbtsti_d, VBRSTID_i, VBRinvsti_d, PBRSTID_i, fstopsti_d, slopesti_d, qprefgat_d, qpref2gat_d, vbiinvgat_d, one_minus_PGAT_d, idsatgat_d, CSRHGATD_i, CTATGATD_i, vbigat_d, wdepnulrgat_d, VBIRGATinv_d, PGATD_i, ftdgat_d, btatpartgat_d, atatgat_d, one_over_one_minus_PGAT_d, CBBTGATD_i, VBIRGATD_i, wdepnulrinvgat_d, fbbtgat_d, VBRGATD_i, VBRinvgat_d, PBRGATD_i, fstopgat_d, slopegat_d, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d) - `JuncapExpressInit2(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, qprefbot_d, qpref2bot_d, vbiinvbot_d, one_minus_PBOT_d, idsatbot_d, CSRHBOTD_i, CTATBOTD_i, vbibot_d, wdepnulrbot_d, VBIRBOTinv_d, PBOTD_i, ftdbot_d, btatpartbot_d, atatbot_d, one_over_one_minus_PBOT_d, CBBTBOTD_i, VBIRBOTD_i, wdepnulrinvbot_d, fbbtbot_d, VBRBOTD_i, VBRinvbot_d, PBRBOTD_i, fstopbot_d, slopebot_d, qprefsti_d, qpref2sti_d, vbiinvsti_d, one_minus_PSTI_d, idsatsti_d, CSRHSTID_i, CTATSTID_i, vbisti_d, wdepnulrsti_d, VBIRSTIinv_d, PSTID_i, ftdsti_d, btatpartsti_d, atatsti_d, one_over_one_minus_PSTI_d, CBBTSTID_i, VBIRSTID_i, wdepnulrinvsti_d, fbbtsti_d, VBRSTID_i, VBRinvsti_d, PBRSTID_i, fstopsti_d, slopesti_d, qprefgat_d, qpref2gat_d, vbiinvgat_d, one_minus_PGAT_d, idsatgat_d, CSRHGATD_i, CTATGATD_i, vbigat_d, wdepnulrgat_d, VBIRGATinv_d, PGATD_i, ftdgat_d, btatpartgat_d, atatgat_d, one_over_one_minus_PGAT_d, CBBTGATD_i, VBIRGATD_i, wdepnulrinvgat_d, fbbtgat_d, VBRGATD_i, VBRinvgat_d, PBRGATD_i, fstopgat_d, slopegat_d, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d) - `JuncapExpressInit3(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, idsatbot_d, idsatsti_d, idsatgat_d, ISATFOR1_d, MFOR1_d, ISATFOR2_d, MFOR2_d, ISATREV_d, MREV_d, m0flag_d) - `JuncapExpressInit4(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, FJUNQD_i, cjobot_d, cjosti_d, cjogat_d, zflagbot_d, zflagsti_d, zflaggat_d) - `JuncapExpressInit5(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, ISATFOR1_d, ISATFOR2_d, ISATREV_d, xhighf1_d, expxhf1_d, xhighf2_d, expxhf2_d, xhighr_d, expxhr_d) - end // JUNCAPexpressInit - - end - - end // initial_instance - - begin : evaluateblock - - real sigVds, dphit1, xgct, xsct0, xbct, xsbstar, xsct, dCTG, ct_fact, phit1, inv_phit1, xg_dc, alpha_dc, dps_dc, qim_dc; - real qim1_dc, H_dc, FdL_dc, Gvsatinv_dc, Ids, Iimpact, mavl, Igdov, Igsov, Igcd, Igcs, eta_p_ac, Gvsat_ac, Gmob_dL_ac, H0; - real COX_qm, ijun_s, ijunbot_s, ijunsti_s, ijungat_s, ijun_d, ijunbot_d, ijunsti_d, ijungat_d, qjun_s, qjunbot_s, qjunsti_s; - real qjungat_s, qjun_d, qjunbot_d, qjunsti_d, qjungat_d, jnoise_s, jnoise_d, Gmob_dc, xitsb_dc, Vdse_dc, Vsbstaredge, Vsbxedge; - real dphit1edge, phit1edge, inv_phit1edge, Vdspedge, delVgedge, xgedge, xbedge, dxthedge, xnedge_s, qseffedge, xnedge_d; - real qdseffedge, qdeffedge, qmeffedge, dsqredge, alphabmedge, Idsedge, Sfledge, midedge, sqidedge; - `ifdef SelfHeating - real Pdiss, phit, BET_i, BETEDGE_i, nt0, nt, THESAT_T, Sfl_prefac, phit0edge, Gfedge2, lnGfedge2, Sfl_prefac_edge; - real ntedge; - `endif // SelfHeating - real temp, temp1, temp2; - - // -------------------------------------------------------------------------------------------------------------- - // DC bias dependent quantities (calculations for current contribs) - // -------------------------------------------------------------------------------------------------------------- - begin : evaluateStatic - - // Initialize temporary variables - temp = 0.0; - temp1 = 0.0; - temp2 = 0.0; - - // Initialization of variables for SHE effect - `ifdef SelfHeating - TKD = TKA + Temp(br_rth); - `TempInitialize - `TempScaling - `endif // SelfHeating - QCLM = 0.0; - xs_ov = 0.0; - xd_ov = 0.0; - Vovs = 0.0; - Vovd = 0.0; - Iimpact = 0.0; - mavl = 0.0; - - // Initialization of variables for NQS model - `ifdef NQSmodel - pd = 1.0; - ym = 0.0; - `endif // NQSmodel - - // Voltage affectations - if (CHNL_TYPE == `NMOS) begin - Vgs = V(GP, SI); - Vds = V(DI, SI); - Vsb = V(SI, BP); - Vjun_s = -V(SI, BS); - Vjun_d = -V(DI, BD); - end else begin - Vgs = -V(GP, SI); - Vds = -V(DI, SI); - Vsb = -V(SI, BP); - Vjun_s = V(SI, BS); - Vjun_d = V(DI, BD); - end - - // Voltages NOT subject to S/D-interchange - VgsPrime = Vgs; - VsbPrime = Vsb; - VdbPrime = Vds + Vsb; - VgdPrime = Vgs - Vds; - xgs_ov = -VgsPrime * inv_phita; - xgd_ov = -VgdPrime * inv_phita; - - // Source-drain interchange - sigVds = 1.0; - if (Vds < 0.0) begin - sigVds = -1.0; - Vgs = Vgs - Vds; - Vsb = Vsb + Vds; - Vds = -Vds; - end - Vdb = Vds + Vsb; - Vdsx = Vds * Vds / (sqrt(Vds * Vds + 0.01) + 0.1); - - // Core's model calculation for DC - begin : SPcalc_dc - - // Local variable declaration - `SPcalcLocalVarDecl - real FdL, qim1_1, r1, r2, s2, dL1; - - // Conditioning of terminal voltages - temp = `MINA(Vdb, Vsb, bphi_dc) + phix_dc; - Vsbstar_dc = Vsb - `MINA(temp, 0, aphi_dc) + phix1_dc; - Vsbstar_dc_tmp = Vsbstar_dc; - - // Adapt Vsb for NUD-effect - if ((SWNUD_i != 0) && (GFACNUD_i != 1.0)) begin - Vmb = Vsbstar_dc + 0.5 * (Vds - Vdsx); - us = sqrt(Vmb + phib_dc) - sqrt_phib_dc; - temp = 2.0 * (us - us1) / us21 - 1.0; - usnew = us - 0.25 * (1.0 - GFACNUD_i) * us21 * (temp + sqrt(temp * temp + 0.4804530139182)); - Vmbnew = usnew * usnew + (2.0 * sqrt_phib_dc) * usnew; - Vsbstar_dc = Vmbnew - 0.5 * (Vds - Vdsx); - end - - // Set variables needed in PSP103_SPCalculation.include - phib = phib_dc; - G_0 = G_0_dc; - Vsbstar = Vsbstar_dc; - FdL = 1.0; - - `include "PSP103_SPCalculation.include" - - if (xg > 0.0) begin - qim1_1 = 1.0 / qim1; - r1 = qim * qim1_1; - r2 = phit1 * (alpha * qim1_1); - s2 = ln(1.0 + Vdsx * inv_VP); - dL1 = dL + ALP1_i * (qim1_1 * r1 * s1) + ALP2_i * (qbm * r2 * r2 * s2); - FdL = (1.0 + dL1 + dL1 * dL1) * GdL; - end - - xg_dc = xg; - qeff1_dc = qeff1; - Voxm_dc = Voxm; - alpha_dc = alpha; - dps_dc = dps; - qim_dc = qim; - qim1_dc = qim1; - GdL_dc = GdL; - FdL_dc = FdL; - H_dc = H; - eta_p_dc = eta_p; - Gvsat_dc = Gvsat; - Gvsatinv_dc = Gvsatinv; - Gmob_dL_dc = Gmob_dL; - x_ds_dc = x_ds; - x_m_dc = x_m; - Gf_dc = Gf; - Vdsat_dc = Vdsat; - Udse_dc = Udse; - Gmob_dc = Gmob; - xitsb_dc = xitsb; - Vdse_dc = Vdse; - `ifdef NQSmodel - xgm_dc = xgm; - thesat1_dc = thesat1; - margin_dc = margin; - `endif // NQSmodel - end // SPcalc_dc - - if (xg_dc <= 0) begin - Ids = 0.0; - end else begin - // Drain-source current - Ids = BET_i * (FdL_dc * qim1_dc * dps_dc * Gvsatinv_dc); - end - - // Surface potential in gate overlap regions - if (((SWIGATE_i != 0) && ((IGOV_i > 0.0) || (IGOVD_i > 0.0))) || ((SWGIDL_i != 0) && ((AGIDL_i > 0.0) || (AGIDLD_i > 0.0))) || (CGOV_i > 0.0) || (CGOVD_i > 0.0)) begin - SP_OV_xg = 0.5 * (xgs_ov + sqrt(xgs_ov * xgs_ov + SP_OV_eps2_s)); - xs_ov = -SP_OV_xg - GOV2_s * 0.5 + GOV_s * sqrt(SP_OV_xg + GOV2_s * 0.25 + SP_OV_a_s) + SP_OV_delta1_s; - SP_OV_xg = 0.5 * (xgd_ov + sqrt(xgd_ov * xgd_ov + SP_OV_eps2_d)); - xd_ov = -SP_OV_xg - GOV2_d * 0.5 + GOV_d * sqrt(SP_OV_xg + GOV2_d * 0.25 + SP_OV_a_d) + SP_OV_delta1_d; - Vovs = -phita * (xgs_ov + xs_ov); - Vovd = -phita * (xgd_ov + xd_ov); - end - - // Gate current - Igsov = 0.0; - Igdov = 0.0; - Igc = 0.0; - Igb = 0.0; - Igcs = 0.0; - Igcd = 0.0; - if (SWIGATE_i != 0) begin - if (IGOV_i > 0.0) begin - // Gate-source overlap component of gate current - zg = sqrt(Vovs * Vovs + 1.0e-6) * inv_CHIB; - if (GC3_i < 0.0) begin - zg = `MINA(zg, GCQ, 1.0e-6); - end - temp = BOV * (-1.5 + zg * (GC2_i + GC3_i * zg)); - if (temp > 0.0) begin - TP = `P3(temp); - end else begin - `expl_low(temp, TP) - end - Fs1 = 3.0 + xs_ov; - Fs2 = -3.0 - GCO_i; - Fs3 = 30.0 * VgsPrime; - `MNE(Fs1, Fs3, 0.9, temp) - `MXE(Fs2, temp, 0.3, Fs) - Igsov = IGOV_i * (TP * Fs); - end - - if (IGOVD_i > 0.0) begin - // Gate-drain overlap component of gate current - zg = sqrt(Vovd * Vovd + 1.0e-6) * inv_CHIB; - if (GC3_i < 0.0) begin - zg = `MINA(zg, GCQ, 1.0e-6); - end - temp = BOV_d * (-1.5 + zg * (GC2_i + GC3_i * zg)); - if (temp > 0.0) begin - TP = `P3(temp); - end else begin - `expl_low(temp, TP) - end - Fs1 = 3.0 + xd_ov; - Fs2 = -3.0 - GCO_i; - Fs3 = 30.0 * VgdPrime; - `MNE(Fs1, Fs3, 0.9, temp) - `MXE(Fs2, temp, 0.3, Fs) - Igdov = IGOVD_i * (TP * Fs); - end - - // Gate-channel component of gate current - if (IGINV_i > 0.0) begin - if (xg_dc <= 0.0) begin - temp = pow(Vds / Vdsat_lim, AX_i); - Udse_dc = Vds * pow(1.0 + temp, -inv_AX) * inv_phit1; - end - `expl_low(x_ds_dc-Udse_dc, temp) - Vm = Vsbstar_dc + phit1 * (0.5 * x_ds_dc - ln(0.5 * (1.0 + temp))); - Dch = GCO_i * phit1; - arg2mina = Voxm_dc + Dch; - psi_t = `MINA(0.0, arg2mina, 0.01); - zg = sqrt(Voxm_dc * Voxm_dc + 1.0e-6) * inv_CHIB; - if (GC3_i < 0.0) begin - zg = `MINA(zg, GCQ, 1.0e-06); - end - arg1 = (x_m_dc + (psi_t - alpha_b - Vm) * inv_phit1); - `expl(arg1,Dsi) - arg1 = -(Vgs + Vsbstar_dc - Vm) * inv_phit1; - `expl(arg1,temp) - Dgate = Dsi * temp; - temp = BCH * (-1.5 + zg * (GC2_i + GC3_i * zg)); - if (temp > 0) begin - TP = `P3(temp); - end else begin - `expl_low(temp, TP) - end - Igc0 = IGINV_i * (TP * ln((1.0 + Dsi) / (1.0 + Dgate))); - - // Source/drain partitioning of gate-channel current - if ((xg_dc <= 0.0) || ((GC2_i == 0.0) && (GC3_i == 0.0))) begin - igc = 1.0; - igcd_h = 0.5; - end else begin - temp = GC2_i + 2.0 * GC3_i * zg; - u0 = CHIB_i / (temp * BCH); - x = 0.5 * (dps_dc / u0); - u0_div_H = u0 / H_dc; - Bg = u0_div_H * (1.0 - u0_div_H) * 0.5; - Ag = 0.5 - 3.0 * Bg; - if (x < 1.0e-3) begin - xsq = x * x; - igc = 1.0 + xsq * (`oneSixth + u0_div_H * `oneThird + `oneSixth * (xsq * (0.05 + 0.2 * u0_div_H))); - igcd_h = 0.5 * igc - `oneSixth * (x * (1.0 + xsq * (0.4 * (Bg + 0.25) + 0.0285714285714 * (xsq * (0.125 + Bg))))); - end else begin - inv_x = 1.0 / x; - `expl(x, ex) - inv_ex = 1.0 / ex; - temp = ex - inv_ex; - temp2 = ex + inv_ex; - igc = 0.5 * ((1.0 - u0_div_H) * temp * inv_x + u0_div_H * temp2); - igcd_h = 0.5 * (igc - temp * (Bg - Ag * inv_x * inv_x) - Ag * temp2 * inv_x); - end - end - Sg = 0.5 * (1.0 + xg_dc / sqrt(xg_dc * xg_dc + 1.0e-6)); - Igc = Igc0 * igc * Sg; - Igcd = Igc0 * igcd_h * Sg; - Igcs = Igc - Igcd; - Igb = Igc0 * igc * (1.0 - Sg); - end // (IGINV >0) - end // (SWIGATE != 0) - - // GIDL/GISL current - Igidl = 0.0; - Igisl = 0.0; - if (SWGIDL_i != 0) begin - // GIDL current computation - if ((AGIDLD_i > 0) && (Vovd < 0)) begin - Vtovd = sqrt(Vovd * Vovd + CGIDLD_i * CGIDLD_i * (VdbPrime * VdbPrime) + 1.0e-6); - temp = -BGIDLDs / Vtovd; - `expl_low(temp, temp2) - Igidl = -AGIDLDs * (VdbPrime * Vovd * Vtovd * temp2); - end - - // GISL current computation - if ((AGIDL_i > 0) && (Vovs < 0)) begin - Vtovs = sqrt(Vovs * Vovs + CGIDL_i * CGIDL_i * (VsbPrime * VsbPrime) + 1.0e-6); - temp = -BGIDLs / Vtovs; - `expl_low(temp, temp2) - Igisl = -AGIDLs * (VsbPrime * Vovs * Vtovs * temp2); - end - end // (SWGIDL != 0) - - // Drain current of edge transistors: PSP 103.4 - xgedge = 0.0; - qdseffedge = 0.0; - qmeffedge = 0.0; - dsqredge = 1.0e-40; - alphabmedge = 1.0; - Idsedge = 0.0; - if ((SWEDGE_i != 0.0) && (BETNEDGE_i > 0)) begin - temp = `MINA(Vdb, Vsb, bphiedge) + phixedge; - Vsbstaredge = Vsb - `MINA(temp, 0, aphiedge) + phix1edge; - Vsbxedge = Vsbstaredge + 0.5 * (Vds - Vdsx); - dphit1edge = PSCEEDGE_i * (1 + PSCEDEDGE_i * Vdsx)* (1.0 + PSCEBEDGE_i * Vsbxedge); // SCE on subthreshold slope - phit1edge = phit0edge * (1.0 + dphit1edge); - inv_phit1edge = 1.0 / phit1edge; - if (CFDEDGE_i < 0.05) begin - Vdspedge = Vdsx; - end else begin - Vdspedge = 2.0 * (sqrt(1.0 + CFDEDGE_i * Vdsx) - 1.0) / CFDEDGE_i; - end - delVgedge = CFEDGE_i * Vdspedge * (1 + CFBEDGE_i * Vsbxedge); // DIBL effect - xgedge = inv_phit1edge * (Vgs + Vsbstaredge + delVgedge - VFBEDGE_T); - xbedge = inv_phit1edge * phibedge; - dxthedge = 2.0 * ln(xbedge / Gfedge + sqrt(xbedge)); - xnedge_s = inv_phit1edge * Vsbstaredge; - `qi_edge(qseffedge,xgedge,xnedge_s) - xnedge_d = inv_phit1edge * (Vdse_dc + Vsbstaredge); - if ((qseffedge < 1.0e-3)&(Vdse_dc < 1.0e-6)) begin - `expl_low((-xnedge_d + xnedge_s), temp) - qdseffedge = qseffedge * (temp - 1.0); - qdeffedge = qdseffedge + qseffedge; - end else begin - `qi_edge(qdeffedge,xgedge,xnedge_d) - qdseffedge = qdeffedge - qseffedge; - end - qmeffedge = 0.5 * (qdeffedge + qseffedge); - dsqredge = max(xgedge - qmeffedge, 1.0e-40); - alphabmedge = 1.0 - 0.5 * Gfedge / sqrt(dsqredge + 0.25 * Gfedge2); - Idsedge = -BETEDGE_i * phit1edge * phit1edge * (alphabmedge * qmeffedge + 1.0) * qdseffedge / Gmob_dc; - end - - // Impact-Ionization - if ((xg_dc > 0) && (SWIMPACT_i != 0)) begin - delVsat = Vds - A3_i * dps_dc; - if (delVsat > 0) begin - temp2 = A2_T * ((1.0 + A4_i * (sqrt(phib_dc + Vsbstar_dc) - sqrt_phib_dc)) / (delVsat + 1.0e-30)); - `expl(-temp2, temp) - mavl = A1_i * (delVsat * temp); - Iimpact = mavl * (Ids + Idsedge); - end - end - - // Threshold voltage calculation for .OP - P_D = 1.0 + 0.25 * (Gf_dc * kp); - facvsb0 = phib_dc + 2.0 * phit1; - facvsb = Vsbstar_dc + facvsb0; - vts_i = VFB_T + P_D * facvsb - Vsbstar_dc + Gf_dc * sqrt(phit1 * facvsb ); - vth_i = vts_i - delVg; - - end // evaluateStatic - - // -------------------------------------------------------------------------------------------------------------- - // AC bias dependent quantities (calculations for charge contribs) - // -------------------------------------------------------------------------------------------------------------- - begin : evaluateDynamic - - // Core's model calculation for AC - begin : SPcalc_ac - - // Local variable declaration - `SPcalcLocalVarDecl - - // SP calculations - if ((SWNUD_i == 1) || (SWDELVTAC_i != 0)) begin - if (SWDELVTAC_i != 0) begin - // Conditioning of terminal voltages - temp = `MINA(Vdb, Vsb, bphi_ac) + phix_ac; - Vsbstar_ac = Vsb - `MINA(temp, 0.0, aphi_ac) + phix1_ac; - Vsbstar = Vsbstar_ac; - phib = phib_ac; - G_0 = G_0_ac; - end else begin - Vsbstar = Vsbstar_dc_tmp; - phib = phib_dc; - G_0 = G_0_dc; - end - - `include "PSP103_SPCalculation.include" - - xg_ac = xg; - qeff1_ac = qeff1; - Voxm_ac = Voxm; - alpha_ac = alpha; - dps_ac = dps; - qim_ac = qim; - GdL_ac = GdL; - H_ac = H; - eta_p_ac = eta_p; - Gvsat_ac = Gvsat; - Gmob_dL_ac = Gmob_dL; - `ifdef NQSmodel - Gf_ac = Gf; - x_m_ac = x_m; - xgm_ac = xgm; - thesat1_ac = thesat1; - margin_ac = margin; - `endif // NQSmodel - end else begin - xg_ac = xg_dc; - qeff1_ac = qeff1_dc; - Voxm_ac = Voxm_dc; - alpha_ac = alpha_dc; - dps_ac = dps_dc; - qim_ac = qim_dc; - GdL_ac = GdL_dc; - H_ac = H_dc; - eta_p_ac = eta_p_dc; - Gvsat_ac = Gvsat_dc; - Gmob_dL_ac = Gmob_dL_dc; - `ifdef NQSmodel - Gf_ac = Gf_dc; - x_m_ac = x_m_dc; - xgm_ac = xgm_dc; - thesat1_ac = thesat1_dc; - margin_ac = margin_dc; - `endif // NQSmodel - end - end // SPcalc_ac - - // Quantum mechanical corrections - Vgb = Vgs + Vsb; - COX_qm = COX_i; - if (qq > 0.0) begin - COX_qm = COX_i / (1.0 + qq * pow(qeff1_ac * qeff1_ac + qlim2, -1.0 * `oneSixth)); - end - - // Intrinsic charge model - if (xg_ac <= 0.0) begin - QG = Voxm_ac; - QI = 0.0; - QD = 0.0; - QB = QG; - end else begin - Fj = 0.5 * (dps_ac / H_ac); - Fj2 = Fj * Fj; - QCLM = (1.0 - GdL_ac) * (qim_ac - 0.5 * (alpha_ac * dps_ac)); - QG = Voxm_ac + 0.5 * (eta_p_ac * dps_ac * (Fj * GdL_ac * `oneThird - 1.0 + GdL_ac)); - temp = alpha_ac * dps_ac * `oneSixth; - QI = GdL_ac * (qim_ac + temp * Fj) + QCLM; - QD = 0.5 * (GdL_ac * GdL_ac * (qim_ac - temp * (1.0 - Fj - 0.2 * Fj2)) + QCLM * (1.0 + GdL_ac)); - QB = QG - QI; - end - Qg = QG * COX_qm; - Qd = -QD * COX_qm; - Qb = -QB * COX_qm; - - // Extrinsic charge model - Qgs_ov = CGOV_i * Vovs; - Qgd_ov = CGOVD_i * Vovd; - Qgb_ov = CGBOV_i * Vgb; - - // Outer fringe charge - Qfgs = CFR_i * VgsPrime; - Qfgd = CFRD_i * VgdPrime; - - // Variables for NQS model - `ifdef NQSmodel - Gp = 0.0; - Gp2 = 0.0; - a_factrp = 0.0; - marginp = 0.0; - if (SWNQS_i != 0) begin - if (xg_ac <= 0.0) begin - ym = 0.5; - pd = 1.0; - Gp = Gf_ac; - end else begin - ym = 0.5 * ( 1.0 + 0.25 * (dps_ac / H_ac)); - pd = xgm_ac / (xg_ac - x_m_ac); - Gp = Gf_ac / pd; - end - Gp2 = Gp * Gp; - a_factrp = 1.0 + Gp * `invSqrt2; - marginp = 1.0e-5 * a_factrp; - end - `endif // NQSmodel - - end // evaluateDynamic - - // -------------------------------------------------------------------------------------------------------------- - // JUNCAP2 contribs - // -------------------------------------------------------------------------------------------------------------- - begin : evaluateStaticDynamic - ijun_s = 0.0; - ijunbot_s = 0.0; - ijunsti_s = 0.0; - ijungat_s = 0.0; - ijun_d = 0.0; - ijunbot_d = 0.0; - ijunsti_d = 0.0; - ijungat_d = 0.0; - qjun_s = 0.0; - qjunbot_s = 0.0; - qjunsti_s = 0.0; - qjungat_s = 0.0; - qjun_d = 0.0; - qjunbot_d = 0.0; - qjunsti_d = 0.0; - qjungat_d = 0.0; - if (SWJUNCAP_i > 0) begin - if (SWJUNEXP_i == 1) begin - `JuncapExpressCurrent(Vjun_s, MFOR1_s, ISATFOR1_s, MFOR2_s, ISATFOR2_s, MREV_s, ISATREV_s, m0flag_s, xhighf1_s, expxhf1_s, xhighf2_s, expxhf2_s, xhighr_s, expxhr_s, ijun_s) - `JuncapExpressCurrent(Vjun_d, MFOR1_d, ISATFOR1_d, MFOR2_d, ISATFOR2_d, MREV_d, ISATREV_d, m0flag_d, xhighf1_d, expxhf1_d, xhighf2_d, expxhf2_d, xhighr_d, expxhr_d, ijun_d) - begin : evaluateDynamic - real tmpv, vjv; - `JuncapExpressCharge(Vjun_s, ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, qprefbot, qprefsti, qprefgat, qpref2bot, qpref2sti, qpref2gat, vbiinvbot, vbiinvsti, vbiinvgat, one_minus_PBOT, one_minus_PSTI, one_minus_PGAT, vfmin_s, vch_s, zflagbot_s, zflagsti_s, zflaggat_s, qjunbot_s, qjunsti_s, qjungat_s) - `JuncapExpressCharge(Vjun_d, ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, qprefbot_d, qprefsti_d, qprefgat_d, qpref2bot_d, qpref2sti_d, qpref2gat_d, vbiinvbot_d, vbiinvsti_d, vbiinvgat_d, one_minus_PBOT_d, one_minus_PSTI_d, one_minus_PGAT_d, vfmin_d, vch_d, zflagbot_d, zflagsti_d, zflaggat_d, qjunbot_d, qjunsti_d, qjungat_d) - end - end else begin - `juncapcommon(Vjun_s, ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s, ijunbot_s, qjunbot_s, ijunsti_s, qjunsti_s, ijungat_s, qjungat_s) - ijun_s = ABSOURCE_i * ijunbot_s + LSSOURCE_i * ijunsti_s + LGSOURCE_i * ijungat_s; - `juncapcommon(Vjun_d, ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, qprefbot_d, qpref2bot_d, vbiinvbot_d, one_minus_PBOT_d, idsatbot_d, CSRHBOTD_i, CTATBOTD_i, vbibot_d, wdepnulrbot_d, VBIRBOTinv_d, PBOTD_i, ftdbot_d, btatpartbot_d, atatbot_d, one_over_one_minus_PBOT_d, CBBTBOTD_i, VBIRBOTD_i, wdepnulrinvbot_d, fbbtbot_d, VBRBOTD_i, VBRinvbot_d, PBRBOTD_i, fstopbot_d, slopebot_d, qprefsti_d, qpref2sti_d, vbiinvsti_d, one_minus_PSTI_d, idsatsti_d, CSRHSTID_i, CTATSTID_i, vbisti_d, wdepnulrsti_d, VBIRSTIinv_d, PSTID_i, ftdsti_d, btatpartsti_d, atatsti_d, one_over_one_minus_PSTI_d, CBBTSTID_i, VBIRSTID_i, wdepnulrinvsti_d, fbbtsti_d, VBRSTID_i, VBRinvsti_d, PBRSTID_i, fstopsti_d, slopesti_d, qprefgat_d, qpref2gat_d, vbiinvgat_d, one_minus_PGAT_d, idsatgat_d, CSRHGATD_i, CTATGATD_i, vbigat_d, wdepnulrgat_d, VBIRGATinv_d, PGATD_i, ftdgat_d, btatpartgat_d, atatgat_d, one_over_one_minus_PGAT_d, CBBTGATD_i, VBIRGATD_i, wdepnulrinvgat_d, fbbtgat_d, VBRGATD_i, VBRinvgat_d, PBRGATD_i, fstopgat_d, slopegat_d, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d, ijunbot_d, qjunbot_d, ijunsti_d, qjunsti_d, ijungat_d, qjungat_d) - ijun_d = ABDRAIN_i * ijunbot_d + LSDRAIN_i * ijunsti_d + LGDRAIN_i * ijungat_d; - end - end - - // -------------------------------------------------------------------------------------------------------------- - // NQS and parasitic resistance contribs - // -------------------------------------------------------------------------------------------------------------- - - // Set initial conditions for NQS model - `ifdef NQSmodel - `include "PSP103_InitNQS.include" - `endif // NQSmodel - - // Parasitic resistances (including noise) - rgatenoise = nt0 * ggate; - rsourcenoise = nt0 * gsource; - rdrainnoise = nt0 * gdrain; - rbulknoise = nt0 * gbulk; - rjunsnoise = nt0 * gjuns; - rjundnoise = nt0 * gjund; - rwellnoise = nt0 * gwell; - - end // evaluateStaticDynamic - - // -------------------------------------------------------------------------------------------------------------- - // Current contribs - // -------------------------------------------------------------------------------------------------------------- - begin : loadStatic - - // Convert back for NMOS-PMOS and Source-Drain interchange - if (sigVds > 0.0) begin - I(DI, BP) <+ CHNL_TYPE * MULT_i * Iimpact; - I(DI, SI) <+ CHNL_TYPE * MULT_i * (Ids + Idsedge); - I(GP, SI) <+ CHNL_TYPE * MULT_i * Igcs; - I(GP, DI) <+ CHNL_TYPE * MULT_i * Igcd; - end else begin - I(SI, BP) <+ CHNL_TYPE * MULT_i * Iimpact; - I(SI, DI) <+ CHNL_TYPE * MULT_i * (Ids + Idsedge); - I(GP, DI) <+ CHNL_TYPE * MULT_i * Igcs; - I(GP, SI) <+ CHNL_TYPE * MULT_i * Igcd; - end - I(GP, BP) <+ CHNL_TYPE * MULT_i * Igb; - I(GP, SI) <+ CHNL_TYPE * MULT_i * Igsov; - I(GP, DI) <+ CHNL_TYPE * MULT_i * Igdov; - I(SI, BP) <+ CHNL_TYPE * MULT_i * Igisl; - I(DI, BP) <+ CHNL_TYPE * MULT_i * Igidl; - I(BS, SI) <+ CHNL_TYPE * MULT_i * ijun_s; - I(BD, DI) <+ CHNL_TYPE * MULT_i * ijun_d; - - `CollapsableR(ggate, RG_i, rgatenoise, G, GP, "rgate") - `CollapsableR(gsource, RSE_i, rsourcenoise, S, SI, "rsource") - `CollapsableR(gdrain, RDE_i, rdrainnoise, D, DI, "rdrain") - `CollapsableR(gbulk, RBULK_i, rbulknoise, BP, BI, "rbulk") - `CollapsableR(gjuns, RJUNS_i, rjunsnoise, BS, BI, "rjuns") - `CollapsableR(gjund, RJUND_i, rjundnoise, BD, BI, "rjund") - `CollapsableR(gwell, RWELL_i, rwellnoise, B, BI, "rwell") - - I(DI, SI) <+ `GMIN * V(DI, SI); - - end // loadStatic - - // -------------------------------------------------------------------------------------------------------------- - // ddt() contribs from charges (Note: MULT is handled explicitly) - // -------------------------------------------------------------------------------------------------------------- - begin : loadStaticDynamic - - // Implementation of NQS charges - `ifdef NQSmodel - `include "PSP103_ChargesNQS.include" - `endif // NQSmodel - - // Implementation of Self heating effect - `ifdef SelfHeating - begin : self_heating - real Pdiss_s, Pdiss_d; - Pdiss = 0.0; - Pdiss_s = 0.0; - Pdiss_d = 0.0; - if (RSE_i > 0.0) begin - Pdiss_s = gsource * V(S, SI) * V(S, SI); - end - if (RDE_i > 0.0) begin - Pdiss_d = gdrain * V(D, DI) * V(D, DI); - end - if (RTH_p > 1.0e-3) begin - Pdiss = ((Ids + Idsedge) * Vds + Iimpact * (Vds + Vsb) + Pdiss_s + Pdiss_d); - end - Pwr(br_ith) <+ -MULT_i * Pdiss; - Pwr(br_rth) <+ ddt(MULT_i * CTH_i * Temp(br_rth)); - Pwr(br_rth) <+ MULT_i * Temp(br_rth) / RTH_T; - end // self_heating - `endif // SelfHeating - - end // loadStaticDynamic - - begin : loadDynamic - - // Local variable - real temp; - - // Intrinsic MOSFET charges - Qs = -(Qg + Qb + Qd); - - // Total outerFringe + overlap for gate-source and gate-drain. - Qfgs = Qfgs + Qgs_ov; - Qfgd = Qfgd + Qgd_ov; - - // JUNCAP2 - qjun_s = ABSOURCE_i * qjunbot_s + LSSOURCE_i * qjunsti_s + LGSOURCE_i * qjungat_s; - qjun_d = ABDRAIN_i * qjunbot_d + LSDRAIN_i * qjunsti_d + LGDRAIN_i * qjungat_d; - - // Convert back (undo S-D interchange) - if (sigVds < 0.0) begin - temp = Qd; // Qd <--> Qs - Qd = Qs; - Qs = temp; - end - - I(GP, SI) <+ ddt(CHNL_TYPE * MULT_i * Qg); - I(BP, SI) <+ ddt(CHNL_TYPE * MULT_i * Qb); - I(DI, SI) <+ ddt(CHNL_TYPE * MULT_i * Qd); - I(GP, SI) <+ ddt(CHNL_TYPE * MULT_i * Qfgs); - I(GP, DI) <+ ddt(CHNL_TYPE * MULT_i * Qfgd); - I(GP, BP) <+ ddt(CHNL_TYPE * MULT_i * Qgb_ov); - I(BS, SI) <+ ddt(CHNL_TYPE * MULT_i * qjun_s); - I(BD, DI) <+ ddt(CHNL_TYPE * MULT_i * qjun_d); - - end // loadDynamic - - // -------------------------------------------------------------------------------------------------------------- - // Noise - // -------------------------------------------------------------------------------------------------------------- - begin : noise - - // Noise variable calculation - Sfl = 0.0; - Sidexc = 0.0; - mid = 0.0; - mig = 1.0e-40; - migid = 0.0; - c_igid = 0.0; - CGeff = COX_qm * eta_p_ac; - sqid = 0.0; - sqig = 0.0; - Sfledge = 0.0; - midedge = 0.0; - sqidedge = 0.0; - - // Channel noise contributions - if ((xg_dc > 0.0) && (MULT_i > 0.0) && (BET_i > 0.0)) begin - // Flicker noise - N1 = Cox_over_q * alpha_dc * phit; - Nm1 = Cox_over_q * qim1_dc; - Delta_N1 = Cox_over_q * alpha_dc * dps_dc; - Sfl = (NFA_i - NFB_i * N1 + NFC_i * (N1 * N1)) * ln((Nm1 + 0.5 * Delta_N1) / (Nm1 - 0.5 * Delta_N1)); - Sfl = Sfl + (NFB_i + NFC_i * (Nm1 - 2.0 * N1)) * Delta_N1; - Sfl = Sfl_prefac * Ids * Gvsatinv_dc * Sfl / N1; - Sfl = `CLIP_LOW(Sfl, 0.0); - - // Thermal channel noise - H0 = qim1_dc / alpha_dc; - t1 = qim_dc / qim1_dc; - sqt2 = 0.5 * `oneSixth * (dps_dc / H0); - t2 = sqt2 * sqt2; - r = H0 / H_dc - 1.0; - lc = `CLIP_LOW(1.0 - 12.0 * (r * t2), 1.0e-20); - lcinv2 = 1.0 / (lc * lc); - g_ideal = BET_i * (FdL_dc * qim1_dc * Gvsatinv_dc); - mid = t1 + 12.0 * t2 - 24.0 * ((1.0 + t1) * t2 * r); - mid = `CLIP_LOW(mid, 1.0e-40); - mid = g_ideal * lcinv2 * mid; - if (FNTEXC_i > 0.0) begin - // recalculate Gvsat, excluding Gmob-effect - temp2_exc = qim_dc * xitsb_dc; - wsat_exc = 100.0 * (temp2_exc / (100.0 + temp2_exc)); - if (THESATG_i < 0) begin - temp_exc = 1.0 / (1.0 - THESATG_i * wsat_exc); - end else begin - temp_exc = 1.0 + THESATG_i * wsat_exc; - end - thesat1_exc = THESAT_T * (temp_exc / Gmob_dc); - zsat_exc = thesat1_exc * thesat1_exc * dps_dc * dps_dc; - if (CHNL_TYPE == `PMOS) begin - zsat_exc = zsat_exc / (1.0 + thesat1_exc * dps_dc); - end - Gvsat_exc = 0.5 * (Gmob_dc * (1.0 + sqrt(1.0 + 2.0 * zsat_exc))); - gfac = Gmob_dc / (Gvsat_exc * lc); - Sidexc = fac_exc * Ids * Vdse_dc * gfac * gfac; - mid = mid + Sidexc / nt0; - end - sqid = sqrt(nt * mid); - - // Induced gate noise - if ((SWIGN_i == 1) && (nt > 0.0)) begin - mig = t1 / 12.0 - t2 * (t1 + 0.2 - 12.0 * t2) - 1.6 * (t2 * (t1 + 1.0 - 12.0 * t2) * r); - mig = `CLIP_LOW(mig, 1.0e-40); - mig = lcinv2 / g_ideal * mig; - migid0 = lcinv2 * sqt2 * (1.0 - 12.0 * t2 - (t1 + 19.2 * t2 - 12.0 * (t1 * t2)) * r); - CGeff = Gvsat_ac * Gvsat_ac * COX_qm * eta_p_ac / (Gmob_dL_ac * Gmob_dL_ac); - if (FNTEXC_i > 0.0) begin - mig = mig + Sidexc * (1.0 + 12.0 * t2) / (12.0 * g_ideal * g_ideal * nt0); - migid0 = migid0 - Sidexc * sqt2 * (1.0 + r) / (g_ideal * nt0); - end - sqig = sqrt(nt / mig); - if (sqid == 0) begin - c_igid = 0.0; - end else begin - c_igid = migid0 * sqig / sqid; // = migid0 / sqrt(mig * mid); - end - c_igid = `CLIP_BOTH(c_igid, 0.0, 1.0); - migid = c_igid * sqid / sqig; - end - end - - // Noise of gate leakage currents - shot_igcsx = 2.0 * `QELE * abs(Igcs); - shot_igcdx = 2.0 * `QELE * abs(Igcd); - shot_igsov = 2.0 * `QELE * abs(Igsov); - shot_igdov = 2.0 * `QELE * abs(Igdov); - - // Noise of impact ionization currents - shot_iavl = 2.0 * `QELE * ((mavl + 1) * abs(Iimpact)); - - // Noise of junctions (JUNCAP2) - jnoisex_s = 2.0 * `QELE * abs(ijun_s); - jnoisex_d = 2.0 * `QELE * abs(ijun_d); - if (sigVds > 0.0) begin - shot_igs = shot_igcsx + shot_igsov; - shot_igd = shot_igcdx + shot_igdov; - jnoise_s = jnoisex_s; - jnoise_d = jnoisex_d + shot_iavl; - end else begin - shot_igs = shot_igcdx + shot_igsov; - shot_igd = shot_igcsx + shot_igdov; - jnoise_s = jnoisex_s + shot_iavl; - jnoise_d = jnoisex_d; - end - - // Noise of edge transistors: PSP 103.4 - if ((SWEDGE_i != 0.0) && (BETNEDGE_i > 0) && (xgedge > 0)) begin - // Flicker noise of edge transistor - temp1 = 4.0 * dsqredge / Gfedge2; - anoisedge = sqrt(temp1 + 1.0) / (sqrt(temp1 + 1.1) - 1.0); - temp1 = Cox_over_q * phit; - N1edge = temp1 * anoisedge; - Nm1edge = temp1 * (qmeffedge + anoisedge); - Delta_N1edge = -temp1 * anoisedge * alphabmedge * qdseffedge; - Sfledge = (NFAEDGE_i - (NFBEDGE_i - NFCEDGE_i * N1edge) * N1edge) * ln((Nm1edge + 0.5 * Delta_N1edge) / (Nm1edge - 0.5 * Delta_N1edge)); - Sfledge = Sfledge + (NFBEDGE_i + NFCEDGE_i * (Nm1edge - 2.0 * N1edge)) * Delta_N1edge; - Sfledge = Sfl_prefac_edge * Idsedge * Gvsatinv_dc * Sfledge / N1edge; - Sfledge = `CLIP_LOW(Sfledge, 0.0); - - // Thermal channel noise of edge transistor - H0edge = phit * (qmeffedge + anoisedge) / anoisedge; - t1edge = phit1 / phit * qmeffedge / (qmeffedge + anoisedge); - sqt2edge = -0.5 * `oneSixth * phit * alphabmedge * qdseffedge / H0edge; - t2edge = sqt2edge * sqt2edge; - redge = 0.0; - temp1 = alpha_dc * H_dc; - if (temp1 > 1.0e-10) begin - redge = anoisedge * H0edge / temp1 - 1.0; - end - lcedge = `CLIP_LOW(1.0 - 12.0 * (redge * t2edge), 1.0e-20); - lcinv2edge = 1.0 / (lcedge * lcedge); - g_idealedge = BETEDGE_i * phit * (qmeffedge + anoisedge) * FdL_dc * Gvsatinv_dc; - midedge = t1edge + 12.0 * t2edge - 24.0 * ((1.0 + t1edge) * t2edge * redge); - midedge = `CLIP_LOW(midedge, 1.0e-40); - midedge = g_idealedge * lcinv2edge * midedge; - sqidedge = sqrt(ntedge * midedge); - end - - // Noise contributions - I(NOII) <+ white_noise((nt / mig), "igig"); - I(NOIR) <+ V(NOIR) / mig; - I(NOIC) <+ ddt(CGeff * V(NOIC)); - I(GP,SI) <+ -ddt(sqrt(MULT_i) * 0.5 * CGeff * V(NOIC)); - I(GP,DI) <+ -ddt(sqrt(MULT_i) * 0.5 * CGeff * V(NOIC)); - I(DI,SI) <+ sigVds * sqrt(MULT_i) * migid * I(NOII); - I(DI,SI) <+ white_noise(MULT_i * sqid * sqid * (1.0 - c_igid * c_igid), "idid"); - I(DI,SI) <+ flicker_noise(MULT_i * Sfl, EF_i, "flicker"); - I(GP,SI) <+ white_noise(MULT_i * shot_igs, "igs"); - I(GP,DI) <+ white_noise(MULT_i * shot_igd, "igd"); - I(BS,SI) <+ white_noise(MULT_i * jnoise_s, "ibs"); - I(BD,DI) <+ white_noise(MULT_i * jnoise_d, "ibd"); - I(DI,SI) <+ flicker_noise(MULT_i * Sfledge, EFEDGE_i, "flicker"); - I(DI,SI) <+ white_noise(MULT_i * sqidedge * sqidedge, "ididedge"); - - end // noise - - // -------------------------------------------------------------------------------------------------------------- - // Operating point info - // -------------------------------------------------------------------------------------------------------------- - begin : OPinfo - - // Auxiliary variables - id_op = Ids + Idsedge + Iimpact - Igcd; - is = -Ids - Idsedge - Igcs; - ig = Igcs + Igcd + Igsov + Igdov + Igb; - ib = -Iimpact - Igb - Igidl - Igisl; - sig1k = 2.0e3 * `PI * CGeff; - sig1k = sig1k * sig1k * mig; - - // Actual operation point output variables - sdint = sigVds; - ctype = CHNL_TYPE; - if (sigVds < 0.0) begin - ise = MULT_i * (is - Igdov + Igidl - ijun_d); - ige = MULT_i * ig; - ide = MULT_i * (id_op - Igsov + Igisl - ijun_s); - ibe = MULT_i * (ib + ijun_s + ijun_d); - ids = MULT_i * Ids; - idb = MULT_i * (Iimpact + Igisl - ijun_s); - isb = MULT_i * (Igidl - ijun_d); - igs = MULT_i * (Igcs + Igdov); - igd = MULT_i * (Igcd + Igsov); - igb = MULT_i * Igb; - idedge = MULT_i * Idsedge; - igcs = MULT_i * Igcs; - igcd = MULT_i * Igcd; - iavl = MULT_i * Iimpact; - igisl = MULT_i * Igidl; - igidl = MULT_i * Igisl; - if (SWJUNEXP_i == 1) begin - ijsbot = 0.0; - ijsgat = 0.0; - ijssti = 0.0; - ijdbot = 0.0; - ijdgat = 0.0; - ijdsti = 0.0; - idsatsbot = 0.0; - idsatssti = 0.0; - idsatsgat = 0.0; - idsatsbotd = 0.0; - idsatsstid = 0.0; - idsatsgatd = 0.0; - end else begin - ijsbot = MULT_i * ABDRAIN_i * ijunbot_d; - ijsgat = MULT_i * LGDRAIN_i * ijungat_d; - ijssti = MULT_i * LSDRAIN_i * ijunsti_d; - ijdbot = MULT_i * ABSOURCE_i * ijunbot_s; - ijdgat = MULT_i * LGSOURCE_i * ijungat_s; - ijdsti = MULT_i * LSSOURCE_i * ijunsti_s; - idsatsbot = MULT_i * ABSOURCE_i * idsatbot; - idsatssti = MULT_i * LSSOURCE_i * idsatsti; - idsatsgat = MULT_i * LGSOURCE_i * idsatgat; - idsatsbotd = MULT_i * ABDRAIN_i * idsatbot_d; - idsatsstid = MULT_i * LSDRAIN_i * idsatsti_d; - idsatsgatd = MULT_i * LGDRAIN_i * idsatgat_d; - end - ijs = MULT_i * ijun_d; - ijd = MULT_i * ijun_s; - vds = Vds; - vgs = Vgs; - vsb = Vsb; - vto = VFB_T + P_D * facvsb0 + Gf_dc * sqrt(phit1 * facvsb0); - vts = vts_i; - vth = vth_i; - vgt = vgs - vth; - vdss = Vdsat_dc; - vsat = Vds - vdss; - ids_i = Ids + Idsedge + Iimpact + Igisl - Igcd - Igsov - ijun_s; // Total drain-current - `ifdef OPderiv - gm = CHNL_TYPE * MULT_i * ddx(ids_i, V(GP)); - gmb = CHNL_TYPE * MULT_i * ddx(ids_i, V(BP)); - gds = CHNL_TYPE * MULT_i * ddx(ids_i, V(SI)); - gjs = MULT_i * ddx(ijun_d, V(BD)); - gjd = MULT_i * ddx(ijun_s, V(BS)); - css = CHNL_TYPE * MULT_i * ddx(Qd, V(DI)); - csg = -CHNL_TYPE * MULT_i * ddx(Qd, V(GP)); - csb = -CHNL_TYPE * MULT_i * ddx(Qd, V(BP)); - csd = css - csg - csb; - cgs = -CHNL_TYPE * MULT_i * ddx(Qg, V(DI)); - cgg = CHNL_TYPE * MULT_i * ddx(Qg, V(GP)); - cgb = -CHNL_TYPE * MULT_i * ddx(Qg, V(BP)); - cgd = cgg - cgs - cgb; - cds = -CHNL_TYPE * MULT_i * ddx(Qs, V(DI)); - cdg = -CHNL_TYPE * MULT_i * ddx(Qs, V(GP)); - cdb = -CHNL_TYPE * MULT_i * ddx(Qs, V(BP)); - cdd = cdg + cds + cdb; - cbs = -CHNL_TYPE * MULT_i * ddx(Qb, V(DI)); - cbg = -CHNL_TYPE * MULT_i * ddx(Qb, V(GP)); - cbb = CHNL_TYPE * MULT_i * ddx(Qb, V(BP)); - cbd = cbb - cbs - cbg; - cgsol = CHNL_TYPE * MULT_i * ddx(Qfgd, V(GP)); - cgdol = CHNL_TYPE * MULT_i * ddx(Qfgs, V(GP)); - cjsbot = -MULT_i * CHNL_TYPE * ABDRAIN_i * ddx(qjunbot_d, V(DI)); - cjsgat = -MULT_i * CHNL_TYPE * LGDRAIN_i * ddx(qjungat_d, V(DI)); - cjssti = -MULT_i * CHNL_TYPE * LSDRAIN_i * ddx(qjunsti_d, V(DI)); - cjs = cjsbot + cjsgat + cjssti; - cjdbot = -MULT_i * CHNL_TYPE * ABSOURCE_i * ddx(qjunbot_s, V(SI)); - cjdgat = -MULT_i * CHNL_TYPE * LGSOURCE_i * ddx(qjungat_s, V(SI)); - cjdsti = -MULT_i * CHNL_TYPE * LSSOURCE_i * ddx(qjunsti_s, V(SI)); - cjd = cjdbot + cjdgat + cjdsti; - `endif // OPderiv - end else begin - ise = MULT_i * (is - Igsov + Igisl - ijun_s); - ige = MULT_i * ig; - ide = MULT_i * (id_op - Igdov + Igidl - ijun_d); - ibe = MULT_i * (ib + ijun_s + ijun_d); - ids = MULT_i * Ids; - idb = MULT_i * (Iimpact + Igidl - ijun_d); - isb = MULT_i * (Igisl - ijun_s); - igs = MULT_i * (Igcs + Igsov); - igd = MULT_i * (Igcd + Igdov); - igb = MULT_i * Igb; - idedge = MULT_i * Idsedge; - igcs = MULT_i * Igcs; - igcd = MULT_i * Igcd; - iavl = MULT_i * Iimpact; - igisl = MULT_i * Igisl; - igidl = MULT_i * Igidl; - if (SWJUNEXP_i == 1) begin - ijsbot = 0.0; - ijsgat = 0.0; - ijssti = 0.0; - ijdbot = 0.0; - ijdgat = 0.0; - ijdsti = 0.0; - idsatsbot = 0.0; - idsatssti = 0.0; - idsatsgat = 0.0; - idsatsbotd = 0.0; - idsatsstid = 0.0; - idsatsgatd = 0.0; - end else begin - ijsbot = MULT_i * ABSOURCE_i * ijunbot_s; - ijsgat = MULT_i * LGSOURCE_i * ijungat_s; - ijssti = MULT_i * LSSOURCE_i * ijunsti_s; - ijdbot = MULT_i * ABDRAIN_i * ijunbot_d; - ijdgat = MULT_i * LGDRAIN_i * ijungat_d; - ijdsti = MULT_i * LSDRAIN_i * ijunsti_d; - idsatsbot = MULT_i * ABSOURCE_i * idsatbot; - idsatssti = MULT_i * LSSOURCE_i * idsatsti; - idsatsgat = MULT_i * LGSOURCE_i * idsatgat; - idsatsbotd = MULT_i * ABDRAIN_i * idsatbot_d; - idsatsstid = MULT_i * LSDRAIN_i * idsatsti_d; - idsatsgatd = MULT_i * LGDRAIN_i * idsatgat_d; - end - ijs = MULT_i * ijun_s; - ijd = MULT_i * ijun_d; - vds = Vds; - vgs = Vgs; - vsb = Vsb; - vto = VFB_T + P_D * facvsb0 + Gf_dc * sqrt(phit1 * facvsb0); - vts = vts_i; - vth = vth_i; - vgt = vgs - vth; - vdss = Vdsat_dc; - vsat = Vds - vdss; - ids_i = Ids + Idsedge + Iimpact + Igidl - Igcd - Igdov - ijun_d; // Total drain-current - `ifdef OPderiv - gm = CHNL_TYPE * MULT_i * ddx(ids_i, V(GP)); - gmb = CHNL_TYPE * MULT_i * ddx(ids_i, V(BP)); - gds = CHNL_TYPE * MULT_i * ddx(ids_i, V(DI)); - gjs = -MULT_i * ddx(ijun_s, V(SI)); - gjd = -MULT_i * ddx(ijun_d, V(DI)); - cdd = CHNL_TYPE * MULT_i * ddx(Qd, V(DI)); - cdg = -CHNL_TYPE * MULT_i * ddx(Qd, V(GP)); - cdb = -CHNL_TYPE * MULT_i * ddx(Qd, V(BP)); - cds = cdd - cdg - cdb; - cgd = -CHNL_TYPE * MULT_i * ddx(Qg, V(DI)); - cgg = CHNL_TYPE * MULT_i * ddx(Qg, V(GP)); - cgb = -CHNL_TYPE * MULT_i * ddx(Qg, V(BP)); - cgs = cgg - cgd - cgb; - csd = -CHNL_TYPE * MULT_i * ddx(Qs, V(DI)); - csg = -CHNL_TYPE * MULT_i * ddx(Qs, V(GP)); - csb = -CHNL_TYPE * MULT_i * ddx(Qs, V(BP)); - css = csg + csd + csb; - cbd = -CHNL_TYPE * MULT_i * ddx(Qb, V(DI)); - cbg = -CHNL_TYPE * MULT_i * ddx(Qb, V(GP)); - cbb = CHNL_TYPE * MULT_i * ddx(Qb, V(BP)); - cbs = cbb - cbd - cbg; - cgsol = CHNL_TYPE * MULT_i * ddx(Qfgs, V(GP)); - cgdol = CHNL_TYPE * MULT_i * ddx(Qfgd, V(GP)); - cjsbot = -MULT_i * CHNL_TYPE * ABSOURCE_i * ddx(qjunbot_s, V(SI)); - cjsgat = -MULT_i * CHNL_TYPE * LGSOURCE_i * ddx(qjungat_s, V(SI)); - cjssti = -MULT_i * CHNL_TYPE * LSSOURCE_i * ddx(qjunsti_s, V(SI)); - cjs = cjsbot + cjsgat + cjssti; - cjdbot = -MULT_i * CHNL_TYPE * ABDRAIN_i * ddx(qjunbot_d, V(DI)); - cjdgat = -MULT_i * CHNL_TYPE * LGDRAIN_i * ddx(qjungat_d, V(DI)); - cjdsti = -MULT_i * CHNL_TYPE * LSDRAIN_i * ddx(qjunsti_d, V(DI)); - cjd = cjdbot + cjdgat + cjdsti; - `endif // OPderiv - end - weff = WE; - leff = LE; - `ifdef OPderiv - if (abs(gds) < 1.0e-18) begin - u = 0.0; - rout = 0.0; - vearly = 0.0; - end else begin - u = gm / gds; - rout = 1.0 / gds; - vearly = ide / gds; - end - if (abs(vgt) < 1.0e-12) begin - beff = 0.0; - end else begin - beff = 2.0 * abs(ide) / (vgt * vgt); - end - if (abs(cgg + cgsol + cgdol) < 1.0e-30) begin - fug = 0.0; - end else begin - fug = gm / (2.0 * `PI * (cgg + cgsol + cgdol)); - end - rg = RG_i / MULT_i; - sfl = MULT_i * Sfl; - if (abs(gm) < 1.0e-18) begin - sqrtsff = 0.0; - sqrtsfw = 0.0; - end else begin - sqrtsff = sqrt(MULT_i * Sfl / 1000.0) / gm; - sqrtsfw = sqrt(MULT_i) * sqid / gm; - end - sid = MULT_i * sqid * sqid; - sig = MULT_i * nt * sig1k / (1.0 + sig1k * mig); - cigid = c_igid; - if (sid == 0.0) begin - fknee = 0.0; - end else begin - fknee = sfl / sid; - end - siavl = MULT_i * shot_iavl; - if (sigVds < 0.0) begin - sigs = MULT_i * (shot_igcsx + shot_igdov); - sigd = MULT_i * (shot_igcdx + shot_igsov); - ssi = MULT_i * jnoisex_d; - sdi = MULT_i * jnoisex_s; - end else begin - sigs = MULT_i * (shot_igcsx + shot_igsov); - sigd = MULT_i * (shot_igcdx + shot_igdov); - ssi = MULT_i * jnoisex_s; - sdi = MULT_i * jnoisex_d; - end - sfledge = MULT_i * Sfledge; - sidedge = MULT_i * sqidedge; - `endif // OPderiv - - lp_vfb = VFB_T; - lp_stvfb = STVFB_i; - lp_st2vfb = ST2VFB_i; - lp_tox = TOX_i; - lp_epsrox = EPSROX_i; - lp_neff = NEFF_i; - lp_facneffac = FACNEFFAC_i; - lp_gfacnud = GFACNUD_i; - lp_vsbnud = VSBNUD_i; - lp_dvsbnud = DVSBNUD_i; - lp_vnsub = VNSUB_i; - lp_nslp = NSLP_i; - lp_dnsub = DNSUB_i; - lp_dphib = DPHIB_i; - lp_delvtac = DELVTAC_i; - lp_np = NP_i; - lp_toxov = TOXOV_i; - lp_toxovd = TOXOVD_i; - lp_nov = NOV_i; - lp_novd = NOVD_i; - lp_ct = CT_T; - lp_ctg = CTG_T; - lp_ctb = CTB_i; - lp_stct = STCT_i; - lp_cf = CF_i; - lp_cfd = CFD_i; - lp_cfb = CFB_i; - lp_psce = PSCE_i; - lp_psceb = PSCEB_i; - lp_psced = PSCED_i; - lp_betn = BETN_T; - lp_stbet = STBET_i; - lp_mue = MUE_T; - lp_stmue = STMUE_i; - lp_themu = THEMU_T; - lp_stthemu = STTHEMU_i; - lp_cs = CS_T; - lp_stcs = STCS_i; - lp_thecs = THECS_T; - lp_stthecs = STTHECS_i; - lp_xcor = XCOR_T; - lp_stxcor = STXCOR_i; - lp_feta = FETA_i; - lp_rs = RS_T; - lp_strs = STRS_i; - lp_rsb = RSB_i; - lp_rsg = RSG_i; - lp_thesat = THESAT_T; - lp_stthesat = STTHESAT_i; - lp_thesatb = THESATB_i; - lp_thesatg = THESATG_i; - lp_ax = AX_i; - lp_alp = ALP_i; - lp_alp1 = ALP1_i; - lp_alp2 = ALP2_i; - lp_vp = VP_i; - lp_a1 = A1_i; - lp_a2 = A2_T; - lp_sta2 = STA2_i; - lp_a3 = A3_i; - lp_a4 = A4_i; - lp_gco = GCO_i; - lp_iginv = IGINV_i; - lp_igov = IGOV_i; - lp_igovd = IGOVD_i; - lp_stig = STIG_i; - lp_gc2 = GC2_i; - lp_gc3 = GC3_i; - lp_chib = CHIB_i; - lp_agidl = AGIDL_i; - lp_agidld = AGIDLD_i; - lp_bgidl = BGIDL_T; - lp_bgidld = BGIDLD_T; - lp_stbgidl = STBGIDL_i; - lp_stbgidld = STBGIDLD_i; - lp_cgidl = CGIDL_i; - lp_cgidld = CGIDLD_i; - lp_cox = COX_i; - lp_cgov = CGOV_i; - lp_cgovd = CGOVD_i; - lp_cgbov = CGBOV_i; - lp_cfr = CFR_i; - lp_cfrd = CFRD_i; - lp_fnt = FNT_i; - lp_fntexc = FNTEXC_i; - lp_nfa = NFA_i; - lp_nfb = NFB_i; - lp_nfc = NFC_i; - lp_ef = EF_i; - lp_vfbedge = VFBEDGE_T; - lp_stvfbedge = STVFBEDGE_i; - lp_dphibedge = DPHIBEDGE_i; - lp_neffedge = NEFFEDGE_i; - lp_ctedge = CTEDGE_i; - lp_betnedge = BETNEDGE_T; - lp_stbetedge = STBETEDGE_i; - lp_psceedge = PSCEEDGE_i; - lp_pscebedge = PSCEBEDGE_i; - lp_pscededge = PSCEDEDGE_i; - lp_cfedge = CFEDGE_i; - lp_cfdedge = CFDEDGE_i; - lp_cfbedge = CFBEDGE_i; - lp_fntedge = FNTEDGE_i; - lp_nfaedge = NFAEDGE_i; - lp_nfbedge = NFBEDGE_i; - lp_nfcedge = NFCEDGE_i; - lp_efedge = EFEDGE_i; - lp_rg = RG_i; - lp_rse = RSE_i; - lp_rde = RDE_i; - lp_rbulk = RBULK_i; - lp_rwell = RWELL_i; - lp_rjuns = RJUNS_i; - lp_rjund = RJUND_i; - `ifdef SelfHeating - lp_rth = RTH_i; - lp_cth = CTH_i; - lp_strth = STRTH_i; - pdiss = MULT_i * Pdiss; - dtsh = TKD - TKA; - `endif // SelfHeating - tk = TKD; - cjosbot = MULT_i * ABSOURCE_i * cjobot; - cjossti = MULT_i * LSSOURCE_i * cjosti; - cjosgat = MULT_i * LGSOURCE_i * cjogat; - vbisbot = vbibot; - vbissti = vbisti; - vbisgat = vbigat; - cjosbotd = MULT_i * ABDRAIN_i * cjobot_d; - cjosstid = MULT_i * LSDRAIN_i * cjosti_d; - cjosgatd = MULT_i * LGDRAIN_i * cjogat_d; - vbisbotd = vbibot_d; - vbisstid = vbisti_d; - vbisgatd = vbigat_d; - `ifdef NQSmodel - lp_munqs = MUNQS_i; - `endif // NQSmodel - - end // OPinfo - - end // evaluateblock - - end // analogBlock diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/README.md b/ihp-sg13g2/libs.tech/ngspice/openvaf/README.md deleted file mode 100644 index 4ff3c6ab..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Compilation and installation of the psp_103 model for ngspice - - -First download from [here](https://openvaf.semimod.de/download/) and install (copy) the binary `openvaf` into `/usr/local/bin/` directory and then execute the following: - -``` -openvaf psp103_nqs.va -mv psp103_nqs.osdi ../../xschem/simulations/ -``` diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/juncap200.va b/ihp-sg13g2/libs.tech/ngspice/openvaf/juncap200.va deleted file mode 100644 index 5ad1f1a8..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/juncap200.va +++ /dev/null @@ -1,339 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: juncap200.va -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA) and 2012-2015 Delft University of Technology -// Licensed under the Educational Community License, Version 2.0 (the "License"); you -// may not use this file except in compliance with the License. You may obtain a copy -// of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 200.5.0, August 2016 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - -`include "discipline.h" - -`include "Common103_macrodefs.include" - -`include "JUNCAP200_macrodefs.include" - -`define JUNCAP_StandAlone - -// Note: some verilog-A compilers have problems handling the ddx-operator, -// which occurs in definition of OP-output variables. If the line below is -// commented out, all OP-output variables using the ddx-operator are skipped. -`define OPderiv - -///////////////////////////////////////////////////////////////////////////// -// -// Start of JUNCAP2 model code -// -///////////////////////////////////////////////////////////////////////////// - -module JUNCAP200(A,K); - - // -------------------------------------------------------------------------------------------------------------- - // Node definitions - // -------------------------------------------------------------------------------------------------------------- - inout A,K; - electrical A,K; - - // -------------------------------------------------------------------------------------------------------------- - // Special model parameters and switch parameters - // -------------------------------------------------------------------------------------------------------------- - `MPInb(LEVEL ,200 ,"" ,"Model level must be 200") - `MPIty(TYPE ,1.0 ,"" ,"Type parameter, in output value 1 reflects n-type, -1 reflects p-type") - `MPRnb(DTA ,0.0 ,"K" ,"Temperature offset with respect to ambient temperature") - - // -------------------------------------------------------------------------------------------------------------- - // Instance parameters - // -------------------------------------------------------------------------------------------------------------- - `IPRco(AB ,1.0e-12 ,"m^2" ,`AB_cliplow ,inf ,"Junction area") - `IPRco(LS ,1.0e-6 ,"m^2" ,`LS_cliplow ,inf ,"STI-edge part of junction perimeter") - `IPRco(LG ,1.0e-6 ,"m^2" ,`LG_cliplow ,inf ,"Gate-edge part of junction perimeter") - `IPRco(MULT ,1.0 ,"" ,`MULT_cliplow ,inf ,"Number of devices in parallel") - - // -------------------------------------------------------------------------------------------------------------- - // JUNCAP2 model parameters - // -------------------------------------------------------------------------------------------------------------- - `include "JUNCAP200_parlist.include" - - // -------------------------------------------------------------------------------------------------------------- - // Variables - // -------------------------------------------------------------------------------------------------------------- - real MULT_i; - real EPSSI; - `include "JUNCAP200_varlist1.include" - `include "JUNCAP200_varlist2.include" - - // -------------------------------------------------------------------------------------------------------------- - // Variables for operating point info - // -------------------------------------------------------------------------------------------------------------- - - `OPP(vak ,"V" ,"Voltage between anode and cathode") - `ifdef OPderiv - `OPP(cj ,"F" ,"Total source junction capacitance") - `OPP(cjbot ,"F" ,"Junction capacitance (bottom component)") - `OPP(cjgat ,"F" ,"Junction capacitance (gate-edge component)") - `OPP(cjsti ,"F" ,"Junction capacitance (STI-edge component)") - `endif // OPderiv - `OPP(ij ,"A" ,"Total source junction current") - `OPP(ijbot ,"A" ,"Junction current (bottom component)") - `OPP(ijgat ,"A" ,"Junction current (gate-edge component)") - `OPP(ijsti ,"A" ,"Junction current (STI-edge component)") - `OPP(si ,"A^2/Hz" ,"Total junction current noise spectral density") - - // local parameters after scaling, T-scaling, and clipping - `OPP(idsatsbot ,"A" ,"Total bottom saturation current") - `OPP(idsatssti ,"A" ,"Total STI-edge saturation current") - `OPP(idsatsgat ,"A" ,"Total gate-edge saturation current") - `OPP(cjosbot ,"F" ,"Total bottom capacity") - `OPP(cjossti ,"F" ,"Total STI-edge capacity") - `OPP(cjosgat ,"F" ,"Total gate-edge capacity") - `OPP(vbisbot ,"V" ,"built-in voltage of the bottom junction") - `OPP(vbissti ,"V" ,"built-in voltage of the STI-edge junction") - `OPP(vbisgat ,"V" ,"built-in voltage of the gate-edge junction") - -// -------------------------------------------------------------------------------------------------------------- -// Analog block with all calculations and contribs -// -------------------------------------------------------------------------------------------------------------- - - analog begin - - // -------------------------------------------------------------------------------------------------------------- - // Definition of bias/instance independent model variables - // -------------------------------------------------------------------------------------------------------------- - begin : initial_model - - EPSSI = `EPSO * `EPSRSI; - `include "JUNCAP200_InitModel.include" - - end // initial_model - - // -------------------------------------------------------------------------------------------------------------- - // Definition of instance dependent and bias independent variables - // -------------------------------------------------------------------------------------------------------------- - begin : initial_instance - - // Clipping of the local model parameters - - AB_i = `CLIP_LOW(AB, `AB_cliplow); - LS_i = `CLIP_LOW(LS, `LS_cliplow); - LG_i = `CLIP_LOW(LG, `LG_cliplow); - MULT_i = `CLIP_LOW(MULT, `MULT_cliplow); - - exp_VMAX_over_phitd = 0.0; - `JuncapInitInstance(AB_i, LS_i, LG_i, idsatbot, idsatsti, idsatgat, vbibot, vbisti, vbigat, PBOT_i, PSTI_i, PGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) - - // Initialization of (global) variables; required for some verilog-A compilers - ISATFOR1 = 0.0; - MFOR1 = 1.0; - MFOR2 = 1.0; - ISATFOR2 = 0.0; - MREV = 1.0; - ISATREV = 0.0; - m0flag = 0.0; - xhighf1 = 0.0; - expxhf1 = 0.0; - xhighf2 = 0.0; - expxhf2 = 0.0; - xhighr = 0.0; - expxhr = 0.0; - - m0_rev = 0.0; - mcor_rev = 0.0; - I1_cor = 0.0; - I2_cor = 0.0; - I3_cor = 0.0; - I4_cor = 0.0; - I5_cor = 0.0; - tt0 = 0.0; - tt1 = 0.0; - tt2 = 0.0; - zfrac = 0.0; - zflagbot = 1.0; - zflagsti = 1.0; - zflaggat = 1.0; - alphaje = 0.0; - - if (SWJUNEXP_i == 1.0) begin : JUNCAPexpressInit - // Note: the variables in the macro below are (re-)declared locally, to keep them separated from their globally declared counterparts. - // This trick allows one to use the "juncapcommon" macro both in the JUNCAP-express initialization and in the full-JUNCAP evalutation, - // while in the former the verilog-A compiler will still consider the variables as voltage-INdependent. This is essential to avoid - // recomputation of the JUNCAP-express initialization at each bias-step. - - `LocalGlobalVars - // results computed here are not used elsewhere - real ijunbot, ijunsti, ijungat, qjunbot, qjunsti, qjungat; - - // Initialization of (local) variables; required for some verilog-A compilers - ysq = 0.0; - terfc = 0.0; - erfcpos = 0.0; - h1 = 0.0; - h2 = 0.0; - h2d = 0.0; - h3 = 0.0; - h4 = 0.0; - h5 = 0.0; - idmult = 0.0; - vj = 0.0; - z = 0.0; - zinv = 0.0; - two_psistar = 0.0; - vjlim = 0.0; - vjsrh = 0.0; - vbbt = 0.0; - vav = 0.0; - tmp = 0.0; - id = 0.0; - isrh = 0.0; - vbi_minus_vjsrh = 0.0; - wsrhstep = 0.0; - dwsrh = 0.0; - wsrh = 0.0; - wdep = 0.0; - asrh = 0.0; - itat = 0.0; - btat = 0.0; - twoatatoverthreebtat = 0.0; - umaxbeforelimiting = 0.0; - umax = 0.0; - sqrtumax = 0.0; - umaxpoweronepointfive = 0.0; - wgamma = 0.0; - wtat = 0.0; - ktat = 0.0; - ltat = 0.0; - mtat = 0.0; - xerfc = 0.0; - erfctimesexpmtat = 0.0; - gammamax = 0.0; - ibbt = 0.0; - Fmaxr = 0.0; - fbreakdown = 0.0; - qjunbot = 0.0; - qjunsti = 0.0; - qjungat = 0.0; - - // Computation of JUNCAP-express internal parameters - `JuncapExpressInit1(AB_i, LS_i, LG_i, VJUNREF_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) - `JuncapExpressInit2(AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) - `JuncapExpressInit3(AB_i, LS_i, LG_i, idsatbot, idsatsti, idsatgat, ISATFOR1, MFOR1, ISATFOR2, MFOR2, ISATREV, MREV, m0flag) - `JuncapExpressInit4(AB_i, LS_i, LG_i, FJUNQ_i, cjobot, cjosti, cjogat, zflagbot, zflagsti, zflaggat) - `JuncapExpressInit5(AB_i, LS_i, LG_i, ISATFOR1, ISATFOR2, ISATREV, xhighf1, expxhf1, xhighf2, expxhf2, xhighr, expxhr) - - end // JUNCAPexpressInit - - end // initial_instance - - begin : evaluateblock - - // Local variables - real ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat, ijun, qjun, jnoise, VAK; - - // Variable initializing - ijun = 0.0; - ijunbot = 0.0; - ijunsti = 0.0; - ijungat = 0.0; - - // -------------------------------------------------------------------------------------------------------------- - // DC and AC bias dependent quantities (calculations for current and charge contributions) - // -------------------------------------------------------------------------------------------------------------- - begin : evaluateStaticDynamic - - VAK = TYPE * V(A, K); - if (SWJUNEXP_i == 1.0) begin - `JuncapExpressCurrent(VAK, MFOR1, ISATFOR1, MFOR2, ISATFOR2, MREV, ISATREV, m0flag, xhighf1, expxhf1, xhighf2, expxhf2, xhighr, expxhr, ijun) - begin : evaluateDynamic - real tmpv, vjv; - `JuncapExpressCharge(VAK, AB_i, LS_i, LG_i, qprefbot, qprefsti, qprefgat, qpref2bot, qpref2sti, qpref2gat, vbiinvbot, vbiinvsti, vbiinvgat, one_minus_PBOT, one_minus_PSTI, one_minus_PGAT, vfmin, vch, zflagbot, zflagsti, zflaggat, qjunbot, qjunsti, qjungat) - end - end else begin - `juncapcommon(VAK, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) - ijun = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; - end - qjun = AB_i * qjunbot + LS_i * qjunsti + LG_i * qjungat; - - end // evaluateStaticDynamic - - // -------------------------------------------------------------------------------------------------------------- - // Current contributions - // -------------------------------------------------------------------------------------------------------------- - - begin : loadStatic - I(A, K) <+ (TYPE * MULT_i) * ijun; - end // loadStatic - - // -------------------------------------------------------------------------------------------------------------- - // ddt() contribs from charges - // -------------------------------------------------------------------------------------------------------------- - - begin : loadDynamic - I(A, K) <+ ddt((TYPE * MULT_i) * qjun); - end // loadDynamic - - // -------------------------------------------------------------------------------------------------------------- - // Noise - // -------------------------------------------------------------------------------------------------------------- - - begin : noise - jnoise = (2 * `QELE) * abs(ijun); - I(A, K) <+ white_noise(MULT_i * jnoise, "shot"); - end // noise - - // -------------------------------------------------------------------------------------------------------------- - // Operating point info - // -------------------------------------------------------------------------------------------------------------- - - begin : OPinfo - vak = VAK; - `ifdef OPderiv - cjbot = TYPE * MULT_i * AB_i * ddx(qjunbot, V(A)); - cjgat = TYPE * MULT_i * LG_i * ddx(qjungat, V(A)); - cjsti = TYPE * MULT_i * LS_i * ddx(qjunsti, V(A)); - cj = cjbot + cjgat + cjsti; - `endif // OPderiv - if (SWJUNEXP_i == 1.0) begin - ijbot = 0.0; - ijgat = 0.0; - ijsti = 0.0; - idsatsbot = 0.0; - idsatssti = 0.0; - idsatsgat = 0.0; - end else begin - ijbot = MULT_i * AB_i * ijunbot; - ijgat = MULT_i * LG_i * ijungat; - ijsti = MULT_i * LS_i * ijunsti; - idsatsbot = MULT_i * AB_i * idsatbot; - idsatssti = MULT_i * LS_i * idsatsti; - idsatsgat = MULT_i * LG_i * idsatgat; - end - ij = MULT_i * ijun; - si = MULT_i * jnoise; - cjosbot = MULT_i * AB_i * cjobot; - cjossti = MULT_i * LS_i * cjosti; - cjosgat = MULT_i * LG_i * cjogat; - vbisbot = vbibot; - vbissti = vbisti; - vbisgat = vbigat; - end // OPinfo - end // evaluateblock - end // analogBlock -endmodule diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/psp103.va b/ihp-sg13g2/libs.tech/ngspice/openvaf/psp103.va deleted file mode 100644 index 6f7fb0b1..00000000 --- a/ihp-sg13g2/libs.tech/ngspice/openvaf/psp103.va +++ /dev/null @@ -1,52 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: psp103.va -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and -// 2004-2011 Arizona State University Licensed under the Educational Community License, -// Version 2.0 (the "License"); you may not use this file except in compliance with the -// License. You may obtain a copy of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 103.6.0 (PSP), 200.5.0 (JUNCAP), December 2017 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - -`include "discipline.h" - -`include "Common103_macrodefs.include" - -`include "JUNCAP200_macrodefs.include" - -`include "PSP103_macrodefs.include" - -// Note: some verilog-A compilers have problems handling the ddx-operator, -// which occurs in definition of OP-output variables. If the line below is -// commented out, all OP-output variables using the ddx-operator are skipped. -`define OPderiv - -///////////////////////////////////////////////////////////////////////////// -// -// PSP global model code -// -///////////////////////////////////////////////////////////////////////////// - -module PSP103VA(D, G, S, B); - -`include "PSP103_module.include" - -endmodule diff --git a/ihp-sg13g2/libs.tech/qucs/install.py b/ihp-sg13g2/libs.tech/qucs/install.py index 5704b5ad..3c25eeac 100755 --- a/ihp-sg13g2/libs.tech/qucs/install.py +++ b/ihp-sg13g2/libs.tech/qucs/install.py @@ -54,7 +54,7 @@ def info(): msg = """ This script: - copies the Qucs-S user library files into $HOME/[.qucs|QucsWorkspace]/user_lib directory. - - compiles and copies PSP103 model in ../ngspice/openvaf location + - compiles and copies Verilog-A models in ../verilog-a location Please make sure that you have set up the PDK_ROOT env variable export PDK_ROOT= """ @@ -148,15 +148,19 @@ def info(): logging.error(f"{program_name} is not installed.") exit(1) - # Compiling MOSFET PSP Verilog-A models - print("\nCompiling MOSFET PSP Verilog-A models ...") - source_directory = pdk_root + "/ihp-sg13g2/libs.tech/ngspice/openvaf" - destination_directory = pdk_root + "/ihp-sg13g2/libs.tech/ngspice/openvaf" + # Compiling Verilog-A models + print("\nCompiling Verilog-A models ...") + destination_directory = pdk_root + "/ihp-sg13g2/libs.tech/verilog-a" program_name = "openvaf" if is_program_installed(program_name): + source_directory = pdk_root + "/ihp-sg13g2/libs.tech/verilog-a/psp103" command = "openvaf psp103_nqs.va --output " + destination_directory + "/psp103_nqs.osdi" print(f"{program_name} is available and about to run the command '{command}' in a location: {source_directory} ") exec_app_in_directory(command, source_directory) + source_directory = pdk_root + "/ihp-sg13g2/libs.tech/verilog-a/r3_cmc" + command = "openvaf r3_cmc.va --output " + destination_directory + "/r3_cmc.osdi" + print(f"{program_name} is available and about to run the command '{command}' in a location: {source_directory} ") + exec_app_in_directory(command, source_directory) else: logging.error(f"{program_name} is not installed.") exit(1) diff --git a/ihp-sg13g2/libs.tech/xyce/adms/README.md b/ihp-sg13g2/libs.tech/verilog-a/README.md similarity index 89% rename from ihp-sg13g2/libs.tech/xyce/adms/README.md rename to ihp-sg13g2/libs.tech/verilog-a/README.md index 4f6dbf41..0afb730a 100644 --- a/ihp-sg13g2/libs.tech/xyce/adms/README.md +++ b/ihp-sg13g2/libs.tech/verilog-a/README.md @@ -1,4 +1,4 @@ -# Compilation and installation of the psp_103 model for XYCE +# Compilation and installation of verilog-a models for XYCE Each model should be placed in a separate directory like `psp103` diff --git a/ihp-sg13g2/libs.tech/xyce/adms/adms-compile-va.sh b/ihp-sg13g2/libs.tech/verilog-a/adms-compile-va.sh old mode 100755 new mode 100644 similarity index 67% rename from ihp-sg13g2/libs.tech/xyce/adms/adms-compile-va.sh rename to ihp-sg13g2/libs.tech/verilog-a/adms-compile-va.sh index fd361d65..2c4da09a --- a/ihp-sg13g2/libs.tech/xyce/adms/adms-compile-va.sh +++ b/ihp-sg13g2/libs.tech/verilog-a/adms-compile-va.sh @@ -5,7 +5,7 @@ # License: New BSD -DIRECTORY="../plugins" +DIRECTORY="../xyce/plugins" if [ ! -d "$DIRECTORY" ]; then # Directory does not exist, so create it @@ -13,7 +13,13 @@ if [ ! -d "$DIRECTORY" ]; then fi cd ./psp103/ -buildxyceplugin psp103.va ../../plugins +buildxyceplugin psp103.va ../../xyce/plugins +rm *.la *.log +rm -rfd .libs/ +cd .. + +cd ./r3_cmc/ +buildxyceplugin r3_cmc.va ../../xyce/plugins rm *.la *.log rm -rfd .libs/ cd .. diff --git a/ihp-sg13g2/libs.tech/verilog-a/openvaf-compile-va.bat b/ihp-sg13g2/libs.tech/verilog-a/openvaf-compile-va.bat new file mode 100644 index 00000000..01a1e87f --- /dev/null +++ b/ihp-sg13g2/libs.tech/verilog-a/openvaf-compile-va.bat @@ -0,0 +1,15 @@ +:: +:: +:: Copyright 2023 The ngspice team +:: Authors: Holger Vogt, Dietmar Warning +:: License: New BSD + +openvaf.exe -D__NGSPICE__ -o psp103.osdi psp103\\psp103.va +openvaf.exe -D__NGSPICE__ -o psp103_nqs.osdi psp103\psp103_nqs.va +openvaf.exe -D__NGSPICE__ -o r3_cmc.osdi r3_cmc\r3_cmc.va + +del *.lib +del *.exp + +echo done + diff --git a/ihp-sg13g2/libs.tech/verilog-a/openvaf-compile-va.sh b/ihp-sg13g2/libs.tech/verilog-a/openvaf-compile-va.sh new file mode 100644 index 00000000..e1c9ecd5 --- /dev/null +++ b/ihp-sg13g2/libs.tech/verilog-a/openvaf-compile-va.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Copyright 2023 The ngspice team +# Authors: Holger Vogt, Dietmar Warning +# License: New BSD + +openvaf -D__NGSPICE__ -o psp103.osdi psp103/psp103.va +openvaf -D__NGSPICE__ -o psp103_nqs.osdi psp103/psp103_nqs.va +openvaf -D__NGSPICE__ -o r3_cmc.osdi r3_cmc/r3_cmc.va + +echo done + diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/Changelog b/ihp-sg13g2/libs.tech/verilog-a/psp103/Changelog similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/Changelog rename to ihp-sg13g2/libs.tech/verilog-a/psp103/Changelog diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/Common103_macrodefs.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/Common103_macrodefs.include similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/Common103_macrodefs.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/Common103_macrodefs.include diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/JUNCAP200_InitModel.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/JUNCAP200_InitModel.include similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/JUNCAP200_InitModel.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/JUNCAP200_InitModel.include diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/JUNCAP200_macrodefs.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/JUNCAP200_macrodefs.include similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/JUNCAP200_macrodefs.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/JUNCAP200_macrodefs.include diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/JUNCAP200_parlist.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/JUNCAP200_parlist.include similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/JUNCAP200_parlist.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/JUNCAP200_parlist.include diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/JUNCAP200_varlist1.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/JUNCAP200_varlist1.include similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/JUNCAP200_varlist1.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/JUNCAP200_varlist1.include diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/JUNCAP200_varlist2.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/JUNCAP200_varlist2.include similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/JUNCAP200_varlist2.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/JUNCAP200_varlist2.include diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_ChargesNQS.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_ChargesNQS.include similarity index 100% rename from ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_ChargesNQS.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_ChargesNQS.include diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_InitNQS.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_InitNQS.include similarity index 100% rename from ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_InitNQS.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_InitNQS.include diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_SPCalculation.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_SPCalculation.include similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_SPCalculation.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_SPCalculation.include diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_binning.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_binning.include similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_binning.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_binning.include diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_binpars.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_binpars.include similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_binpars.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_binpars.include diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_macrodefs.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_macrodefs.include similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_macrodefs.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_macrodefs.include diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_module.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_module.include similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_module.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_module.include diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_nqs_macrodefs.include b/ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_nqs_macrodefs.include similarity index 100% rename from ihp-sg13g2/libs.tech/ngspice/openvaf/PSP103_nqs_macrodefs.include rename to ihp-sg13g2/libs.tech/verilog-a/psp103/PSP103_nqs_macrodefs.include diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/README.md b/ihp-sg13g2/libs.tech/verilog-a/psp103/README.md similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/README.md rename to ihp-sg13g2/libs.tech/verilog-a/psp103/README.md diff --git a/ihp-sg13g2/libs.tech/verilog-a/psp103/discipline.h b/ihp-sg13g2/libs.tech/verilog-a/psp103/discipline.h new file mode 100644 index 00000000..b70ce89a --- /dev/null +++ b/ihp-sg13g2/libs.tech/verilog-a/psp103/discipline.h @@ -0,0 +1,284 @@ +// Copyright(c) 2009-2014 Accellera Systems Initiative Inc. +// 1370 Trancas Street #163, Napa, CA 94558, USA. +// +// The material in disciplines.vams is an essential part of the Accellera Systems +// Initiative ("Accellera") Verilog-AMS Language Standard. Verbatim copies of +// the material in this Annex may be used and distributed without restriction. +// All other uses require permission from Accellera IP Committee +// (ipr-chair@lists.accellera.org). +// All other rights reserved. +// +// Version 2.4.0 + +`ifdef DISCIPLINES_VAMS +`else +`define DISCIPLINES_VAMS 1 + +// +// Natures and Disciplines +// + +discipline logic; + domain discrete; +enddiscipline + +discipline ddiscrete; + domain discrete; +enddiscipline + +/* + * Default absolute tolerances may be overridden by setting the + * appropriate _ABSTOL prior to including this file + */ + +// Electrical + +// Current in amperes +nature Current; + units = "A"; + access = I; + idt_nature = Charge; +`ifdef CURRENT_ABSTOL + abstol = `CURRENT_ABSTOL; +`else + abstol = 1e-12; +`endif +endnature + +// Charge in coulombs +nature Charge; + units = "coul"; + access = Q; + ddt_nature = Current; +`ifdef CHARGE_ABSTOL + abstol = `CHARGE_ABSTOL; +`else + abstol = 1e-14; +`endif +endnature + +// Potential in volts +nature Voltage; + units = "V"; + access = V; + idt_nature = Flux; +`ifdef VOLTAGE_ABSTOL + abstol = `VOLTAGE_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Flux in Webers +nature Flux; + units = "Wb"; + access = Phi; + ddt_nature = Voltage; +`ifdef FLUX_ABSTOL + abstol = `FLUX_ABSTOL; +`else + abstol = 1e-9; +`endif +endnature + +// Conservative discipline +discipline electrical; + potential Voltage; + flow Current; +enddiscipline + +// Signal flow disciplines +discipline voltage; + potential Voltage; +enddiscipline + +discipline current; + flow Current; +enddiscipline + +// Magnetic + +// Magnetomotive force in Ampere-Turns. +nature Magneto_Motive_Force; + units = "A*turn"; + access = MMF; +`ifdef MAGNETO_MOTIVE_FORCE_ABSTOL + abstol = `MAGNETO_MOTIVE_FORCE_ABSTOL; +`else + abstol = 1e-12; +`endif +endnature + +// Conservative discipline +discipline magnetic; + potential Magneto_Motive_Force; + flow Flux; +enddiscipline + +// Thermal + +// Temperature in Kelvin +nature Temperature; + units = "K"; + access = Temp; +`ifdef TEMPERATURE_ABSTOL + abstol = `TEMPERATURE_ABSTOL; +`else + abstol = 1e-4; +`endif +endnature + +// Power in Watts +nature Power; + units = "W"; + access = Pwr; +`ifdef POWER_ABSTOL + abstol = `POWER_ABSTOL; +`else + abstol = 1e-9; +`endif +endnature + +// Conservative discipline +discipline thermal; + potential Temperature; + flow Power; +enddiscipline + +// Kinematic + +// Position in meters +nature Position; + units = "m"; + access = Pos; + ddt_nature = Velocity; +`ifdef POSITION_ABSTOL + abstol = `POSITION_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Velocity in meters per second +nature Velocity; + units = "m/s"; + access = Vel; + ddt_nature = Acceleration; + idt_nature = Position; +`ifdef VELOCITY_ABSTOL + abstol = `VELOCITY_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Acceleration in meters per second squared +nature Acceleration; + units = "m/s^2"; + access = Acc; + ddt_nature = Impulse; + idt_nature = Velocity; +`ifdef ACCELERATION_ABSTOL + abstol = `ACCELERATION_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Impulse in meters per second cubed +nature Impulse; + units = "m/s^3"; + access = Imp; + idt_nature = Acceleration; +`ifdef IMPULSE_ABSTOL + abstol = `IMPULSE_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Force in Newtons +nature Force; + units = "N"; + access = F; +`ifdef FORCE_ABSTOL + abstol = `FORCE_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Conservative disciplines + +discipline kinematic; + potential Position; + flow Force; +enddiscipline + +discipline kinematic_v; + potential Velocity; + flow Force; +enddiscipline + +// Rotational + +// Angle in radians +nature Angle; + units = "rads"; + access = Theta; + ddt_nature = Angular_Velocity; +`ifdef ANGLE_ABSTOL + abstol = `ANGLE_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Angular Velocity in radians per second +nature Angular_Velocity; + units = "rads/s"; + access = Omega; + ddt_nature = Angular_Acceleration; + idt_nature = Angle; +`ifdef ANGULAR_VELOCITY_ABSTOL + abstol = `ANGULAR_VELOCITY_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Angular acceleration in radians per second squared +nature Angular_Acceleration; + units = "rads/s^2"; + access = Alpha; + idt_nature = Angular_Velocity; +`ifdef ANGULAR_ACCELERATION_ABSTOL + abstol = `ANGULAR_ACCELERATION_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Torque in Newtons +nature Angular_Force; + units = "N*m"; + access = Tau; +`ifdef ANGULAR_FORCE_ABSTOL + abstol = `ANGULAR_FORCE_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Conservative disciplines +discipline rotational; + potential Angle; + flow Angular_Force; +enddiscipline + +discipline rotational_omega; + potential Angular_Velocity; + flow Angular_Force; +enddiscipline + +`endif diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/juncap200.va b/ihp-sg13g2/libs.tech/verilog-a/psp103/juncap200.va similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/juncap200.va rename to ihp-sg13g2/libs.tech/verilog-a/psp103/juncap200.va diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/psp103.va b/ihp-sg13g2/libs.tech/verilog-a/psp103/psp103.va similarity index 100% rename from ihp-sg13g2/libs.tech/xyce/adms/psp103/psp103.va rename to ihp-sg13g2/libs.tech/verilog-a/psp103/psp103.va diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/psp103_nqs.va b/ihp-sg13g2/libs.tech/verilog-a/psp103/psp103_nqs.va similarity index 100% rename from ihp-sg13g2/libs.tech/ngspice/openvaf/psp103_nqs.va rename to ihp-sg13g2/libs.tech/verilog-a/psp103/psp103_nqs.va diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/psp103t.va b/ihp-sg13g2/libs.tech/verilog-a/psp103/psp103t.va similarity index 100% rename from ihp-sg13g2/libs.tech/ngspice/openvaf/psp103t.va rename to ihp-sg13g2/libs.tech/verilog-a/psp103/psp103t.va diff --git a/ihp-sg13g2/libs.tech/ngspice/openvaf/releasenotesPSP103p6.txt b/ihp-sg13g2/libs.tech/verilog-a/psp103/releasenotesPSP103p6.txt similarity index 100% rename from ihp-sg13g2/libs.tech/ngspice/openvaf/releasenotesPSP103p6.txt rename to ihp-sg13g2/libs.tech/verilog-a/psp103/releasenotesPSP103p6.txt diff --git a/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/Changelog b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/Changelog new file mode 100644 index 00000000..fc82c873 --- /dev/null +++ b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/Changelog @@ -0,0 +1,5 @@ +Xyce: +An explicit "mult" (multiplicity) parameter has been added. Xyce does not support an implicit $mfactor. + +Origin of the model: +https://si2.org/download-links/ diff --git a/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/LICENSE.txt b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/LICENSE.txt new file mode 100644 index 00000000..6e390f4b --- /dev/null +++ b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/LICENSE.txt @@ -0,0 +1,11 @@ +Copyright (c) 2020 Silicon Integration Initiative, Inc. + +Licensed under Educational Community License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may +obtain a copy of the license at +http://opensource.org/licenses/ECL-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/NOTICE.txt b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/NOTICE.txt new file mode 100644 index 00000000..2457e532 --- /dev/null +++ b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/NOTICE.txt @@ -0,0 +1,7 @@ +The R3_CMC standard has been developed by the Silicon Integration Initiative's Compact Model Coalition. + +CMC Release Date: September 22, 2020 +Public Release Date: December 1, 2021 + +A link to the most recent version of this standard can be found at: +http://www.si2.org/cmc diff --git a/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/discipline.h b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/discipline.h new file mode 100644 index 00000000..b70ce89a --- /dev/null +++ b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/discipline.h @@ -0,0 +1,284 @@ +// Copyright(c) 2009-2014 Accellera Systems Initiative Inc. +// 1370 Trancas Street #163, Napa, CA 94558, USA. +// +// The material in disciplines.vams is an essential part of the Accellera Systems +// Initiative ("Accellera") Verilog-AMS Language Standard. Verbatim copies of +// the material in this Annex may be used and distributed without restriction. +// All other uses require permission from Accellera IP Committee +// (ipr-chair@lists.accellera.org). +// All other rights reserved. +// +// Version 2.4.0 + +`ifdef DISCIPLINES_VAMS +`else +`define DISCIPLINES_VAMS 1 + +// +// Natures and Disciplines +// + +discipline logic; + domain discrete; +enddiscipline + +discipline ddiscrete; + domain discrete; +enddiscipline + +/* + * Default absolute tolerances may be overridden by setting the + * appropriate _ABSTOL prior to including this file + */ + +// Electrical + +// Current in amperes +nature Current; + units = "A"; + access = I; + idt_nature = Charge; +`ifdef CURRENT_ABSTOL + abstol = `CURRENT_ABSTOL; +`else + abstol = 1e-12; +`endif +endnature + +// Charge in coulombs +nature Charge; + units = "coul"; + access = Q; + ddt_nature = Current; +`ifdef CHARGE_ABSTOL + abstol = `CHARGE_ABSTOL; +`else + abstol = 1e-14; +`endif +endnature + +// Potential in volts +nature Voltage; + units = "V"; + access = V; + idt_nature = Flux; +`ifdef VOLTAGE_ABSTOL + abstol = `VOLTAGE_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Flux in Webers +nature Flux; + units = "Wb"; + access = Phi; + ddt_nature = Voltage; +`ifdef FLUX_ABSTOL + abstol = `FLUX_ABSTOL; +`else + abstol = 1e-9; +`endif +endnature + +// Conservative discipline +discipline electrical; + potential Voltage; + flow Current; +enddiscipline + +// Signal flow disciplines +discipline voltage; + potential Voltage; +enddiscipline + +discipline current; + flow Current; +enddiscipline + +// Magnetic + +// Magnetomotive force in Ampere-Turns. +nature Magneto_Motive_Force; + units = "A*turn"; + access = MMF; +`ifdef MAGNETO_MOTIVE_FORCE_ABSTOL + abstol = `MAGNETO_MOTIVE_FORCE_ABSTOL; +`else + abstol = 1e-12; +`endif +endnature + +// Conservative discipline +discipline magnetic; + potential Magneto_Motive_Force; + flow Flux; +enddiscipline + +// Thermal + +// Temperature in Kelvin +nature Temperature; + units = "K"; + access = Temp; +`ifdef TEMPERATURE_ABSTOL + abstol = `TEMPERATURE_ABSTOL; +`else + abstol = 1e-4; +`endif +endnature + +// Power in Watts +nature Power; + units = "W"; + access = Pwr; +`ifdef POWER_ABSTOL + abstol = `POWER_ABSTOL; +`else + abstol = 1e-9; +`endif +endnature + +// Conservative discipline +discipline thermal; + potential Temperature; + flow Power; +enddiscipline + +// Kinematic + +// Position in meters +nature Position; + units = "m"; + access = Pos; + ddt_nature = Velocity; +`ifdef POSITION_ABSTOL + abstol = `POSITION_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Velocity in meters per second +nature Velocity; + units = "m/s"; + access = Vel; + ddt_nature = Acceleration; + idt_nature = Position; +`ifdef VELOCITY_ABSTOL + abstol = `VELOCITY_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Acceleration in meters per second squared +nature Acceleration; + units = "m/s^2"; + access = Acc; + ddt_nature = Impulse; + idt_nature = Velocity; +`ifdef ACCELERATION_ABSTOL + abstol = `ACCELERATION_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Impulse in meters per second cubed +nature Impulse; + units = "m/s^3"; + access = Imp; + idt_nature = Acceleration; +`ifdef IMPULSE_ABSTOL + abstol = `IMPULSE_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Force in Newtons +nature Force; + units = "N"; + access = F; +`ifdef FORCE_ABSTOL + abstol = `FORCE_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Conservative disciplines + +discipline kinematic; + potential Position; + flow Force; +enddiscipline + +discipline kinematic_v; + potential Velocity; + flow Force; +enddiscipline + +// Rotational + +// Angle in radians +nature Angle; + units = "rads"; + access = Theta; + ddt_nature = Angular_Velocity; +`ifdef ANGLE_ABSTOL + abstol = `ANGLE_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Angular Velocity in radians per second +nature Angular_Velocity; + units = "rads/s"; + access = Omega; + ddt_nature = Angular_Acceleration; + idt_nature = Angle; +`ifdef ANGULAR_VELOCITY_ABSTOL + abstol = `ANGULAR_VELOCITY_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Angular acceleration in radians per second squared +nature Angular_Acceleration; + units = "rads/s^2"; + access = Alpha; + idt_nature = Angular_Velocity; +`ifdef ANGULAR_ACCELERATION_ABSTOL + abstol = `ANGULAR_ACCELERATION_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Torque in Newtons +nature Angular_Force; + units = "N*m"; + access = Tau; +`ifdef ANGULAR_FORCE_ABSTOL + abstol = `ANGULAR_FORCE_ABSTOL; +`else + abstol = 1e-6; +`endif +endnature + +// Conservative disciplines +discipline rotational; + potential Angle; + flow Angular_Force; +enddiscipline + +discipline rotational_omega; + potential Angular_Velocity; + flow Angular_Force; +enddiscipline + +`endif diff --git a/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/r3_cmc.va b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/r3_cmc.va new file mode 100644 index 00000000..c732e677 --- /dev/null +++ b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/r3_cmc.va @@ -0,0 +1,814 @@ +// r3_cmc version 1.1.1 + +/* +Copyright (c) 2020 Silicon Integration Initiative, Inc. + +Licensed under Educational Community License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may +obtain a copy of the license at +http://opensource.org/licenses/ECL-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +The R3_CMC standard has been developed by the Silicon Integration Initiative's Compact Model Coalition. + +CMC Release Date: June 1, 2020 +Public Release Date: December 1, 2021 + +A link to the most recent version of this standard can be found at: +http://www.si2.org/cmc +*/ + +`define VERSION 1 +`define SUBVERSION 1 +`define REVISION 1 +`define LEVEL 1003 + +// +// Verilog-A definition of the CMC 3-terminal resistor model, r3_cmc. +// +// See the file r3_cmc.txt for a quick description of the model, +// and see the r3_cmc_v111.pdf file for complete documentation. +// + +`include "discipline.h" +`include "r3_cmc_macros.include" + +// +// Start of r3_cmc model code +// + +module r3_cmc(n1,nc,n2,dt); + +// +// Node definitions +// + +inout n1,n2,nc,dt; +electrical n1,n2,nc; +electrical i1,i2; +thermal dt; + +// +// Branch definitions +// + +branch (n1,i1) b_re1; // terminal 1 end resistance +branch (n1,i1) b_ne1; // terminal 1 end resistance noise +branch (n2,i2) b_re2; // terminal 2 end resistance +branch (n2,i2) b_ne2; // terminal 2 end resistance noise +branch (i2,i1) b_rb; // main resistor body branch +branch (nc,i1) b_pc1; // terminal 1 parasitics and nc resistance modulation control +branch (nc,i2) b_pc2; // terminal 2 parasitics and nc resistance modulation control +branch (dt ) b_rth; // local thermal branch + +// +// Instance parameters +// + +`IPRoz( w , 1.0e-06 ,"m" , "design width of resistor body") +`IPRoz( l , 1.0e-06 ,"m" , "design length of resistor body") +`IPRcz( wd , 0.0 ,"m" , "dogbone width (total; not per side)") +`IPRcz( a1 , 0.0 ,"m^2" , "area of node n1 partition") +`IPRcz( p1 , 0.0 ,"m" , "perimeter of node n1 partition") +`IPIcz( c1 , 0 ,"" , "# contacts at node n1 terminal") +`IPRcz( a2 , 0.0 ,"m^2" , "area of node n2 partition") +`IPRcz( p2 , 0.0 ,"m" , "perimeter of node n2 partition") +`IPIcz( c2 , 0 ,"" , "# contacts at node n2 terminal") +`IPRnb( trise , 0.0 ,"degC" , "local temperature offset from ambient (before self-heating)") +`IPRnb( nsmm_rsh , 0.0 ,"" , "number of standard deviations of local variation for rsh") +`IPRnb( nsmm_w , 0.0 ,"" , "number of standard deviations of local variation for w") +`IPRnb( nsmm_l , 0.0 ,"" , "number of standard deviations of local variation for l") +`ifdef __XYCE__ + `IPIcz(mult ,1 ,"" ,"Number of devices in parallel") +`endif + +// +// Parameters that can be instance and/or model (the former overrides the latter) +// + +`IPIsw( sw_noise , 1 ,"" , "switch to include noise: 0=no and 1=yes") +`IPIsw( sw_et , 1 ,"" , "switch to include self-heating: 0=no and 1=yes") +`IPIsw( sw_lin , 0 ,"" , "switch to force linearity: 0=no and 1=yes") +`IPIsw( sw_mman , 0 ,"" , "switch to enable mismatch analysis: 0=no and 1=yes") + +// +// Special model parameters, some may be simulator global parameters +// + +`MPInb( version , `VERSION,"" , "model version") +`MPInb( subversion,`SUBVERSION,"" , "model subversion") +`MPInb( revision , `REVISION,"" , "model revision") +`MPInb( level , `LEVEL ,"" , "model level") +`MPIty( type , -1 ,"" , "resistor type: -1=n-body and +1=p-body") +`MPRoc( scale ,`SIMPARSCAL,"" , 0.0, 1.0, "scale factor for instance geometries") +`MPRco( shrink ,`SIMPARSHRI,"%" , 0.0, 100.0, "shrink percentage for instance geometries") +`MPRcc( tmin ,-100.0 ,"degC" ,-250.0, 27.0, "minimum ambient temperature") +`MPRcc( tmax , 500.0 ,"degC" , 27.0,1000.0, "maximum ambient temperature") +`MPRoz( rthresh ,`SIMPARRTHR,"Ohm" , "threshold to switch end resistance to V=I*R form") +`MPRoz( imax ,`SIMPARIMAX,"A" , "current at which to linearize diode currents") + +// +// General model parameters +// + +`MPRcc( tnom , 27.0 ,"degC" ,-250.0,1000.0, "nominal (reference) temperature") +`MPRcz( lmin , 0.0 ,"um" , "minimum allowed drawn length") +`MPRoo( lmax , 9.9e09 ,"um" , lmin, inf, "maximum allowed drawn length") +`MPRcz( wmin , 0.0 ,"um" , "minimum allowed drawn width") +`MPRoo( wmax , 9.9e09 ,"um" , wmin, inf, "maximum allowed drawn width") +`MPRoz( jmax , 100.0 ,"A/um" , "maximum current density") +`MPRoz( vmax , 9.9e09 ,"V" , "maximum voltage w.r.t. control node nc") +`MPRcc( tminclip ,-100.0 ,"degC" ,-250.0, 27.0, "clip minimum temperature") +`MPRcc( tmaxclip , 500.0 ,"degC" , 27.0,1000.0, "clip maximum temperature") + +// +// Basic resistance (current) model parameters +// + +`MPRoz( rsh , 100.0 ,"Ohm/sq" , "sheet resistance") +`MPRnb( xw , 0.0 ,"um" , "width offset (total)") +`MPRnb( nwxw , 0.0 ,"um^2" , "narrow width width offset correction coefficient") +`MPRnb( wexw , 0.0 ,"um" , "webbing effect width offset correction coefficient (for dogboned devices)") +`MPRoz( fdrw , 1.0 ,"um" , "finite doping width offset reference width") +`MPRnb( fdxwinf , 0.0 ,"um" , "finite doping width offset width value for wide devices") +`MPRnb( xl , 0.0 ,"um" , "length offset (total)") +`MPRnb( xlw , 0.0 ,"" , "width dependence of length offset") +`MPRnb( dxlsat , 0.0 ,"um" , "additional length offset for velocity saturation calculation") +`MPRcc( nst , 1.0 ,"" , 0.1, 5.0, "subthreshold slope parameter") +`MPRcz( ats , 0.0 ,"V" , "saturation smoothing parameter") +`MPRcz( atsl , 0.0 ,"V*um" , "saturation smoothing parameter 1/l coefficient") +`MPRcc( dfinf , 0.01 ,"/V^0.5" ,1.0e-4, 10.0, "depletion factor for wide/long device") +`MPRnb( dfw , 0.0 ,"um/V^0.5" , "depletion factor 1/w coefficient") +`MPRnb( dfl , 0.0 ,"um/V^0.5" , "depletion factor 1/l coefficient") +`MPRnb( dfwl , 0.0 ,"um^2/V^0.5" , "depletion factor 1/(w*l) coefficient") +`MPIsw( sw_dfgeo , 1 ,"" , "switch for depletion factor geometry dependence: 0=drawn and 1=effective") +`MPRco( dp , 2.0 ,"V" , 0.1, inf, "depletion potential") +`MPRnb( dpw , 0.0 ,"V*um^dpwe" , "depletion potential w dependence coefficient") +`MPRnb( dpwe , 0.5 ,"" , "depletion potential w dependence exponent") +`MPRnb( dpl , 0.0 ,"V*mu^dple" , "depletion potential l dependence coefficient") +`MPRnb( dple , 2.0 ,"" , "depletion potential l dependence exponent") +`MPRnb( dpwl , 0.0 ,"V*um^(dpwe+dple)" , "depletion potential wl dependence coefficient") +`MPRcc( ecrit , 4.0 ,"V/um" , 0.0,1000.0, "velocity saturation critical field") +`MPRcc( ecorn , 0.4 ,"V/um" , 0.0, ecrit, "velocity saturation corner field") +`MPIsw( sw_vsatt , 0 ,"" , "switch for vsat temperature effects: 0=none and 1=link with body resistance") +`MPIcc( sw_accpo , 0 ,"" , 0, 3, "switch for pinchoff modeling, 0->3 increases accuracy, but also simulation time") +`MPRoc( grpo , 1.0e-12 ,"" , 0.0, 0.1, "minimum body conductance in pinch-off (ratio w.r.t. Vc=0)") +`MPRcc( du , 0.02 ,"" , 0.0,1000.0, "mobility reduction at ecorn") +`MPRcz( rc , 0.0 ,"Ohm" , "resistance per contact") +`MPRcz( rcw , 0.0 ,"Ohm*um" , "width adjustment for contact resistance") + +// +// Parasitic model parameters (diodes and dielectric) +// + +`MPRcc( fc , 0.9 ,"" , 0.0, 0.99, "depletion capacitance linearization factor") +`MPRcz( isa , 0.0 ,"A/um^2" , "diode saturation current per unit area") +`MPRoz( na , 1.0 ,"" , "ideality factor for isa") +`MPRcz( ca , 0.0 ,"F/um^2" , "fixed capacitance per unit area") +`MPRcz( cja , 0.0 ,"F/um^2" , "depletion capacitance per unit area") +`MPRoz( pa , 0.75 ,"V" , "built-in potential for cja") +`MPRoo( ma , 0.33 ,"" , 0.0, 1.0, "grading coefficient for cja") +`MPRnb( aja , -0.5 ,"V" , "smoothing parameter for cja") +`MPRcz( isp , 0.0 ,"A/um" , "diode saturation current per unit perimeter") +`MPRoz( np , 1.0 ,"" , "ideality factor for isp") +`MPRcz( cp , 0.0 ,"F/um" , "fixed capacitance per unit perimeter") +`MPRcz( cjp , 0.0 ,"F/um" , "depletion capacitance per unit perimeter") +`MPRoz( pp , 0.75 ,"V" , "built-in potential for cjp") +`MPRoo( mp , 0.33 ,"" , 0.0, 1.0, "grading coefficient for cjp") +`MPRnb( ajp , -0.5 ,"V" , "smoothing parameter for cjp") +`MPRcz( vbv , 0.0 ,"V" , "breakdown voltage") +`MPRoz( ibv , 1.0e-06 ,"A" , "current at breakown") +`MPRoz( nbv , 1.0 ,"" , "ideality factor for breakdown current") + +// +// 1/f noise model parameters +// + +`MPRcz( kfn , 0.0 ,"" , "flicker noise coefficient (unit depends on afn)") +`MPRoz( afn , 2.0 ,"" , "flicker noise current exponent") +`MPRoz( bfn , 1.0 ,"" , "flicker noise 1/f exponent") +`MPIsw( sw_fngeo , 0 ,"" , "switch for flicker noise geometry calculation: 0=drawn and 1=effective") + +// +// Temperature dependence model parameters +// + +`MPRnb( ea , 1.12 ,"V" , "activation voltage for diode temperature dependence") +`MPRnb( xis , 3.0 ,"" , "exponent for diode temperature dependence") +`MPRnb( xvsat , 0.0 ,"" , "exponent for saturation velocity temperature dependence") +`MPRnb( tc1 , 0.0 ,"/K" , "resistance linear TC") +`MPRnb( tc2 , 0.0 ,"/K^2" , "resistance quadratic TC") +`MPRnb( tc1l , 0.0 ,"um/K" , "resistance linear TC 1/l coefficient") +`MPRnb( tc2l , 0.0 ,"um/K^2" , "resistance quadratic TC 1/l coefficient") +`MPRnb( tc1w , 0.0 ,"um/K" , "resistance linear TC 1/w coefficient") +`MPRnb( tc2w , 0.0 ,"um/K^2" , "resistance quadratic TC 1/w coefficient") +`MPRnb( tc1wl , 0.0 ,"um^2/K" , "resistance linear TC 1/(w*l) coefficient") +`MPRnb( tc2wl , 0.0 ,"um^2/K^2" , "resistance quadratic TC 1/(w*l) coefficient") +`MPRnb( tc1rc , 0.0 ,"/K" , "contact resistance linear TC") +`MPRnb( tc2rc , 0.0 ,"/K^2" , "contact resistance quadratic TC") +`MPRnb( tc1dp , 0.0 ,"/K" , "depletion potential linear TC") +`MPRnb( tc2dp , 0.0 ,"/K^2" , "depletion potential quadratic TC") +`MPRnb( tc1vbv , 0.0 ,"/K" , "breakdown voltage linear TC") +`MPRnb( tc2vbv , 0.0 ,"/K^2" , "breakdown voltage quadratic TC") +`MPRnb( tc1nbv , 0.0 ,"/K" , "breakdown ideality factor linear TC") +`MPRnb( tc1kfn , 0.0 ,"/K" , "flicker noise coefficient linear TC") +`MPRoc( tegth , 0.0 ,"" , -inf, 0.0, "thermal conductance temperature exponent") + +// +// Thermal resistance and capacitance model parameters +// + +`MPRcz( gth0 , 1.0e+06 ,"W/K" , "thermal conductance fixed component") +`MPRcz( gthp , 0.0 ,"W/K/um" , "thermal conductance perimeter component") +`MPRcz( gtha , 0.0 ,"W/K/um^2" , "thermal conductance area component") +`MPRcz( gthc , 0.0 ,"W/K" , "thermal conductance contact component") +`MPRcz( cth0 , 0.0 ,"s*W/K" , "thermal capacitance fixed component") +`MPRcz( cthp , 0.0 ,"s*W/K/um" , "thermal capacitance perimeter component") +`MPRcz( ctha , 0.0 ,"s*W/K/um^2" , "thermal capacitance area component") +`MPRcz( cthc , 0.0 ,"s*W/K" , "thermal capacitance contact component") + +// +// Statistical model parameters +// + +`MPRnb( nsig_rsh , 0.0 ,"" , "number of standard deviations of global variation for rsh") +`MPRnb( nsig_w , 0.0 ,"" , "number of standard deviations of global variation for w") +`MPRnb( nsig_l , 0.0 ,"" , "number of standard deviations of global variation for l") +`MPRcz( sig_rsh , 0.0 ,"%" , "global variation standard deviation for rsh (relative)") +`MPRcz( sig_w , 0.0 ,"um" , "global variation standard deviation for w (absolute)") +`MPRcz( sig_l , 0.0 ,"um" , "global variation standard deviation for l (absolute)") +`MPRcz( smm_rsh , 0.0 ,"%um" , "local variation standard deviation for rsh (relative)") +`MPRcz( smm_w , 0.0 ,"um^1.5" , "local variation standard deviation for w (absolute)") +`MPRcz( smm_l , 0.0 ,"um^1.5" , "local variation standard deviation for l (absolute)") +`MPIsw( sw_mmgeo , 0 ,"" , "switch for mismatch geometry calculation: 0=drawn and 1=effective") + +// +// Supported aliases for parameters +// + +aliasparam dtemp = trise; +aliasparam dta = trise; +aliasparam atsinf = ats; +aliasparam dpinf = dp; + +// +// These variables will be displayed as part of operating point information. +// + +`OPP( v ,"V" ,"voltage across resistor") +`OPM( ibody ,"A" ,"current through resistor body") +`OPM( power ,"W" ,"dissipated power") +`OPP( leff_um ,"um" ,"effective electrical length in um") +`OPP( weff_um ,"um" ,"effective electrical width in um") +`OPD( r0 ,"Ohm" ,"zero-bias resistance (per segment)") +`OPD( r_dc ,"Ohm" ,"DC resistance (including bias dependence)") +`OPD( r_ac ,"Ohm" ,"AC resistance (including bias dependence)") +`OPD( rth ,"K/W" ,"thermal resistance") +`OPM( cth ,"s*W/K","thermal capacitance") +`OPP( dt_et ,"K" ,"self-heating temperature rise") + +analog begin : analog_block + +// +// Intermediate variables used in calculations +// + + real gmin, mMod; + real lFactor, aFactor, tiniK, tambK, tambC, iecrit, ecrneff, dufctr, uoff, de; + real tdevC, tdevK, xleff, w_um, l_um, leffE_um, gf; + real wd_um, a1_um2, p1_um, a2_um2, p2_um, a_um2, p_um, len, wid, fctr1; + real delr_rsh, dp_i, iw_dpwe, il_dple, dfmin, df, dfsq, gth, vpo, vpoe, V1cx, lde, tc1e, tc2e; + real rc1_tnom, rc2_tnom, gc, tcr, tcrc, tcvsat, vmax_p, vmax_a, vmax_b; + real geff, Vrb, Vc1, Vc2, Vcl, rT, dT, phi_t, phi_t0, ecorn_t, ecrit_t; + real isa_t, isp_t, pa_t, cja_t, pp_t, cjp_t, kfn_t; + real Irb, Ip1, Ip2, Is1, Is2, Cj1, Cj2, Cf1, Cf2, Id1, Id2, Ib1, Ib2, Ith, Irth, Qcp1, Qcp2, Qcth; + real wn, fn, didt, g_ac, vbv_t, nbv_t; + real nsteff, ats_i, atspo; + +// +// Code independent of bias or instance parameters +// + + begin : initializeModel + if (`LEVEL!=level) begin + `ERROR("ERROR: r3_cmc model called with incorrect level parameter") + end + if (`VERSION!=version) begin + `ERROR("ERROR: r3_cmc model version is inconsistent with the parameter set") + end + if (`SUBVERSIONtmax) begin + `WARNING("WARNING: ambient temperature is higher than allowed maximum") + end + `CLIPB1p0(tdevC,tdevC,tminclip,tmaxclip) + tdevK = tdevC+`TABS_NIST2004; + phi_t0 = `KB_NIST2004*tdevK/`QQ_NIST2004; + rT = tdevK/tiniK; + dT = tdevK-tiniK; + w_um = w*lFactor; // w in um + l_um = l*lFactor; // l in um + if (w_umwmax) begin + `WARNING("WARNING: drawn width is greater than allowed maximum") + end + if (l_umlmax) begin + `WARNING("WARNING: drawn length is greater than allowed maximum") + end + wd_um = wd*lFactor; // dogbone in um + a1_um2 = a1*aFactor; // a1 in um^2 + p1_um = p1*lFactor; // p1 in um + a2_um2 = a2*aFactor; // a2 in um^2 + p2_um = p2*lFactor; // p2 in um + a_um2 = l_um*w_um; // area in um^2 + p_um = 2.0*l_um+((c1>0)+(c2>0))*w_um; // perim in um + xleff = 0.5*((c1>0)+(c2>0))*(xl+xlw/w_um); + weff_um = (w_um+xw+(nwxw/w_um)+fdxwinf*(1.0-exp(-w_um/fdrw)))/(1.0-wexw*wd_um/a_um2); + leff_um = l_um+xleff; + +// +// Statistical variation, including physical mismatch variation. +// Note the scaling with 1.0/sqrt($mfactor), and that +// the resistance is varied in a log-normal fashion, this +// is physical and avoids negative resistance values for +// large variations. +// The statistical variation is composed of two parts, global +// and local (mismatch). The total variance is the sum of the global +// variance, which does not depend on geometry, and the +// mismatch variance, which does depend on geometry. +// If mismatch analysis is not being done (sw_mman=0) then the +// "global" variance is increased by the mismatch variance, +// this captures the correct, geometry dependent magnitude, +// although it assumes perfect correlation between all devices +// which is not correct for the mismatch component. +// The code below which bypasses the variation calculation +// if variances are zero is to avoid problems with derivative +// calculation when the argument of sqrt() is zero. +// + + if (sw_mmgeo) begin + wid = weff_um; + len = leff_um; + end else begin + wid = w_um; + len = l_um; + end + if (sw_mman) begin + weff_um = weff_um+nsig_w*sig_w+nsmm_w*smm_w/sqrt(mMod*len); + leff_um = leff_um+nsig_l*sig_l+nsmm_l*smm_l/sqrt(mMod*wid); + delr_rsh = exp(0.01*(nsig_rsh*sig_rsh+nsmm_rsh*smm_rsh/sqrt(mMod*len*wid))); + end else begin + if ((nsig_w!=0.0)&&((smm_w>0.0)||(sig_w>0.0))) begin + fctr1 = smm_w/sqrt(mMod*len); + weff_um = weff_um+nsig_w*sqrt(sig_w*sig_w+fctr1*fctr1); + end + if ((nsig_l!=0.0)&&((smm_l>0.0)||(sig_l>0.0))) begin + fctr1 = smm_l/sqrt(mMod*wid); + leff_um = leff_um+nsig_l*sqrt(sig_l*sig_l+fctr1*fctr1); + end + if ((nsig_rsh!=0.0)&&((smm_rsh>0.0)||(sig_rsh>0.0))) begin + fctr1 = smm_rsh/sqrt(mMod*len*wid); + delr_rsh = exp(0.01*nsig_rsh*sqrt(sig_rsh*sig_rsh+fctr1*fctr1)); + end else begin + delr_rsh = 1.0; + end + end + if (weff_um<=0.0) begin + `ERROR("ERROR: calculated effective r3_cmc resistor width is <= 0.0") + end + if (leff_um<=0.0) begin + `ERROR("ERROR: calculated effective r3_cmc resistor length is <= 0.0") + end + leffE_um = leff_um+dxlsat; + if (leffE_um<=0.0) begin + `ERROR("ERROR: calculated effective r3_cmc resistor length for velocity saturation is <= 0.0") + end + +// +// Mappings for parameters that depend on geometry +// + + if (sw_dfgeo) begin + wid = weff_um; + len = leff_um; + end else begin + wid = w_um; + len = l_um; + end + iw_dpwe = 1.0/pow(wid,dpwe); + il_dple = 1.0/pow(len,dple); + dp_i = dp*(1.0+dpw*iw_dpwe)*(1.0+dpl*il_dple)*(1.0+dpwl*iw_dpwe*il_dple)*(1.0+dT*(tc1dp+dT*tc2dp)); + dp_i = `MAX(dp_i,0.1); // limit lower value - NOTE: temperature dependence is without self-heating + dfmin = sqrt(dp_i)/(dp_i+1.0e4); // minimum value of df for stable Vsat calculation + df = (sw_lin) ? 0.0 : dfinf+(dfw*len+dfl*wid+dfwl)/(len*wid); + if (df1) begin + vpoe = vpo-2.0*grpo/dfsq; + V1cx = `oneSixth/dfsq-dp_i*0.5; + end else if (sw_accpo>0) begin + vpoe = vpo-sqrt(2.0*grpo/dfsq); + V1cx = 0.0; + end else begin + // backwards-compatible + vpoe = vpo; + V1cx = 0.0; + end + ats_i = ats/(1.0+atsl/leff_um); + if (sw_accpo>1) begin // full pinch-off modeling does not need to include self-heating + nsteff = nst*phi_t0; + atspo = (sw_accpo>2) ? 0.55*phi_t0*(1.0+exp(-ats_i/phi_t0)) : 1.10*phi_t0; // controls 1-exp(-Vb/phi_t) approximation pinch-off + end else if (sw_accpo>0) begin + nsteff = 2.0*nst*phi_t0; + atspo = 4.0*ats_i*ats_i; + end else begin + nsteff = nst*phi_t0; + atspo = 4.0*ats_i*ats_i; + end + r0 = rsh*delr_rsh*(leff_um/weff_um)*(1.0-df*sqrt(dp_i)); + if (r0<=1.0e-99) begin + `ERROR("ERROR: calculated zero bias resistance is too small") + end + if ((rc>0.0)&&(c1>0)) begin + rc1_tnom = (rc+rcw/w_um)/c1; + end else begin + rc1_tnom = 0.0; + end + if ((rc>0.0)&&(c2>0)) begin + rc2_tnom = (rc+rcw/w_um)/c2; + end else begin + rc2_tnom = 0.0; + end + if (sw_lin) begin + gth = 0.0; // makes rth=0 + cth = 0.0; + end else begin // thermal conductance and capacitance + gth = (gth0+gthp*p_um+gtha*a_um2+gthc*(c1+c2))*pow(rT,tegth); + cth = cth0+cthp*p_um+ctha*a_um2+cthc*(c1+c2); + end + tc1e = tc1+tc1w/weff_um+0.5*((c1>0)+(c2>0))*(tc1l+tc1wl/weff_um)/leff_um; + tc2e = tc2+tc2w/weff_um+0.5*((c1>0)+(c2>0))*(tc2l+tc2wl/weff_um)/leff_um; + Cf1 = ca*a1_um2+cp*p1_um; + Cf2 = ca*a2_um2+cp*p2_um; + Cj1 = cja*a1_um2+cjp*p1_um; + Cj2 = cja*a2_um2+cjp*p2_um; + end // initializeInstance + +// +// DC bias dependent quantities, as self-heating is always in effect +// the temperature dependencies are also coded here. +// + + begin : evaluateStatic + dt_et = Temp(b_rth); + Vrb = -type*V(b_rb); + Vc1 = -type*V(b_pc1); + Vc2 = -type*V(b_pc2); + +// +// Temperature dependent calculations +// + + tdevC = $temperature+trise+dt_et-`TABS_NIST2004; + `CLIPB1p0(tdevC,tdevC,tminclip,tmaxclip) + tdevK = tdevC+`TABS_NIST2004; + phi_t = `KB_NIST2004*tdevK/`QQ_NIST2004; + rT = tdevK/tiniK; + dT = tdevK-tiniK; + tcr = (1.0+dT*(tc1e+dT*tc2e)); + `CLIPL0p1(tcr,tcr,0.01) + if (sw_accpo) begin + gf = 1.0/(r0*(1.0-df*sqrt(dp_i))*tcr); + end else begin + gf = 1.0/(r0*tcr); + end + tcrc = (1.0+dT*(tc1rc+dT*tc2rc)); + `CLIPL0p1(tcrc,tcrc,0.01) + tcvsat = pow(rT,xvsat); + if (isa>0.0) begin + isa_t = isa*exp((-ea*(1.0-rT)/phi_t+xis*ln(rT))/na); + vmax_a = na*phi_t*ln(1.0+imax/isa_t); + end else begin + isa_t = 0.0; + vmax_a = 0.0; + end + if (isp>0.0) begin + isp_t = isp*exp((-ea*(1.0-rT)/phi_t+xis*ln(rT))/np); + vmax_p = np*phi_t*ln(1.0+imax/isp_t); + end else begin + isp_t = 0.0; + vmax_p = 0.0; + end + Is1 = a1_um2*isa_t+p1_um*isp_t; + Is2 = a2_um2*isa_t+p2_um*isp_t; + if (cja>0.0) begin + `psibi(pa_t,pa,ea,phi_t,rT,blockPa) + cja_t = cja*pow((pa/pa_t),ma); + end else begin + pa_t = pa; + cja_t = 0.0; + end + if (cjp>0.0) begin + `psibi(pp_t,pp,ea,phi_t,rT,blockPp) + cjp_t = cjp*pow((pp/pp_t),mp); + end else begin + pp_t = pp; + cjp_t = 0.0; + end + kfn_t = (1+dT*tc1kfn)*kfn; + kfn_t = `MAX(kfn_t,0.0); + if (vbv>0) begin + vbv_t = vbv*(1.0+dT*(tc1vbv+dT*tc2vbv)); + vbv_t = `MAX(vbv_t,0.0); + nbv_t = nbv*(1.0+tc1nbv*dT); + vmax_b = nbv_t*phi_t*ln(exp(-vbv_t/(nbv_t*phi_t))+imax/ibv); + end else begin + vbv_t = vbv; + nbv_t = nbv; + vmax_b = 1.0; // dummy value for vbv=0.0 + end + if ((ecrit>0.0)&&(!sw_lin)) begin + if (sw_vsatt) begin + ecorn_t = ecorn*tcvsat*tcr; + ecrit_t = ecrit*tcvsat*tcr; + end else begin + ecorn_t = ecorn; + ecrit_t = ecrit; + end + ecrneff = sqrt(ecorn_t*ecorn_t+4.0*du*du*ecrit_t*ecrit_t)-2.0*du*ecrit_t; + dufctr = du*ecrneff/ecrit_t; + uoff = sqrt((ecrneff*ecrneff/(ecrit_t*ecrit_t))+4.0*dufctr); + de = ecrit_t-ecorn_t; + iecrit = 1.0/ecrit_t; + end else begin + ecrneff = 0.0; + dufctr = 0.0; + uoff = 0.0; + de = 1.0e3; + iecrit = 0.0; + end + lde = leffE_um*de; // (effective length)*delta_field for velocity saturation + if (lde>1.0e5) begin + lde = 1.0e5; // limit for numerical stability + end + +// +// Macro that calculates core r3_cmc current for the resistor body +// + + `r3Ibody(Irb,geff,Vrb,Vc1,Vc2,vpo,vpoe,V1cx,nsteff,phi_t0,dp_i,df,dfsq,lde,leffE_um,ecrneff,iecrit,dufctr,uoff,ats,atspo,gf,grpo,sw_accpo,r3Body) + +// +// Diode currents (note Vc1 and Vc2 are for an n-type body in a p-type tub) +// including gmin components (these are not included if there is no +// diode component, e.g. for poly resistors). +// + + if (Is1>0.0) begin + `pnjIap(Id1,Vc1,phi_t,a1_um2,isa_t,na,vmax_a,p1_um,isp_t,np,vmax_p,Id1Block) + `pnjIbkd(Ib1,Vc1,ibv,vbv_t,phi_t,nbv_t,vmax_b,Ib1Block) + Ip1 = Id1+Ib1+gmin*Vc1; + end else begin + Id1 = 0.0; + Ib1 = 0.0; + Ip1 = 0.0; + end + if (Is2>0.0) begin + `pnjIap(Id2,Vc2,phi_t,a2_um2,isa_t,na,vmax_a,p2_um,isp_t,np,vmax_p,Id2Block) + `pnjIbkd(Ib2,Vc2,ibv,vbv_t,phi_t,nbv_t,vmax_b,Ib2Block) + Ip2 = Id2+Ib2+gmin*Vc2; + end else begin + Id2 = 0.0; + Ib2 = 0.0; + Ip2 = 0.0; + end + +// +// Self-heating components +// + + if ((gth>0.0)&&(sw_et)&&(!sw_lin)) begin + power = (Irb*Vrb+Ip1*Vc1+Ip2*Vc2)+I(b_re1)*V(b_re1)+I(b_re2)*V(b_re2); + Ith = -power; // negative as it flows dt->0 + if (tegth==0.0) begin + Irth = gth*dt_et; + end else begin + tambC = $temperature+trise-`TABS_NIST2004; + `CLIPB1p0(tambC,tambC,tminclip,tmaxclip) + tambK = tambC+`TABS_NIST2004; + if (abs(tegth+1.0)>0.1) begin + Irth = gth*tambK*(pow((1.0+dt_et/tambK),(1.0+tegth))-1.0)/(1.0+tegth); + end else begin + Irth = gth*dt_et*(1.0+0.5*tegth*dt_et/tambK); + end + end + end else begin // treat gth=0 as gth=inf + power = 0.0; + Ith = 0.0; + Irth = 1.0e6*dt_et; // becomes singular without this + end + +// +// Polarity flipping +// + + Irb = -type*Irb; + Ip1 = -type*Ip1; + Ip2 = -type*Ip2; + +// +// Contact resistance calculations are handled in the loadStatic block +// + +// +// Excessive current and voltage warnings +// + + if (abs(Irb/weff_um)>jmax) begin + `WARNING("WARNING: Irb current density is greater than specified by jmax") + end + if (abs(Ip1/weff_um)>jmax) begin + `WARNING("WARNING: Ip1 current density is greater than specified by jmax") + end + if (abs(Vc1)>vmax) begin + `WARNING("WARNING: V(i1,c) voltage is greater than specified by vmax") + end + if (abs(Ip2/weff_um)>jmax) begin + `WARNING("WARNING: Ip2 current density is greater than specified by jmax") + end + if (abs(Vc2)>vmax) begin + `WARNING("WARNING: V(i2,c) voltage is greater than specified by vmax") + end + end // evaluateStatic + + begin : evaluateDynamic + +// +// Diode charges (note Vc1 and Vc2 are for an n-type body in a p-type tub) +// + + if (Cj1>0.0) begin + if (sw_accpo) begin + Vcl = 0.5*(Vc1-vpo+sqrt((Vc1+vpo)*(Vc1+vpo)+0.04)); // limited to pinch-off + end else begin + Vcl = Vc1; + end + `pnjQap(Qcp1,Vcl,a1_um2,cja_t,pa_t,ma,fc,aja,p1_um,cjp_t,pp_t,mp,fc,ajp,Qcp1Block,Qcp11,Qcp12) + end else begin + Qcp1 = 0.0; + end + if (Cj2>0.0) begin + if (sw_accpo) begin + Vcl = 0.5*(Vc2-vpo+sqrt((Vc2+vpo)*(Vc2+vpo)+0.04)); // limited to pinch-off + end else begin + Vcl = Vc2; + end + `pnjQap(Qcp2,Vcl,a2_um2,cja_t,pa_t,ma,fc,aja,p2_um,cjp_t,pp_t,mp,fc,ajp,Qcp2Block,Qcp21,Qcp22) + end else begin + Qcp2 = 0.0; + end + +// +// Fixed capacitance charges (for poly resistors with dielectric isolation) +// + + Qcp1 = (Qcp1+Cf1*Vc1); + Qcp2 = (Qcp2+Cf2*Vc2); + +// +// Polarity flipping and thermal capacitance charge +// + + Qcp1 = -type*Qcp1; + Qcp2 = -type*Qcp2; + Qcth = dt_et*cth; + end // evaluateDynamic + + begin : loadStatic + I(b_rb) <+ Irb; + I(b_pc1) <+ Ip1; + I(b_pc2) <+ Ip2; + Pwr(b_rth) <+ Irth; + Pwr(b_rth) <+ Ith; + if ((rc1_tnom/mMod)<=rthresh) begin // V=R*I formulation + V(b_re1) <+ I(b_re1)*rc1_tnom*tcrc; + end else begin // I=G*V formulation + I(b_re1) <+ V(b_re1)/(rc1_tnom*tcrc); + end + if ((rc2_tnom/mMod)<=rthresh) begin // V=R*I formulation + V(b_re2) <+ I(b_re2)*rc2_tnom*tcrc; + end else begin // I=G*V formulation + I(b_re2) <+ V(b_re2)/(rc2_tnom*tcrc); + end + end // loadStatic + + begin : loadDynamic + I(b_pc1) <+ ddt(Qcp1); + I(b_pc2) <+ ddt(Qcp2); + Pwr(b_rth) <+ ddt(Qcth); + end // loadDynamic + +// +// Noise contributions +// + + begin : noise + if (sw_noise) begin + if (sw_fngeo) begin + len = leff_um; + wid = weff_um; + end else begin + len = l_um; + wid = w_um; + end + wn = 4.0*`KB_NIST2004*tdevK*geff; + fn = kfn_t*pow((abs(Irb/wid)),afn)*wid/len; + if (Irb < 0) begin + fn = -fn; + end + I(b_rb) <+ white_noise(wn,"body thermal noise"); + I(b_rb) <+ flicker_noise(fn,bfn,"body 1/f noise"); + if (rc1_tnom>0) begin + gc = 1.0/(rc1_tnom*tcrc); + end else begin + gc = 0.0; + end + I(b_ne1) <+ white_noise(4.0*`KB_NIST2004*tdevK*gc,"end 1 resistance thermal noise"); + if (rc2_tnom>0) begin + gc = 1.0/(rc2_tnom*tcrc); + end else begin + gc = 0.0; + end + I(b_ne2) <+ white_noise(4.0*`KB_NIST2004*tdevK*gc,"end 2 resistance thermal noise"); + if (Is1>0.0) begin + `pnjShotNoise(b_pc1,Is1,Id1,Ib1,"end 1 parasitic shot noise") + end + if (Is2>0.0) begin + `pnjShotNoise(b_pc2,Is2,Id2,Ib2,"end 2 parasitic shot noise") + end + end + end // noise + +// +// Operating point information +// +// for I=g(V,T)*V where T=I*V*rth, then (with underscore _ meaning partial differentiation) +// dI/dV=I_V+I_T*T_V=I_V+I_T*rth*(I+V*I_V) +// + + begin : OPinfo + v = V(n2,n1); + r0 = r0; + r_dc = (1.0/geff+tcrc*(rc1_tnom+rc2_tnom)); // end resistance is added, this is an approximation + rth = (gth>0.0) ? 1.0/gth : 0.0; + cth = cth; + ibody = Irb; + g_ac = ddx(ibody,V(i2)); + didt = ddx(ibody,Temp(dt)); + g_ac = g_ac+didt*rth*(ibody+Vrb*g_ac); + if (abs(g_ac)>1.0e-99) begin + r_ac = 1.0/g_ac; + end else begin + r_ac = 1.0e99; + end + end // OPinfo + +end // analog +endmodule diff --git a/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/r3_cmc_macros.include b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/r3_cmc_macros.include new file mode 100644 index 00000000..9bff2e84 --- /dev/null +++ b/ihp-sg13g2/libs.tech/verilog-a/r3_cmc/r3_cmc_macros.include @@ -0,0 +1,792 @@ +// r3_cmc version 1.1.1 + +/* +Copyright (c) 2020 Silicon Integration Initiative, Inc. + +Licensed under Educational Community License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. You may +obtain a copy of the license at +http://opensource.org/licenses/ECL-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +The R3_CMC standard has been developed by the Silicon Integration Initiative's Compact Model Coalition. + +CMC Release Date: September 22, 2020 +Public Release Date: December 1, 2021 + +A link to the most recent version of this standard can be found at: +http://www.si2.org/cmc +*/ + +`ifdef haveIncludededCmcMacrosAndDefines +`else +`define haveIncludededCmcMacrosAndDefines + +// +// Physical constants and other generally useful numbers +// + +`define TABS_NIST2004 273.15 // (NIST2004) 0C in K +`define QQ_NIST2004 1.60217653e-19 // (NIST2004) mag. of electronic charge (C) +`define KB_NIST2004 1.3806505e-23 // (NIST2004) Boltzmann constant (J/K) +`define EPS0_NIST2004 8.854187817e-12 // (NIST2004) Electric constant (F/m) +`define EPS_OX 3.45313324863e-11 // EPS0_NIST2004*3.90 (F/m) +`define EPS_SI 1.035939974589e-10 // EPS0_NIST2004*11.7 (F/m) +`define oneSixth 0.1666666666666667 +`define oneThird 0.3333333333333333 +`define twoThirds 0.6666666666666667 +`define sqrtTwo 1.414213562373095 +`define inv_sqrtTwo 0.7071067811865475 +`define egTsividis(Eg,t_K) \ + if (t_K<300.0) \ + Eg = 1.17850-t_K*(9.025e-05-t_K*3.05e-07); \ + else \ + Eg = 1.20595-t_K*2.7325e-04; + +// +// Clipping macros, these smoothly limit to lower, upper, or both lower and upper +// limits. Rather than using a sqrt or log-exp form, which affects values +// everywhere, these use a conditional form that is continuous in function +// and derivative. If a value is not clipped then no exp() evaluation occurs. +// Smooth limiting is preferable to hard limiting (although latter can still +// be useful for enforcing parameter limits) for bias dependent quantities +// as derivatives do not become zero or have discontinuities. +// + +`define CLIPL0p1(XCLIP,X,LOWER) \ + if (X<(LOWER+0.1)) \ + XCLIP = LOWER+0.1*exp(10.0*(X-LOWER)-1.0); \ + else \ + XCLIP = X; +`define CLIPU0p1(XCLIP,X,UPPER) \ + if (X>(UPPER-0.1)) \ + XCLIP = UPPER-0.1*exp(10.0*(UPPER-X)-1.0); \ + else \ + XCLIP = X; +`define CLIPB0p1(XCLIP,X,LOWER,UPPER) \ + if (X<(LOWER+0.1)) \ + XCLIP = LOWER+0.1*exp(10.0*(X-LOWER)-1.0); \ + else if (X>(UPPER-0.1)) \ + XCLIP = UPPER-0.1*exp(10.0*(UPPER-X)-1.0); \ + else \ + XCLIP = X; + +`define CLIPL1p0(XCLIP,X,LOWER) \ + if (X<(LOWER+1.0)) \ + XCLIP = LOWER+exp(X-LOWER-1.0); \ + else \ + XCLIP = X; +`define CLIPU1p0(XCLIP,X,UPPER) \ + if (X>(UPPER-1.0)) \ + XCLIP = UPPER-exp(UPPER-X-1.0); \ + else \ + XCLIP = X; +`define CLIPB1p0(XCLIP,X,LOWER,UPPER) \ + if (X<(LOWER+1.0)) \ + XCLIP = LOWER+exp(X-LOWER-1.0); \ + else if (X>(UPPER-1.0)) \ + XCLIP = UPPER-exp(UPPER-X-1.0); \ + else \ + XCLIP = X; + +// +// Hard clamping and sqrt clamping macros +// + +`define MAX(x,y) ((x)>(y)?(x):(y)) +`define MIN(x,y) ((x)<(y)?(x):(y)) +`define CLAMP(val,min,max) `MIN(max,`MAX(val,min)) +`define MAXA(x,y,a) (0.5*((x)+(y)+sqrt(((x)-(y))*((x)-(y))+(a)))) +`define MINA(x,y,a) (0.5*((x)+(y)-sqrt(((x)-(y))*((x)-(y))+(a)))) + +// +// Macro definitions. The "des" description argument is intended to be +// a short description, the "inf" information argument is intended to be +// a detailed description (e.g. for display as part of on-line help). +// +// MPR model parameter real +// MPI model parameter integer +// IPR instance parameter real +// IPI instance parameter integer +// OPP operating point parameter, includes units and description for printing +// OPM operating point parameter, value scaled by $mfactor +// OPD operating point parameter, value scaled by 1/$mfactor +// +// There are 9 versions with different range options: +// cc closed lower bound, closed upper bound +// co closed lower bound, open upper bound +// oc open lower bound, closed upper bound +// oo open lower bound, open upper bound +// cz closed lower bound of 0.0, no upper bound +// oz open lower bound of 0.0, no upper bound +// nb no bounds +// sw switch (integer only, values 0=false and 1=true) +// ty switch (integer only, values -1=n-type and +1=p-type) +// + +`define ERROR(str) \ + begin \ + $strobe(str); \ + $finish(1); \ + end +`define WARNING(str) $strobe(str); +`define OPP(nam,uni,des) (*units=uni, desc=des *) real nam; +`define OPM(nam,uni,des) (*units=uni, desc=des, multiplicity="multiply"*) real nam; +`define OPD(nam,uni,des) (*units=uni, desc=des, multiplicity="divide" *) real nam; +`define MPRcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from [lwr:upr]; +`define MPRco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from [lwr:upr); +`define MPRoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from (lwr:upr]; +`define MPRoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from (lwr:upr); +`define MPRcz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from [0.0:inf); +`define MPRoz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from (0.0:inf); +`define MPRnb(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def; +`define MPIcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from [lwr:upr]; +`define MPIco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from [lwr:upr); +`define MPIoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from (lwr:upr]; +`define MPIoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from (lwr:upr); +`define MPInb(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def; +`define MPIsw(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from [ 0: 1]; +`define MPIty(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from [ -1: 1] exclude 0; +`define IPRcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from [lwr:upr]; +`define IPRco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from [lwr:upr); +`define IPRoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from (lwr:upr]; +`define IPRoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from (lwr:upr); +`define IPRcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from [0.0:inf); +`define IPRoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from (0.0:inf); +`define IPRnb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def; +`define IPIcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from [lwr:upr]; +`define IPIco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from [lwr:upr); +`define IPIoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from (lwr:upr]; +`define IPIoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from (lwr:upr); +`define IPIcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from [ 0:inf); +`define IPInb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def; +`define IPIsw(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from [ 0: 1]; + +// +// Simulator variable macros, for use as defaults in model parameter definitions +// + +`define SIMPARIMAX $simparam("imax",1.0) +`define SIMPARSCAL $simparam("scale",1.0) +`define SIMPARSHRI $simparam("shrink",0.0) +`define SIMPARRTHR $simparam("rthresh",1.0e-3) + + +// +// Built-in potential temperature mapping (smoothly goes to zero as the temperature increases). +// +// This is originally from Richard Booth (Agere Systems), and is physically based on the +// built-in potential being (kT/q)*ln(ppo*nno/ni^2), whereas the standard SPICE model is +// based on (kT/q)*ln(NA*ND/ni^2) which assumes ppo=NA and nno=ND and does not take into +// account that at high temperatures material becomes intrinsic and ppo and nno approach ni. +// The model is based on ni^2(T)=ni^2(Tnom)*exp(-(EA*q/k)*(1/T-1/Tnom))*(T/Tnom)^3 +// where the temperatures T and Tnom are in Kelvins. +// +// A derivation is available at http://www.designers-guide.org/VBIC/documents/notesPsibi.html +// +// Outputs: +// psibi built-in potential at temperature T +// Inputs: +// p built-in potential at reference temperature Tnom +// ea activation energy for intrinsic concentration squared +// vtv thermal voltage at temperature T (=k*T/q) +// rt T/Tnom, ratio of temperatures +// blockName name for the begin/end block (must be unique) +// + +`define psibi(psibi,p,ea,vtv,rt,blockName) \ + begin : blockName \ + real psiio, psiin ; \ + psiio = 2.0*(vtv/rt)*ln(exp(0.5*p*rt/vtv)-exp(-0.5*p*rt/vtv)); \ + psiin = psiio*rt-3.0*vtv*ln(rt)-ea*(rt-1.0); \ + psibi = psiin+2.0*vtv*ln(0.5*(1.0+sqrt(1.0+4.0*exp(-psiin/vtv)))); \ + end + +// +// exp(V*a) that linearizes for V>Vmax +// +// Outputs: +// expv exponential linearized for V>Vmax +// Inputs: +// V input voltage +// Vmax voltage at which to linearize the exponential +// a multiplicative factor for V in the exponential calculation +// + +`define expLinA(expv,V,Vmax,a) \ + if (V0). The basic capacitance form is 1/(1-v/p)^m. +// +// Outputs: +// qj junction charge +// Inputs: +// v voltage across the junction +// p built-in voltage of the junction +// m grading coefficient of the junction +// fc linearization factor, model is linearized for v>fc*p +// aj smoothing parameter, if <=0 a the model is regional +// blockName name for the begin/end block (must be unique) +// +// There are 6 variants of the (aj>0) depletion charge model. Physically, +// for high forward bias the depletion region does not exist as it is swamped by +// mobile carriers, hence the depletion charge (and capacitance) should +// go to zero. This gives a cj(v) characteristic that peaks and then drops +// to zero as v increases. This characteristic can cause convergence problems +// and has to be carefully matched with a diffusion charge model so that the +// total (depletion+diffusion) charge and capacitance are modeled accurately. +// A less radical version of this is provided, that smoothly approaches the +// constant capacitance at v=fc*p. This also needs to be carefully integrated +// with a diffusion charge model to give correct total (depletion+diffusion) +// charge and capacitance modeling. A smooth version of the standard SPICE +// model, where the capacitance linearly increases with voltage for v>fc*p, +// is also provided. In the absence of a diffusion charge model, which is +// often the case for parasitic junction models which are not expected to be +// driven to high forward bias and so for which diffusion charge can be ignored, +// the version that gives a linear cj(v) form for v>fc*p should be used. +// +// Each of these 3 models has 2 variants, one that has qj(v=0)=0 and another +// that does not. For capacitance modeling it does not matter which is used, +// as only the derivative is important. For modeling base-charge in BJTs +// it is the change in depletion charge w.r.t. zero bias that is used to +// model the Early effect, hence qj(v=0)=0 is required. This requires +// additional calculations that are not needed if only capacitance modeling +// is of interest. Hence versions that do not force qj(v=0)=0 are provided +// as they are more efficient to evaluate. +// +// cj(v) for +// Name qj(v=0)=0 v->+inf +// ========= ========== ======== +// qj no linear in v +// qj_z yes linear in v +// qjCnst no constant 1/(1-fc)^m +// qjCnst_z yes constant 1/(1-fc)^m +// qjPeak no zero +// qjPeak_z yes zero +// + +`define qj(qj,v,p,m,fc,aj,blockName) \ + begin : blockName \ + real dv0, dvh, pwq, qlo, qhi, mv0, vl0, dv, mv, vl; \ + dv0 = -p*fc; \ + if (aj<=0.0) begin \ + dvh = v+dv0; \ + if (dvh>0.0) begin \ + pwq = pow((1.0-fc),(-m)); \ + qlo = p*(1.0-pwq*(1.0-fc))/(1.0-m); \ + qhi = dvh*(1.0+0.5*m*dvh/(p*(1.0-fc)))*pwq; \ + end else begin \ + qlo = p*(1.0-pow((1.0-v/p),(1.0-m)))/(1.0-m); \ + qhi = 0.0; \ + end \ + qj = qlo+qhi; \ + end else begin \ + mv0 = sqrt(dv0*dv0+4.0*aj*aj); \ + vl0 = -0.5*(dv0+mv0); \ + dv = v+dv0; \ + mv = sqrt(dv*dv+4.0*aj*aj); \ + vl = 0.5*(dv-mv)-dv0; \ + qlo = -p*pow((1.0-vl/p),(1.0-m))/(1.0-m); \ + qj = qlo+pow((1.0-fc),(-m))*(v-vl+vl0)*(1.0+0.5*m*(v-vl+vl0)/(p*(1.0-fc))); \ + end \ + end + +`define qj_z(qj,v,p,m,fc,aj,blockName) \ + begin : blockName \ + real dv0, dvh, pwq, qlo, qhi, mv0, vl0, q0, dv, mv, vl; \ + dv0 = -p*fc; \ + if (aj<=0.0) begin \ + dvh = v+dv0; \ + if (dvh>0.0) begin \ + pwq = pow((1.0-fc),(-m)); \ + qlo = p*(1.0-pwq*(1.0-fc))/(1.0-m); \ + qhi = dvh*(1.0+0.5*m*dvh/(p*(1.0-fc)))*pwq; \ + end else begin \ + qlo = p*(1.0-pow((1.0-v/p),(1.0-m)))/(1.0-m); \ + qhi = 0.0; \ + end \ + qj = qlo+qhi; \ + end else begin \ + mv0 = sqrt(dv0*dv0+4.0*aj*aj); \ + vl0 = -0.5*(dv0+mv0); \ + q0 = -p*pow((1.0-vl0/p),(1.0-m))/(1.0-m); \ + dv = v+dv0; \ + mv = sqrt(dv*dv+4.0*aj*aj); \ + vl = 0.5*(dv-mv)-dv0; \ + qlo = -p*pow((1.0-vl/p),(1.0-m))/(1.0-m); \ + qj = qlo+pow((1.0-fc),(-m))*(v-vl+vl0)*(1.0+0.5*m*(v-vl+vl0)/(p*(1.0-fc)))-q0; \ + end \ + end + +`define qjCnst(qj,v,p,m,fc,aj,blockName) \ + begin : blockName \ + real dv0, dvh, pwq, qlo, qhi, mv0, vl0, dv, mv, vl; \ + dv0 = -p*fc; \ + if (aj<=0.0) begin \ + dvh = v+dv0; \ + if (dvh>0.0) begin \ + pwq = pow((1.0-fc),(-m)); \ + qlo = p*(1.0-pwq*(1.0-fc))/(1.0-m); \ + qhi = dvh*pwq; \ + end else begin \ + qlo = p*(1.0-pow((1.0-v/p),(1.0-m)))/(1.0-m); \ + qhi = 0.0; \ + end \ + qj = qlo+qhi; \ + end else begin \ + mv0 = sqrt(dv0*dv0+4.0*aj*aj); \ + vl0 = -0.5*(dv0+mv0); \ + dv = v+dv0; \ + mv = sqrt(dv*dv+4.0*aj*aj); \ + vl = 0.5*(dv-mv)-dv0; \ + qlo = -p*pow((1.0-vl/p),(1.0-m))/(1.0-m); \ + qj = qlo+pow((1.0-fc),(-m))*(v-vl+vl0); \ + end \ + end + +`define qjCnst_z(qj,v,p,m,fc,aj,blockName) \ + begin : blockName \ + real dv0, dvh, pwq, qlo, qhi, mv0, vl0, q0, dv, mv, vl; \ + dv0 = -p*fc; \ + if (aj<=0.0) begin \ + dvh = v+dv0; \ + if (dvh>0.0) begin \ + pwq = pow((1.0-fc),(-m)); \ + qlo = p*(1.0-pwq*(1.0-fc))/(1.0-m); \ + qhi = dvh*pwq; \ + end else begin \ + qlo = p*(1.0-pow((1.0-v/p),(1.0-m)))/(1.0-m); \ + qhi = 0.0; \ + end \ + qj = qlo+qhi; \ + end else begin \ + mv0 = sqrt(dv0*dv0+4.0*aj*aj); \ + vl0 = -0.5*(dv0+mv0); \ + q0 = -p*pow((1.0-vl0/p),(1.0-m))/(1.0-m); \ + dv = v+dv0; \ + mv = sqrt(dv*dv+4.0*aj*aj); \ + vl = 0.5*(dv-mv)-dv0; \ + qlo = -p*pow((1.0-vl/p),(1.0-m))/(1.0-m); \ + qj = qlo+pow((1.0-fc),(-m))*(v-vl+vl0)-q0; \ + end \ + end + +`define qjPeak(qj,v,p,m,fc,aj,blockName) \ + begin : blockName \ + real dv0, dvh, pwq, qlo, dv, mv, vl; \ + dv0 = -p*fc; \ + if (aj<=0.0) begin \ + dvh = v+dv0; \ + if (dvh>0.0) begin \ + pwq = pow((1.0-fc),(-m)); \ + qj = p*(1.0-pwq*(1.0-fc))/(1.0-m); \ + end else begin \ + qj = p*(1.0-pow((1.0-v/p),(1.0-m)))/(1.0-m); \ + end \ + end else begin \ + dv = v+dv0; \ + mv = sqrt(dv*dv+4.0*aj*aj); \ + vl = 0.5*(dv-mv)-dv0; \ + qj = -p*pow((1.0-vl/p),(1.0-m))/(1.0-m); \ + end \ + end + +`define qjPeak_z(qj,v,p,m,fc,aj,blockName) \ + begin : blockName \ + real dv0, dvh, pwq, mv0, vl0, q0, dv, mv, vl; \ + dv0 = -p*fc; \ + if (aj<=0.0) begin \ + dvh = v+dv0; \ + if (dvh>0.0) begin \ + pwq = pow((1.0-fc),(-m)); \ + qj = p*(1.0-pwq*(1.0-fc))/(1.0-m); \ + end else begin \ + qj = p*(1.0-pow((1.0-v/p),(1.0-m)))/(1.0-m); \ + end \ + end else begin \ + mv0 = sqrt(dv0*dv0+4.0*aj*aj); \ + vl0 = -0.5*(dv0+mv0); \ + q0 = -p*pow((1.0-vl0/p),(1.0-m))/(1.0-m); \ + dv = v+dv0; \ + mv = sqrt(dv*dv+4.0*aj*aj); \ + vl = 0.5*(dv-mv)-dv0; \ + qj = -p*pow((1.0-vl/p),(1.0-m))/(1.0-m)-q0; \ + end \ + end + +// +// pn junction current, includes area and perimeter components +// +// Outputs: +// pnjI junction current +// Inputs: +// v voltage across the junction +// vtv the thermal voltage +// a area of junction +// isa saturation current per unit area +// na ideality factor of the area component +// vmaxa linearization voltage for the area component +// p perimeter of junction +// isp saturation current per unit perimeter +// np ideality factor of the perimeter component +// vmaxp linearization voltage for the perimeter component +// blockName name for the begin/end block (must be unique) +// + +`define pnjIap(pnjI,v,vtv,a,isa,na,vmaxa,p,isp,np,vmaxp,blockName) \ + begin : blockName \ + real aisa,pisp,argx,expx,pnjIa,pnjIp; \ + aisa = a*isa; \ + pisp = p*isp; \ + if (aisa>0.0) begin \ + argx = 1.0/(na*vtv); \ + `expLinA(expx,v,vmaxa,argx) \ + pnjIa = aisa*(expx-1.0); \ + end else begin \ + pnjIa = 0.0; \ + end \ + if (pisp>0.0) begin \ + argx = 1.0/(np*vtv); \ + `expLinA(expx,v,vmaxp,argx) \ + pnjIp = pisp*(expx-1.0); \ + end else begin \ + pnjIp = 0.0; \ + end \ + pnjI = pnjIa+pnjIp; \ + end + +// +// pn junction charge, includes area and perimeter components +// +// Based on the basic depletion charge model with a linear increase +// in c(v) at high forward bias, qj(v=0)=0 is not enforced. +// +// Outputs: +// pnjQ junction charge +// Inputs: +// v voltage across the junction +// a area of junction +// cja zero-bias capacitance per unit area +// pa built-in voltage of the area component +// ma grading coefficient of the area component +// fca linearization factor of the are component +// aja smoothing parameter of the area component +// p perimeter of junction +// cjp zero-bias capacitance per unit perimeter +// pp built-in voltage of the perimeter component +// mp grading coefficient of the perimeter component +// fcp linearization factor of the perimeter component +// ajp smoothing parameter of the perimeter component +// blockName name for the begin/end block (must be unique) +// dba name to pass to `qj for the area component (must be unique) +// dbp name to pass to `qj for the perimeter component (must be unique) +// + +`define pnjQap(pnjQ,v,a,cja,pa,ma,fca,aja,p,cjp,pp,mp,fcp,ajp,blockName,dba,dbp) \ + begin : blockName \ + real acja,pcjp,arga,argp; \ + acja = a*cja; \ + pcjp = p*cjp; \ + if (acja>0.0) begin \ + `qj(arga,v,pa,ma,fca,aja,dba) \ + end else begin \ + arga = 0.0; \ + end \ + if (pcjp>0.0) begin \ + `qj(argp,v,pp,mp,fcp,ajp,dbp) \ + end else begin \ + argp = 0.0; \ + end \ + pnjQ = acja*arga+pcjp*argp; \ + end + +// +// simple junction breakdown current model +// +// Outputs: +// bkdI breakdown current +// Inputs: +// v voltage across the junction +// Ibv current at Vbv +// Vbv breakdown voltage (defined at Ibv) +// vtv the thermal voltage +// nb ideality factor of the breakdown exponential +// vmax linearization voltage +// blockName name for the begin/end block (must be unique) +// +// This model is based on the simple exponential breakdown model +// for SPICE diodes. The model has current -Ibv at voltage -Vbv, +// and varies exponentially with voltage. The nb parameter controls +// the steepness of the exponential. The current is linearized for +// for bias and hasvalue zero at zero bias across the junction. +// + +`define pnjIbkd(bkdI,v,Ibv,Vbv,vtv,nb,vmax,blockName) \ + begin : blockName \ + real Vbkd,argx,expx; \ + if (Vbv>0.0) begin \ + Vbkd = -Vbv-v; \ + argx = 1.0/(nb*vtv); \ + `expLinA(expx,Vbkd,vmax,argx) \ + bkdI = -Ibv*(expx-exp(-Vbv*argx)); \ + end else begin \ + bkdI = 0.0; \ + end \ + end + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// +// Junction shot noise (including ideal and nonideal components of current) +// +// The commonly used shot noise model 2q|I| is inaccurate for voltages less +// than a few phi_t, and for pn junctions with nonideal components of current +// can underpredict the noise. This formulation overcomes those limitations +// and, for zero nonideal component, matches the van der Ziel result. +// +// Inputs: +// b_j branch defined for the intrinsic pn junction +// iSat ideal saturation current +// iIdeal ideal component of current +// iNonideal nonideal component of current +// label string that identifies the noise component (must be in "") +// + +`define pnjShotNoise(b_j,iSat,iIdeal,iNonideal,label) \ + I(b_j) <+ white_noise(2.0*`QQ_NIST2004*(abs(iIdeal+2.0*iSat)+abs(iNonideal)),label); + + +// +// Core calculation for r3_cmc, current in the main resistor body +// +// Outputs: +// Irb current through the body of the resistor element +// geff effective DC conductance (used in noise calculation) +// Inputs: +// Vrb voltage across the resistor body +// Vc1 voltage from control to terminal 1 nodes +// Vc2 voltage from control to terminal 2 nodes +// vpo pinch-off voltage: 0.5/(df*df)-dp*0.5 +// vpoe effective pinch-off voltage (vpo less offset for grpo limiting) +// V1cx threshold to switch simple Vsat calculation form for iecrit=0 +// nsteff full pinch-off slope parameter +// phi_t0 thermal voltage at circuit ambient (without self-heating) +// dp depletion pinching potential +// df depletion pinching factor +// dfsq df*df (precomputed as it is used several times) +// lde (effective length)*delta_field for velocity saturation +// leffE_um effective resistor length for velocity saturation calculation, in micron +// ecrneff effective corner field for velocity saturation +// iecrit inverse of the velocity saturation critical field +// dufctr du factor, precomputed +// uoff du offset, precomputed +// ats pinch-off smoothing parameter +// atspo ats limit in pinch-off or 4*ats*ats (for swaccpo=2/3 or 0/1, respectively) +// gf conductance factor +// grpo minimum conductance ratio in pinch-off +// swaccpo switch for accurate pinch-off calculation (0=orig, 1=no, 2/3=yes) +// blockName name for the begin/end block (must be unique) +// +// Some of the above arguments are, to reduce model evaluation time, +// pre-computed quantities. +// +// Most of the calculations below are to solve a quartic equation for Vsat +// that gives a value the guarantees that the output conductance (without +// self-heating) will not become negative, Vsat equal to or (just) less than +// the Vrb voltage at which d(Irb)/d(Vrb) is zero. The appropriate real root of +// the equation is calculated. Note that always bb<0, rp>0, arg1>0, so some +// conditional calculation branches below should never be followed. rm can change +// sign, which leads to a numerical problem in evaluation of the derivative of +// pow(rm,`oneThird) for rm near zero. Hence the linearization of this function +// for abs(rm)<1.0e-6. The derivative of bvar2 w.r.t. rm is not continuous when +// abs(rm)=1.0e-6, but the effect on Irb and gm is embedded in many calculations +// and is negligible. +// +// Terminology: +// non-pinch-off is when neither source nor drain are in pinch-off +// drain pinch-off is when the drain is pinched off but the source is not +// full pinch-off is when both the source and drain are in pinch-off +// +// There are 4 options for limiting behavior in full pinch-off: +// sw_accpo=0 original equations from version 1.0.0 +// sw_accpo=1 no special handling of full pinch-off, the model does not well +// approximate 1-exp(-Vb/phi_t0) behavior; this has the fastest +// computation time and is appropriate for resistor modeling +// (setting ats to 1.1*phi_t0 makes full pinch-off modeling reasonable, +// setting ats to less than that value makes saturation happen too early, +// setting ats to more than that value makes saturation happen too late) +// sw_accpo=2 this makes the model approximate 1-exp(-Vb/phi_t0) behavior in +// full pinch-off significantly more accurately than sw_accpo=1; it takes +// more computation time than sw_accpo=0 but is more accurate for JFETs +// sw_accpo=3 this also makes the model approximate 1-exp(-Vb/phi_t0) behavior +// in full pinch-off significantly more accurately than sw_accpo=1; +// it is slightly less accurate than sw_accpo=2 in full pinch-off but +// slightly more accurate through the transition to full pinch-off, +// i.e. around "threshold" compared to sw_accpo=2; the transition from +// non-pinch-off to drain pinch-off is smoother, and higher order +// continuity is maintained through Vb=0; the cost is a small increase +// in computational complexity cf. sw_accpo=2 + + +`define r3Ibody(Irb,geff,Vrb,Vc1,Vc2,vpo,vpoe,V1cx,nsteff,phi_t0,dp,df,dfsq,lde,leffE_um,ecrneff,iecrit,dufctr,uoff,ats,atspo,gf,grpo,swaccpo,blockName) \ + begin : blockName \ + real sdFlip, V1ci, Vrbi, V1cl, V1c, pe; \ + real a0, a1, a2, a3, a4, dvar, cvar, bvar, avar, asq, pvar, qvar, rvar; \ + real aa, bb, aa3d27, dd, sd, rp, rm, avar2, bvar2, yvar, val1, val2, arg1, arg2; \ + real dore, Vsat, VrbEff, fctrm, fctrp, sqrtp, sqrtm, rmu, dpfctr, atseff, fouratsq; \ + real Vsatphi, Fsatphi, drmu, dfe, dpee, tmp; \ + if (Vrb<0.0) begin \ + sdFlip = -1.0; \ + V1ci = -Vc2; \ + Vrbi = -Vrb; \ + end else begin \ + sdFlip = 1.0; \ + V1ci = -Vc1; \ + Vrbi = Vrb; \ + end \ + if (V1ci>vpoe) begin \ + V1cl = vpoe-nsteff*ln(1.0+exp((vpoe-V1ci)/nsteff)); \ + end else begin \ + V1cl = V1ci-nsteff*ln(1.0+exp((V1ci-vpoe)/nsteff)); \ + end \ + if (swaccpo) begin \ + if (V1cl<(-0.4*(dp+`MIN(Vrbi,vpoe-V1cl)))) begin \ + V1c = -0.4*(dp+`MIN(Vrbi,vpoe-V1cl)); \ + end else begin \ + V1c = V1cl; \ + end \ + end else begin \ + if (V1cl<(-0.4*dp)) begin \ + V1c = -0.4*dp; \ + end else begin \ + V1c = V1cl; \ + end \ + end \ + pe = dp+2.0*V1c; \ + if (iecrit>0.0) begin \ + a0 = dfsq*pe*pe-pe; \ + a1 = -1.0+3.0*dfsq*pe; \ + a2 = dfsq*(9.0/4.0+pe/lde); \ + a3 = 1.5*dfsq/lde; \ + a4 = 4.0*lde*lde/dfsq; \ + dvar = a0*a4; \ + cvar = a1*a4; \ + bvar = a2*a4; \ + avar = a3*a4; \ + asq = avar*avar; \ + pvar = -bvar; \ + qvar = avar*cvar-4.0*dvar; \ + rvar = 4.0*bvar*dvar-cvar*cvar-dvar*asq; \ + aa = qvar-pvar*pvar*`oneThird; \ + bb = rvar-pvar*(qvar+2.0*aa)/9.0; \ + aa3d27 = aa*aa*aa/27.0; \ + dd = 0.25*bb*bb+aa3d27; \ + sd = sqrt(dd); \ + if (bb<0.0) begin \ + rp = -0.5*bb+sd; \ + rm = -aa3d27/rp; \ + end else begin \ + rm = -0.5*bb-sd; \ + rp = -aa3d27/rm; \ + end \ + if (rp>(0.000001)) begin \ + avar2 = pow(rp,`oneThird); \ + end else if (rp<(-0.000001)) begin \ + avar2 = -pow((-rp),`oneThird); \ + end else begin \ + avar2 = 10000.0*rp; \ + end \ + if (rm>(0.000001)) begin \ + bvar2 = pow(rm,`oneThird); \ + end else if (rm<(-0.000001)) begin \ + bvar2 = -pow((-rm),`oneThird); \ + end else begin \ + bvar2 = 10000.0*rm; \ + end \ + yvar = avar2+bvar2-pvar*`oneThird; \ + rvar = sqrt(0.25*asq-bvar+yvar); \ + val1 = 0.75*asq-rvar*rvar-2.0*bvar; \ + val2 = (avar*bvar-2.0*cvar-0.25*asq*avar)/rvar; \ + arg1 = val1+val2; \ + if (arg1>0.0) begin \ + dore = sqrt(arg1); \ + Vsat = -0.25*avar+0.5*(dore+rvar); \ + end else begin \ + arg2 = val1-val2; \ + dore = sqrt(sqrt(arg2*arg2+1.0e-4)); \ + Vsat = -0.25*avar+0.5*(dore-rvar); \ + end \ + end else begin \ + if (V1c>V1cx) begin \ + tmp = dfsq*(vpo-V1c); \ + Vsat = 2.0*(1.0-2.0*tmp)*(vpo-V1c)/(1.0-3.0*tmp+sqrt(1.0-1.5*tmp)); \ + end else begin \ + tmp = 3.0*dfsq*pe; \ + Vsat = (1.0-tmp+sqrt(1.0+tmp))/(4.5*dfsq); \ + end \ + end \ + if (swaccpo>1) begin \ + Vsatphi = Vsat+phi_t0; \ + Fsatphi = df*sqrt(pe+Vsat); \ + if (iecrit>0.0) begin \ + fctrm = 0.5*((Vsatphi/leffE_um)-ecrneff)*iecrit; \ + fctrp = 0.5*((Vsatphi/leffE_um)+ecrneff)*iecrit; \ + sqrtm = sqrt(fctrm*fctrm+dufctr); \ + sqrtp = sqrt(fctrp*fctrp+dufctr); \ + rmu = sqrtm+sqrtp-uoff; \ + drmu = 0.5*((fctrm/sqrtm)+(fctrp/sqrtp))*iecrit/leffE_um; \ + dfe = sqrt(2.0*Fsatphi*(1.0-Fsatphi)*(1.0-drmu*Vsatphi/(1.0+rmu))/Vsatphi); \ + end else begin \ + dfe = sqrt(2.0*Fsatphi*(1.0-Fsatphi)/Vsatphi); \ + end \ + dpee = dfsq*(pe+Vsat)/(dfe*dfe)-Vsatphi; \ + atseff = atspo+ats*Vsat/(ats+Vsatphi); \ + fouratsq = 4.0*atseff*atseff; \ + VrbEff = 2.0*Vrbi*Vsatphi/(sqrt((Vrbi-Vsatphi)*(Vrbi-Vsatphi)+fouratsq)+sqrt((Vrbi+Vsatphi)*(Vrbi+Vsatphi)+fouratsq)); \ + if (sw_accpo>2) begin \ + atseff = atspo+ats*VrbEff/(ats+Vsatphi); \ + fouratsq = 4.0*atseff*atseff; \ + VrbEff = 2.0*Vrbi*Vsatphi/(sqrt((Vrbi-Vsatphi)*(Vrbi-Vsatphi)+fouratsq)+sqrt((Vrbi+Vsatphi)*(Vrbi+Vsatphi)+fouratsq)); \ + end \ + dpfctr = 1.0-dfe*sqrt(dpee+VrbEff); \ + if (iecrit>0.0) begin \ + fctrm = 0.5*((VrbEff/leffE_um)-ecrneff)*iecrit; \ + fctrp = 0.5*((VrbEff/leffE_um)+ecrneff)*iecrit; \ + sqrtm = sqrt(fctrm*fctrm+dufctr); \ + sqrtp = sqrt(fctrp*fctrp+dufctr); \ + rmu = sqrtm+sqrtp-uoff; \ + end else begin \ + rmu = 0.0; \ + end \ + end else begin \ + VrbEff = 2.0*Vrbi*Vsat/(sqrt((Vrbi-Vsat)*(Vrbi-Vsat)+atspo)+sqrt((Vrbi+Vsat)*(Vrbi+Vsat)+atspo)); \ + if (iecrit>0.0) begin \ + fctrm = 0.5*((VrbEff/leffE_um)-ecrneff)*iecrit; \ + fctrp = 0.5*((VrbEff/leffE_um)+ecrneff)*iecrit; \ + sqrtm = sqrt(fctrm*fctrm+dufctr); \ + sqrtp = sqrt(fctrp*fctrp+dufctr); \ + rmu = sqrtm+sqrtp-uoff; \ + end else begin \ + rmu = 0.0; \ + end \ + dpfctr = 1.0-df*sqrt(pe+VrbEff); \ + end \ + if (dpfctr= 2) begin - if (SWNQS_i == 2) begin - dQy = (2.0 * Qp0 - 12.0 * Qp1 + 3.0 * Qp2 + 7.0 * QpN) / 5.0; - d2Qy = -18.0 / 5.0 * (-4.0 * QpN + 9.0 * Qp2 - 6.0 * Qp1 + Qp0); - end else if (SWNQS_i == 3) begin - dQy = 0.5 * Qp0 - 3.0 * Qp1 + 3.0 * Qp3 - 0.5 * QpN; - d2Qy = (-48.0 * Qp0 + 288.0 * Qp1 - 480.0 * Qp2 + 288.0 * Qp3 - 48.0 * QpN) / 7.0; - end else if (SWNQS_i == 5) begin - dQy = (-291.0 * Qp1 - 6.0 * Qp2 - 84.0 * Qp4 + 21.0 * Qp5) / 65.0 - + (630.0 * Qp3 - 7.0 * QpN + 97.0 * Qp0) / 130.0; - d2Qy = (-1728.0 * Qp4 + 432.0 * Qp5 + 6480.0 * Qp3 - 72.0 * QpN - 1008.0 * Qp0 - + 6048.0 * Qp1 - 10152.0 * Qp2) / 65.0; - end else if (SWNQS_i == 9) begin - dQy = (-5880.0 * Qp6 - 81900.0 * Qp4 + 305655.0 * Qp3 - 420.0 * Qp8 - + 105.0 * Qp9 - 282255.0 * Qp1 + 1575.0 * Qp7 - 5850.0 * Qp2) / 37829.0 - + 105.0 / 181.0 * Qp5 + (94085.0 * Qp0 - 35.0 * QpN) / 75658.0; - d2Qy = (9777600.0 * Qp1 + 54000.0 * Qp7 - 2808000.0 * Qp4 + 10479600.0 * Qp3 - - 16413000.0 * Qp2 - 1629600.0 * Qp0 - 600.0 * QpN - 14400.0 * Qp8 - + 3600.0 * Qp9 - 201600.0 * Qp6) / 37829.0 + 3600.0 * Qp5 / 181.0; - end else begin - dQy = 0.0; - d2Qy = 0.0; - end - `fq(Qp2, xg_ac, dQy, d2Qy, fk2) - end - - if (SWNQS_i >= 3) begin - if (SWNQS_i == 3) begin - dQy = (13.0 * QpN + 6.0 * Qp3 - 24.0 * Qp2 + 6.0 * Qp1 - Qp0) / 7.0; - d2Qy = (180.0 * QpN - 408.0 * Qp3 + 288.0 * Qp2 - 72.0 * Qp1 + 12.0 * Qp0) / 7.0; - end else if (SWNQS_i == 5) begin - dQy = (QpN - 6.0 * Qp5 + 24.0 * Qp4 - 24.0 * Qp2 + 6.0 * Qp1 - Qp0) / 5.0; - d2Qy = (1296.0 * (Qp4 + Qp2) - 324.0 * (Qp5 + Qp1) - 2052.0 * Qp3 - + 54.0 * (QpN + Qp0)) / 13.0; - end else if (SWNQS_i == 9) begin - dQy = (21840.0 * Qp6 + 304200.0 * Qp4 + 65.0 * QpN - 420.0 * Qp3 + 1560.0 * Qp8 - - 12605.0 * Qp0 - 390.0 * Qp9 + 75630.0 * Qp1 - 5850.0 * Qp7 - - 302520.0 * Qp2) / 37829.0 - 390.0 / 181.0 * Qp5; - d2Qy = (-2619900.0 * Qp1 - 202500.0 * Qp7 + 10530000.0 * Qp4 - 16601100.0 * Qp3 - + 10479600.0 * Qp2 + 436650.0 * Qp0 + 2250.0 * QpN + 54000.0 * Qp8 - - 13500.0 * Qp9 + 756000.0 * Qp6) / 37829.0 - 13500.0 * Qp5 / 181.0; - end else begin - dQy = 0.0; - d2Qy = 0.0; - end - `fq(Qp3, xg_ac, dQy, d2Qy, fk3) - end - - if (SWNQS_i >= 4) begin - if (SWNQS_i == 5) begin - dQy = (-630.0 * Qp3 + 12.0 * Qp4 + 582.0 * Qp5 - 97.0 * QpN + 7.0 * Qp0 - - 42.0 * Qp1 + 168.0 * Qp2) / 130.0; - d2Qy = (-10152.0 * Qp4 + 6048.0 * Qp5 + 6480.0 * Qp3 - 1008.0 * QpN - - 72.0 * Qp0 + 432.0 * Qp1 - 1728.0 * Qp2) / 65.0; - end - else if (SWNQS_i == 9) begin - dQy = (-81480.0 * Qp6 - 30.0 * Qp4 - 303975.0 * Qp3 - 5820.0 * Qp8 - + 1455.0 * Qp9 - 20265.0 * Qp1 + 21825.0 * Qp7 + 81060.0 * Qp2) / 37829.0 - - 485.0 / 75658.0 * QpN + 1455.0 * Qp5 / 181.0 + 6755.0 * Qp0 / 75658.0; - d2Qy = (702000.0 * Qp1 + 756000.0 * Qp7 - 16614600.0 * Qp4 + 10530000.0 * Qp3 - - 2808000.0 * Qp2 - 117000.0 * Qp0 - 8400.0 * QpN - 201600.0 * Qp8 - + 50400.0 * Qp9 - 2822400.0 * Qp6) / 37829.0 + 50400.0 * Qp5 / 181.0; - end else begin - dQy = 0.0; - d2Qy = 0.0; - end - `fq(Qp4, xg_ac, dQy, d2Qy, fk4) - end - - if (SWNQS_i >= 5) begin - if (SWNQS_i == 5) begin - dQy = (-336.0 * Qp4 + 84.0 * Qp5 + 90.0 * Qp3 + 181.0 * QpN - Qp0 + 6.0 * Qp1 - - 24.0 * Qp2) / 65.0; - d2Qy = (18.0 * Qp0 + 3762.0 * QpN + 6048.0 * Qp4 + 432.0 * Qp2 - 1620.0 * Qp3 - - 108.0 * Qp1 - 8532.0 * Qp5) / 65.0; - end else if (SWNQS_i == 9) begin - dQy = (1680.0 * (Qp6 - Qp4) + 5.0 * (QpN - Qp0) + 450.0 * (Qp3 - Qp7) - + 120.0 * (Qp8 - Qp2) - 30.0 * (Qp9 - Qp1)) / 209.0; - d2Qy = (-900.0 * (Qp1 + Qp9) - 13500.0 * (Qp7 + Qp3) - 79500.0 * Qp5 - + 50400.0 * (Qp4 + Qp6) + 3600.0 * (Qp2 + Qp8) + 150.0 * (Qp0 + QpN)) / 181.0; - end else begin - dQy = 0.0; - d2Qy = 0.0; - end - `fq(Qp5, xg_ac, dQy, d2Qy, fk5) - end - - if (SWNQS_i >= 6) begin - if (SWNQS_i == 9) begin - dQy = (30.0 * Qp6 + 81480.0 * Qp4 - 21825.0 * Qp3 - 81060.0 * Qp8 + 20265.0 * Qp9 - - 1455.0 * Qp1 + 303975.0 * Qp7 + 5820.0 * Qp2) / 37829.0 - -(6755.0 * QpN - 485.0 * Qp0) / 75658.0 - 1455.0 / 181.0 * Qp5; - d2Qy = (50400.0 * Qp1 + 10530000.0 * Qp7 - 2822400.0 * Qp4 + 756000.0 * Qp3 - - 201600.0 * Qp2 - 8400.0 * Qp0 - 117000.0 * QpN - 2808000.0 * Qp8 - + 702000.0 * Qp9 - 16614600.0 * Qp6) / 37829.0 + 50400.0 * Qp5 / 181.0; - end else begin - dQy = 0.0; - d2Qy = 0.0; - end - `fq(Qp6, xg_ac, dQy, d2Qy, fk6) - end - - if (SWNQS_i >= 7) begin - if (SWNQS_i == 9) begin - dQy = (-304200.0 * Qp6 - 21840.0 * Qp4 + 12605.0 * QpN + 5850.0 * Qp3 - + 302520.0 * Qp8 - 65.0 * Qp0 - 75630.0 * Qp9 + 390.0 * Qp1 + 420.0 * Qp7 - - 1560.0 * Qp2) / 37829.0 + 390.0 / 181.0 * Qp5; - d2Qy = (-13500.0 * Qp1 - 16601100.0 * Qp7 + 756000.0 * Qp4 - 202500.0 * Qp3 - + 54000.0 * Qp2 + 2250.0 * Qp0 + 436650.0 * QpN + 10479600.0 * Qp8 - - 2619900.0 * Qp9 + 10530000.0 * Qp6) / 37829.0 - 13500.0 * Qp5 / 181.0; - end else begin - dQy = 0.0; - d2Qy = 0.0; - end - `fq(Qp7, xg_ac, dQy, d2Qy, fk7) - end - - if (SWNQS_i >= 8) begin - if (SWNQS_i == 9) begin - dQy = (81900.0 * Qp6 + 5880.0 * Qp4 - 1575.0 * Qp3 + 5850.0 * Qp8 + 282255.0 * Qp9 - - 105.0 * Qp1 - 305655.0 * Qp7 + 420.0 * Qp2) / 37829.0 + (35.0 * Qp0 - - 94085.0 * QpN) / 75658.0 - 105.0 / 181.0 * Qp5; - d2Qy = (3600.0 * Qp1 + 10479600.0 * Qp7 - 201600.0 * Qp4 + 54000.0 * Qp3 - - 14400.0 * Qp2 - 600.0 * Qp0 - 1629600.0 * QpN - 16413000.0 * Qp8 - + 9777600.0 * Qp9 - 2808000.0 * Qp6) / 37829.0 + 3600.0 * Qp5 / 181.0; - end else begin - dQy = 0.0; - d2Qy = 0.0; - end - `fq(Qp8, xg_ac, dQy, d2Qy, fk8) - end - - if (SWNQS_i >= 9) begin - if (SWNQS_i == 9) begin - dQy = (-23400.0 * Qp6 - 1680.0 * Qp4 + 175565.0 * QpN + 450.0 * Qp3 - - 325920.0 * Qp8 - 5.0 * Qp0 + 81480.0 * Qp9 + 30.0 * Qp1 - + 87330.0 * Qp7 - 120.0 * Qp2) / 37829.0 + 30.0 * Qp5 / 181.0; - d2Qy = (-900.0 * Qp1 - 2619900.0 * Qp7 + 50400.0 * Qp4 - 13500.0 * Qp3 - + 3600.0 * Qp2 + 150.0 * Qp0 + 6081750.0 * QpN + 9777600.0 * Qp8 - - 13793100.0 * Qp9 + 702000.0 * Qp6) / 37829.0 - 900.0 * Qp5 / 181.0; - end else begin - dQy = 0.0; - d2Qy = 0.0; - end - `fq(Qp9, xg_ac, dQy, d2Qy, fk9) - end - - //-------------------------------------------------------------------- - - // Terminal charges for NQS - QS_NQS = 0.0; - QD_NQS = 0.0; - QG_NQS = 0.0; - if (SWNQS_i != 0) begin - if (SWNQS_i == 1) begin - QS_NQS = (17.0 * Qp0 + 30.0 * Qp1 + QpN) / 96.0; - QD_NQS = (Qp0 + 30.0 * Qp1 + 17.0 * QpN) / 96.0; - `QiToPhi(Qp1,xg_ac, temp1) - QG_NQS = xg_ac - (x_sp + 4.0 * temp1 + x_dp) * `oneSixth; - end else if (SWNQS_i == 2) begin - QS_NQS = (11.0 * Qp0 + 24.0 * Qp1 + 9.0 * Qp2 + QpN) / 90.0; - QD_NQS = (11.0 * QpN + 24.0 * Qp2 + 9.0 * Qp1 + Qp0) / 90.0; - `QiToPhi(Qp1, xg_ac, temp1) - `QiToPhi(Qp2, xg_ac, temp2) - QG_NQS = xg_ac - (x_sp + 3.0 * (temp1 + temp2) + x_dp) * 0.125; - end else if (SWNQS_i == 3) begin - QS_NQS = (251.0 * Qp0 + 594.0 * Qp1 + 312.0 * Qp2 + 174.0 * Qp3 + 13.0 * QpN) / 2688.0; - QD_NQS = (251.0 * QpN + 594.0 * Qp3 + 312.0 * Qp2 + 174.0 * Qp1 + 13.0 * Qp0) / 2688.0; - `QiToPhi(Qp1, xg_ac, temp1) - `QiToPhi(Qp2, xg_ac, temp2) - `QiToPhi(Qp3, xg_ac, temp3) - QG_NQS = xg_ac - (x_sp + 4.0 * temp1 + 2.0 * temp2 + 4.0 * temp3 + x_dp) / 12.0; - end else if (SWNQS_i == 5) begin - QS_NQS = (1187.0 * Qp0 + 43.0 * QpN) / 18720.0 + (503.0 * Qp1 + 172.0 * Qp4 - + 87.0 * Qp5 + 265.0 * Qp3 + 328.0 * Qp2) / 3120.0; - QD_NQS = (1187.0 * QpN + 43.0 * Qp0) / 18720.0 + (503.0 * Qp5 + 172.0 * Qp2 - + 87.0 * Qp1 + 265.0 * Qp3 + 328.0 * Qp4) / 3120.0; - `QiToPhi(Qp1, xg_ac, temp1) - `QiToPhi(Qp2, xg_ac, temp2) - `QiToPhi(Qp3, xg_ac, temp3) - `QiToPhi(Qp4, xg_ac, temp4) - `QiToPhi(Qp5, xg_ac, temp5) - QG_NQS = xg_ac - (x_sp + 4.0 * (temp1 + temp3 + temp5) + 2.0 * (temp2 + temp4) + x_dp) / 18.0; - end else if (SWNQS_i == 9) begin - QS_NQS = (75653.0 * Qp8 + 225999.0 * Qp4) / 3782900.0 + (151321.0 * Qp9 - + 454023.0 * Qp7 + 1073767.0 * Qp3 + 1564569.0 * Qp1) / 15131600.0 - + 75623.0 * Qp6 / 1891450.0 + 145.0 * Qp5 / 2896.0 + 72263.0 * Qp2 / 945725.0 - + (3504517.0 * Qp0 + 75653.0 * QpN) / 90789600.0; - QD_NQS = (75653.0 * Qp2 + 225999.0 * Qp6) / 3782900.0 + (151321.0 * Qp1 - + 454023.0 * Qp3 + 1073767.0 * Qp7 + 1564569.0 * Qp9) / 15131600.0 - + 75623.0 * Qp4 / 1891450.0 + 145.0 * Qp5 / 2896.0 + 72263.0 * Qp8 / 945725.0 - + (3504517.0 * QpN + 75653.0 * Qp0) / 90789600.0; - `QiToPhi(Qp1, xg_ac, temp1) - `QiToPhi(Qp2, xg_ac, temp2) - `QiToPhi(Qp3, xg_ac, temp3) - `QiToPhi(Qp4, xg_ac, temp4) - `QiToPhi(Qp5, xg_ac, temp5) - `QiToPhi(Qp6, xg_ac, temp6) - `QiToPhi(Qp7, xg_ac, temp7) - `QiToPhi(Qp8, xg_ac, temp8) - `QiToPhi(Qp9, xg_ac, temp9) - QG_NQS = xg_ac - (x_sp + 4.0 * (temp1 + temp3 + temp5 + temp7 + temp9) - + 2.0 * (temp2 + temp4 + temp6 + temp8) + x_dp) / 30.0; - end - QG_NQS = pd * QG_NQS; - - if (sigVds > 0) begin - Qs = COX_qm * phit1 * QS_NQS; - Qd = COX_qm * phit1 * QD_NQS; - end else begin - Qs = COX_qm * phit1 * QD_NQS; - Qd = COX_qm * phit1 * QS_NQS; - end - Qg = COX_qm * phit1 * QG_NQS; - Qb = -Qg - Qs - Qd; - end - - // Update internal nodes - V(RES1) <+ vnorm_inv * I(RES1) * r_nqs; - V(SPLINE1) <+ vnorm_inv * idt(-Tnorm * fk1, Qp1_0); - V(RES2) <+ vnorm_inv * I(RES2) * r_nqs; - V(SPLINE2) <+ vnorm_inv * idt(-Tnorm * fk2, Qp2_0); - V(RES3) <+ vnorm_inv * I(RES3) * r_nqs; - V(SPLINE3) <+ vnorm_inv * idt(-Tnorm * fk3, Qp3_0); - V(RES4) <+ vnorm_inv * I(RES4) * r_nqs; - V(SPLINE4) <+ vnorm_inv * idt(-Tnorm * fk4, Qp4_0); - V(RES5) <+ vnorm_inv * I(RES5) * r_nqs; - V(SPLINE5) <+ vnorm_inv * idt(-Tnorm * fk5, Qp5_0); - V(RES6) <+ vnorm_inv * I(RES6) * r_nqs; - V(SPLINE6) <+ vnorm_inv * idt(-Tnorm * fk6, Qp6_0); - V(RES7) <+ vnorm_inv * I(RES7) * r_nqs; - V(SPLINE7) <+ vnorm_inv * idt(-Tnorm * fk7, Qp7_0); - V(RES8) <+ vnorm_inv * I(RES8) * r_nqs; - V(SPLINE8) <+ vnorm_inv * idt(-Tnorm * fk8, Qp8_0); - V(RES9) <+ vnorm_inv * I(RES9) * r_nqs; - V(SPLINE9) <+ vnorm_inv * idt(-Tnorm * fk9, Qp9_0); - diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_InitNQS.include b/ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_InitNQS.include deleted file mode 100644 index 27b86359..00000000 --- a/ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_InitNQS.include +++ /dev/null @@ -1,207 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: PSP103_InitNQS.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and -// 2004-2011 Arizona State University Licensed under the Educational Community License, -// Version 2.0 (the "License"); you may not use this file except in compliance with the -// License. You may obtain a copy of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 103.6.0 (PSP), 200.5.0 (JUNCAP), December 2017 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - - ///////////////////////////////////////////////////////////////////////////// - // - // Computing initial (dc) values for internal nodes. - // This code is independent of internal-node voltages - // - ///////////////////////////////////////////////////////////////////////////// - - Qp1_0 = 0.0; - Qp2_0 = 0.0; - Qp3_0 = 0.0; - Qp4_0 = 0.0; - Qp5_0 = 0.0; - Qp6_0 = 0.0; - Qp7_0 = 0.0; - Qp8_0 = 0.0; - Qp9_0 = 0.0; - fk1 = 0.0; - fk2 = 0.0; - fk3 = 0.0; - fk4 = 0.0; - fk5 = 0.0; - fk6 = 0.0; - fk7 = 0.0; - fk8 = 0.0; - fk9 = 0.0; - if (SWNQS_i != 0) begin - dQis = 0.0; - dQy = 0.0; - dfQi = 0.0; - fQi = 0.0; - d2Qy = 0.0; - - Qp1 = 0.0; - Qp2 = 0.0; - Qp3 = 0.0; - Qp4 = 0.0; - Qp5 = 0.0; - Qp6 = 0.0; - Qp7 = 0.0; - Qp8 = 0.0; - Qp9 = 0.0; - - phi_p1 = 0.0; - phi_p2 = 0.0; - phi_p3 = 0.0; - phi_p4 = 0.0; - phi_p5 = 0.0; - phi_p6 = 0.0; - phi_p7 = 0.0; - phi_p8 = 0.0; - phi_p9 = 0.0; - - // Setting initial values for charge along the channel - // from interpolated DC-solution - if (xg_ac > 0) begin - if (SWNQS_i == 1) begin - - phi_p1 = `Phiy(0.5); - `PhiToQb(phi_p1,Qb_tmp) - Qp1_0 = -pd * (xg_ac - phi_p1) - Qb_tmp; - - end else if (SWNQS_i == 2) begin - phi_p1 = `Phiy(`oneThird); - `PhiToQb(phi_p1,Qb_tmp) - Qp1_0 = -pd * (xg_ac - phi_p1) - Qb_tmp; - - phi_p2 = `Phiy(`twoThirds); - `PhiToQb(phi_p2,Qb_tmp) - Qp2_0 = -pd * (xg_ac - phi_p2) - Qb_tmp; - - if (sigVds < 0) begin - `swap(Qp1_0, Qp2_0) - end - end else if (SWNQS_i == 3) begin - phi_p1 = `Phiy(0.25); - `PhiToQb(phi_p1,Qb_tmp) - Qp1_0 = -pd * (xg_ac - phi_p1) - Qb_tmp; - - phi_p2 = `Phiy(0.5); - `PhiToQb(phi_p2,Qb_tmp) - Qp2_0 = -pd * (xg_ac - phi_p2) - Qb_tmp; - - phi_p3 = `Phiy(0.75); - `PhiToQb(phi_p3,Qb_tmp) - Qp3_0 = -pd * (xg_ac - phi_p3) - Qb_tmp; - - if (sigVds < 0) begin - `swap(Qp1_0, Qp3_0) - end - end else if (SWNQS_i == 5) begin - phi_p1 = `Phiy(`oneSixth); - `PhiToQb(phi_p1,Qb_tmp) - Qp1_0 = -pd * (xg_ac - phi_p1) - Qb_tmp; - - phi_p2 = `Phiy(`oneThird); - `PhiToQb(phi_p2,Qb_tmp) - Qp2_0 = -pd * (xg_ac - phi_p2) - Qb_tmp; - - phi_p3 = `Phiy(0.5); - `PhiToQb(phi_p3,Qb_tmp) - Qp3_0 = -pd * (xg_ac - phi_p3) - Qb_tmp; - - phi_p4 = `Phiy(`twoThirds); - `PhiToQb(phi_p4,Qb_tmp) - Qp4_0 = -pd * (xg_ac - phi_p4) - Qb_tmp; - - phi_p5 = `Phiy(0.8333333333333333); - `PhiToQb(phi_p5,Qb_tmp) - Qp5_0 = -pd * (xg_ac - phi_p5) - Qb_tmp; - - if (sigVds < 0) begin - `swap(Qp1_0, Qp5_0) - `swap(Qp2_0, Qp4_0) - end - end else if (SWNQS_i == 9) begin - phi_p1 = `Phiy(0.1); - `PhiToQb(phi_p1,Qb_tmp) - Qp1_0 = -pd * (xg_ac - phi_p1) - Qb_tmp; - - phi_p2 = `Phiy(0.2); - `PhiToQb(phi_p2,Qb_tmp) - Qp2_0 = -pd * (xg_ac - phi_p2) - Qb_tmp; - - phi_p3 = `Phiy(0.3); - `PhiToQb(phi_p3,Qb_tmp) - Qp3_0 = -pd * (xg_ac - phi_p3) - Qb_tmp; - - phi_p4 = `Phiy(0.4); - `PhiToQb(phi_p4,Qb_tmp) - Qp4_0 = -pd * (xg_ac - phi_p4) - Qb_tmp; - - phi_p5 = `Phiy(0.5); - `PhiToQb(phi_p5,Qb_tmp) - Qp5_0 = -pd * (xg_ac - phi_p5) - Qb_tmp; - - phi_p6 = `Phiy(0.6); - `PhiToQb(phi_p6,Qb_tmp) - Qp6_0 = -pd * (xg_ac - phi_p6) - Qb_tmp; - - phi_p7 = `Phiy(0.7); - `PhiToQb(phi_p7,Qb_tmp) - Qp7_0 = -pd * (xg_ac - phi_p7) - Qb_tmp; - - phi_p8 = `Phiy(0.8); - `PhiToQb(phi_p8,Qb_tmp) - Qp8_0 = -pd * (xg_ac - phi_p8) - Qb_tmp; - - phi_p9 = `Phiy(0.9); - `PhiToQb(phi_p9,Qb_tmp) - Qp9_0 = -pd * (xg_ac - phi_p9) - Qb_tmp; - - if (sigVds < 0) begin - `swap(Qp1_0, Qp9_0) - `swap(Qp2_0, Qp8_0) - `swap(Qp3_0, Qp7_0) - `swap(Qp4_0, Qp6_0) - end - end - end // (x_g >0) - end // (SWNQS_i != 0) - - x_sp = 0.0; - x_dp = 0.0; - Qp0 = 0.0; - QpN = 0.0; - if (SWNQS_i != 0.0) begin - x_sp = x_m_ac - sigVds * 0.5 * dps_ac * inv_phit1; - x_dp = x_m_ac + sigVds * 0.5 * dps_ac * inv_phit1; - Qp0 = 0.0; - QpN = 0.0; - if (x_sp > 0) begin - `PhiToQb(x_sp, QbSIGN) - Qp0 = -pd * (xg_ac - x_sp) - QbSIGN; - end - if (x_dp > 0) begin - `PhiToQb(x_dp, QbSIGN) - QpN = -pd * (xg_ac - x_dp) - QbSIGN; - end - end diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_nqs_macrodefs.include b/ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_nqs_macrodefs.include deleted file mode 100644 index 7bd812e7..00000000 --- a/ihp-sg13g2/libs.tech/xyce/adms/psp103/PSP103_nqs_macrodefs.include +++ /dev/null @@ -1,125 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: PSP103_nqs_macrodefs.include -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and -// 2004-2011 Arizona State University Licensed under the Educational Community License, -// Version 2.0 (the "License"); you may not use this file except in compliance with the -// License. You may obtain a copy of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 103.6.0 (PSP), 200.5.0 (JUNCAP), December 2017 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - -////////////////////////////////////////// -// -// Macros used in PSP-NQS -// -////////////////////////////////////////// - -// Function to calculate bulk charge from surface potential -`define PhiToQb(phi,Qb_tmp) \ -if (abs(phi) <= margin_ac) \ - Qb_tmp = -0.70710678 * phi * Gf_ac * (1.0 - `oneSixth * phi * (1.0 - `oneSixth * phi)); \ -else begin \ - `expl((-phi), temp) \ - Qb_tmp = Gf_ac * sqrt(temp + phi - 1.0); \ - if (phi > margin_ac) \ - Qb_tmp = -Qb_tmp; \ -end - -// Function used in fq-macro -`define PhiTod2Qis(xphi,d2Qis) \ -if (abs(xphi) <= margin_ac) begin \ - Qb_tmp = -0.70710678 * xphi * Gf_ac * (1.0 - `oneSixth * xphi * (1.0 - `oneSixth * xphi)); \ - dQbs = -0.70710678 * Gf_ac * (1.0 - `oneThird * xphi * (1.0 - 0.25 * xphi)); \ - d2Qis = -0.235702 * Gf_ac * (1.0 - 0.5 * xphi); \ -end else begin \ - `expl((-xphi),temp) \ - Qb_tmp = Gf_ac * sqrt(temp + xphi - 1.0); \ - if (xphi > margin_ac) \ - Qb_tmp = -Qb_tmp; \ - dQbs = 0.5 * Gf_ac * Gf_ac * (1.0 - temp) / Qb_tmp; \ - d2Qis = (dQbs * dQbs - 0.5 * Gf_ac * Gf_ac) / Qb_tmp + dQbs; \ -end - - -// Function used in QiToPhi -`define sps(sp, xg) \ -if (abs(xg) <= marginp) begin \ - sp = xg / a_factrp; \ -end else begin \ - if (xg < -marginp) begin \ - NQS_yg = -xg; \ - NQS_z = 1.25 * NQS_yg / a_factrp; \ - NQS_eta = (NQS_z + 10.0 - sqrt((NQS_z - 6.0) * (NQS_z - 6.0) + 64.0)) * 0.5; \ - NQS_a = (NQS_yg - NQS_eta) * (NQS_yg - NQS_eta) + Gp2 * (NQS_eta + 1.0); \ - NQS_c = 2.0 * (NQS_yg - NQS_eta) - Gp2; \ - NQS_tau = ln(NQS_a / Gp2) - NQS_eta; \ - `sigma(NQS_a, NQS_c, NQS_tau, NQS_eta, NQS_y0) \ - `expl(NQS_y0, NQS_D0) \ - NQS_xi = 1.0 - Gp2 * NQS_D0 * 0.5; \ - NQS_p = 2.0 * (NQS_yg - NQS_y0) + Gp2 * (NQS_D0 - 1.0); \ - NQS_q = (NQS_yg - NQS_y0) * (NQS_yg - NQS_y0) + Gp2 * (NQS_y0 + 1.0 - NQS_D0); \ - NQS_temp = NQS_p * NQS_p - 4.0 * NQS_xi * NQS_q; \ - NQS_w = 2.0 * NQS_q / (NQS_p + sqrt(NQS_temp)); \ - sp = -(NQS_y0 + NQS_w); \ - end else begin \ - NQS_xg1 = 1.0 / ( 1.25 + 7.32464877560822e-01 * Gp); \ - NQS_A_fac = (1.25 * a_factrp * NQS_xg1 - 1.0) * NQS_xg1; \ - NQS_xbar = xg / a_factrp * (1.0 + NQS_A_fac * xg); \ - `expl(-NQS_xbar, NQS_temp) \ - NQS_w = 1.0 - NQS_temp; \ - NQS_x0 = xg + Gp2 * 0.5 - Gp * sqrt(xg + Gp2 * 0.25 - NQS_w); \ - `expl((-NQS_x0), NQS_D0) \ - NQS_xi = 1.0 - Gp2 * 0.5 * NQS_D0; \ - NQS_p = 2.0 * (xg - NQS_x0) + Gp2 * (1.0 - NQS_D0); \ - NQS_q = (xg - NQS_x0) * (xg - NQS_x0) - Gp2 * (NQS_x0 - 1.0 + NQS_D0); \ - NQS_temp = NQS_p * NQS_p - 4.0 * NQS_xi * NQS_q; \ - NQS_u = 2.0 * NQS_q / (NQS_p + sqrt(NQS_temp)); \ - sp = NQS_x0 + NQS_u; \ - end \ -end - - -// Function to calculate surface potential from inversion charge -`define QiToPhi(Qi,xg,xphi) \ - temp = Qi / pd + xg; \ - `sps(xphi,temp) - -// Calculation of fk -`define fq(Qi,xg,dQy,d2Qy,fk) \ - `QiToPhi(Qi, xg, xphi) \ - `PhiTod2Qis(xphi, d2Qis) \ - dQis = pd - dQbs; \ - dQis_1 = 1.0 / dQis; \ - fQi = Qi * dQis_1 - 1.0; \ - dfQi = (1.0 - Qi * d2Qis * dQis_1 * dQis_1) * dQis_1; \ - fk0 = dfQi * dQy * dQy + fQi * d2Qy; \ - dpsy2 = dQy * dQy * dQis_1 * dQis_1; \ - zsat_nqs = thesat2 * dpsy2; \ - if (CHNL_TYPE == `PMOS) \ - zsat_nqs = zsat_nqs / (1.0 + thesat1_ac * dps_ac); \ - temp = sqrt(1.0 + 2.0 * zsat_nqs); \ - Fvsat = 2.0 / (1.0 + temp); \ - temp1 = d2Qy - dpsy2 * d2Qis; \ - fk = Fvsat * (fk0 - zsat_nqs * fQi * temp1 * Fvsat / temp); - -// Interpolation of surface potential along channel -`define Phiy(y) \ - x_m_ac + H_ac * (1.0 - sqrt(1.0 - 2.0 * dps_ac / H_ac * ((y) - ym))) * inv_phit1 diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/psp103_nqs.va b/ihp-sg13g2/libs.tech/xyce/adms/psp103/psp103_nqs.va deleted file mode 100644 index 99b2c0ab..00000000 --- a/ihp-sg13g2/libs.tech/xyce/adms/psp103/psp103_nqs.va +++ /dev/null @@ -1,56 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: psp103_nqs.va -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and -// 2004-2011 Arizona State University Licensed under the Educational Community License, -// Version 2.0 (the "License"); you may not use this file except in compliance with the -// License. You may obtain a copy of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 103.6.0 (PSP), 200.5.0 (JUNCAP), December 2017 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - -`include "discipline.h" - -//`define NQSmodel true - -`include "Common103_macrodefs.include" - -`include "JUNCAP200_macrodefs.include" - -`include "PSP103_macrodefs.include" - -// Note: some verilog-A compilers have problems handling the ddx-operator, -// which occurs in definition of OP-output variables. If the line below is -// commented out, all OP-output variables using the ddx-operator are skipped. -`define OPderiv - -///////////////////////////////////////////////////////////////////////////// -// -// PSP global model code -// -///////////////////////////////////////////////////////////////////////////// - -`include "PSP103_nqs_macrodefs.include" - -module PSPNQS103VA(D, G, S, B); - -`include "PSP103_module.include" - -endmodule diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/psp103t.va b/ihp-sg13g2/libs.tech/xyce/adms/psp103/psp103t.va deleted file mode 100644 index 4526d86e..00000000 --- a/ihp-sg13g2/libs.tech/xyce/adms/psp103/psp103t.va +++ /dev/null @@ -1,54 +0,0 @@ -//====================================================================================== -//====================================================================================== -// Filename: psp103t.va -//====================================================================================== -//====================================================================================== -// -// (c) Copyright notice -// -// Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique -// et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and -// 2004-2011 Arizona State University Licensed under the Educational Community License, -// Version 2.0 (the "License"); you may not use this file except in compliance with the -// License. You may obtain a copy of the License at -// http://opensource.org/licenses/ECL-2.0 -// Unless required by applicable law or agreed to in writing, software distributed under -// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -// ANY KIND, either express or implied. See the License for the specific language -// governing permissions and limitations under the License. -// -// -// Version: 103.6.0 (PSP), 200.5.0 (JUNCAP), December 2017 -// -//====================================================================================== -//====================================================================================== -// -// Further information can be found in the file releasenotesPSP103.txt -// - -`include "discipline.h" - -`define SelfHeating true - -`include "Common103_macrodefs.include" - -`include "JUNCAP200_macrodefs.include" - -`include "PSP103_macrodefs.include" - -// Note: some verilog-A compilers have problems handling the ddx-operator, -// which occurs in definition of OP-output variables. If the line below is -// commented out, all OP-output variables using the ddx-operator are skipped. -`define OPderiv - -///////////////////////////////////////////////////////////////////////////// -// -// PSP global model code -// -///////////////////////////////////////////////////////////////////////////// - -module PSP103TVA(D, G, S, B, DT); - -`include "PSP103_module.include" - -endmodule diff --git a/ihp-sg13g2/libs.tech/xyce/adms/psp103/releasenotesPSP103p6.txt b/ihp-sg13g2/libs.tech/xyce/adms/psp103/releasenotesPSP103p6.txt deleted file mode 100644 index 7eb88a77..00000000 --- a/ihp-sg13g2/libs.tech/xyce/adms/psp103/releasenotesPSP103p6.txt +++ /dev/null @@ -1,151 +0,0 @@ - -====================================================================================== -====================================================================================== - Silicon Integration Initiative (Si2) - Compact Model Coalition In-Code Statement - - Copyright 2004-2017 NXP Semiconductors, 2015-2017 Commissariat a l’energie atomique - et aux energies alternatives (CEA), 2012-2015 Delft University of Technology and - 2004-2011 Arizona State University Licensed under the Educational Community License, - Version 2.0 (the "License"); you may not use this file except in compliance with the - License. You may obtain a copy of the License at - http://opensource.org/licenses/ECL-2.0 - Unless required by applicable law or agreed to in writing, software distributed under - the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF - ANY KIND, either express or implied. See the License for the specific language - governing permissions and limitations under the License. - This work is licensed under the Creative Commons Attribution 4.0 International License. - To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or - send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. - - CMC In-Code Statement Revision: 103.6.0 (PSP), 12/14/2017 - 200.5.0 (JUNCAP),09/09/2016 - -====================================================================================== -====================================================================================== - - Authors: G.D.J. Smit, A.J. Scholten, and D.B.M. Klaassen (NXP Semiconductors) - O. Rozeau, S. Martinie, T. Poiroux, J.C. Barbé (CEA-Leti) - - Former contributers: - G. Gildenblat, W. Yao, Z. Zhu, X. Li and W. Wu (Arizona State University) - R. van Langevelde (Philips Research) - R. van der Toorn (Delft University of Technology) - - The most recent version of the model code, the documentation, and contact - information can be found on: - - http://www.cea.fr/cea-tech/leti/pspsupport - -====================================================================================== -====================================================================================== - -This package consists of the following files: - - - releasenotesPSP103.txt This file - - - psp103.va Main file for PSP model - - psp103t.va Main file for PSP model with self heating - - psp103_nqs.va Main file for PSP model with NQS-effects - - juncap200.va Main file for JUNCAP2 stand-alone model - - - Common103_macrodefs.include Common macro definitions - - PSP103_macrodefs.include Macro definitions for PSP - - PSP103_module.include Actual model code for intrinsic MOS model - - PSP103_SPCalculation.include Surface potential and related calculations - - PSP103_binning.include Geometry scaling equation for binning - - PSP103_binpars.include Parameterlist for global PSP binning model - - PSP103_nqs_macrodefs.include Macro definitions for PSP-NQS - - PSP103_InitNQS.include PSP-NQS initialization code - - PSP103_ChargesNQS.include Calculation of NQS-charge contributions - - JUNCAP200_macrodefs.include Macro definitions for JUNCAP2 model - - JUNCAP200_parlist.include JUNCAP2 parameter list - - JUNCAP200_varlist1.include JUNCAP2 variable declarations - - JUNCAP200_varlist2.include JUNCAP2 variable declarations - - JUNCAP200_InitModel.include JUNCAP2 model initialization code - -====================================================================================== -====================================================================================== - -Usage ------ - -Depending which model one wants to use, one should compile one of the four .va-files -(psp103.va, psp103t.va, psp103_nqs.va, and juncap200.va). The module names are -"PSP103VA", "PSP103TVA", and "PSPNQS103VA" (for QS, self heating, and NQS, -respectively), and "JUNCAP200" for the JUNCAP2-model. - - -====================================================================================== -====================================================================================== - -Release notes vA-code of PSP 103.6.0 (December 2017) ---------------------------------------------------------- - -Changes include 2 bug fixes, new modeling of interface states, new parameter for edge -scaling rules and new clipping values of local parameters: - - Induced gate noise: clipped value of migid in line with c_igid - - Thermal noise of edge transistor: bug fix to avoid possible division by zero - during the calculation of redge. - - Improvement of gm/Id in weak inversion: new model of interface states. - - Addition of new parameter NSUBEDGELEXP: exponent for channel length dependence - of edge transistor substrate doping. - - Minimum values of calculated local parameters NOV and NOVD in global mode: now in - lines with minimum values of local model parameters. - -- PSP103_macrodefs.include: - - Calculation of phit0 is cancelled, temperature dependence of interface states is - now calculated using the variable CT_T: lines 356 to 359 - -- PSP103_module.include: - - Addition of new local parameters related to the new model of interface states - CTG, CTB and STCT: lines 181 to 185 - - Addition of new global parameters related to the new model of interface states - CTGO, CTBO and STCTO: lines 392 to 400 - - Addition of new global parameter related to edge transistor doping NSUBEDGELEXP: - line 552 - - Addition of new variable declarations CTG_p, CTB_p, STCT_p, CT_i, CTG_i, CTB_i, - STCT_i, CT_T, tf_ct, migid0: lines 732 to 777 - - Cancelling of the variable declaration phit0. This variable is not used. - - New variable declarations for OP info related to interface states model: lines - 908 to 910 - - Calculation of CTG_p, CTB_p, STCT_p: lines 1238 to 1240 and lines 1379 to 1383 - - Addition of an exponent parameter NSUBEDGELEXP in calculation of NEFFEDGE_p: - line 1490 - - Calculation of CTG_i, CTB_i and STCT_i: lines 1621 to 1623 - - modification of min clipping values of NOV_i and NOVD_i, now in line with local - parameters: lines 1618 and 1619 - - Addition of new variable declarations xgct, xsct0, xbct, xsbstar, xsct, dCTG, - and ct_fact in section evaluateblock: line 2045 - - - Modification of a condition: line 2750 - "if (SWIGN_i == 1) begin" is replaced by - "if ((SWIGN_i == 1) && (nt > 0.0)) begin" - - Changing of variable: migid is replaced by migid0, lines 2754, 2758 and 2764 - - New calculation of migid: "migid = c_igid * sqid / sqig;", line 2767 - - New calculation of redge to avoid division by zero: lines 2814 to 2818 - - Affectation of variables for OP info related to the new model of interface states - lp_ctg, lp_ctb, lp_stct: lines 3117 to 3119 - -- PSP103_SPCalculation.include: - - Modification of calculation of phit1 and inv_phit1 including new model of - interface states: lines 74 to 91 - -- PSP103_binpars.include: - - Addition of new binning parameters related to the new model of interface states - POCTG, POCTB and POSTCT: lines 84 to 91 - -- PSP103_binning.include: - - Addition of local parameter calculation related to the new model of interface - states CTG_p, CTB_p, STCT_p: lines 73 to 77 - -PSP 103.6.0 is backwards compatible with the previous version, PSP 103.5.0 - - -====================================================================================== -====================================================================================== - -The authors want to thank Laurent Lemaitre and Colin McAndrew (Freescale) -for their help with ADMS and the implementation of the model code. Geoffrey -Coram (Analog Devices) is acknowledged for input concerning the Verilog-A -implementation of the model. From bac1a67a9c18d7c21eccc9d419b10f6b72006d4f Mon Sep 17 00:00:00 2001 From: Dietmar Warning Date: Tue, 21 Jan 2025 18:06:10 +0100 Subject: [PATCH 3/4] correct r3_cmc terminal order Signed-off-by: Dietmar Warning --- ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib | 6 +++--- .../libs.tech/ngspice/models/resistors_mod_mismatch.lib | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib index d7d707fa..5a72a878 100644 --- a/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib +++ b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib @@ -56,7 +56,7 @@ R1 1 2 R=r*res_rpara TC1=TC1 TC2=TC2 +rqrc=4.5e-6 +rz=rzspec/w*rsh_rsil-(postsim>0)*rqrc/w -NR1 1 2 0 dt rmod_rsil L=leff W=weff m=m +NR1 1 0 2 dt rmod_rsil L=leff W=weff m=m +a1=a a2=a +p1=p p2=p +c1=1 c2=1 @@ -114,7 +114,7 @@ R2 2 3 R=res_rzspec TC1=3100e-6 TC2=0.3e-6 m=m +rqrc=4.5e-6 +rz=rzspec/w*rsh_rhigh-(postsim>0)*rqrc/w -NR1 1 2 0 dt rmod_rhigh L=leff W=weff m=m +NR1 1 0 2 dt rmod_rhigh L=leff W=weff m=m +a1=a a2=a +p1=p p2=p +c1=1 c2=1 @@ -170,7 +170,7 @@ R2 2 3 R=res_rzspec TC1=-2300e-6 TC2=2.1e-6 m=m +rqrc=4.5e-6 +rz=rzspec/w*rsh_rppd-(postsim>0)*rqrc/w -NR1 1 2 0 dt res_rppd L=leff W=weff m=m +NR1 1 0 2 dt res_rppd L=leff W=weff m=m +a1=a a2=a +p1=p p2=p +c1=1 c2=1 diff --git a/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib index e4c79ad2..9de32a95 100644 --- a/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib +++ b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib @@ -56,7 +56,7 @@ R1 1 2 R=r*res_rpara TC1=TC1 TC2=TC2 +rqrc=4.5e-6 +rz=rzspec/w*rsh_rsil-(postsim>0)*rqrc/w -NR1 1 2 0 dt rmod_rsil L=leff W=weff m=m +NR1 1 0 2 dt rmod_rsil L=leff W=weff m=m +a1=a a2=a +p1=p p2=p +c1=1 c2=1 @@ -121,7 +121,7 @@ R2 2 3 R=res_rzspec TC1=3100e-6 TC2=0.3e-6 m=m +rqrc=4.5e-6 +rz=rzspec/w*rsh_rhigh-(postsim>0)*rqrc/w -NR1 1 2 0 dt rmod_rhigh L=leff W=weff m=m +NR1 1 0 2 dt rmod_rhigh L=leff W=weff m=m +a1=a a2=a +p1=p p2=p +c1=1 c2=1 @@ -184,7 +184,7 @@ R2 2 3 R=res_rzspec TC1=-2300e-6 TC2=2.1e-6 m=m +rqrc=4.5e-6 +rz=rzspec/w*rsh_rppd-(postsim>0)*rqrc/w -NR1 1 2 0 dt res_rppd L=leff W=weff m=m +NR1 1 0 2 dt res_rppd L=leff W=weff m=m +a1=a a2=a +p1=p p2=p +c1=1 c2=1 From af8e639c1e56f8f48381b37cdf690cbfa0c49959 Mon Sep 17 00:00:00 2001 From: Dietmar Warning Date: Tue, 21 Jan 2025 22:33:18 +0100 Subject: [PATCH 4/4] correct contact resistance for r3_cmc Signed-off-by: Dietmar Warning --- ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib | 6 +++--- .../libs.tech/ngspice/models/resistors_mod_mismatch.lib | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib index 5a72a878..8ca8d6c0 100644 --- a/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib +++ b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib @@ -54,7 +54,7 @@ R1 1 2 R=r*res_rpara TC1=TC1 TC2=TC2 +p=(p0>0)*p0 +rshspec=7 +rqrc=4.5e-6 -+rz=rzspec/w*rsh_rsil-(postsim>0)*rqrc/w ++rz=rzspec/w-(postsim>0)*rqrc/w NR1 1 0 2 dt rmod_rsil L=leff W=weff m=m +a1=a a2=a @@ -112,7 +112,7 @@ R2 2 3 R=res_rzspec TC1=3100e-6 TC2=0.3e-6 m=m +p=(p0>0)*p0 +rshspec=1360 +rqrc=4.5e-6 -+rz=rzspec/w*rsh_rhigh-(postsim>0)*rqrc/w ++rz=rzspec/w-(postsim>0)*rqrc/w NR1 1 0 2 dt rmod_rhigh L=leff W=weff m=m +a1=a a2=a @@ -168,7 +168,7 @@ R2 2 3 R=res_rzspec TC1=-2300e-6 TC2=2.1e-6 m=m +p0=leff+lhead+w-(postsim>0)*px*1e-6 +p=(p0>0)*p0 +rqrc=4.5e-6 -+rz=rzspec/w*rsh_rppd-(postsim>0)*rqrc/w ++rz=rzspec/w-(postsim>0)*rqrc/w NR1 1 0 2 dt res_rppd L=leff W=weff m=m +a1=a a2=a diff --git a/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib index 9de32a95..e169954b 100644 --- a/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib +++ b/ihp-sg13g2/libs.tech/ngspice/models/resistors_mod_mismatch.lib @@ -54,7 +54,7 @@ R1 1 2 R=r*res_rpara TC1=TC1 TC2=TC2 +p=(p0>0)*p0 +rshspec=7 +rqrc=4.5e-6 -+rz=rzspec/w*rsh_rsil-(postsim>0)*rqrc/w ++rz=rzspec/w-(postsim>0)*rqrc/w NR1 1 0 2 dt rmod_rsil L=leff W=weff m=m +a1=a a2=a @@ -119,7 +119,7 @@ R2 2 3 R=res_rzspec TC1=3100e-6 TC2=0.3e-6 m=m +p=(p0>0)*p0 +rshspec=1360 +rqrc=4.5e-6 -+rz=rzspec/w*rsh_rhigh-(postsim>0)*rqrc/w ++rz=rzspec/w-(postsim>0)*rqrc/w NR1 1 0 2 dt rmod_rhigh L=leff W=weff m=m +a1=a a2=a @@ -182,7 +182,7 @@ R2 2 3 R=res_rzspec TC1=-2300e-6 TC2=2.1e-6 m=m +p0=leff+lhead+w-(postsim>0)*px*1e-6 +p=(p0>0)*p0 +rqrc=4.5e-6 -+rz=rzspec/w*rsh_rppd-(postsim>0)*rqrc/w ++rz=rzspec/w-(postsim>0)*rqrc/w NR1 1 0 2 dt res_rppd L=leff W=weff m=m +a1=a a2=a