Roberto Di Lorenzo
11/24/2022, 8:44 PMStefan Schippers
11/24/2022, 8:51 PMi(vmeas)
or (equivalent) vmeas#branch
variable.
If you look into the produced netlist you see the ammeter also generates a .save statement.
Voltage sources also generate a .save statement so in your case the Vmeas is redundant, you can use i(vdd).Stefan Schippers
11/24/2022, 8:53 PMdc VDD 0 1.8 0.1 vgs_nmos 0 1.501 0.5
Stefan Schippers
11/24/2022, 9:01 PMplot all.i(vmeas)
Roberto Di Lorenzo
11/24/2022, 9:03 PMStefan Schippers
11/24/2022, 9:12 PMdisplay
command at the ngspice prompt to see the nodes that are saved.Stefan Schippers
11/24/2022, 9:13 PM.end
, xschem adds a .end at end of netlist.Roberto Di Lorenzo
11/24/2022, 9:35 PMStefan Schippers
11/24/2022, 9:38 PMvmeas#branch
is saved, at the ngspice prompt you can plot all vmeas current curves with:
plot all.vmeas#branch
or
plot all.i(vmeas)
i(vmeas)
is equivalent to vmeas#branch
Roberto Di Lorenzo
11/24/2022, 9:47 PMStefan Schippers
11/24/2022, 11:50 PMSimulation -> Add simulation graph
Load spice data: Simulation->Load/Unload spice Raw file
Add a waveform in the graph: double click the graph, select the wave from the listbox on the left, click 'add'
then press '`f`' to do a full zoom on the xaxis when the mouse is inside the graph, then do a y full zoom by pressing '`f`' with the mouse to the left of the y axis.Roberto Di Lorenzo
11/25/2022, 9:20 PMStefan Schippers
11/26/2022, 9:37 AMdc VDD 0 1.8 0.01 vgs_nmos 0.75 1.501 0.25
write ids_vds_2.raw
set appendwrite
dc VDD 0 1.8 0.01 vgs_pmos 0.75 1.501 0.25
write ids_vds_2.raw
plot dc1.i(vmeas2) dc2.i(vmeas1)
Roberto Di Lorenzo
11/26/2022, 9:55 PMStefan Schippers
11/26/2022, 10:58 PMRoberto Di Lorenzo
11/26/2022, 11:09 PM.save all v(vg)
.options savecurrents
*
.control
dc VDD 0 1.8 0.01 vgs_nmos 0.75 1.501 0.25
write ids_vds_2.raw
set appendwrite
dc VDD 0 1.8 0.01 vgs_pmos 0.75 1.501 0.25
write ids_vds_2.raw
plot dc1.i(vmeas2) dc2.i(vmeas1)
.endc
when i do load .raw file, appear
raw_read(): failed to open file /home/roberto/.xschem/simulations/ids_vds_2.raw for readingStefan Schippers
11/26/2022, 11:22 PMRoberto Di Lorenzo
11/26/2022, 11:47 PMRoberto Di Lorenzo
11/27/2022, 1:27 PMRoberto Di Lorenzo
11/27/2022, 3:47 PMStefan Schippers
11/27/2022, 7:35 PM.option savecurrents
, only add remzerovec
before the write
command. This removes empty vectors ngspice complains about.
.option savecurrents
...
.control
save all
dc VDD 0 1.8 0.01 .....
remzerovec
write xxxx.raw
...
.endc
Calvin Yan
03/12/2024, 4:44 AMStefan Schippers
03/12/2024, 11:54 AM