📄 inverter_vtc.m
字号:
function vtc = inverter_vtc(vdd, wn, ln, wp, lp)
% analysis of inverter threshold for 0.25 micron CMOS process
% be aware that this routine can take a long time to run!
eq = 'nmos025(wn,ln,vin,vout,0)+pmos025(wp,lp,vin-vdd,vout-vdd,0)';
xstep = 0.05;
ystep = 0.001;
accuracy = 5.e-7;
for i = 1:(vdd/xstep+1)
vin = xstep * (i-1);
for j=1:(vdd/ystep +1)
vout = ystep * (j-1);
cur = eval(eq);
if (abs(cur) < accuracy)
break;
end
end
vi(i)=vin;
vtc(i)=vout;
end
plot(vi,vtc,'r-');
xlabel('V_{in} (V)');
ylabel('V_{out} (V)');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -