X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=matthijs%2Fintroduction.lhs;h=369ab79dcb5bb3e8f692691251e19c16ecd101a7;hb=a8f72535b76928e7374968ae7ae0407d4f82c5c5;hp=0d11fd84a88e3d9cbd5ef5e7daeb5ce6bf5199a2;hpb=5bfc71c197897497ac6520548fe3e405dc5f9a9b;p=matthijs%2Fmaster-project%2Ffinal-presentation.git diff --git a/matthijs/introduction.lhs b/matthijs/introduction.lhs index 0d11fd8..369ab79 100644 --- a/matthijs/introduction.lhs +++ b/matthijs/introduction.lhs @@ -1,12 +1,6 @@ %include talk.fmt \section{Presentation Matthijs} -\title{Haskell as a higher order structural hardware description language} -\author{Matthijs Kooijman} -\date{December 14, 2009} - -\frame{\titlepage \setcounter{framenumber}{1}} - - +\subsection{Functions} \frame { \frametitle{Functions} @@ -114,22 +108,110 @@ \item Geen bijwerkingen. } +\subsection{State} + \frame { - TODO: Impure (stateful) example. + \frametitle{Multiply-accumulate} + \begin{columns} + \begin{column}{5cm} + \begin{block}{} + \begin{tabular}{lll} + Input A & Input B & Output \\ + \hline + 1 & 1 & 0 \\ + 1 & 2 & 1 \\ + 1 & 1 & 3 \\ + 2 & 2 & 4 \\ + \end{tabular} + \end{block} + \end{column} + \begin{column}{5cm} + \begin{figure} + TODO: Image of MAC with internal register + \end{figure} + \end{column} + \end{columns} } \note[itemize] { - \item TODO + \item Next sheet: MAC circuit and I/O values + \item MAC is common circuit + \item Multiplies pairs, one pair at a time + \item Stores sum so far + \item Not pure! + \item Depends on inputs \emph{and} current register value + \item Solution: Put register value (state) in argument } +\frame +{ + \frametitle{Multiply-accumulate} + \begin{columns} + \begin{column}{5cm} + \begin{block}{} + \vspace{-0.5cm} +\begin{verbatim} +mac (a, b) (State s) = let + sum = s + (a * b) +in (State sum, sum) +\end{verbatim} + \end{block} + \end{column} + \begin{column}{5cm} + \begin{figure} + TODO: Image of MAC with external register + \end{figure} + \end{column} + \end{columns} +} + +\note[itemize] +{ + \item Next sheet: MAC implementation + \item Current state as argument (annotated) + \item Two parts in the result: New state and output + \item Register is placed ``outside'' + \item We want it inside! + \item Annotation allows compiler to put it inside +} + +\begin{frame}[fragile] + \frametitle{Simulating} + + \begin{block}{Recursive run function} + run f (i:is) s = let + (o, s') = f i s + in o : (run f is s') + \end{block} + + \begin{block}{Remember \texttt{mac}} +\vspace{-0.5cm} +\begin{verbatim} +mac (a, b) (State s) = let + sum = s + (a * b) +in (State sum, sum) +\end{verbatim} + \end{block} +\end{frame} + +\note[itemize] +{ + \item Next sheet: run function + \item Used for simulation only + \item Recursion ``stores'' state + \item Each recursion step, \texttt{f} is evaluated once. +} + +\subsection{\clash} + \frame{ \begin{center} {\Huge \clash} \bigskip - CAES language for hardware descriptions + CAES Language for Synchronous Hardware \end{center} } @@ -162,6 +244,7 @@ \item Normalisatie: Nog simpeler maken. } +\subsection{Normalization} \frame { \frametitle{Netlists} @@ -282,6 +365,8 @@ \item De goede weg } +\subsection{Summary} + \frame { \frametitle{But now?} @@ -300,6 +385,7 @@ \item Meer testen nodig, } +\subsection{Thanks} \frame { {\Huge Thanks!}