aboutsummaryrefslogtreecommitdiffstats
path: root/tex/vhdl.tex
blob: 185459256419e784f4f4b85b13d35ddfe6a167a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\section{VHSIC Hardware Description Language (\texttt{VHDL})}

\newcommand{\ph}[1]{\textrm{\textit{#1}}}
\newcommand{\reqph}[1]{\textrm{\textlangle\,\ph{#1}\,\textrangle}}
\newcommand{\optionalph}[1]{\textrm{[\,\ph{#1}\,]}}

\subsection{Entities and Architectures}

\begin{lstlisting}[language=vhdl]
entity `\reqph{name}` is
  port(
    `\reqph{pin}` : `\reqph{mode} \reqph{type}`;
  );
end `\reqph{name}`;
\end{lstlisting}

\begin{lstlisting}[language=vhdl]
architecture `\reqph{name}` of `\reqph{entity}` is
  -- declare used variables, signals and component types
begin
  -- concurrent area
end `\optionalph{name}`;
\end{lstlisting}

\subsection{Declaration}
\begin{lstlisting}[language=vhdl]
signal `\reqph{name}`, `\optionalph{name, \ldots}` : `\reqph{type}`;
variable `\reqph{name}`, `\optionalph{name, \ldots}` : `\reqph{type}`;

component `\reqph{entity name}` is
  port(
    `\ph{}`
  );
end component;
\end{lstlisting}

\subsection{Concurrent Area}

\begin{lstlisting}[language=vhdl]
`\optionalph{label}`: `\reqph{signal}` <= `\ph{Expression}`
\end{lstlisting}