<@U01819B63HP>: I am looking for a way to plot a 2-dimensional sweep in xschem (without resorting t...
t

Tim Edwards

over 1 year ago
@Stefan Schippers: I am looking for a way to plot a 2-dimensional sweep in xschem (without resorting to an external tool like octave to generate the plots). I know of two ways to get the data for a 2D sweep, but I can only get ngspice to produce a meaningful plot for one of those methods, and I can't get xschem to produce a meaningful plot for either one. Example with sweep over voltage and temperature for a transistor characteristic:
.control
save all
set temp=27
dc VDD 0 1 0.01
write BG3_ZTC_1v8_lvt_X.raw
reset
set temp=100
dc VDD 0 1 0.01
set appendwrite
write BG3_ZTC_1v8_lvt_X.raw
* plot dc1.i(VID1) dc2.i(VID1)
.endc
With the above control block, the plot command (uncommented) works, and reading back the raw file and issuing the same plot command works. However, an attempt to do the plot in xschem just produces an error complaining that the raw file cannot be read, with the message
Xschem requires all datasets to be saved with identical and same number of variables
There is a mismatch, so this and following datasets will not be read
Raw file data read: /home/tim/.xschem/simulations/BG3_ZTC_1v8_lvt_X.raw
points=101, vars=8, datasets=1 sim_type=dc
(xschem schematic attached) The other method would be to let ngspice do the 2D sweep:
dc TEMP 27 100 73 VDD 0 1 0.01
When I do that, all the correct data is in the raw file, but it's all in one vector and I can't figure out how to get the plot to separate the two variables. Is there a known solution to this problem? I'm guessing that there is one involving the
set curplot
command. Managing plots in ngspice doesn't seem to be terribly well documented. . .
BG3_ZTC_1v8_lvt_X.sch