\begin{tikzpicture}
  
  \def\width{7cm}

  \tikzstyle{bfm}=[draw,
                   fill=white,
                   anchor = west,
                   minimum width=\dimexpr\width/2\relax,
                   node distance=\dimexpr\width/2+0.5cm\relax]
  \tikzstyle{multiple}=[double copy shadow = {shadow xshift=-0.5ex, shadow yshift=0.5ex}]
  \tikzstyle{multiple_nox}=[double copy shadow = {shadow xshift=0ex, shadow yshift=0.5ex}]
  \tikzstyle{bfms}=[bfm,multiple]


  \node [bfms] (BFMs) {BFMs};
  \node [bfm, below of=BFMs, node distance=2em] (MBIST_BFM) {\texttt{mbist.sv}};
  \node [bfm, right of=BFMs,
         draw=none]  (DUT) {};

  \node [bfm, right of=MBIST_BFM,
         minimum width=\dimexpr\width/2-1cm\relax] (BIST) {BIST};

  \node [bfms, right of=BFMs, minimum width=\dimexpr\width/2-1cm\relax] (BLOCKS) {Modules};

  \path [draw=black] ($(DUT.north west)+(0, 1)$) rectangle ($(BIST.south east)+(0.25,-0.25)$);
  \path ($(DUT.north  west) + (0,1)$) node [anchor=north west] (DUTtext) {DUT};

  \draw[->, multiple_nox] (BFMs) -- (BFMs -| DUT.north west);
  
  \draw[->, dashed] (MBIST_BFM) -- (BFMs);
  \draw[->] (MBIST_BFM) -- (BIST);

  \path[draw=black] ($(BFMs.north west) + (-0.5,    1)$) rectangle 
                    ($(BIST.south east)  + (0.5, -0.5)$);

  \draw ($(BFMs.north west) + (-0.5, 1)$) node [anchor=north west] (TB) {Test bench};

  \node [bfm, draw=none, below of=MBIST_BFM, node distance=1.5cm] (TC) {Test case};
  \path [draw=black] ($(MBIST_BFM.south west) + (-0.5, -1)$) rectangle ($(BIST.south east) + (0.5, -1.5)$);

  \draw[->, dashed] (TC) -- (MBIST_BFM);

  \draw [->] (2,-3) -- (3, -3) node [anchor=west] {Signál};
  \draw [->, dashed] (2,-3.5) -- (3,-3.5) node [anchor=west] {Volání tasku};
  
\end{tikzpicture}
