Jnanapurushothama
12/25/2024, 6:01 AMStefan Schippers
12/25/2024, 10:39 AMJnanapurushothama
12/25/2024, 12:15 PMStefan Schippers
12/25/2024, 12:39 PMStefan Schippers
12/25/2024, 12:45 PMrp1-tb.spice file.Jnanapurushothama
12/26/2024, 9:37 AMStefan Schippers
12/26/2024, 10:37 AMrp1-tb.spice file is located create a .spiceinit file with following content:
set ngbehavior=hsa
set ng_nomodcheck
# set filetype=ascii
set num_threads=4
# set strict_errorhandling=1
set skywaterpdk
This is needed for ngspice to correctly recognize device models.Jnanapurushothama
12/26/2024, 10:43 AMStefan Schippers
12/26/2024, 10:48 AMRp1 is an unfortunate choice for the component name. Looks like there is some Rp1 definition somewhere in the models and ngspice gets confused. The set skywaterpdk will make ngspice work on your example because all parameter references in the circuit must be done with {param} and not param, so ngspice does not get confused by your subcircuit instance line.
But if you rename Rp1 to something different simulation runs fine even without the set skywaterpdk option in the .spiceinit file (I added myself this option only recently, it merely speeds up the loading of pdk data).Stefan Schippers
12/26/2024, 6:46 PMJnanapurushothama
12/27/2024, 3:06 AMStefan Schippers
12/28/2024, 9:16 AMngspice 208 -> print @m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[l] = 3.000000e-07
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[w] = 2.000000e-06
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[m] = 1.000000e+00
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[nf] = 1.000000e+00
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[sa] = 0.000000e+00
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[sb] = 0.000000e+00
...
...
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[gmbs] = 1.644872e-05
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[gm] = 1.153455e-04
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[gds] = 1.804085e-06
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[vdsat] = 8.898804e-02
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[vth] = 6.135211e-01
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[id] = 6.617659e-06
...
...
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[vdseff] = 8.776572e-02
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[cgso] = 5.110275e-16
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[cgdo] = 4.998776e-16
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[cgbo] = 2.757858e-21
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[weff] = 1.948000e-06
@m.x2.xm1.msky130_fd_pr__nfet_01v8_lvt[leff] = 2.759500e-07
ngspice 209 ->Stefan Schippers
12/28/2024, 9:51 AMrp1-tb.sch is now fixed in ngspice master branch. ngspice no more gets confused if there is a parameter and a subcircuit with the same name.Jnanapurushothama
12/28/2024, 10:19 AMStefan Schippers
12/28/2024, 11:27 AMdisplay as per ngspice manual does only display the active vectors and types, not their values, print does that. If display did show values in previous versions it is an undocumented feature.