proppy
10/12/2022, 1:39 PMI
curve. Should I try other w
and h
ranges?Luis Henrique Rodovalho
10/12/2022, 4:41 PMTim Edwards
10/12/2022, 5:46 PMId
at a fixed Vg
and Vds
, plotted vs. width. I think this can be done with the ngspice alter
command.Stefan Schippers
10/12/2022, 6:47 PM* this option enables mos model bin
* selection based on W/NF instead of W
.option wnflag=1
.option savecurrents
.param VGATE=0
.param VDRAIN=0.1
.param WIDTH=1.0
.param LENGTH=0.15
vd d 0 {VDRAIN}
vg g 0 {VGATE}
vs s 0 0
vb b 0 0
.control
save all
let par=0.15
dowhile par <= 1
alterparam LENGTH=$&par
reset
dc vg 0 1.8 0.01
remzerovec
write test_mos_binning.raw
set appendwrite
let par = par + 0.15
end
.endc
proppy
10/12/2022, 6:53 PMyou will need to choose some parameter and plot the value while looping over device width or length.Sorry for the not being very descriptive, I think that's what I'm doing here: each color represent a different
W
.proppy
10/12/2022, 7:00 PMproppy
10/12/2022, 7:01 PMproppy
10/12/2022, 7:08 PML
(also less distinctly):
https://colab.research.google.com/gist/proppy/57b19edd0c40b49c0f6df497990de69d/sky130-pyspice-playground.ipynb#scrollTo=q0XHBAt1jGmQ
• Vg: 0 → 1.8V += 0.01
• Vd: 1.8V
• L: 0.15 → 0.30 += 0.02
• W: 10
proppy
10/12/2022, 7:18 PMLuis Henrique Rodovalho
10/12/2022, 7:51 PM* id testbench
* Include SkyWater sky130 device models
*.lib "~/git/open_pdks/sources/sky130-pdk/libraries/sky130_fd_pr/latest/models/sky130.lib.spice" tt
.lib "/usr/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice" tt
.param mc_mm_switch=0
.param xl = 0.15
vx x 0 1
X0 x x 0 0 sky130_fd_pr__nfet_01v8 ad=4e+11p pd=2.8e+06u as=4e+11p ps=2.8e+06u w=1.0 l=xl
.option gmin=1e-12
.control
echo "# xl,id" > char.csv
let i_i = 0.15
let i_f = 1.0
let i_s = 0.01
let i = i_i
dowhile i <= i_f
alterparam xl=$&i
reset
op
let id = i(vx)
print i id
echo "$&i,$&id" >> char.csv
let i = i+i_s
end
exit
.endc
.end
This is the output drain current Id and its derivative, dI/dL. As you can see, it is discontinuous.Tim Edwards
10/12/2022, 7:55 PMalter
command so you don't have to run hundreds of individual simulations and collate the results.proppy
10/12/2022, 7:59 PMLuis Henrique Rodovalho
10/12/2022, 7:59 PMLuis Henrique Rodovalho
10/12/2022, 8:04 PMTim Edwards
10/12/2022, 8:18 PMmc
set is different from the corner models and I think is the one that is only defined for exact, specific transistor widths and lengths. Anything outside of those specific values is not modeled.proppy
10/12/2022, 8:18 PMproppy
10/12/2022, 8:18 PMmc
stand for?Luis Henrique Rodovalho
10/12/2022, 8:19 PMTim Edwards
10/12/2022, 8:21 PMmc
corner) is defined this way. The "corner" models, from what I've been told, have taken the same models and just stretched the bin boundaries out so that they cover a continuous range---but that doesn't mean that the models are actually valid outside of the original W, L values! So what I expect to see based on that understanding is that there may be very sharp discontinuities in some parameters across the bin boundaries because there has been no attempt made to make the models match at the boundaries.Tim Edwards
10/12/2022, 8:27 PMmc
(for "Monte Carlo") is the name of the corner passed to the .lib
statement; the set of models that get included for that corner name will have stochastic variation over process. So parameters that vary among different wafer runs (process variation) will be modeled with a gaussian function in the parameter definition, with a mean and standard variation that is supposed to be the same as the random distribution of that parameter value over many wafer runs. By contrast, a fixed corner like ff
(fast-fast) or ss
(slow-slow) have parameter values that are pegged at the 3-sigma point on the same gaussian distribution (upper or lower, depending on which is appropriate for the fast or slow corner), while at the typical (tt
) corner, all values are centered exactly on the gaussian mean.Luis Henrique Rodovalho
10/12/2022, 8:35 PM* id testbench
* Include GF180MCU device models
.include "~/git/open_pdks/gf180mcu/gf180mcuC/libs.tech/ngspice/design.ngspice"
.lib "~/git/open_pdks/gf180mcu//gf180mcuC/libs.tech/ngspice/sm141064.ngspice" typical
.temp 27
.param
+ sw_stat_global = 0
+ sw_stat_mismatch = 0
.param xl = 0.28u
vx x 0 1
X0 x x 0 0 nmos_3p3 w=1.8u l=xl
.option gmin=1e-12
.control
echo "# xl,id" > charGF180.csv
let i_i = 0.28u
let i_f = 1.0u
let i_s = 0.01u
let i = i_i
dowhile i <= i_f
alterparam xl=$&i
reset
op
let id = i(vx)
print i id
echo "$&i,$&id" >> charGF180.csv
let i = i+i_s
end
exit
.endc
.end
It also has a discontinuity. But it is an older process with larger minimum L. Models are very tricky, as smaller the transistors get.Luis Henrique Rodovalho
10/12/2022, 9:07 PMLuis Henrique Rodovalho
10/12/2022, 9:14 PMproppy
10/13/2022, 2:05 AMproppy
10/13/2022, 2:06 AMproppy
10/13/2022, 2:06 AMproppy
10/13/2022, 2:48 PMproppy
10/13/2022, 2:49 PMproppy
10/13/2022, 2:49 PMalterparam
and I could find a way to make it work similarly with alter <device>
Stefan Schippers
10/13/2022, 4:34 PMLuis Henrique Rodovalho
10/13/2022, 9:11 PMclear
clc
graphics_toolkit("fltk")
tmp = dlmread('charSKY130.csv',',',1,0);
l = tmp(:,1);
i = -tmp(:,2);
di = diff(i)/diff(l);
w = 1e-6
is = i.*l./w;
dis = diff(is)/diff(l);
figure(1)
plot(l,i)
title('SKY130 NMOS1.8 VGS = VDS = 1, VBS=0')
xlabel("L")
ylabel("ID")
print SKY130_idxl.jpg
figure(2)
plot(l(2:end),di)
title('SKY130 NMOS1.8 VGS = VDS = 1, VBS=0')
xlabel("L")
ylabel('dID/dL')
print SKY130_didxl.jpg
figure(3)
plot(l,is)
title("SKY130 NMOS1.8 VGS = VDS = 1, VBS=0")
xlabel("L")
ylabel('ID*(L/W)')
print SKY130_isxl.jpg
figure(4)
plot(l(2:end),dis)
title('SKY130 NMOS1.8 VGS = VDS = 1, VBS=0')
xlabel('L')
ylabel('d(ID*(L/W))/dL')
print SKY130_disxl.jpg
This is my code for GNU Octave. Matlab should run it.