aquiles viza
03/06/2024, 9:43 PMset ng_nomodcheck ; Suppresses any model parameter check, if set.
set ngbehavior=hsa ; Sets compatibility mode for ngspice
• If both are declared, gives the expected plot.
• If none is declared, results are wrong.
• If only ng_nomodcheck is set, simulation crashes with "Transient solution failed"
• If only ngbehavior=hsa is set, gives expected plot
When none is declared (wrong result case) it gives the following warnings. (r_sens is a lab_pin):
Error: no such device or model name r_sens
Checking parameters for BSIM 4.5 model x1.xosc_ref.xst3.xinv_osc.xm2:sky130_fd_pr__pfet_01v8__model.17
Warning: Eta0 = -0.306053 is negative.
Warning: A2 = -1.55637 is too small. Set to 0.01.
Checking parameters for BSIM 4.5 model x1.xosc_ref.xst2.xinv_osc.xm2:sky130_fd_pr__pfet_01v8__model.17
Warning: Eta0 = -0.306053 is negative.
Warning: A2 = -1.55637 is too small. Set to 0.01.
Checking parameters for BSIM 4.5 model x1.xosc_ref.xst1.xinv_osc.xm2:sky130_fd_pr__pfet_01v8__model.17
Warning: Eta0 = -0.306053 is negative.
Warning: A2 = -1.55637 is too small. Set to 0.01.
Checking parameters for BSIM 4.5 model x1.xosc_sens.xst3.xinv_osc.xm2:sky130_fd_pr__pfet_01v8__model.17
Warning: Eta0 = -0.306053 is negative.
Warning: A2 = -1.55637 is too small. Set to 0.01.
Checking parameters for BSIM 4.5 model x1.xosc_sens.xst2.xinv_osc.xm2:sky130_fd_pr__pfet_01v8__model.17
Warning: Eta0 = -0.306053 is negative.
Warning: A2 = -1.55637 is too small. Set to 0.01.
Checking parameters for BSIM 4.5 model x1.xosc_sens.xst1.xinv_osc.xm2:sky130_fd_pr__pfet_01v8__model.17
Warning: Eta0 = -0.306053 is negative.
Warning: A2 = -1.55637 is too small. Set to 0.01.
Note: Starting dynamic gmin stepping
Warning: Dynamic gmin stepping failed
Note: Starting true gmin stepping
Note: True gmin stepping completed
And finally, the sky130 devices used have the following parameters:
sky130_fd_pr__cap_mim_m3_1 W=10 L=10 MF=1 m=1
sky130_fd_pr__res_high_po_5p73 L=8 mult=1 m=1
sky130_fd_pr__res_iso_pw W=180 L=30.5 m=1
sky130_fd_pr__nfet_01v8 L=0.15 W=2 nf=1
sky130_fd_pr__nfet_01v8 L=0.15 W=1 nf=1
sky130_fd_pr__nfet_01v8 L=0.15 W=2 nf=2
sky130_fd_pr__pfet_01v8 L=0.15 W=1 nf=1
sky130_fd_pr__pfet_01v8 L=0.15 W=6 nf=6
I'm not sure why this happens, but it could be that the pfets are too small and the good results are not validTim Edwards
03/07/2024, 12:39 AM.spiceinit
file in my working directory when doing simulations with sky130, with the contents from the PDK (copied from libs.tech/ngspice/spinit
):
* ngspice initialization for sky130
* assert BSIM compatibility mode with "nf" vs. "W"
set ngbehavior=hsa
* "nomodcheck" speeds up loading time
set ng_nomodcheck
I have not checked for any change in behavior with ngspice version 42. However, in earlier versions, if nomodcheck
was not set then reading in the sky130.lib.spice
file could take several minutes. The hsa
mode, in spite of being some sort of "hspice compatibility" flag, affects whether W is "interpreted" as total width or width per finger. The BSIM model definition clearly states that W is the total width, so I have never understood what this has to do with hspice (other than that hspice correctly implements the BSIM model definition). Your pFET device with W=6 nf=6 will change size by a factor of 6 depending on the setting of the flag.Tim Edwards
03/07/2024, 12:42 AMngbehavior=hsa
because not using it is simply wrong; and you should use nomodcheck
if you don't want to wait all day for the simulation. (But I would not expect different behavior based on `nomodcheck`; "results are wrong" is consistent with the changed definition of W; it seems like "transient solution failed" should not have happened, though. . . )aquiles viza
03/07/2024, 1:29 AMTim Edwards
03/07/2024, 1:30 AMaquiles viza
03/07/2024, 1:39 AMset skywaterpdk
does?Tim Edwards
03/07/2024, 2:26 AMaquiles viza
03/07/2024, 2:51 AM