From 07c8c2a02f3755f179a7ea4bc7dcc2b1d56f6708 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Thu, 20 May 2021 16:55:12 +0200 Subject: Start VHDL --- tex/vhdl.tex | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 tex/vhdl.tex (limited to 'tex') diff --git a/tex/vhdl.tex b/tex/vhdl.tex new file mode 100644 index 0000000..1854592 --- /dev/null +++ b/tex/vhdl.tex @@ -0,0 +1,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} + -- cgit v1.2.1