Skip to content

Commit

Permalink
Cleanup related to 'elsewhen'
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Oct 12, 2020
1 parent 3962fdd commit a03366f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
16 changes: 5 additions & 11 deletions chapters/equations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -288,26 +288,20 @@ \subsubsection{Restrictions on Equations within When-Equations}\label{restrictio
\end{lstlisting}
\end{example}

The equations within the when-equation must have one of the following
forms:
The equations within the when-equation must have one of the following forms:
\begin{itemize}
\item
\lstinline!v = expr;!
\item
\lstinline!(out1, out2, out3, $\ldots$) = function_call_name(in1, in2, $\ldots$);!
\item
operators \lstinline!assert!, \lstinline!terminate!, \lstinline!reinit!
Operators \lstinline!assert!, \lstinline!terminate!, \lstinline!reinit!.
\item
For- and if-equations if the equations within the for- and
if-equations satisfy these requirements.
For- and if-equations if the equations within the for- and if-equations satisfy these requirements.
\item
The different branches of when/elsewhen must have the same set of
component references on the left-hand side.
The different branches of \lstinline!when!/\lstinline!elsewhen! must have the same set of component references on the left-hand side.
\item
The branches of an if-then-else clause inside when-equations must have
the same set of component references on the left-hand side, unless the
if-then-else have exclusively parameter expressions as switching
conditions.
The branches of an if-then-else clause inside when-equations must have the same set of component references on the left-hand side, unless the if-then-else have exclusively parameter expressions as switching conditions.
\end{itemize}

Any left hand side reference, (\lstinline!v!, \lstinline!out1!, \ldots), in a when-clause must
Expand Down
4 changes: 1 addition & 3 deletions chapters/synchronous.tex
Original file line number Diff line number Diff line change
Expand Up @@ -809,9 +809,7 @@ \section{Clocked When Clause}\label{clocked-when-clause}
end when;
\end{lstlisting}

The clocked when-clause cannot be nested and does not have any elsewhen
part. It cannot be used inside an algorithm. General equations are
allowed in a clocked when-clause.
The clocked when-clause cannot be nested and does not have any \lstinline!elsewhen! part. It cannot be used inside an algorithm. General equations are allowed in a clocked when-clause.

For a clocked when-clause, all equations inside the when-clause are
clocked with the same clock given by the \emph{clock-expression}.
Expand Down

0 comments on commit a03366f

Please sign in to comment.