Added images
[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 descriptions of Mealy Machines
22 }
23
24 % \subsection{Mealy Machine}
25 % \frame
26 % {
27 % \frametitle{What is a Mealy Machine again?}
28 %   \begin{figure}
29 %   \centerline{\includegraphics[width=10cm]{mealymachine}}
30 %   \label{img:mealymachine}
31 %   \end{figure}
32 % }
33 % \note[itemize]{
34 % \item Mealy machine bases its output on current input and previous state
35 % \item: TODO: Integrate this slide with the next two. First, show the picture
36 % with the mealyMachine type signature (and rename it to "func"). Then, show the
37 % run function, without type signature. Focus is on correspondence to the
38 % picture.
39 % }
40
41 \frame
42 {
43 \frametitle{Haskell Description}
44 \begin{figure}
45 \centerline{\includegraphics<1>[width=6.25cm]{mealymachine2}
46 \includegraphics<2>[width=6.25cm]{mealymachine2-func-red}
47 \includegraphics<3>[width=6.25cm]{mealymachine2-state-red}}
48 \label{img:mealymachine}
49 \end{figure}
50 \begin{beamercolorbox}[sep=-2.5ex,rounded=true,shadow=true,vmode]{codebox}
51 \begin{code}
52 run func {-"{\color<3>[rgb]{1,0,0}"-}state{-"}"-} [] = []
53 run func {-"{\color<3>[rgb]{1,0,0}"-}state{-"}"-} (i:inputs) = o:outputs
54   where
55     ({-"{\color<3>[rgb]{1,0,0}"-}state'{-"}"-}, o)  =   {-"{\color<2>[rgb]{1,0,0}"-}func{-"}"-} i {-"{\color<3>[rgb]{1,0,0}"-}state{-"}"-}
56     outputs                                         =   run {-"{\color<2>[rgb]{1,0,0}"-}func{-"}"-} {-"{\color<3>[rgb]{1,0,0}"-}state'{-"}"-} input
57 \end{code}
58 \end{beamercolorbox}
59 }
60 \note[itemize]{
61 \item State is part of the function signature
62 \item Both the current state, as the updated State
63 }
64
65 \frame
66 {
67 \frametitle{Haskell Description}
68 \begin{figure}
69 \centerline{\includegraphics[width=6.25cm]{mealymachine2-func-red}}
70 \end{figure}
71 \begin{beamercolorbox}[sep=-2.5ex,rounded=true,shadow=true,vmode]{codebox}
72 \begin{code}
73 func :: 
74   InputSignal ->
75   State ->
76   (State, OutputSignal)
77 \end{code}
78 \end{beamercolorbox}
79 }