# Complicated logic circuit drawing with Tikz - two input buffer gate?

i'm trying to draw similar image with Tikz and Circuit Library, so far i'm stucked at drawing buffer gate with two labeled inputs (IBUFGDS and IBUFDS), standard library have a gate with only one input...

Anyone have an idea how can i start?

Complete drawing is not necessary , i just need a hand:D

So far i come up with somtheing like this, but it's just a start:P

\documentclass{article}
\usepackage{circuitikz}
\begin{document}

\begin{circuitikz} \draw
(0,0) node[op amp] (opamp) {IBUFDS}
(opamp.+) node[left] {$data\ ser\ p$}
(opamp.-) node[left] {$data\ ser\ n$}
(opamp.out) node[right] {$data\ ser$}

(0,-5) node[op amp] (opamp) {IBUFGDS}
(opamp.+) node[left] {$clk\ in\ p$}
(opamp.-) node[left] {$clk\ in\ n$}
(opamp.out) node[right] {$clk\ in$}
;\end{circuitikz}

\end{document}

-
Can you post what you have already written so far? This way, you can get answers faster. Have a look at circuitikz package. –  hpesoj626 Nov 27 '12 at 15:13
not too much:D I tried to add new circuit symbol but it's not working –  Mapedd Nov 27 '12 at 15:19
how can i post a longer code sample in the comment? –  Mapedd Nov 27 '12 at 15:26
Just edit your question and put your code sample in. –  hpesoj626 Nov 27 '12 at 15:28
sure:D obligatory characters to exceed 15 limit –  Mapedd Nov 27 '12 at 15:33

The problem with the labels in the operationals is that the point at which the label is centered is not at the right place. This can be easily spotted if you use a \bullet as label. It is not the "center" of the node either, as can be seen by drawing a red dot at (0,0):

\begin{circuitikz}
\fill[red] (0,0) circle(2pt);
\draw (0,0) node[op amp] (opamp) {$\bullet$}
(opamp.+) node[left] {$data\ ser\ p$}
(opamp.-) node[left] {$data\ ser\ n$}
(opamp.out) node[right] {$data\ ser$}
;\end{circuitikz}


So, the best option is to place a new node containing the label, positioned relative to the center of the operational (the red dot in the figure above). The left side of the operational is at 10mm from the red dot, so you can put your label at (-9mm,0). Using the same amount in all your operationals ensures that all the inner labels are left aligned. The following code implements this idea:

\documentclass{article}
\usepackage{circuitikz}
\begin{document}

\tikzset{opamp label/.style={xshift=-9mm, font=\footnotesize,right}}
\begin{circuitikz}
\draw
(0,0) node[op amp] (opamp) {}
(opamp.+)   node[left]        {$data\ ser\ p$}
(opamp.-)   node[left]        {$data\ ser\ n$}
(opamp.out) node[right]       {$data\ ser$}
(opamp)     node[opamp label] {IBUFDS}

(0,-3) node[op amp] (opamp) {}
(opamp.+)   node[left]        {$clk\ in\ p$}
(opamp.-)   node[left]        {$clk\ in\ n$}
(opamp.out) node[right]       {$clk\ in$}
(opamp)     node[opamp label] {IBUFGDS}
;
\end{circuitikz}
\end{document}


Resulting in:

-
Great, thanks for help, what about arrow underneath the buffer, from the left right edge, like T_IOPI in the image on the first page –  Mapedd Nov 28 '12 at 12:52