summaryrefslogtreecommitdiffstats
path: root/archive
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-11-18 10:38:50 +0000
committerYann Herklotz <git@yannherklotz.com>2020-11-18 10:39:00 +0000
commitf3b1fa0ebd42b718324fa3a8e691fa12b81b27ed (patch)
treeb2939c619e3c6faeefb429c2708c7a116facf4fd /archive
parent8c2a3b6aeb8864280fbde4bf1a3ae236c5df5cf8 (diff)
downloadoopsla21_fvhls-f3b1fa0ebd42b718324fa3a8e691fa12b81b27ed.tar.gz
oopsla21_fvhls-f3b1fa0ebd42b718324fa3a8e691fa12b81b27ed.zip
More work on algorithms
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 fe4cb10..376196a 100644
--- a/archive/algorithm.tex
+++ b/archive/algorithm.tex
@@ -1,3 +1,8 @@
+\paragraph{Key challenge: Adding reset signals}
+In hardware, there is no notion of a stack that can be popped or pushed. It is therefore necessary to add reset signals to the main module \JWcouldcut{that will be called} so that the proper state can be set at the start of the function.
+The main subtle change that was added to the code is the reset signal which sets the state to the starting state correctly. In HTL, this was described directly in the semantics, where the entry point is stored in the module interface of HTL. However, in Verilog we also want to verify that the hardware will be placed into the right state when we power it up or reset the design, and it therefore has to be encoded directly in the Verilog code.
+To check that the initial state of the Verilog is the same as the HTL code, we therefore have to run the module once, assuming the state is undefined and the reset is set to high. We then have to compare the abstract starting state stored in the HTL module to the bitvector value we obtain from running the module for one clock cycle and prove that they are the same. As the value for the state is undefined, the case statements will evaluate to the default state and therefore not perform any computations.
+
It is therefore important to find the right intermediate language \JW{You already said `crucial to know where to branch off' so this feels repetitive} so that the HLS tool still benefits from many of the generic optimisations that \compcert{} performs, but does not receive the code transformations that are specific to CPU architectures.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%