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

Cut&Paste error in statistical parameter file #272

Open
dwarning opened this issue Nov 22, 2024 · 3 comments
Open

Cut&Paste error in statistical parameter file #272

dwarning opened this issue Nov 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@dwarning
Copy link
Contributor

Looking into file IHP-Open-PDK/ihp-sg13g2/libs.tech/ngspice/models/cornerMOSlv.lib we see in typical (tt) section (abbreviated for better readability):
`
LIB mos_tt
param sg13g2_lv_nmos_vfbo_mm= 1.0
param sg13g2_lv_nmos_ctl = 1.2080
param sg13g2_lv_nmos_rsw1 = 0.7200
param sg13g2_lv_nmos_muew = 0.8500
param sg13g2_lv_nmos_dphibo = 0.9915
param sg13g2_lv_nmos_dphibl = 0.9693

param sg13g2_lv_pmos_vfbo_mm= 1.0
param sg13g2_lv_pmos_ctl = 1.9570
param sg13g2_lv_pmos_rsw1 = 0.7720
param sg13g2_lv_pmos_muew = 1.0520
param sg13g2_lv_pmos_dphibo = 0.9050
param sg13g2_lv_pmos_dphibl = 0.8550

include sg13g2_moslv_mod.lib
ENDL mos_tt`

So we see that we have different parameters (act as factor) for nmos and pmos.
Next section is for statistical simulation in typical corner:
`
LIB mos_tt_stat
param sg13g2_lv_nmos_vfbo_mm_norm= 1.0
param sg13g2_lv_nmos_ctl_norm = 1.2080
param sg13g2_lv_nmos_rsw1_norm = 0.7200
param sg13g2_lv_nmos_muew_norm = 0.8500
param sg13g2_lv_nmos_dphibo_norm = 0.9915
param sg13g2_lv_nmos_dphibl_norm = 0.9693

param sg13g2_lv_pmos_vfbo_mm_norm= 1.0
param sg13g2_lv_pmos_ctl_norm = 1.2080
param sg13g2_lv_pmos_rsw1_norm = 0.7200
param sg13g2_lv_pmos_muew_norm = 0.8500
param sg13g2_lv_pmos_dphibo_norm = 0.9915
param sg13g2_lv_pmos_dphibl_norm = 0.9693

include sg13g2_moslv_stat.lib
include sg13g2_moslv_mod.lib
ENDL mos_tt_stat`

The problem is that the nmos parameter are taken over from tt section into the stat section - but pmos not. They are a simple copy of the nmos parameter. Looks like a cut and paste error and follows in wrong results for tt_stat pmos simulations.

Other sections in lv and hv Corner lib have not this bug.

BTW - I see no need to create additional parameter for statistical simulation with _norm in the end of name. Just using the tt, ff, ss parameter is sufficient.

@miesli : In case you are still there, can you comment please.

@dwarning
Copy link
Contributor Author

Another case of Cut&Paste in sg13g2_moslv_stat.lib (abbreviated):

param sg13g2_lv_nmos_vfbo_mm ='gauss(sg13g2_lv_nmos_vfbo_mm_norm , 0.004, mc_ok)'
param sg13g2_lv_nmos_toxo ='gauss(sg13g2_lv_nmos_toxo_norm, 0.0133, mc_ok)'
param sg13g2_lv_nmos_dphibo ='gauss(sg13g2_lv_nmos_dphibo_norm, 0.0656, mc_ok)'
param sg13g2_lv_nmos_dphibl ='gauss(sg13g2_lv_nmos_dphibl_norm, 0.1135, mc_ok)'
param sg13g2_lv_nmos_dphibw ='gauss(sg13g2_lv_nmos_dphibw_norm, 0.1197, mc_ok)'
param sg13g2_lv_nmos_dphiblw ='gauss(sg13g2_lv_nmos_dphiblw_norm, 0.0135, mc_ok)'
param sg13g2_lv_nmos_toxovo ='gauss(sg13g2_lv_nmos_toxovo_norm, 0.0133, mc_ok)'

param sg13g2_lv_pmos_vfbo_mm ='gauss(sg13g2_lv_pmos_vfbo_mm_norm, 0.004, mc_ok)'
param sg13g2_lv_pmos_toxo ='gauss(sg13g2_lv_pmos_toxo_norm, 0.0133, mc_ok)'
param sg13g2_lv_pmos_dphibo ='gauss(sg13g2_lv_pmos_dphibo_norm, 0.0656, mc_ok)'
param sg13g2_lv_pmos_dphibl ='gauss(sg13g2_lv_pmos_dphibl_norm, 0.1135, mc_ok)'
param sg13g2_lv_pmos_dphibw ='gauss(sg13g2_lv_pmos_dphibw_norm, 0.1197, mc_ok)'
param sg13g2_lv_pmos_dphiblw ='gauss(sg13g2_lv_pmos_dphiblw_norm, 0.0135, mc_ok)'
param sg13g2_lv_pmos_toxovo ='gauss(sg13g2_lv_pmos_toxovo_norm, 0.0133, mc_ok)'

It's unbelievable that the variations of lv nmos and pmos are identical. hv nmos statistical is not affected.

dwarning pushed a commit to dwarning/IHP-Open-PDK that referenced this issue Nov 24, 2024
@metroid120
Copy link

Hi Dietmar, you are right in both cases this is very likely a bug. In the closed PDK the pmos parameters are different. Our bad...
It is a long time ago that we did this and I have no memory what could have happened. Anyhow.

  1. Here would be the correct values for the file ""cornerMOSlv.lib" (starting line 137):
.param sg13g2_lv_pmos_vfbo_mm_norm= 1.0
 .param sg13g2_lv_pmos_ctl_norm    = 1.9570
 .param sg13g2_lv_pmos_rsw1_norm   = 0.7720
 .param sg13g2_lv_pmos_muew_norm   = 1.0520
 .param sg13g2_lv_pmos_dphibo_norm = 0.9050
 .param sg13g2_lv_pmos_dphibl_norm = 0.8550
 .param sg13g2_lv_pmos_dphibw_norm = -1.5800
 .param sg13g2_lv_pmos_dphiblw_norm= 1.0000
 .param sg13g2_lv_pmos_themuo_norm = 0.9580
 .param sg13g2_lv_pmos_thesatl_norm= 0.5510
 .param sg13g2_lv_pmos_thesatw_norm= 1.0800
 .param sg13g2_lv_pmos_thesatlw_norm= 1.0000
 .param sg13g2_lv_pmos_toxo_norm   = 1.0000
 .param sg13g2_lv_pmos_toxovo_norm = 1.0000
 .param sg13g2_lv_pmos_cjorbot_norm= 1.0000
 .param sg13g2_lv_pmos_cjorsti_norm= 1.0000
 .param sg13g2_lv_pmos_cjorgat_norm= 1.0000
  1. For file sg13g2_moslv_stat.lib (starting line 38):
.param sg13g2_lv_pmos_vfbo_mm  ='gauss(sg13g2_lv_pmos_vfbo_mm_norm,  0.004, mc_ok)'
.param sg13g2_lv_pmos_toxo     ='gauss(sg13g2_lv_pmos_toxo_norm,     0.0133, mc_ok)'
.param sg13g2_lv_pmos_dphibo   ='gauss(sg13g2_lv_pmos_dphibo_norm,   0.1078, mc_ok)'
.param sg13g2_lv_pmos_dphibl   ='gauss(sg13g2_lv_pmos_dphibl_norm,   0.1412, mc_ok)'
.param sg13g2_lv_pmos_dphibw   ='gauss(sg13g2_lv_pmos_dphibw_norm,   1.4858, mc_ok)'
.param sg13g2_lv_pmos_dphiblw  ='gauss(sg13g2_lv_pmos_dphiblw_norm,  1e-9, mc_ok)'
.param sg13g2_lv_pmos_toxovo   ='gauss(sg13g2_lv_pmos_toxovo_norm,   0.0133, mc_ok)'
.param sg13g2_lv_pmos_ctl      ='gauss(sg13g2_lv_pmos_ctl_norm,      0.1880, mc_ok)'
.param sg13g2_lv_pmos_muew     ='gauss(sg13g2_lv_pmos_muew_norm,     0.0235, mc_ok)'
.param sg13g2_lv_pmos_themuo   ='gauss(sg13g2_lv_pmos_themuo_norm,   0.0247, mc_ok)'
.param sg13g2_lv_pmos_rsw1     ='gauss(sg13g2_lv_pmos_rsw1_norm,     0.0727, mc_ok)'
.param sg13g2_lv_pmos_thesatl  ='gauss(sg13g2_lv_pmos_thesatl_norm,  0.1718, mc_ok)'
.param sg13g2_lv_pmos_thesatw  ='gauss(sg13g2_lv_pmos_thesatw_norm,  0.0427, mc_ok)'
.param sg13g2_lv_pmos_thesatlw ='gauss(sg13g2_lv_pmos_thesatlw_norm, 0.1667, mc_ok)'
.param sg13g2_lv_pmos_cjorbot  ='gauss(sg13g2_lv_pmos_cjorbot_norm,  0.0267, mc_ok)'
.param sg13g2_lv_pmos_cjorsti  ='gauss(sg13g2_lv_pmos_cjorsti_norm,  0.0267, mc_ok)'
.param sg13g2_lv_pmos_cjorgat  ='gauss(sg13g2_lv_pmos_cjorgat_norm,  0.0267, mc_ok)'

Please double check these values and let me know if you agree.

@dwarning
Copy link
Contributor Author

Hi Markus,
yes I so I made it in my PR yesterday.
Few parameters looking strange (e.g. dphibw), I will check it.
Thanks for taking care,
Dietmar

@sergeiandreyev sergeiandreyev added the bug Something isn't working label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants