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 · 1 comment
Open

Cut&Paste error in statistical parameter file #272

dwarning opened this issue Nov 22, 2024 · 1 comment

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant