Sud_ana
07/24/2024, 7:32 PMvalue=vdd
. I've written this ngspice script with the intention of changing the dc source to a pwl
source for transient sim after a dc sim but it doesn't change the output to a pwl. What's the best way to change the DC source to a pwl source for a simulation and then reset it back to DC ?
value = "
.param vdd=1.8
.control
save all
* Sets the vdd to 1.6V
aterparam vdd=1.6
reset
dc temp -40 140 5
remzerovec
write test_temperature.raw
* Sets the v1 source to a pwl and performs a transient simulation
alterparam vdd = "dc 1.8 pwl 0 0 1u 1 10u 1 11u 0 20u 0"
reset
tran 1n 250n
remzerovec
write test_transient.raw
.endc
"
Luis Henrique Rodovalho
07/24/2024, 7:44 PMSud_ana
07/25/2024, 6:05 AMvalue="dc 1.8 pwl 0 vl 1u vh 10u vh 11u vl 20u vl"
but the transient has no data. The params vh, vl
to set the levels of the DC.
value="
.param vd=1.8
.param vh=1.8
.param vl=0
.control
save all
dc temp -40 140 5
remzerovec
write test_temperature.raw
alterparam vl=0
reset
tran 1n 250n
remzerovec
write test_transient.raw
.endc
"
Stefan Schippers
07/26/2024, 5:42 AMsave all
after reset
.
value="
.param vd=1.8
.param vh=1.8
.param vl=0
.control
save all
dc temp -40 140 5
remzerovec
write test_temperature.raw
alterparam vl=0
reset
*** add below line
save all
tran 1n 250n
remzerovec
write test_transient.raw
.endc
"