Adapt gtkwave plotting to the various OSs.

macOS still needs some improvement.
This commit is contained in:
Holger Vogt 2021-08-28 16:19:43 +02:00
parent de1024a75b
commit 1b1d4f412f
1 changed files with 8 additions and 9 deletions

View File

@ -62,11 +62,7 @@ X1 1 2 3 4 5 6 7 8 s0 s1 s2 s3 d0 c3 FOURBIT
* save inputs
*.save V(a1) V(a2) V(a3) V(a4) V(a5) V(a6) V(a7) V(a8)
*.save v(1)
.control
*save v(1)
TRAN 500p 6400NS
rusage
display
@ -74,11 +70,14 @@ edisplay
* save data to input directory
cd $inputdir
eprvcd 1 2 3 4 5 6 7 8 s0 s1 s2 s3 c3 > adder_x.vcd
* plotting the vcd file (e.g. with GTKWave)
* For Windows: returns control to ngspice
shell start gtkwave adder_x.vcd --script nggtk.tcl
* Others
*shell gtkwave adder_x.vcd --script nggtk.tcl &
* plotting the vcd file with GTKWave
if $oscompiled = 1 | $oscompiled = 8 ; MS Windows
shell start gtkwave adder_x.vcd --script nggtk.tcl
else if $oscompiled = 7 ; macOS, manual tweaking required
shell open -a gtkwave adder_x.vcd
else ; Linux and others
shell gtkwave adder_x.vcd --script nggtk.tcl &
end
.endc
.END