I started to use the circ package and I would like to draw this kind of black box, but the final result is unsatisfactory: how can I take advantage of LaTeX principles in this kind of code? For example, the square is not precise and I would like to add the arrows and other symbols inside the square.
\documentclass{article}
\usepackage[basic,box,gate,oldgate,ic,optics,physics]{circ}
\usepackage{tikz-timing}
\newcommand{\degr}{degr}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{circuit}1
\- 20 l
\- 20 u
\- 20 r
\- 20 d
\at{-19} {17}
\centertext CMD from { } to { }
\at{-20} {17}
\bundle { } 10 l
\at{-20} {10}
\bundle {1} 10 l
\at{-19} {10}
\centertext DSI from { } to { }
\at{-20} {3}
\bundle {64} 10 l
\at{-19} {3}
\centertext DATAIN from { } to { }
\at{0} {16}
\bundle {1} 10 r
\at{-4} {16}
\centertext DSO from { } to { }
\at{0} {12}
\bundle {1} 10 r
\at{-4} {12}
\centertext ERR from { } to { }
\at{0} {8}
\bundle {1} 10 r
\at{-4} {8}
\centertext ACK from { } to { }
\at{0} {4}
\bundle {64} 10 r
\at{-5} {4}
\centertext DOUT from { } to { }
\at{-10} {10}
\centertext BLACKBOX from { } to { }
\at{-18} {0.3}
\centertext $\bigtriangleup$ from { } to { }
\at{-17.4} {0}
\- 5 d
\centertext CLK from { } to { }
\at{-14} {-0.6}
\centertext $\bigcirc$ from { } to { }
\at{-13.4} {-1.2}
\- 5 d
\centertext RST from { } to { }
\end{circuit}
\end{center}
\end{document}