Hey! Seems like there is bug in xschem (or ngspice...
# xschem
p
Hey! Seems like there is bug in xschem (or ngspice) using sky130 pdk: If doing a noise simulation (.noise) within placed a nfet_01v8 in xschem and saving data in ngspice using write noiseSim.raw (for example), ngspice crashes and writes an error: "vector @m.xm1.msky130_fd_pr___nfet_01v8[ib] is not available or has zero length. free(): invalid pointer ...". It seems that only nfet01v[id] has data and ngspice can't handle that. A temporary solution would be (for example) instead of write noiseSim.raw: setplot noise1 write noiseSim.raw @m.xm1.msky130_fd_pr__nfet_01v8[id] @r1[i] inoise_spectrum onoise_spectrum set appendwrite setplot noise2 write noiseSim.raw @m.xm1.msky130_fd_pr__nfet_01v8[id] @r1[i] inoise_total onoise_total
s
@Patrick Fath this is a ngspice issue. Before doing a write command put a
remzerovec
command. From ngspice manual: 17.5.57 Remzerovec: Remove zero length vectors General Form: remzerovec This command removes vectors of length zero from the current plot
p
works fine thanks! I've also posted it to the ngspice project to be fixed.