I'm looking here for some examples of block diagrams, I was however wondering how can I insert a small "cut" in the signals arc and label it with the bitwidth.
Like the following
I'm looking here for some examples of block diagrams, I was however wondering how can I insert a small "cut" in the signals arc and label it with the bitwidth.
Like the following
The "strike out" part has a good answer in How do I cancel/strike out a line?
To add the number you can for example add a label to the node, as in the first tikzpicture below. The second tikzpicture is exactly the same as the first, except that the options to the node is put in a style, for convenience.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.misc}
\begin{document}
\begin{tikzpicture}
\node (a) {\(A\)};
\node (b) at (0,-1) {\(B\)};
\draw[->] (a) -- node[strike out,draw,-,label=left:\tiny 4]{} (b);
\end{tikzpicture}
\begin{tikzpicture}[dashwithlabel/.style={strike out,draw,-,label=#1}]
\node (a) {\(A\)};
\node (b) at (0,-1) {\(B\)};
\draw[->] (a) -- node[dashwithlabel={left:\tiny 4}]{} (b);
\end{tikzpicture}
\end{document}
labelto the node providing the slanted line, e.g.\draw[->] (a) -- node[strike out,draw,label=above:\tiny 4]{} (b);. (requires theshapes.misclibrary). – Torbjørn T. Aug 16 '17 at 14:15leftinstead ofabovefor thelabel:label=left:\tiny 4. – Torbjørn T. Aug 16 '17 at 14:33