This is the testbench for a 20V nFET. Yes, that i...
# analog-design
t
This is the testbench for a 20V nFET. Yes, that is one of the devices that is not in the files included by "sky130.lib.spice". I have not fully decoded the hierarchy of included files, but I have at least figured out the minimum set of "include" lines to add to the top of a netlist to get any device to simulate.
Copy code
* Transistor Vth and I-V characteristic
.param TEMP=27
.option scale=1E-6

* Include SkyWater sky130 device models
.include "../../../models/r+c/res_typical__cap_typical__lin.spice"
.include "../../../models/r+c/res_typical__cap_typical.spice"
.include "../../../models/corners/tt.spice"

* Gate bias
Rg 1 2 680
X1 3 2 0 0 sky130_fd_pr__nfet_20v0
Rd 3 4 100

* DC source for current measure
Vid 5 4 DC 0V
Vgb 1 0 DC 0V
Vdd 5 0 DC 3.3V

.control
* Sweep Vds from 0 to 1.8V
dc Vdd 0 1.8 0.01 Vgb 0 1.2 0.01
wrdata sky130_fd_pr__nfet_20v0__iv.data Vid#branch V(1) V(3)