Tim Edwards
07/12/2024, 8:43 PM.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. . .Stefan Schippers
07/13/2024, 8:49 AMreset
command resets also the save all
keyword, as a result the second run has only 2 vars saved (voltage source currents). The updated schematic does the job, (see the syntax for accessing individual datasets in graphs: "node%dataset") please check.Tim Edwards
07/13/2024, 2:30 PMreset
. That does explain the problem; thanks for the help!Stefan Schippers
07/14/2024, 6:29 AMTim Edwards
07/15/2024, 1:47 PMnode%dataset
notations for graphs added to xschem recently? I'm doing some back-and-forth here helping Phil Allen with xschem details (you might have noticed his name on the schematic). He's not getting the suffix notation to work. It could be a typo or something in the schematic (I haven't seen his latest version of the schematic), but then he also mentioned using the menu option "Unload/load spice .raw file" to load the graphs, and I have not seen that menu option in recent versions of xschem. Which leads to a second question: What happened to that menu option? Was it deprecated in favor of the "Load graph" symbol?Stefan Schippers
07/16/2024, 5:06 AMcommit 617e6b3b8d5d0bfe82dedd60f8cdb5bca469a682
Author: stefan schippers <stefan.schippers@gmail.com>
Date: Fri Oct 13 15:51:51 2023 +0200
update live backannotation if "a" and "b" cursors are swapped, syntax node%n is now allowed to plot only dataset "n" of the node. Update html docs and example autozero_comp circuit
The Load/Unload is gone (Toggle buttons are not a very good choice in general) and a better menu is added to the Waves button. This was done on Nov.9 2023. So yes, Phil Allen xschem is rather old.
A simple Load/Unload button does not work well if the raw file contains multiple simulations (OP, DC, TRAN, ...), in this case the type of analysis to load must be specified.Tim Edwards
07/16/2024, 12:57 PM