blob: 874b69d44ad1d8097c184e13cd6af54ecc3fd074 [file] [log] [blame] [edit]
* Diode Vth
.param TEMP=27
* Include SkyWater sky130 device models
INCLUDELINES
D1 3 0 DEVICENAME area=1.0 M=1
Rd 3 4 100
* DC source for current measure
Vid 4 5
Vdd 5 0 DC 0V
.control
* Sweep Vdd from 0 to 2.0V
dc Vdd 0 2.0 0.05
* NOTE: Internally accessed names MUST be in lowercase
wrdata DEVICENAME.data -Vid#branch V(3)
* Find threshold
let ih=-Vid#branch[38]
let il=-Vid#branch[28]
let vh=V(3)[38]
let vl=V(3)[28]
let vth=((vl - vh) / (ih - il)) * ih + vh
echo threshold voltage
print vth
quit
.endc
.end