3 \subsection{What is \texorpdfstring{\clash{}}{CLasH}}
6 \frametitle{What is \clash{}?}\pause
8 \item \clash{}: CAES Language for Hardware Descriptions\pause
9 \item Rapid prototyping language\pause
10 \item Subset of Haskell can be translated to Hardware (VHDL)\pause
11 \item Structural Description of a Mealy Machine
16 \item We are a Computer Architectures group, this has been a 6 month 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 desigs
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
24 \subsection{Mealy Machine}
27 \frametitle{What again is a Mealy Machine?}
29 \centerline{\includegraphics[width=10cm]{mealymachine}}
30 \label{img:mealymachine}
34 \item Mealy machine bases its output on current input and previous state
39 \frametitle{Haskell Description}
40 \begin{beamercolorbox}[sep=-2.5ex,rounded=true,shadow=true,vmode]{codebox}
44 {-"{\color<2>[rgb]{1,0,0}"-}State{-"}"-} ->
45 (State, OutputSignals)
46 mealyMachine inputs {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} = ({-"{\color<3>[rgb]{1,0,0}"-}new_state{-"}"-}, output)
48 {-"{\color<3>[rgb]{1,0,0}"-}new_state{-"}"-} = logic {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} input
49 outputs = logic {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} input
53 \uncover<2->{\item Current state is part of the input}
54 \uncover<3->{\item New state is part of the output}
58 \item State is part of the function signature
59 \item Both the current state, as the updated State
62 \subsection{Simulation}
65 \frametitle{Simulating a Mealy Machine}
66 \begin{beamercolorbox}[sep=-2.5ex,rounded=true,shadow=true,vmode]{codebox}
68 run func {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} [] = []
69 run func {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} (i:input) = o:out
71 ({-"{\color<3>[rgb]{1,0,0}"-}state'{-"}"-}, o) = func i {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-}
72 out = run func {-"{\color<3>[rgb]{1,0,0}"-}state'{-"}"-} input
76 \item State behaves like an accumulator
80 \item This is just a quick example of how we can simulate the mealy machine
81 \item It sort of behaves like MapAccumN