\begin{tikzpicture}[circuit logic US, scale=0.8]

  \def\outLen{2}
  \def\rightSpace{4}
  \def\leftSpace{2}

  \node [or gate, point right] (FAIL) {};
  \node [or gate, point right, below of= FAIL] (STALL) {};

  \draw[-] (FAIL.output)  to ++(right:\leftSpace)
              to[short, -*] (STALL.output -| \currentcoordinate);
  \draw[->, line width=1.75] (STALL.output)+(\leftSpace,0) 
              to
                node [at end, above, right] {MAI2MAI\_OUT}
                ++(right:\numexpr\outLen+\leftSpace\relax);

  \draw[-] (STALL.output) -- ++ (right:\leftSpace);

  \draw[-] (STALL.input 1)+(-\rightSpace,0) -- (STALL.input 1);
  \draw[-] (FAIL.input 1) to ++(left:\rightSpace)
                          to[short,-*] (STALL.input 1 -| \currentcoordinate);
  \draw[>-, line width=1.75] (STALL.input 1)+(\numexpr-\outLen-\rightSpace\relax,0)
                          to 
                            node [at start, left] {MAI2MAI\_IN}
                            ($(STALL.input 1)+(-\rightSpace,0)$);

  \draw[-] (STALL.input 2) to 
              node[at end, left] {local\_stall}
              ++(left:0.5);
  \draw[-] (FAIL.input 2)  to 
              node[at end, left] {local\_fail}
              ++(left:0.5);

  \path[draw=black] (FAIL.north west)+(\numexpr-1-\rightSpace\relax,+0.75) rectangle
                    ($(STALL.south east)+(1.5+\leftSpace,-1.5)$);


%  \node [twoport, below of=STALL] (SHIFT) {Sériový přístup};
  \draw ($(STALL.output)+(\leftSpace,0)$)
        to[short] ++(down:0.75)
        to[-<] 
          node [at end, left] (SO) {Serial out}
          ++(left:0.5);

  \draw ($(STALL.input 1)+(-\rightSpace,0)$)
        to[short] (SO -| \currentcoordinate)
        to[->] 
          node [at end, right] {Serial in}
          ++(right:0.5);

\end{tikzpicture}
