Stefan Schippers
10/03/2021, 8:51 PM.control
save all
* op
* tran 1n 300n
dc vvcc 1 4 0.01
set appendwrite
write cmos_example.raw
.endc
and everytime i run a simulation the cmos_example.raw file grows. Simulation results are appended. Ensure the 'set appendwrite' is before the write command.
You also can place a 'quit' command in the control block, so ngspice exits automatically.
Also ensure you run ngspice in interactive mode (ngspice -i circuit.spice -a
) and not in batch mode (ngspice -b -r circuit.raw circuit.spice
)