(Excuse me for my bad English)
NG-Spice rework 19 can not do simple thing: write simulation results from .print directive to text file as I know (please coorect me if it is wrong).
I want something like this in file:
time V(1) V(1)-V(2) V(5)
0.000e+00 -3.396e-25 -1.787e-24 1.788e-24
1.000e-08 4.930e-12 -2.498e-02 2.498e-02
2.000e-08 1.479e-11 -4.997e-02 4.997e-02
4.000e-08 4.439e-11 -9.997e-02 9.997e-02
8.000e-08 1.628e-10 -2.000e-01 2.000e-01
1.527e-07 6.081e-10 -3.818e-01 3.818e-01
There are 3 ways to write ngspice results to file.
1. ngspice -b x.net -r x.raw
It produces binary file, but text file is needed.
2. ngspice -b x.net -o x.txt
It will place many info to file, but only .print data is needed
3. ngspice -b x.net > x.txt
It will place many info to file, but only .print data is needed
Sergey,
ngspice can do many things, even simple things.
For point 1:
Add the following line to the spinit file:
set filetype=ascii
for points 2 and 3:
Add the following line to the spinit file:
set noacct
Alternatively you may add the line
.options noacct
to your input file.
Regards
Holger
Hi, Holger!
There are additional problems with this points.
For point 1 the problem is that .save directive can't save V(1)-V(2). It can save only V(1) and V(2).
For point 2 and 3 problem is that with noacct option user will not see whats going on in simulation process.
The simple thing that I can't do with ngspice is:
- run simulation from bash's command line (just one command);
- view simulation process (messages about convergence problems etc);
- then have text file with simulation results that can be used in external programs (gaw etc).
gnucap has good solution. This is from their website:
.print dc v(10) v(20) v(30)
.dc Vcc 0 5 0.5 >eg6.dat
May be ngspice can also implement this syntax in future?
Regards, Sergey
see new command
wrdata file vecs
writing output vectors to file
Holger