summaryrefslogtreecommitdiffstats
path: root/archive
diff options
context:
space:
mode:
authorJohn Wickerson <j.wickerson@imperial.ac.uk>2020-11-20 12:41:44 +0000
committeroverleaf <overleaf@localhost>2020-11-20 12:42:33 +0000
commit255a3d4d25a31fa8342b1061a3955ad37fcb118d (patch)
treee1e6eda047672e83d0db5cc63f5c520486fc75c9 /archive
parent47585b142f991d55f7d7019c3e8383b839f98001 (diff)
downloadoopsla21_fvhls-255a3d4d25a31fa8342b1061a3955ad37fcb118d.tar.gz
oopsla21_fvhls-255a3d4d25a31fa8342b1061a3955ad37fcb118d.zip
Update on Overleaf.
Diffstat (limited to 'archive')
-rw-r--r--archive/algorithm.tex5
1 files changed, 5 insertions, 0 deletions
diff --git a/archive/algorithm.tex b/archive/algorithm.tex
index bd85e4b..d04b5e0 100644
--- a/archive/algorithm.tex
+++ b/archive/algorithm.tex
@@ -1,3 +1,8 @@
+The translation from 3AC to HTL is straightforward, as each 3AC instruction either matches up quite well to a hardware construct, or does not have to be handled by the translation, such as function calls.
+%At each instruction, the control flow is separated from the data computation and is then added to the control logic and data-flow map respectively.
+%\JW{I suspect that you could safely chop that sentence.}
+For example, in state 15 in figure~\ref{fig:accumulator_rtl}, the register \texttt{x8} is initialised to 1, after which the control flow moves to state 14. This is encoded in HTL by initialising a 32-bit register \texttt{reg\_8} to 1 in the data-flow section, and also adding a transition to the state 15 in the control logic section. Simple operator instructions are translated in a similar way. For example, in state 5, the value in the array is added to the current value of the accumulated sum, which is simply translated to an addition of the equivalent registers in the HTL code.
+
\subsection{Translating HTL to Verilog}
Finally, we have to translate the HTL code into proper Verilog and prove that it behaves the same as the 3AC according to the Verilog semantics. Whereas HTL is a language that is specifically designed to represent the FSMDs we are interested in, Verilog is a general-purpose HDL.\@ So the challenge here is to translate our FSMD representation into a Verilog AST. However, as all the instructions are already expressed in Verilog, only the maps need to be translated to valid Verilog, and correct declarations for all the variables in the program need to be added as well.