Morris Frazier
03/14/2023, 3:46 AMChecking parameters for BSIM 4.5 model x3.xm1:sky130_fd_pr__nfet_01v8__model.25
Fatal: Pclm = -0.0968433 is not positive.
Fatal: Drout = -0.261499 is negative.
Warning: Cdscd = -0.00649389 is negative.
Warning: Eta0 = -0.0934787 is negative.
Fatal error: detected during BSIM4v5.5.0 parameter checking for
model x3.xm1:sky130_fd_pr__nfet_01v8__model.25 of device instance m.x3.xm1.msky130_fd_pr__nfet_01v8
I've tried 1 inverter and 3 inverters. I'm attaching PNG exports from xschem. Any advice appreciated.Arman Avetisyan
03/14/2023, 5:06 AMStefan Schippers
03/14/2023, 9:08 AMMorris Frazier
03/14/2023, 11:12 AM** sch_path: /home/user/work/inverter/xschem/inverter_multi_tb.sch
**.subckt inverter_multi_tb val
*.opin val
x1 val net2 inverter
x2 net1 val inverter
x3 net2 net1 inverter
V1 VDD GND 1.8
.save i(v1)
**** begin user architecture code
.lib /usr/local/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
.ic V(val) 1
.control
save all
tran 1n 1u
plot V(val)
.endc
**** end user architecture code
**.ends
* expanding symbol: inverter.sym # of pins=2
** sym_path: /home/user/work/inverter/xschem/inverter.sym
** sch_path: /home/user/work/inverter/xschem/inverter.sch
.subckt inverter out inp
*.ipin inp
*.opin out
XM1 out inp GND GND sky130_fd_pr__nfet_01v8 L=0.18 W=4.5 nf=3 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29'
+ pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W'
+ sa=0 sb=0 sd=0 mult=1 m=1
XM2 out inp VDD VDD sky130_fd_pr__pfet_01v8 L=0.18 W=3 nf=3 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29'
+ pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W'
+ sa=0 sb=0 sd=0 mult=1 m=1
.ends
.GLOBAL GND
.GLOBAL VDD
.end
Stefan Schippers
03/14/2023, 11:22 AMsky130.lib.spice
file which is different on my system and simulation did run with no errors.
If you build and install ngspice from sources remember to remove the packaged ngspice installation (sudo apt purge ngspice
)
my open_pdks install is super new, updated yesterday, as well as ngspice.Morris Frazier
03/14/2023, 2:47 PMngspice -i ~/.xschem/simulations/inverter_multi_tb.spice
. it still does not work when I press the simulate
button in xschem
though. the command line for ngspice
seems the same up to -a
option which just seem to trigger an irrelevant compatibility option. however the working directory varies between these - when I invoke ngspice manually from the schematic directory I get the good behavior but when I invoke it manually from .xschem/simulations
I get the bad behavior similar to the button. update: if I soft-link the spice init file in the simulations
directory it seems to work from the button too, though I wasn't expecting that to be necessary. resolved, thanks.Stefan Schippers
03/14/2023, 5:06 PMset ngbehavior=hsa
set ng_nomodcheck
# set filetype=ascii
set num_threads=4