入力出力インターフェース図

入力出力インターフェース図

そのような図を作成したいのですが、誰か助けてもらえますか?私は現在ここにいます。よろしくお願いいたします

\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{calc,arrows}
\makeatletter
\pgfdeclareshape{circuit}{
  \savedanchor\northeast{
    \pgfmathsetlength\pgf@x{\pgfshapeminwidth}
    \pgfmathsetlength\pgf@y{\pgfshapeminheight}
    \pgf@x=0.5\pgf@x
    \pgf@y=0.5\pgf@y}
  \savedanchor\southwest{
    \pgfmathsetlength\pgf@x{\pgfshapeminwidth}
    \pgfmathsetlength\pgf@y{\pgfshapeminheight}
    \pgf@x=-0.5\pgf@x
    \pgf@y=-1.9\pgf@y}
  \inheritanchorborder[from=rectangle]
  \anchor{center}{\pgfpointorigin}
  \anchor{north}{\northeast \pgf@x=0pt}
  \anchor{east}{\northeast \pgf@y=0pt}
  \anchor{south}{\southwest \pgf@x=0pt}
  \anchor{west}{\southwest \pgf@y=0pt}
  \anchor{north east}{\northeast}
  \anchor{north west}{\northeast \pgf@x=-\pgf@x}
  \anchor{south west}{\southwest}
  \anchor{south east}{\southwest \pgf@x=-\pgf@x}
  \anchor{text}{
    \pgfpointorigin
    \advance\pgf@x by -.5\wd\pgfnodeparttextbox
    \advance\pgf@y by -7.800000000000002\ht\pgfnodeparttextbox
    \advance\pgf@y by +.5\dp\pgfnodeparttextbox}
\anchor{ina}{
  \pgf@process{\northeast}
  \pgf@x=-1\pgf@x
  \pgf@y=0.5\pgf@y}
\anchor{inb}{
  \pgf@process{\northeast}
  \pgf@x=-1\pgf@x
  \pgf@y=0.09999999999999998\pgf@y}
\anchor{inc}{
  \pgf@process{\northeast}
  \pgf@x=-1\pgf@x
  \pgf@y=-0.6000000000000001\pgf@y}
\anchor{ind}{
  \pgf@process{\northeast}
  \pgf@x=-1\pgf@x
  \pgf@y=-1\pgf@y}
\anchor{ine}{
  \pgf@process{\northeast}
  \pgf@x=-1\pgf@x
  \pgf@y=-1.4\pgf@y}
\anchor{outa}{
  \pgf@process{\northeast}
  \pgf@y=0.5\pgf@y}
\anchor{outb}{
  \pgf@process{\northeast}
  \pgf@y=-0.2\pgf@y}
\anchor{outc}{
  \pgf@process{\northeast}
  \pgf@y=-0.6000000000000001\pgf@y}
\anchor{outd}{
  \pgf@process{\northeast}
  \pgf@y=-1\pgf@y}
\anchor{inf}{
  \pgf@process{\northeast}
  \pgf@x=-1\pgf@x
  \pgf@y=-2.1\pgf@y}
\anchor{ing}{
  \pgf@process{\northeast}
  \pgf@x=-1\pgf@x
  \pgf@y=-2.799999999999999\pgf@y}
\anchor{inh}{
  \pgf@process{\northeast}
  \pgf@x=-1\pgf@x
  \pgf@y=-3.199999999999999\pgf@y}
\anchor{ini}{
  \pgf@process{\northeast}
  \pgf@x=-1\pgf@x
  \pgf@y=-3.599999999999999\pgf@y}
\anchor{oute}{
  \pgf@process{\northeast}
  \pgf@y=-1.7\pgf@y}
\backgroundpath{
  \pgfpathrectanglecorners{\southwest}{\northeast}
  \begingroup
    \tikzset{labels}
    \tikz@textfont
  \endgroup}}
\tikzset{add font/.code={\expandafter\def\expandafter\tikz@textfont\expandafter{\tikz@textfont#1}}}
\tikzset{labels/.style={font=\sffamily\scriptsize}}
\tikzset{every circuit node/.style={draw,minimum width=2cm,minimum height=2.5cm,very thick,inner sep=1mm,outer sep=0pt,cap=round,add font=\sffamily\bfseries}}
\makeatother
\begin{document}
\begin{figure}[htb]
\centering
\begin{tikzpicture}[font=\sffamily,>=triangle 45]
  \node [shape=circuit] (item) at (0,0) {wrapper\_dec\_viterbi};
  \draw [<-] (item.ina) node [anchor=west,labels] {} -- +(-1,0) node [anchor=east] {aclk};
  \draw [<-] (item.inb) node [anchor=west,labels] {} -- +(-1,0) node [anchor=east] {aresetn};
  \draw [<-] (item.inc) node [anchor=west,labels] {} -- +(-1,0) node [anchor=east] {s\_axis\_input\_tvalid};
  \draw [<-] (item.ind) node [anchor=west,labels] {} -- +(-1,0) node [anchor=east] {s\_axis\_input\_tdata};
  \draw [<-] (item.ine) node [anchor=west,labels] {} -- +(-1,0) node [anchor=east] {s\_axis\_input\_tlast};
  \draw [->] (item.outa) node [anchor=east,labels] {} -- +(1,0) node [anchor=west] {s\_axis\_input\_tready};
  \draw [->] (item.outb) node [anchor=east,labels] {} -- +(1,0) node [anchor=west] {m\_axis\_output\_tvalid};
  \draw [->] (item.outc) node [anchor=east,labels] {} -- +(1,0) node [anchor=west] {m\_axis\_output\_tdata};
  \draw [->] (item.outd) node [anchor=east,labels] {} -- +(1,0) node [anchor=west] {m\_axis\_output\_tlast};
  \draw [<-] (item.inf) node [anchor=west,labels] {} -- +(-1,0) node [anchor=east] {m\_axis\_output\_tready};
  \draw [<-] (item.ing) node [anchor=west,labels] {} -- +(-1,0) node [anchor=east] {s\_axis\_ctrl\_tvalid};
  \draw [<-] (item.inh) node [anchor=west,labels] {} -- +(-1,0) node [anchor=east] {s\_axis\_ctrl\_tdata};
  \draw [<-] (item.ini) node [anchor=west,labels] {} -- +(-1,0) node [anchor=east] {s\_axis\_ctrl\_tlast};
  \draw [->] (item.oute) node [anchor=east,labels] {} -- +(1,0) node [anchor=west] {s\_axis\_ctrl\_tready};
\end{tikzpicture}
\caption{Entity of wrapper\_dec\_viterbi}
\end{figure}
\end{document}

ここに画像の説明を入力してください

関連情報