Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[border=10pt]{standalone}
- \usepackage[utf8]{inputenc}
- \usepackage[english]{babel}
- \usepackage{tikz}
- \usetikzlibrary{
- shapes.geometric,
- arrows.meta,
- positioning,
- fit,
- calc
- }
- % Стили по ГОСТ 19.701-90
- \tikzset{
- startstop/.style={
- rectangle,
- rounded corners,
- minimum width=3cm,
- minimum height=1cm,
- text centered,
- draw=black,
- fill=white,
- font=\bfseries
- },
- process/.style={
- rectangle,
- minimum width=3cm,
- minimum height=1.5cm,
- text centered,
- draw=black,
- fill=white,
- font=\bfseries
- },
- decision/.style={
- diamond,
- minimum width=3cm,
- minimum height=1cm,
- text centered,
- draw=black,
- fill=white,
- font=\bfseries
- },
- io/.style={
- trapezium,
- trapezium left angle=70,
- trapezium right angle=110,
- minimum width=3cm,
- minimum height=1cm,
- text centered,
- draw=black,
- fill=white,
- font=\bfseries
- },
- arrow/.style={
- thick,
- ->,
- >=Latex
- },
- dashed_box/.style={
- draw,
- dashed,
- inner sep=5mm
- }
- }
- \begin{document}
- \begin{tikzpicture}[node distance=2cm]
- % Блоки памяти
- \node (memA) [process] {MemA};
- \node (memB) [process, below=of memA, yshift=-1cm] {MemB};
- \node (control) [process, below=of memB, yshift=-0.5cm] {Control};
- % Блоки обработки
- \node (multiplier) [process, right=4cm of memA, yshift=-0.75cm] {Multiplier};
- \node (accumulator) [process, right=of multiplier] {Accumulator};
- % Пунктирные рамки групп
- \node (group1) [dashed_box, fit=(memA)(memB)] {};
- \node (group2) [dashed_box, fit=(multiplier)(accumulator)] {};
- \node (group3) [dashed_box, fit=(control), inner sep=5mm, yshift=-5mm] {};
- % Стрелки
- \draw [arrow, line width=2pt] (memA.east) -- ++(1,0) |-
- node[pos=0.25, above] {Aij} (multiplier.west);
- \draw [arrow, line width=2pt] (memB.east) -- ++(1,0) |-
- node[pos=0.25, below] {Bjk} (multiplier.west);
- \draw [arrow] (multiplier.east) -- (accumulator.west);
- \draw [arrow] (accumulator.east) -- ++(2,0);
- \draw [arrow] (control.north) -- (memB.south);
- \draw [arrow] (control.east) -| (multiplier.south);
- \draw [arrow] (control.east) -| (accumulator.south);
- % Выход из аккумулятора
- \node[right=0.5cm of accumulator.east] {I};
- \end{tikzpicture}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment