Current Mirror


Current Mirror

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
\begin{tikzpicture}
%--------start graphics code --------
%Grid for intial drawing.
%Comment next three lines once typesetting finished
\def\figHt{6};
\def\figWd{7};
\draw[step=0.5,very thin, black!20] (-0.5,-0.5) grid (\figWd,\figHt);
\foreach \x in {0,...,\figWd} {\node [anchor=north] at (\x,-0.5) {\x};}
\foreach \y in {0,...,\figHt} {\node [anchor=east] at (-0.5,\y) {\y};}
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% PMOS current mirror %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\coordinate (ref_node) at (0,0);
\coordinate (ref_nodeA) at ($(ref_node)+(0,\figHt)$); 
%Instantiation of components
\draw (ref_nodeA) node[pmos,anchor=source,xscale=-1](Mt0){};
\draw (Mt0.drain) to [I] (ref_node);
%Inter-connections
\draw (Mt0.gate) |- (Mt0.drain) node[circ];
% Numbering the components
\draw (Mt0.base) node[left] {$M_{t0}$};
%Ground and Vdd lines
\draw (ref_node) node[ground]{};
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% NMOS current mirror %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\coordinate (ref_node1) at (3,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]{}; % node[circ] -- (Mt1.source);
%--------end graphics code ----------
\end{tikzpicture}