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
Stefan Schippers
09/01/2022, 3:34 PM
@Patrick Fath this is a ngspice issue. Before doing a write command put a
remzerovec
command. From ngspice manual:
17.5.57Remzerovec: Remove zero length vectorsGeneral Form:remzerovecThis command removes vectors of length zero from the current plot
p
Patrick Fath
09/01/2022, 4:00 PM
works fine thanks! I've also posted it to the ngspice project to be fixed.
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.