Skip to content

Commit

Permalink
Merge pull request #338 from dwarning/res_r3_model
Browse files Browse the repository at this point in the history
Res r3 model issue #318
  • Loading branch information
sergeiandreyev authored Feb 7, 2025
2 parents 7bdd49c + af8e639 commit 9681b01
Show file tree
Hide file tree
Showing 62 changed files with 2,697 additions and 7,356 deletions.
2 changes: 1 addition & 1 deletion ihp-sg13g2/libs.tech/klayout/python/pypreprocessor
3 changes: 2 additions & 1 deletion ihp-sg13g2/libs.tech/ngspice/.spiceinit
Original file line number Diff line number Diff line change
Expand Up @@ -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'

67 changes: 50 additions & 17 deletions ihp-sg13g2/libs.tech/ngspice/models/cornerRES.lib
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
*#######################################################################
*
* 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.
*
*#######################################################################
* 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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
191 changes: 162 additions & 29 deletions ihp-sg13g2/libs.tech/ngspice/models/resistors_mod.lib
Original file line number Diff line number Diff line change
@@ -1,73 +1,206 @@
*#######################################################################
*
* 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.
*
*#######################################################################

.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-(postsim>0)*rqrc/w

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
+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-(postsim>0)*rqrc/w

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
+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-(postsim>0)*rqrc/w

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
+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
Loading

0 comments on commit 9681b01

Please sign in to comment.