summaryrefslogtreecommitdiffstats
path: root/verilog.tex
diff options
context:
space:
mode:
authorJohn Wickerson <j.wickerson@imperial.ac.uk>2020-06-29 16:03:44 +0000
committeroverleaf <overleaf@localhost>2020-06-29 16:11:54 +0000
commit2b4769853b0a99c9a5c32e1d913e1de0f7573450 (patch)
tree5b8e53c8ea63e3cfef03b290634ff1433a0f35c0 /verilog.tex
parent9797dabf78b306183766c2446b3ee62406d9623f (diff)
downloadoopsla21_fvhls-2b4769853b0a99c9a5c32e1d913e1de0f7573450.tar.gz
oopsla21_fvhls-2b4769853b0a99c9a5c32e1d913e1de0f7573450.zip
Update on Overleaf.
Diffstat (limited to 'verilog.tex')
-rw-r--r--verilog.tex6
1 files changed, 3 insertions, 3 deletions
diff --git a/verilog.tex b/verilog.tex
index 6f1e5ee..13fee98 100644
--- a/verilog.tex
+++ b/verilog.tex
@@ -2,7 +2,7 @@
Verilog is a hardware description language commonly used to design hardware. A Verilog design can then be synthesised into more basic logic which describes how different gates connect to each other, called a netlist. This representation can then be put onto either a field-programmable gate array (FPGA) or turned into an application-specific integrated circuit (ASPIC) to implement the design that was described in Verilog. The Verilog standard is quite large though, and not all Verilog features are needed to be able to describe hardware. Many Verilog features are only useful for simulation and do not affect the actual hardware itself, which means that these features do not have to be modelled in the semantics. In addition to that, as the HLS algorithm dictates which Verilog constructs are generated, meaning the Verilog subset that has to be modelled by the semantics can be reduced even further to only support the constructs that are needed. Only supporting a smaller subset in the semantics also means that there is less chance that the standard is misunderstood, and that the semantics actually model how the Verilog is simulated.
-The Verilog semantics are based on the semantics proposed by \citet{loow19_verif_compil_verif_proces}, which were used to create a formal translation from HOL logic into a Verilog circuit. These semantics are quite practical as they restrict themselves to a small subset of Verilog, which can nonetheless be used to model all hardware constructs one would want to design. The main syntax for the Verilog subset is the following:
+The Verilog semantics are based on the semantics proposed by \citet{loow19_verif_compil_verif_proces}, which were used to create a formal translation from HOL logic into a Verilog circuit. These semantics are quite practical as they restrict themselves to a small subset of Verilog, which can nonetheless be used to model all hardware constructs one would want to design. The main syntax for the Verilog subset is the following: \JW{Eventually the $e$ alternatives could be listed horizontally rather than with one per line, to save space.} \JW{This verilog syntax looks weird to me. I didn't think there was a `then' keyword, for instance. Perhaps you're aiming more at some sort of abstracted syntax of Verilog? What does the semicolon on its own mean? Some sort of skip statement? The case statement looks weird too -- how do you get multiple cases in a single switch statement, and where is the default case? }
\begin{align*}
v ::=&\; \mathit{sz} * n\\
@@ -10,7 +10,7 @@ The Verilog semantics are based on the semantics proposed by \citet{loow19_verif
|&\; x\\[-2pt]
|&\; e [e]\\[-2pt]
|&\; e\ \mathit{op}\ e\\[-2pt]
- |&\; \texttt{!} e\ |\ \texttt{~} e\\[-2pt]
+ |&\; \texttt{!} e\ |\ \texttt{\textasciitilde} e\\[-2pt]
|&\; e \texttt{ ? } e \texttt{ : } e\\
s ::=&\; s\ \texttt{;}\ s\ |\ \texttt{;}\\[-2pt]
|&\; \texttt{if } e \texttt{ then } s \texttt{ else } s\\[-2pt]
@@ -22,7 +22,7 @@ The Verilog semantics are based on the semantics proposed by \citet{loow19_verif
|&\; \text{\tt always @(posedge clk)}\ s
\end{align*}
-The main addition to the Verilog syntax is the explicit declaration of inputs and outputs, as well as variables and arrays. This means that the declarations have to be handled in the semantics as well, adding to the safety that all the registers are declared properly with the right size, as this affects how the Verilog module is synthesised and simulated. In addition to that, literal values are not represented by a list of nested boolean values, but instead they are represented by a size and its value, meaning a boolean is represented as a value with size one. Finally, the last difference is that the syntax supports two dimensional arrays in Verilog explicitly which model memory so that we can reason about array loads and stores properly.
+The main addition to the Verilog syntax is the explicit declaration of inputs and outputs, as well as variables and arrays. This means that the declarations have to be handled in the semantics as well, adding to the safety that all the registers are declared properly with the right size, as this affects how the Verilog module is synthesised and simulated. In addition to that, literal values are not represented by a list of nested boolean values, but instead they are represented by a size and its value \JW{But I wouldn't use `$*$' to separate the size and the value here, because it makes it look like you're multiplying them together. You could use the apostrophe symbol like real Verilog? \texttt{4'b5} and so on?}, meaning a boolean is represented as a value with size one. Finally, the last difference is that the syntax supports two dimensional arrays in Verilog explicitly which model memory so that we can reason about array loads and stores properly.
\subsection{Semantics}