blob: d7983b0067d5e0c6512858153330337f81ada829 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
clear;
clc;
//Example 16.5
Voh=4.2;
Vol=0.1;
//x=Kd/Kl
x=25.1;
Vdd=5;
Vtnl=0.8;
Vohu=4.2;
Vil=0.8;
Vtnd=0.8;
Vih=Vtnd+(Vdd-Vtnl)/x*((1+2*x)/sqrt(1+3*x)-1);
printf('\nVih=%.2f V\n',Vih)
Volu=(Vdd-Vtnl+x*(Vih-Vtnd))/(1+2*x);
printf('\noutput voltage corresponding to Vih=%.3f V\n',Volu)
NMl=Vil-Volu;
printf('\nnoise margin=%0.3f V\n',NMl)
NMh=Vohu-Vih;
printf('\nnoise margin=%.3f V\n',NMh)
|