Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix diodes and bjts #5

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8ed2664
Corrected a bad "include" line in sky130_fd_pr__nfet_05v0_nvt.pm3.spice.
RTimothyEdwards Jul 10, 2023
be6d00e
Added the continuous models from the original pull request on the Goo…
RTimothyEdwards Jul 11, 2023
7ddb22f
Merge pull request #1 from efabless/develop_07_10
RTimothyEdwards Jul 11, 2023
dfcebee
Ran all of the open_pdks patches and fix scripts not including the pr…
RTimothyEdwards Jul 15, 2023
e3c1e06
Merge pull request #2 from efabless/develop_07_14
RTimothyEdwards Jul 15, 2023
3720f7f
Corrected the long-time problem with the erroneous name "pfet_pass",
RTimothyEdwards Jul 16, 2023
682e6a4
Merge pull request #3 from efabless/develop_07_16
RTimothyEdwards Jul 16, 2023
d736a5c
Monte carlo update and other fixes.
RTimothyEdwards Jul 19, 2023
7e2bb61
Merge pull request #4 from efabless/develop_07_19
RTimothyEdwards Jul 19, 2023
ad76569
Corrected an error in sky130_fd_pr__nfet_g5v0d16v0__ss_discrete.corne…
RTimothyEdwards Oct 10, 2023
69cccc2
Merge pull request #8 from efabless/fix_nfet_ss_model_syntax_error
RTimothyEdwards Oct 10, 2023
b76aad1
Corrected the NPN corner includes, matching what was done for PNPs,
RTimothyEdwards Oct 26, 2023
0187549
Merge pull request #9 from efabless/fix_npn_includes
RTimothyEdwards Oct 26, 2023
67f2775
Corrected parameter name "nfet_20v0_nvt_iso" which is in the set
RTimothyEdwards Nov 14, 2023
b42c310
Merge pull request #10 from efabless/fix_20v_nfet_param
RTimothyEdwards Nov 14, 2023
e4bf90b
Copied some missing parameters from the discrete models to the
RTimothyEdwards Nov 18, 2023
223af0c
Merge pull request #11 from efabless/fix_combined_monte_carlo_params
RTimothyEdwards Nov 18, 2023
eb95704
Corrected all occurrences of "sqrt(m)" in the continuous models'
RTimothyEdwards Jan 18, 2024
c2bfb91
Merge pull request #12 from efabless/fix_bjt_mult
RTimothyEdwards Jan 18, 2024
95f86d7
Changed "temp" to "temper" in the continuous pwell resistor model for
RTimothyEdwards Jan 19, 2024
ba9a9cc
Merge pull request #13 from efabless/fix_temp_to_temper
RTimothyEdwards Jan 19, 2024
92a98f6
Corrected the include lines for the discrete model files in the combi…
RTimothyEdwards Feb 5, 2024
f026b2d
One additional correction to remove two suffixes that are not part of
RTimothyEdwards Feb 5, 2024
27fe352
Merge pull request #14 from efabless/fix_combined_model_includes
RTimothyEdwards Feb 5, 2024
1685e74
Several additional fixes related to yesterday's commit. The
RTimothyEdwards Feb 6, 2024
231ef77
Merge pull request #15 from efabless/fix_model_includes_addendum
RTimothyEdwards Feb 6, 2024
405ca5f
Added the nFET and pFET devices used in standard cells that are less …
RTimothyEdwards Feb 11, 2024
be000a2
Merge pull request #16 from efabless/add_stdcell_fets
RTimothyEdwards Feb 11, 2024
3a608a8
Added diode subcircuit models to the original discrete model set
RTimothyEdwards Mar 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion cells/cap_mim_m3/sky130_fd_pr__cap_mim_m3_1.model.spice
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
.param r2 = 'rcvia3/num_contacts'
.param carea = 'camimc*(wc)*(lc)'
.param cperim = 'cpmimc*((wc)+(lc))*2'
.param czero = 'carea + cperim' dev/gauss='0.01*2.8*(carea + cperim)/sqrt(wc*lc*mf)'
.param czero = 'carea + cperim+MC_MM_SWITCH*AGAUSS(0,1.0,1)*0.01*2.8*(carea + cperim)/sqrt(wc*lc*mf)'
c1 c0 a 'czero' tc1 = 0 tc2 = 0.0
rs1 a b1 'r1' tc1 = {tc1rm3} tc2 = {tc2rm3}
rs2 b1 c1 'r2' tc1 = {tc1rvia3} tc2 = {tc2rvia3}
Expand Down
2 changes: 1 addition & 1 deletion cells/cap_mim_m3/sky130_fd_pr__cap_mim_m3_2.model.spice
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
.param r2 = 'rcvia4/num_contacts'
.param carea = 'camimc*(wc)*(lc)'
.param cperim = 'cpmimc*((wc)+(lc))*2'
.param czero = 'carea + cperim' dev/gauss='0.01*2.8*(carea + cperim)/sqrt(wc*lc*mf)'
.param czero = 'carea + cperim+MC_MM_SWITCH*AGAUSS(0,1.0,1)*0.01*2.8*(carea + cperim)/sqrt(wc*lc*mf)'
c1 c0 a 'czero' tc1 = 0 tc2 = 0.0
rs1 a b1 'r1' tc1 = {tc1rm4} tc2 = {tc2rm4}
rs2 b1 c1 'r2' tc1 = {tc1rvia4} tc2 = {tc2rvia4}
Expand Down
12 changes: 6 additions & 6 deletions cells/cap_var_hvt/sky130_fd_pr__cap_var_hvt.model.spice
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
.param cnwvc_slope2=0.35
.param
+ cm0='5.828e-16*cnwvc2_cintmult'
+ cm1=4.596e-16 dev/gauss='sky130_fd_pr__cap_var_hvt__cmin_slope_l/sqrt(2*ld*vm)'
+ cm2=1.614e-16 dev/gauss='sky130_fd_pr__cap_var_hvt__cmin_slope_w/sqrt(2*wd*vm)'
+ cm3='1.541e-15*cnwvc2_cdepmult' dev/gauss='sky130_fd_pr__cap_var_hvt__cmin_slope_wl*cnwvc2_cdepmult/sqrt(2*ld*wd*vm)'
+ cm1='4.596e-16+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_hvt__cmin_slope_l/sqrt(2*ld*vm)'
+ cm2='1.614e-16+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_hvt__cmin_slope_w/sqrt(2*wd*vm)'
+ cm3='1.541e-15*cnwvc2_cdepmult+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_hvt__cmin_slope_wl*cnwvc2_cdepmult/sqrt(2*ld*wd*vm)'
+ cx0=6.778e-16
+ cx1=6.461e-16 dev/gauss='sky130_fd_pr__cap_var_hvt__cmax_slope_l/sqrt(2*ld*vm)'
+ cx2=1.517e-16 dev/gauss='sky130_fd_pr__cap_var_hvt__cmax_slope_w/sqrt(2*wd*vm)'
+ cx3='8.854e-14*3.9/cnwvc2_tox' dev/gauss='sky130_fd_pr__cap_var_hvt__cmax_slope_wl/sqrt(2*ld*wd*vm)'
+ cx1='6.461e-16+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_hvt__cmax_slope_l/sqrt(2*ld*vm)'
+ cx2='1.517e-16+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_hvt__cmax_slope_w/sqrt(2*wd*vm)'
+ cx3='8.854e-14*3.9/cnwvc2_tox+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_hvt__cmax_slope_wl/sqrt(2*ld*wd*vm)'
+ sky130_fd_pr__cap_var_hvt__vgs_min_1 = '-2.071'
+ sky130_fd_pr__cap_var_hvt__vgs_max_1 = '-1*-2.071'
+ sky130_fd_pr__cap_var_hvt__tmax_vgs_1 = '100.001n'
Expand Down
159 changes: 159 additions & 0 deletions cells/cap_var_hvt/sky130_fd_pr__cap_var_hvt.model.va
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
// Copyright 2020 The SkyWater 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 "discipline.h"
`include "constants.h"

// VerilogA model for varactor
module sky130_fd_pr__cap_var_hvt(poly, nwell, sub);

inout nwell;
electrical nwell;

inout poly;
electrical poly;

inout sub;
electrical sub;

parameter real w = 1;
parameter real l = 1;
parameter real vm = 1; //vm passed from subckt, if higher level subckt used will not receive this mult factor.
parameter real cnwvc2_tox = 41.7642;
parameter real cnwvc2_cdepmult=1;
parameter real cnwvc2_cintmult=1;
parameter real cnwvc2_vt1=0.2;
parameter real cnwvc2_vt2=0.33;
parameter real cnwvc2_vtr=0.14;
parameter real cnwvc2_dwc=0.0;
parameter real cnwvc2_dlc=0.0;
parameter real cnwvc2_dld=0.0;
parameter real rp1 = 48.2;
parameter real rcp1 = 150;
parameter real rnw = 1800;
parameter real rcn = 182;
parameter real cm0=5.828e-16*cnwvc2_cintmult;
parameter real cm1=4.596e-16;
parameter real cm2=1.614e-16;
parameter real cm3=1.541e-15*cnwvc2_cdepmult;
parameter real cx0=6.778e-16;
parameter real cx1=6.461e-16;
parameter real cx2=1.517e-16;
parameter real cx3=8.854e-14*3.9/cnwvc2_tox;
parameter real slope_0=1.808e-17;
parameter real slope_0_tc1=7.2181e-20;
parameter real slope_0_tc2=-1.9745e-21;
parameter real slope_w=-3.169e-17;
parameter real slope_w_tc1=-1.4465e-19;
parameter real slope_w_tc2=3.5187e-21;
parameter real slope_l=-7.435e-17;
parameter real slope_l_tc1=-4.4474e-19;
parameter real slope_l_tc2=7.3824e-21;
parameter real slope_wl=2.509e-16;
parameter real slope_wl_tc1=-1.0793e-18;
parameter real slope_wl_tc2=-2.2625e-20;

real cnwvc_ldiff;
real wc,lc,wd,ld,ldd,dwr,dwp,dlr,wl,wlwdiff;
real cnwvc_slope1,cnwvc_slope2;
real cmin,cmax,cval1,cval2;
real con_sp;
real n_pocon,n_con;
real cnwvc_n1,cnwvc_n2;
real cPolySub,cNwellSub;
real cnwvc_k;
real cnwvc_a,cnwvc_b1,cnwvc_c;
real acon,apoly,apolyc;
real anwell,bnwell,cnwell;
real c0,c1,q;
real tc1,tc2;
real rgvalue,rg_nominal;
real v;
real treference;
real temp_celcius;
real cmin_slope_0;
real cmin_slope_w;
real cmin_slope_l;
real cmin_slope_wl;
real cmin_slope;

// Internal nodes
electrical v1 ;

analog begin
treference=30.0;
cnwvc_ldiff=0.15;
wc=1*w;
lc=1*l;
wd=wc+2*cnwvc2_dwc;
ld=lc+2*cnwvc2_dlc;
ldd=0.015+2*cnwvc2_dld;
dwr=0.0;
dwp=0.0;
dlr=0.03;
wl=(wd-2*dwr)/(ld-2*dlr);
wlwdiff=((0.5*(ld-2*dlr))+cnwvc_ldiff)/(2*(wd-2*dwr));
cnwvc_slope1=0.15;
cnwvc_slope2=0.35;
cmin=cm0+cm1*ld+cm2*wd+cm3*wd*(ld-ldd)+cx3*wd*ldd;
cmax=cx0+cx1*ld+cx2*wd+cx3*wd*ld;
cval1=0.5*(cmax+cmin);
cval2=0.5*(cmax-cmin);
con_sp=0.17;
cnwvc_k=12;
cnwvc_n1=0.2;
cnwvc_n2=0.35;
apoly=1.1;
apolyc=1.1;
acon=1;
anwell=1;
bnwell=0.5;
cnwell=0.3;
n_pocon=max((l-0.14)/(2*con_sp),1); //numbers of poly contact
n_con=(w-2*0.06+con_sp)/(2*con_sp);
cPolySub=0.15e-15;
cNwellSub=0.15e-15;

cnwvc_a=apoly*rp1*wl/cnwvc_k+apolyc*rcp1/n_pocon+acon*rcn/n_con+anwell*rnw*wlwdiff;
cnwvc_b1=bnwell*rnw*cnwvc_ldiff/(2*(wd-2*dwr));
cnwvc_c=cnwell*rnw*cnwvc_ldiff/(2*(wd-2*dwp));

v=V(v1,nwell);

tc1=9.611e-4;
tc2=5.523e-6;

temp_celcius= $temperature-273.15; //$temperature is in Kelvin

cmin_slope_0 = slope_0+(temp_celcius-treference)*slope_0_tc1+(temp_celcius-treference)*(temp_celcius-treference)*slope_0_tc2;
cmin_slope_w = slope_w+(temp_celcius-treference)*slope_w_tc1+(temp_celcius-treference)*(temp_celcius-treference)*slope_w_tc2;
cmin_slope_l = slope_l+(temp_celcius-treference)*slope_l_tc1+(temp_celcius-treference)*(temp_celcius-treference)*slope_l_tc2;
cmin_slope_wl = slope_wl+(temp_celcius-treference)*slope_wl_tc1+(temp_celcius-treference)*(temp_celcius-treference)*slope_wl_tc2;
cmin_slope = cmin_slope_0+cmin_slope_w*wd+cmin_slope_l*ld+cmin_slope_wl*wd*ld;

rg_nominal =(cnwvc_a+cnwvc_b1*(0.5*tanh((v-cnwvc2_vtr)/cnwvc_n1)+0.5)+20*cnwvc_c*(0.5*tanh((v-cnwvc2_vtr)/cnwvc_n1)+0.5)*exp(-abs((v-cnwvc2_vtr)/cnwvc_n2)));
rgvalue = rg_nominal*(1+tc1*(temp_celcius-treference)+tc2*(temp_celcius-treference)*(temp_celcius-treference));

q = cmin_slope*min(v+0.8,0)*min(v+0.8,0)+cval1*v + (cval2/1.9) * (cnwvc_slope1*ln(0.5*((limexp((v-cnwvc2_vt1)/cnwvc_slope1))+limexp(-(v-cnwvc2_vt1)/cnwvc_slope1))) + 0.9*cnwvc_slope2*ln(0.5*((limexp((v-cnwvc2_vt2)/cnwvc_slope2))+limexp(-(v-cnwvc2_vt2)/cnwvc_slope2))));
I(v1,nwell) <+ vm*ddt(q);

V(poly,v1) <+ I(poly,v1)*rgvalue/vm;
V(poly,v1) <+ white_noise( 4*1.38e-23*$temperature*rgvalue/vm, "rg_noise");

//c1 and c2 are the tuning capacitors
I(poly,sub)<+ vm*cPolySub*ddt(V(poly,sub)); // c1 poly sub c=0.15e-15
I(nwell,sub)<+ vm*cNwellSub*ddt(V(nwell,sub)); // c2 nwell sub c=0.15e-15
end

endmodule
12 changes: 6 additions & 6 deletions cells/cap_var_lvt/sky130_fd_pr__cap_var_lvt.model.spice
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
.param cnwvc_slope2=0.125
.param
+ cm0='5.571e-16*cnwvc_cintmult'
+ cm1='4.775e-16' dev/gauss='sky130_fd_pr__cap_var_lvt__cmin_slope_l/sqrt(2*ld*vm)'
+ cm2='2.019e-16' dev/gauss='sky130_fd_pr__cap_var_lvt__cmin_slope_w/sqrt(2*wd*vm)'
+ cm3='6.529e-16*cnwvc_cdepmult' dev/gauss='sky130_fd_pr__cap_var_lvt__cmin_slope_wl*cnwvc_cdepmult/sqrt(2*ld*wd*vm)'
+ cm1='4.775e-16+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_lvt__cmin_slope_l/sqrt(2*ld*vm)'
+ cm2='2.019e-16+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_lvt__cmin_slope_w/sqrt(2*wd*vm)'
+ cm3='6.529e-16*cnwvc_cdepmult+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_lvt__cmin_slope_wl*cnwvc_cdepmult/sqrt(2*ld*wd*vm)'
+ cx0=6.261e-16
+ cx1='5.75e-16' dev/gauss='sky130_fd_pr__cap_var_lvt__cmax_slope_l/sqrt(2*ld*vm)'
+ cx2='1.712e-16' dev/gauss='sky130_fd_pr__cap_var_lvt__cmax_slope_w/sqrt(2*wd*vm)'
+ cx3='8.854e-14*3.9/cnwvc_tox' dev/gauss='sky130_fd_pr__cap_var_lvt__cmax_slope_wl/sqrt(2*wd*ld*vm)'
+ cx1='5.75e-16+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_lvt__cmax_slope_l/sqrt(2*ld*vm)'
+ cx2='1.712e-16+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_lvt__cmax_slope_w/sqrt(2*wd*vm)'
+ cx3='8.854e-14*3.9/cnwvc_tox+MC_MM_SWITCH*AGAUSS(0,1.0,1)*sky130_fd_pr__cap_var_lvt__cmax_slope_wl/sqrt(2*wd*ld*vm)'
+ sky130_fd_pr__cap_var_lvt__vgs_min_1 = '-2.071'
+ sky130_fd_pr__cap_var_lvt__vgs_max_1 = '-1*-2.071'
+ sky130_fd_pr__cap_var_lvt__tmax_vgs_1 = '100.001n'
Expand Down
135 changes: 135 additions & 0 deletions cells/cap_var_lvt/sky130_fd_pr__cap_var_lvt.model.va
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
// Copyright 2020 The SkyWater 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 "discipline.h"
`include "constants.h"

// VerilogA model for varactor
module sky130_fd_pr__cap_var_lvt(poly, nwell, sub);

inout nwell;
electrical nwell;

inout poly;
electrical poly;

inout sub;
electrical sub;

parameter real w = 1;
parameter real l = 1;
parameter real vm = 1; //vm passed from subckt, if higher level subckt used will not receive this mult factor.
parameter real cnwvc_tox = 41.6503;
parameter real cnwvc_cdepmult=1;
parameter real cnwvc_cintmult=1;
parameter real cnwvc_vt1=0.3333;
parameter real cnwvc_vt2=0.2380952;
parameter real cnwvc_vtr=0.16;
parameter real cnwvc_dwc=0.0;
parameter real cnwvc_dlc=0.0;
parameter real cnwvc_dld=0.0;
parameter real rp1 = 48.2;
parameter real rcp1 = 150;
parameter real rnw = 1800;
parameter real rcn = 182;
parameter real cm0=5.571e-16*cnwvc_cintmult;
parameter real cm1=4.775e-16;
parameter real cm2=2.019e-16;
parameter real cm3=6.529e-16*cnwvc_cdepmult;
parameter real cx0=6.261e-16;
parameter real cx1=5.75e-16;
parameter real cx2=1.712e-16;
parameter real cx3=8.854e-14*3.9/cnwvc_tox;

real cnwvc_ldiff;
real wc,lc,wd,ld,ldd,dwr,dwp,dlr,wl,wlwdiff;
real cnwvc_slope1,cnwvc_slope2;
real cmin,cmax,cval1,cval2;
real con_sp;
real n_pocon,n_con;
real cnwvc_n1,cnwvc_n2;
real cPolySub,cNwellSub;
real cnwvc_k;
real cnwvc_a,cnwvc_b1,cnwvc_c;
real acon,apoly,apolyc;
real anwell,bnwell,cnwell;
real c0,c1,q;
real tc1,tc2;
real rgvalue,rg_nominal;
real v;
real treference;
real temp_celcius;

// Internal nodes
electrical v1;

analog begin
treference=30.0;
cnwvc_ldiff=0.15;
wc=1*w;
lc=1*l;
wd=wc+2*cnwvc_dwc;
ld=lc+2*cnwvc_dlc;
ldd=0.018+2*cnwvc_dld;
dwr=-0.02;
dwp=-0.5;
dlr=0.02;
wl=(wd-2*dwr)/(ld-2*dlr);
wlwdiff=((0.5*(ld-2*dlr))+cnwvc_ldiff)/(2*(wd-2*dwr));
cnwvc_slope1=0.21875;
cnwvc_slope2=0.125;
cmin=cm0+cm1*ld+cm2*wd+cm3*wd*(ld-ldd)+cx3*wd*ldd;
cmax=cx0+cx1*ld+cx2*wd+cx3*wd*ld;
cval1=0.5*(cmax+cmin);
cval2=0.5*(cmax-cmin);
con_sp=0.17;
cnwvc_k=12;
cnwvc_n1=0.1;
cnwvc_n2=0.28;
apoly=1.15;
apolyc=1;
acon=1;
anwell=1;
bnwell=0.6;
cnwell=2;
n_pocon=max((l-0.14)/(2*con_sp),1); //numbers of poly contact
n_con=(w-2*0.06+con_sp)/(2*con_sp);
cPolySub=0.15e-15;
cNwellSub=0.15e-15;

cnwvc_a=apoly*rp1*wl/cnwvc_k+apolyc*rcp1/n_pocon+acon*rcn/n_con+anwell*rnw*wlwdiff;
cnwvc_b1=bnwell*rnw*wlwdiff;
cnwvc_c=cnwell*rnw*((0.5*(ld-2*dlr))+cnwvc_ldiff)/(2*(wd-2*dwp));

v=V(v1,nwell);

tc1=3e-3;
tc2=0;

temp_celcius= $temperature-273.15; //$temperature is in Kelvin
rg_nominal =(cnwvc_a+cnwvc_b1*(0.5*tanh((v-cnwvc_vtr)/cnwvc_n1)+0.5)+20*cnwvc_c*(0.5*tanh((v-cnwvc_vtr)/cnwvc_n1)+0.5)*exp(-abs((v-cnwvc_vtr)/cnwvc_n2)));
rgvalue = rg_nominal*(1+tc1*(temp_celcius-treference)+tc2*(temp_celcius-treference)*(temp_celcius-treference));

q = cval1*v + (cval2/1.9) * (cnwvc_slope1*ln(0.5*((limexp((v-cnwvc_vt1)/cnwvc_slope1))+limexp(-(v-cnwvc_vt1)/cnwvc_slope1))) + 0.9*cnwvc_slope2*ln(0.5*((limexp((v-cnwvc_vt2)/cnwvc_slope2))+limexp(-(v-cnwvc_vt2)/cnwvc_slope2))));
I(v1,nwell) <+ vm*ddt(q);

V(poly,v1) <+ I(poly,v1)*rgvalue/vm;
V(poly,v1) <+ white_noise( 4*1.38e-23*$temperature*rgvalue/vm, "rg_noise");

//c1 and c2 are the tuning capacitors
I(poly,sub)<+ vm*cPolySub*ddt(V(poly,sub)); // c1 poly sub c=0.15e-15
I(nwell,sub)<+ vm*cNwellSub*ddt(V(nwell,sub)); // c2 nwell sub c=0.15e-15
end

endmodule
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
+
.param mult = 1.0
+
+ ctot_a = {7.833e-16*sky130_fd_pr__cap_vpp_01p8x01p8_m1m2_noshield__cor+0.85105/sqrt(mult/0.50527)*sky130_fd_pr__cap_vpp_01p8x01p8_m1m2_noshield__slope*7.833e-16*sky130_fd_pr__cap_vpp_01p8x01p8_m1m2_noshield__cor}
*(mismatch parameter sky130_fd_pr__cap_vpp_01p8x01p8_m1m2_noshield__slope)
+ ctot_a = {7.833e-16*sky130_fd_pr__cap_vpp_01p8x01p8_m1m2_noshield__cor+0.85105/sqrt(mult/0.50527)*MC_MM_SWITCH*AGAUSS(0,0.0183,1)*7.833e-16*sky130_fd_pr__cap_vpp_01p8x01p8_m1m2_noshield__cor}
+ cli2s = {4.548e-17*cli2s_vpp}
+ rat_m2 = 0.596
+ rat_m1 = 0.387
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
.param mult = 1 presim_flag = 0.0
+
+ lvpp = 3.81 wm1 = 0.14 wm2 = 0.14
+ ctot_a = {4.37e-15*cvpp5_cor+0.0283/sqrt(4.38*2.69*2*mult)*4.37e-15*cvpp5_cor*sky130_fd_pr__cap_vpp_08p6x07p8_l1m1m2_noshield_o1__generic_slope}
*(mismatch parameter sky130_fd_pr__cap_vpp_08p6x07p8_l1m1m2_noshield_o1__generic_slope)
+ ctot_a = {4.37e-15*cvpp5_cor+0.0283/sqrt(4.38*2.69*2*mult)*4.37e-15*cvpp5_cor*MC_MM_SWITCH*AGAUSS(0,1.0,1)}
+ rat_m2 = 0.5767
+ rat_m1 = 0.4233
+ cap_m2 = {rat_m2*ctot_a}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
+
.param mult = 1.0
+
+ ctot_a = {12.13e-15*sky130_fd_pr__model__cap_vpp_finger__cor+0.0283/sqrt(mult*2*6.1*2.7)*12.13e-15*sky130_fd_pr__model__cap_vpp_finger__cor*sky130_fd_pr__model__cap_vpp_only_p__slope}
*(mismatch parameter sky130_fd_pr__model__cap_vpp_only_p__slope)
+ ctot_a = {12.13e-15*sky130_fd_pr__model__cap_vpp_finger__cor+0.0283/sqrt(mult*2*6.1*2.7)*12.13e-15*sky130_fd_pr__model__cap_vpp_finger__cor*MC_MM_SWITCH*AGAUSS(0,1.0,1)}
+ c0_sub = {0.998e-15*cli2s_vpp}
+ c1_sub = {0.701e-15*cli2s_vpp}
+ rat_m4 = 0.125
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
+
.param mult = 1.0
+
+ ctot_a = {23.35e-15*sky130_fd_pr__model__cap_vpp_finger__cor+0.0283/sqrt(mult*2*11.1*2.7)*23.35e-15*sky130_fd_pr__model__cap_vpp_finger__cor*sky130_fd_pr__model__cap_vpp_only_p__slope}
*(mismatch parameter sky130_fd_pr__model__cap_vpp_only_p__slope)
+ ctot_a = {23.35e-15*sky130_fd_pr__model__cap_vpp_finger__cor+0.0283/sqrt(mult*2*11.1*2.7)*23.35e-15*sky130_fd_pr__model__cap_vpp_finger__cor*MC_MM_SWITCH*AGAUSS(0,1.0,1)}
+ c0_sub = {1.506e-15*cli2s_vpp}
+ c1_sub = {1.075e-15*cli2s_vpp}
+ rat_m4 = 0.125
Expand Down
Loading