Hello everyone, I am working with Sky130 technolog...
# sky130
e
Hello everyone, I am working with Sky130 technology with open source software Xschem and NGspice. I would like to be able to change Vth value of a transistor during a simulation but I can't figure out how to do it. Here is a NGspice simulation script that I tried to run, the objective is to do 10 operating point simulations with vth values as [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1] : Code:
Copy code
name=s1 only_toplevel=false
value="
.control
let vth_var = 0.1
repeat 10
  op
  alter @m.xm2.msky130_fd_pr__nfet_01v8_lvt[vth] = vth_var
  print @m.xm2.msky130_fd_pr__nfet_01v8_lvt[vth]
  let vth_var = vth_var + 0.1
  save all
  save @m.xm2.msky130_fd_pr__nfet_01v8_lvt[vth]
  let vt_value = @m.xm2.msky130_fd_pr__nfet_01v8_lvt[vth]
  set wr_singlescale                           
  set wr_vecnames                         
  option numdgt=3                          
  wrdata Test123.csv vt_value                  
  set appendwrite                                
end
quit 0
.endc
.end"
The result of the simulation gives me the original vth value (4.577e-01) but the line "alter @m.xm2.msky130_fd_pr__nfet_01v8_lvt[vth] = vth_var" doesn't change the vth value. I also tried to replace vth by vto but it doesn't work neither. Can someone help me please ?
s
@Etienne Moutinho
altermod @m.xm2.msky130_fd_pr__nfet_01v8_lvt[vth0]=vth_var
e
It works thank you !
👍 1