summaryrefslogtreecommitdiffstats
path: root/verilog.tex
diff options
context:
space:
mode:
authorJohn Wickerson <j.wickerson@imperial.ac.uk>2020-11-20 12:46:14 +0000
committeroverleaf <overleaf@localhost>2020-11-20 12:47:51 +0000
commita43dc70402643c4e13624702be1165c20276cd02 (patch)
tree9060fc45e32bacaf01043e2e14969b33c03b7753 /verilog.tex
parent255a3d4d25a31fa8342b1061a3955ad37fcb118d (diff)
downloadoopsla21_fvhls-a43dc70402643c4e13624702be1165c20276cd02.tar.gz
oopsla21_fvhls-a43dc70402643c4e13624702be1165c20276cd02.zip
Update on Overleaf.
Diffstat (limited to 'verilog.tex')
-rw-r--r--verilog.tex8
1 files changed, 3 insertions, 5 deletions
diff --git a/verilog.tex b/verilog.tex
index 690f7e5..380bbcb 100644
--- a/verilog.tex
+++ b/verilog.tex
@@ -98,15 +98,13 @@ To support this computational model, we extend the Verilog module we generate wi
Figure~\ref{fig:inferrence_module} shows the inference rules for moving between the computational states. The first, \textsc{Step}, is the normal rule of execution. It defines one step in the \texttt{State} state, assuming that the module is not being reset, that the finish state has not been reached yet, that the current and next state are $v$ and $v'$, and that the module runs from state $\Gamma$ to $\Gamma'$ using the \textsc{Step} rule. The \textsc{Finish} rule returns the final value of running the module and is applied when the \textit{fin} register is set; the return value is then taken from the \textit{ret} register.
-
-The first thing to note about the \textsc{Call} rule is that there is no step from \texttt{State} to \texttt{Callstate}, as function calls are not supported, and it is therefore impossible in our semantics to ever reach a \texttt{Callstate} except for the initial call to main. The same can be said about the \textsc{Return} state rule, which will only be matched for the final return value from the main function, as there is no rule that allocates another stack frame \textit{sf} except for the initial call to main. Therefore, in addition to the rules shown in Figure~\ref{fig:inferrence_module}, an initial state and final state need to be defined.
-
+Note that there is no step from \texttt{State} to \texttt{Callstate}; this is because function calls are not supported, and it is therefore impossible in our semantics to ever reach a \texttt{Callstate} except for the initial call to main. So the \textsc{Call} rule is only used at the very beginning of execution; likewise, the \textsc{Return} rule is only matched for the final return value from the main function. %as there is no rule that allocates another stack frame \textit{sf} except for the initial call to main.
+Therefore, in addition to the rules shown in Figure~\ref{fig:inferrence_module}, an initial state and final state need to be defined:
\begin{align*}
\texttt{initial:}\quad &\forall P,\ \yhconstant{Callstate } []\ P.\texttt{main } []\\
\texttt{final:}\quad &\forall n,\ \yhconstant{Returnstate } []\ n \implies n
\end{align*}
-
-\noindent where the initial state is defined as the \texttt{Callstate} with an empty stack frame and no arguments for the \texttt{main} function of program $P$, and the final state results in the program output of value $n$ when reaching a \texttt{Returnstate} with an empty stack frame.
+\noindent where the initial state is the \texttt{Callstate} with an empty stack frame and no arguments for the \texttt{main} function of program $P$, and the final state results in the program output of value $n$ when reaching a \texttt{Returnstate} with an empty stack frame.
%%% Local Variables:
%%% mode: latex