Thomas Figura
11/03/2022, 11:36 PMStefan Schippers
11/04/2022, 1:51 PMalterparam W=$&w_act
Also add a .options savecurrents
outside the .control block and a save all
inside the control block, before the run statementStefan Schippers
11/04/2022, 2:18 PMtest_sweep_mos_w.sch
The commands:
* ngspice commands
.param W=1
.options savecurrents
.dc v2 0 1.8 0.01
.control
let start_w = 1
let stop_w = 90
let delta_w = 5
let w_act = start_w
while w_act le stop_w
alterparam W = $&w_act
reset
save all
run
remzerovec
write test_sweep_mos_w.raw
let w_act = w_act + delta_w
set appendwrite
end
.endc
Stefan Schippers
11/04/2022, 2:19 PMThomas Figura
11/04/2022, 2:39 PMStefan Schippers
11/04/2022, 2:45 PMxschem_sky130
test schematics. It is a good starting point if one needs to sweep a device parameter. Much better than starting from scratch, since as you have seen there are some quirks (the remzerovec, the $& prefix ...) I also have spent some time figuring out all these things some time ago.