image.png
# xschem
v
image.png
s
@vks you can use 2 or more generators each generating a finite number of pulses:
👍 1
@vks... or you can use a B-source to enter an arbitrary waveform. Below example generates a varying frequency square wave.
👍 2
v
@Stefan Schippers Thanks for sharing this setup. It should suffice my requirement.
@Stefan Schippers I have observed that during
TRAN
simulation the ouput
.raw
file data does not get overwritten everytime I run transient simulation but the data for new simulation get appended to last simulation and that reflects in the waveform. How to ensure that for every new TRAN simulation run the output
.raw
gets overwritten and not appended ?
s
@vks you must not have
set appendwrite
before
write
in your spice commands.
v
OK, this is my current setup.
Is appendwrite required befor both
OP
and
TRAN
?
s
if you put
set appendwrite
after the OP
write
it will create a new raw file, then tran
write
will append data.
v
Can you please suggest what will be the correct way of running both
OP
and T`RAN` and save their data in same
.raw
file for below code .
.control
reset
op
write pfd_cp.raw
set appendwrite
tran 0.1n 6u uic
step param R1 R1_start R1_stop R1_step
remzerovec
write pfd_cp.raw
set appendwrite
.endc
s
The code above is correct. I don't know the function of the
step
line, so remove that line, the reset line also has no function here. The sequence:
op
write pfd_cp.raw
set appendwrite
tran ...
remzerovec
write pfd_cp.raw
is correct. If it does not create a new raw file then file the bug to ngspice developers.