NMOS Differential Pair


Rendered by QuickLaTeX.com

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
\begin{tikzpicture}
%--------start graphics code --------
%Grid for intial drawing.
%Comment next three lines one typesetting finished
\def\figHt{5.5};
\draw[step=0.5,very thin, black!20] (-0.5,-0.5) grid (7,6);
\foreach \x in {0,...,7} {\node [anchor=north] at (\x,-0.5) {\x};}
\foreach \y in {0,...,6} {\node [anchor=east] at (-0.5,\y) {\y};}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% NMOS current mirror %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\coordinate (ref_node1) at (0,0);
\coordinate (ref_node1T) at ($(ref_node1)+(0,\figHt)$); 
%Instantiation of components
\draw (ref_node1) node[nmos,anchor=source,xscale=-1] (Mt1){};
\draw (ref_node1T) to [I] (Mt1.drain);
%Inter-connections
\draw (Mt1.drain) node[circ] -| (Mt1.gate);
% Numbering the components
\draw (Mt1.base) node[left]{$M_{t1}$};
%Ground and Vdd lines
\draw (Mt1.source) node[ground]{};
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Differential pair %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\coordinate (ref_node) at (4,0); 
\coordinate (ref_nodeT) at ($(ref_node)+(0,\figHt)$); 
%Component instantiation
\draw (ref_node) node[nmos,anchor=source] (M0){}
      (ref_node) ++(-1.5,2) node[nmos, anchor=source] (M1){}
      (ref_node) ++(1.5,2) node[nmos, anchor=source, xscale=-1] (M2){}
      (ref_nodeT) ++(-1.5,0) node[pmos, anchor=source, xscale=-1] (M3){}
      (ref_nodeT) ++(1.5,0) node[pmos, anchor=source] (M4){} ;
%Inter-connections
\draw (M1.drain) -- (M3.drain)node[circ] -| (M3.gate) node[circ] -- (M4.gate);
\draw (M4.drain) -- (M2.drain);
\draw (M1.source) |- (M0.drain) node[circ] -| (M2.source);
% Numbering the components
\draw (M0.base) node[right]{$M_0$}
      (M1.base) node[right]{$M_1$}
      (M2.base) node[left] {$M_2$}
      (M3.base) node[left] {$M_3$}
      (M4.base) node[right]{$M_4$};
\draw (M1.gate) node[ocirc] node[left] {$v_{ip}$}
      (M2.gate) node[ocirc] node[right]{$v_{im}$}
      (M2.drain) node[circ] -- ++(0.5,0) node[ocirc](vout){} node[right]{$v_{out}$};
%Ground and Vdd lines
\draw (M0.source) node[ground]{};
\draw (M3.source) -- ++(1.5,0) node[anchor=south] {$V_{DD}$} -- (M4.source);
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%% TOP LEVEL INTERCONNECTIONS %%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw (M0.gate) -- (Mt1.gate) node[circ];
\draw (ref_node1T) |- (M3.source) node[circ];
%--------end graphics code ----------
\end{tikzpicture}