blob: 8a1ad72b5a129cad7152f7dd8e8fa3c87aca0348 [file] [log] [blame]
* 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__iv.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