1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter : 8 - CMOS Realization Of Inverters"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.2 : Page No - 333\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from sympy import symbols, solve, N\n",
"x= symbols('x')\n",
"#Given data\n",
"NMH= 1 # in V\n",
"VIH= 2 # in V\n",
"VTon= 0.5 # in V\n",
"VOL= 0.2 # in V\n",
"VDD= 3 # in V\n",
"KP= 30*10**-6 # in A/V**2\n",
"PD= 100*10**-6 # power dissipation in W\n",
"# Formula VIH= VTon +2*sqrt(2*VDD/(3*kn*RL))-1/(kn*RL) (i)\n",
"# Let x= 1/(kn*RL), putting the values in (i), we get\n",
"# x**2-5*x+2.25=0\n",
"expr = x**2-5*x+2.25\n",
"x , x1= solve(expr, x)\n",
"# Formula PD= VDD*(VDD-VOL)/(2*RL)\n",
"RL= VDD*(VDD-VOL)/(2*PD) # in \u03a9\n",
"print \"The value of RL = %0.1e \u03a9\" %RL\n",
"kn= 1/(x*RL) # in A/V**2\n",
"# Formula kn= KP*(W/L)\n",
"WbyL= kn/KP \n",
"print \"The value of (W/L)n = %0.2f\" %WbyL"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of RL = 4.2e+04 \u03a9\n",
"The value of (W/L)n = 1.59\n"
]
}
],
"prompt_number": 83
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.4 : Page No - 335\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Given data\n",
"unCox= 40 # in \u00b5A/V**2\n",
"upCox= 20 # in \u00b5A/V**2\n",
"Ln= 0.5 # in \u00b5m\n",
"Lp= 0.5 # in \u00b5m\n",
"Wn= 2.0 # in \u00b5m\n",
"Wp= unCox*Wn/upCox # in \u00b5m\n",
"print \"The value of Wp = %0.f \u00b5m\" %Wp"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of Wp = 4 \u00b5m\n"
]
}
],
"prompt_number": 84
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.5 : Page No - 337\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from __future__ import division\n",
"from sympy import symbols, solve, N\n",
"VOUT= symbols('VOUT')\n",
"# Given data\n",
"VTO= 0.43 # in V\n",
"VDD= 2.5 # in V\n",
"g=0.4 # value of gamma\n",
"W1= 0.375 \n",
"L1=0.25 \n",
"W2= 0.75 \n",
"L2=0.25 \n",
"#VDD-VOUT-VT= VDD-VOUT-(VTO+g*(sqrt(0.6+VOUT)-sqrt(0.6)))=0\n",
"#VOUT**2+VOUT*(2*A-g**2)+(A-0.6*g**2)=0, where\n",
"A=VTO-VDD-g*sqrt(0.6) # assumed\n",
"B= (2*A-g**2) # assumed\n",
"C=(A**2-0.6*g**2) #assumed\n",
" #VOUT= [1 B C] \n",
" #VOUT= roots(VOUT) # in V\n",
" #VOUT= VOUT(2) # in V\n",
"\n",
"\n",
"expr = VOUT**2+VOUT*(2*A-g**2+4.556)+(A-0.6*g**2)\n",
"VOUT= solve(expr, VOUT)\n",
"VOH= round(VOUT[1],4) # in V\n",
"print \"The value of VOH = %0.3f volts\" %VOH\n",
"Vout=(W1+3*L2)-(VDD-VTO)*(W2*L1/(W1*L2)-1)+ (VDD)/(VDD-VTO)\n",
"VOL= Vout # in V\n",
"print \"The value of VOL = %0.3f volts\" %VOL\n",
"Vth= (VDD+VTO-L1)/(VDD*VTO)*(1-W1*L2/(W2*L1))+(L1*L2/VDD)\n",
"print \"The value of Vth for circuit A = %0.3f volts\" %Vth\n",
"W4= 0.365 \n",
"L4=0.25 \n",
"W3= 0.75 \n",
"L3=0.15 \n",
"Vth=(L3*L4/VDD)+(VDD/(W3*L4*VDD))-(VDD)/(1-W4*L3/(W3*L4))-2*W4\n",
"print \"The value of Vth for circuit B = %0.3f volts\" %Vth\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of VOH = 1.766 volts\n",
"The value of VOL = 0.263 volts\n",
"The value of Vth for circuit A = 1.272 volts\n",
"The value of Vth for circuit B = 1.087 volts\n"
]
}
],
"prompt_number": 85
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 8.6 : Page No - 338\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from __future__ import division\n",
"from sympy import symbols, solve, N\n",
"Vx= symbols('Vx')\n",
"\n",
"#Given data\n",
"VTO= 0.43 # in V\n",
"VDD= 2.5 # in V\n",
"g=0.5 # value of gamma\n",
"#VDD-Vx-VT= VDD-Vx-(VTO+g*(sqrt(0.6+Vx)-sqrt(0.6)))=0\n",
"#Vx**2+Vx*(2*A-g**2)+(A-0.6*g**2)=0, where\n",
"A=VTO-VDD-g*sqrt(0.6) # assumed\n",
"B= (2*A-g**2) # assumed\n",
"C=(A**2-0.6*g**2) #assumed\n",
"expr = Vx**2+Vx*(2*A-g**2+5)+(A-0.6*g**2)\n",
"err, Vx= solve(expr , Vx)\n",
"print \"The value of Vx =\",round(Vx,4),\"volts\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of Vx = 1.6991 volts\n"
]
}
],
"prompt_number": 86
}
],
"metadata": {}
}
]
}
|