Fix typos
[matthijs/master-project/haskell-symposium-talk.git] / introduction.lhs
1 %include talk.fmt
2 \section{Introduction}
3 \subsection{What is \texorpdfstring{\clash{}}{CLasH}}
4 \frame
5 {
6   \frametitle{What is \clash{}?}\pause
7   \begin{itemize}
8     \item \clash{}: CAES Language for Hardware\pause
9     \item Rapid prototyping language\pause
10     \item Subset of Haskell can be translated to Hardware (VHDL)\pause
11     \item Structural Description of the logic part of a Mealy Machine
12   \end{itemize}
13 }
14 \note[itemize]
15 {
16 \item We are a Computer Architectures group, this has been a Masters' project, no prior experience with Haskell.
17 \item \clash{} is written in Haskell, of course
18 \item \clash{} is currently meant for rapid prototyping, not verification of hardware designs
19 \item Functional languages are close to Hardware
20 \item We can only translate a subset of Haskell
21 \item All functions are structural descriptions with a Mealy Machines perspective
22 }
23
24 \frame
25 {
26 \frametitle{Mealy Machine}
27 \begin{figure}
28 \centerline{\includegraphics<1>[width=6.25cm]{mealymachine2}
29 \includegraphics<2>[width=6.25cm]{mealymachine2-func-red}
30 \includegraphics<3>[width=6.25cm]{mealymachine2-state-red}}
31 \label{img:mealymachine}
32 \end{figure}
33 \begin{beamercolorbox}[sep=-2.5ex,rounded=true,shadow=true,vmode]{codebox}
34 \begin{code}
35 run {-"{\color<2>[rgb]{1,0,0}"-}func{-"}"-} {-"{\color<3>[rgb]{1,0,0}"-}state{-"}"-} [] = []
36 run {-"{\color<2>[rgb]{1,0,0}"-}func{-"}"-} {-"{\color<3>[rgb]{1,0,0}"-}state{-"}"-} (i:inputs) = o:outputs
37   where
38     ({-"{\color<3>[rgb]{1,0,0}"-}state'{-"}"-}, o)  =   {-"{\color<2>[rgb]{1,0,0}"-}func{-"}"-} i {-"{\color<3>[rgb]{1,0,0}"-}state{-"}"-}
39     outputs                                         =   run {-"{\color<2>[rgb]{1,0,0}"-}func{-"}"-} {-"{\color<3>[rgb]{1,0,0}"-}state'{-"}"-} input
40 \end{code}
41 \end{beamercolorbox}
42 }
43 \note[itemize]{
44 \item A Mealy machine bases its output on the current state and the input
45 \item State is part of the function signature
46 \item Both the current state, and the updated State
47 \item The run function simulates a mealy machine for the provided number of inputs
48 }
49
50 \frame
51 {
52 \frametitle{Haskell Description}
53 \begin{figure}
54 \centerline{\includegraphics[width=6.25cm]{mealymachine2-func-red}}
55 \end{figure}
56 \begin{beamercolorbox}[sep=-2.5ex,rounded=true,shadow=true,vmode]{codebox}
57 \begin{code}
58 func :: 
59   InputSignal ->
60   State ->
61   (State, OutputSignal)
62 \end{code}
63 \end{beamercolorbox}
64 }
65 \note[itemize]{
66 \item In \clash{} you describe the logic part of the mealy machine
67 \item The state in the signature is turned into memory elements when translating to VHDL
68 }