Hugo Dias
07/09/2022, 10:35 PMPranav Lulu
07/10/2022, 2:23 AMStefan Schippers
07/10/2022, 5:11 AMHugo Dias
07/10/2022, 7:12 PMJuan Andres
07/11/2022, 5:40 AMStefan Schippers
07/11/2022, 5:51 AMset appendwrite
before issuing the write command. Check the ngspice manual for this.Stefan Schippers
07/11/2022, 5:53 AMsave all
is given before the tran , dc, ac command.
If you give .option savecurrents
ngspice saves everything including all device currents (gate, drain, source currents for MOS etc).
.option savecurrents
.control
save all
save @m.xm2.msky130_fd_pr__nfet_01v8_lvt[gm]
tran 1n 100n
remzerovec
write test.raw
.endc
If you want additional variables (transistor gm for example) you must explicitly save it as shown above for mos m2
.
The remzerovec is a quirk that eliminates zero vectors to prevent errors from ngspice when writing the raw file (see https://sourceforge.net/p/ngspice/bugs/596/)Juan Andres
07/11/2022, 6:12 AMStefan Schippers
07/11/2022, 6:18 AMcat test_gm_id1.raw test_gm_id2.raw > test_gm_id.raw
and you can see the 2 traces in a waveform graph:Juan Andres
07/11/2022, 3:21 PMStefan Schippers
07/11/2022, 9:14 PMset appendwrite
does exactly what it says, simulation data is appended to the existing raw file. If you run 1st simulation with no set appendwrite
and all next sims with set appendwrite
you get a unique raw file with all sims
1st simulation:
.control
save all
tran ...
write file.raw
.endc
next simulations:
.control
save all
set appendwrite
tran ...
write file.raw
.endc
At the end file.raw
contains all simulations.Hugo Dias
07/12/2022, 2:47 AMHugo Dias
07/12/2022, 2:51 AM