Running transient simulation to observe waveform with specific load capacitance value. How can gener...
v
Running transient simulation to observe waveform with specific load capacitance value. How can generate plots for multiple transient waveforms by varying cload value in xschem/ngspice for below shown testbench?
s
You can run multiple simulations by setting the capacitance value as a parameter, like
'CLOAD'
, then add a:
.param CLOAD=1pF
run simulation, write results, then set appendwrite, do a alterparam CLOAD=2pF, followed by reset, run another simulation, write results in same file.
Copy code
.control
  tran...
  write ...
  alterparam CLOAD=2pF
  reset
  set appendwrite
  tran...
  write ...
.endc
v
Yes, it worked. Any other option to vary parameter if no. of values need to be large. It would mean
alterparam
set appendwrite
write
statements need to be added that many no. of times.
@Stefan Schippers How to plot overlapped waveforms in xschem viewer for different
cload
parameter defined using
alterparam
? Right now only waveform with default
cload
value is appearing in viewer.
s
@vks after the first
write
command add this:
set appendwrite
. Otherwise each following write overwrites the raw file instead of appending data. Then you can add
out%0
,
out%1
,
out%2
... to get individual waveforms overlapped. If you put
out
you also see all waveforms, but the first method will show each as a separate waveform, this is useful if you want to measure their values with a cursor.
v
@Stefan Schippers Thanks it is working now as required. I ran fft to check vco output frequency for different control voltages. I believe it is not possible to see fft plots in xschem internal waveform viewer but only on ngspice default viewer. Is there any cursor available in ngspice viewer to know x-axis frequency values in fft plot ? Also there are 4 plots here, how to know which plot belongs to which
alterparam vctrl
value ?