process_rc_file($caes_latexmkrc);
# Add your own settings below
-$pdflatex = 'xelatex -shell-escape -synctex=1 -output-driver="xdvipdfmx -q -E" %O %S';
+# $pdflatex = 'xelatex -shell-escape -synctex=1 -output-driver="xdvipdfmx -q -E" %O %S';
FILE = clash-haskell09
LHS2TEX = lhs2TeX -v --poly --haskell
-LATEXMK = latexmk
+LATEXMK = latexmk -pdf
RM = rm -f
RSVG = rsvg-convert --format=pdf
\frame
{
\frametitle{Imports}
+Import all the built-in types, such as vectors and integers:
\begin{code}
-import {-"{\color<2>[rgb]{1,0,0}"-}CLasH.HardwareTypes{-"}"-}
-import {-"{\color<3>[rgb]{1,0,0}"-}CLasH.Translator.Annotations{-"}"-}
+import CLasH.HardwareTypes
+\end{code}\pause
+Import annotations, helps \clash{} to find top-level component:
+\begin{code}
+import CLasH.Translator.Annotations
\end{code}
}
{
First we define some ALU types:
\begin{code}
-type Op s a = a -> {-"{\color<2>[rgb]{1,0,0}"-}Vector s a{-"}"-} -> a
+type Op s a = a -> Vector s a -> a
type Opcode = Bit
-\end{code}
+\end{code}\pause
And some Register types:
\begin{code}
-type RegBank s a = {-"{\color<2>[rgb]{1,0,0}"-}Vector (s :+: D1){-"}"-} a
+type RegBank s a = Vector (s :+: D1) a
type RegState s a = State (RegBank s a)
-\end{code}
+\end{code}\pause
And a simple Word type:
\begin{code}
-type Word = {-"{\color<3>[rgb]{1,0,0}"-}SizedInt D12{-"}"-}
+type Word = SizedInt D12
\end{code}
}
\subsection{Frameworks for Operations}
\begin{code}
primOp :: {-"{\color<2>[rgb]{1,0,0}"-}(a -> a -> a){-"}"-} -> Op s a
primOp f a b = a `f` a
-\end{code}
+\end{code}\pause
We make a vector operation:
\begin{code}
vectOp :: {-"{\color<2>[rgb]{1,0,0}"-}(a -> a -> a){-"}"-} -> Op s a
((State mem'), data_out)
where
data_out = mem!rdaddr
- mem' {-"{\color<3>[rgb]{1,0,0}"-}| wrenable == Low{-"}"-} = mem
- {-"{\color<3>[rgb]{1,0,0}"-}| otherwise{-"}"-} = replace mem wraddr data_in
+ mem' {-"{\color<3>[rgb]{1,0,0}"-}| wrenable == Low{-"}"-} = mem
+ {-"{\color<3>[rgb]{1,0,0}"-}| otherwise{-"}"-} = replace mem wraddr data_in
\end{code}
}
\subsection{Simple CPU: ALU \& Register Bank}
\begin{code}
{-"{\color<2>[rgb]{1,0,0}"-}ANN(actual_cpu TopEntity){-"}"-}
actual_cpu ::
- (Opcode, Word, Vector D4 Word,
- RangedWord D9,
- RangedWord D9, Bit) ->
- RegState D9 Word ->
+ (Opcode, Word, Vector D4 Word, RangedWord D9,
+ RangedWord D9, Bit) -> RegState D9 Word ->
(RegState D9 Word, Word)
-actual_cpu (opc, a ,b, rdaddr, wraddr, wren) ram = (ram', alu_out)
+actual_cpu (opc, a ,b, rdaddr, wraddr, wren) ram =
+ (ram', alu_out)
where
alu_out = alu simpleOp vectorOp opc ram_out b
(ram',ram_out) = registerBank ram a rdaddr wraddr wren
--- /dev/null
+%%
+%% beamercolorthemecaes.sty
+%%
+%% Copyright (C) 2008 CAES (http://caes.ewi.utwente.nl)
+%%
+%% Authors : Pascal Wolkotte
+%% Created On : March 13 2008
+%%
+%% $Author: wolkottept $
+%% $Date: 2008-03-19 09:39:34 +0100 (Wed, 19 Mar 2008) $
+%% $Revision: 40 $
+%% $HeadURL: https://ewi630/svn/general/templates/caes/trunk/beamercolorthemecaes.sty $
+%%
+
+\mode<presentation>
+
+\definecolor{ut_orange}{rgb}{1,.4,.2}
+\definecolor{ut_blue}{rgb}{0,0,.4}
+\definecolor{ut_lightblue}{rgb}{0.5,0.5,.7}
+\definecolor{ut_green}{rgb}{0,.8,0}
+
+\setbeamercolor{normal text}{fg=ut_blue,bg=white}
+\setbeamercolor{alerted text}{fg=ut_orange}
+\setbeamercolor{example text}{fg=ut_green}
+
+\setbeamercolor{structure}{fg=ut_blue}
+\setbeamercolor{institute}{fg=ut_lightblue}
+
+\setbeamercolor{titlelike}{parent=structure}
+
+\setbeamercolor{frametitle}{parent=titlelike}
+\setbeamercolor{framesubtitle}{parent=frametitle}
+
+\setbeamercolor{itemize item}{fg=ut_orange}
+\setbeamercolor{itemize subitem}{fg=ut_green}
+\setbeamercolor{itemize subsubitem}{fg=ut_blue}
+
+\mode
+<all>
--- /dev/null
+%%
+%% beamerfontthemecaes.sty
+%%
+%% Copyright (C) 2008 CAES (http://caes.ewi.utwente.nl)
+%%
+%% Authors : Pascal Wolkotte
+%% Created On : March 13 2008
+%%
+%% $Author: wolkottept $
+%% $Date: 2008-03-13 09:41:28 +0100 (Thu, 13 Mar 2008) $
+%% $Revision: 36 $
+%% $HeadURL: https://svncaes/svn/general/templates/caes/trunk/beamerfontthemecaes.sty $
+%%
+
+\mode<presentation>
+
+\setbeamerfont{item}{size=\large,parent=structure}
+\setbeamerfont{subitem}{size=\small,parent=item}
+\setbeamerfont{subsubitem}{size=\scriptsize,parent=subitem}
+
+\setbeamerfont{itemize item}{parent=item}
+\setbeamerfont{itemize subitem}{parent=subitem}
+\setbeamerfont{itemize subsubitem}{parent=subsubitem}
+
+\setbeamerfont{itemize/enumerate body}{size=\large}
+\setbeamerfont{itemize/enumerate subbody}{size=\small}
+\setbeamerfont{itemize/enumerate subsubbody}{size=\scriptsize}
+
+\mode
+<all>
--- /dev/null
+%%
+%% beamerinnerthemecaes.sty
+%%
+%% Copyright (C) 2008 CAES (http://caes.ewi.utwente.nl)
+%%
+%% Authors : Pascal Wolkotte
+%% Created On : March 13 2008
+%%
+%% $Author: wolkottept $
+%% $Date: 2008-03-19 10:33:08 +0100 (Wed, 19 Mar 2008) $
+%% $Revision: 41 $
+%% $HeadURL: https://ewi630/svn/general/templates/caes/trunk/beamerinnerthemecaes.sty $
+%%
+
+\mode<presentation>
+
+\setbeamertemplate{sections/subsections in toc}[square]
+
+\setbeamertemplate{items}[square]
+\setbeamertemplate{itemize item}{\hbox{\vrule width 1.2ex height 1.2ex}}
+\setbeamertemplate{itemize subitem}{\hbox{\vrule width 1ex height 1ex}}
+\setbeamertemplate{itemize subsubitem}{\hbox{\vrule width .8ex height .8ex}}
+
+\addtolength{\leftmargini}{-.4\labelwidth}
+\addtolength{\leftmarginii}{-.5\labelwidth}
+\addtolength{\leftmarginiii}{-.6\labelwidth}
+
+%\pgfdeclareimage[interpolate=true, height=.1\paperheight]{ctit_logo}{ctit_logo}
+
+\makeatletter
+
+\setbeamertemplate{title page}
+{
+ \begin{centering}
+ \vfill
+ \begin{beamercolorbox}[sep=8pt,center]{title}
+ \usebeamerfont{title}\inserttitle\par%
+ \ifx\insertsubtitle\@empty%
+ \else%
+ \vskip0.25em%
+ {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
+ \fi%
+ \end{beamercolorbox}%
+ \vskip.5em
+ \begin{beamercolorbox}[sep=8pt,center]{author}
+ \usebeamerfont{author}\insertauthor
+ \end{beamercolorbox}\vskip1em
+ \ifx\beamer@shortdate\insertdate\else%
+ \begin{beamercolorbox}[sep=4pt,center]{date}
+ \usebeamerfont{date}\insertshortdate
+ \end{beamercolorbox}
+ \fi
+ \begin{beamercolorbox}[sep=4pt,center]{date}
+ \usebeamerfont{date}\insertdate
+ \end{beamercolorbox}
+% {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
+ \vfill
+ \begin{tikzpicture}
+ \path[use as bounding box] (0,0) rectangle (\textwidth,1pt);
+% \node[above left, inner sep=0pt] at (\textwidth,0) {\pgfuseimage{ctit_logo}};
+ \end{tikzpicture}
+ \begin{beamercolorbox}[sep=8pt,center]{institute}
+ \usebeamerfont{institute}\insertinstitute
+ \end{beamercolorbox}
+ \end{centering}
+}
+\makeatother
+
+\mode<all>
--- /dev/null
+%%
+%% beamercolorthemecaes.sty
+%%
+%% Copyright (C) 2008 CAES (http://caes.ewi.utwente.nl)
+%%
+%% Authors : Pascal Wolkotte
+%% Created On : March 13 2008
+%%
+%% $Author: bakkerv $
+%% $Date: 2008-03-25 10:31:52 +0100 (Tue, 25 Mar 2008) $
+%% $Revision: 45 $
+%% $HeadURL: https://ewi630/svn/general/templates/caes/trunk/beamerouterthemecaes.sty $
+%%
+\makeatletter
+
+\def\footlinetitle{title}
+\def\beamer@theme@footline{title}
+\DeclareOptionBeamer{footline}{\def\beamer@theme@footline{#1}}
+
+\newif\ifbeamer@theme@logoUT
+\def\hidelogoUT{ \beamer@theme@logoUTfalse }
+\def\showlogoUT{ \beamer@theme@logoUTtrue }
+\showlogoUT
+
+\ProcessOptionsBeamer
+
+\usetikzlibrary{positioning}
+\usetikzlibrary{fadings}
+
+\def\getcoordinates{
+ \node[coordinate] (titlepos) at (.95\paperwidth,-.217\paperheight) {};
+ \node[coordinate] (topleft) at (.05\paperwidth,-.225\paperheight) {};
+ \node[coordinate] (TL) at (0,0) {};
+ \node[coordinate] (BR) at (\paperwidth,-\textheight) {};
+ \node[coordinate] (F1) at (.65\paperwidth,-.25\textheight) {};
+ \node[coordinate] (F2) at (.95\paperwidth,-.5\textheight) {};
+ \node[coordinate] (F1m) at (.35\paperwidth,-.25\textheight) {};
+ \node[coordinate] (F2m) at (.05\paperwidth,-.5\textheight) {};
+}
+
+% -- Shading function. From 0 - 50 no transparency and from 50 - 100 transparency
+\pgfdeclarehorizontalshading{shading}{100bp}{ color(0bp)=(transparent!0); color(25bp)=(transparent!0); color(60bp)=(transparent!0); color(75bp)=(transparent!100); color(100bp)=(transparent!100)}
+\pgfdeclarefading{fading}{\pgfuseshading{shading}}
+\def\placehorzfading#1{
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{#1}{-\paperheight}}
+ \pgfsetfadingforcurrentpath{fading}{}
+ \pgfusepath{discard}
+}
+\pgfdeclarefading{LRfading}{
+\begin{tikzpicture}[line width=0pt]
+ \getcoordinates
+ \fill[pgftransparent!0] (TL -| F1m) rectangle (BR -| F1);
+ \shade[left color=pgftransparent!0, right color=pgftransparent!100] (TL -| F1) rectangle (BR -| F2);
+ \shade[right color=pgftransparent!0, left color=pgftransparent!100] (TL -| F2m) rectangle (BR -| F1m);
+\end{tikzpicture}
+}
+\pgfdeclarefading{BRfading}{
+\begin{tikzpicture}[line width=0pt]
+ \getcoordinates
+ \fill[pgftransparent!0] (TL) rectangle (F1);
+ \begin{scope}
+ \path[clip] (F1) -- (F2) -- (BR) |- (TL) -- cycle;
+ \shade[left color=pgftransparent!0, right color=pgftransparent!100] (TL -| F1) rectangle (BR -| F2);
+ \end{scope}
+ \begin{scope}
+ \path[clip] (F1) -- (F2) -- (BR) -| (TL) -- cycle;
+ \shade[top color=pgftransparent!0, bottom color=pgftransparent!100] (TL |- F1) rectangle (BR |- F2);
+ \end{scope}
+\end{tikzpicture}
+}
+
+\mode<presentation>
+
+% -- Headline and footline --
+\pgfdeclareimage[interpolate=true, height=.1\paperheight]{ut_logo}{ut_logo_blue}
+
+% -- HEADER --
+
+%Select the correct logo
+
+\defbeamertemplate{headline}{empty}{%
+ \begin{tikzpicture}
+ \path[use as bounding box] (0,0) rectangle (\paperwidth,-.11\paperheight);
+ \end{tikzpicture}
+}
+\def\UTheadline{
+ \begin{scope}
+ \placehorzfading{.95\paperwidth}
+ \node[fill=ut_blue, line width=0pt, minimum height=.033\paperheight, minimum width=.95\paperwidth, anchor=north west] (bart) at (0,0) {};
+ \placehorzfading{.8\paperwidth}
+ \node[fill=ut_orange,line width=0pt, minimum height=.043\paperheight, minimum width=.8\paperwidth, below=0pt of bart.south west, anchor=north west] (barm) {};
+ \placehorzfading{.675\paperwidth}
+ \node[fill=ut_lightblue, line width=0pt, minimum height=.032\paperheight, minimum width=.675\paperwidth, below=0pt of barm.south west, anchor=north west] (barb) {};
+ \end{scope}
+ \ifbeamer@theme@logoUT
+ \path (\paperwidth,-.11\paperheight) node[above left=0pt and 3pt, line width=0pt,inner sep=0pt] {\pgfuseimage{ut_logo}};
+ \fi
+}
+\pgfdeclareimage[interpolate=true, height=.1\paperheight]{logoNWchameleonA}{chameleonA}
+\pgfdeclareimage[interpolate=true, height=.14\paperheight]{logoNWchameleonB}{chameleonB}
+\pgfdeclareimage[interpolate=true, height=0.55\paperheight]{logoPoles}{poles_shaded}
+\pgfdeclareimage[interpolate=true, height=0.14\paperheight]{logoSloth}{sloth}
+
+\defbeamertemplate*{headline}{chameleonA theme}{%
+ \begin{tikzpicture}
+ \getcoordinates
+ \path[use as bounding box] (0,0) rectangle (\paperwidth,-.11\paperheight);
+ \UTheadline
+ \path (0,-.12\paperheight) node[above right=0pt, line width=0pt,inner sep=0pt] {\pgfuseimage{logoNWchameleonA}};
+ \end{tikzpicture}
+}
+\defbeamertemplate{headline}{chameleonB theme}{%
+ \begin{tikzpicture}
+ \getcoordinates
+ \path[use as bounding box] (0,0) rectangle (\paperwidth,-.11\paperheight);
+ \UTheadline
+ \path (-10pt,-.16\paperheight) node[above right=0pt, line width=0pt,inner sep=0pt] {\pgfuseimage{logoNWchameleonB}};
+ \end{tikzpicture}
+}
+\defbeamertemplate{headline}{energy theme}{%
+ \begin{tikzpicture}
+ \getcoordinates
+ \path[use as bounding box] (0,0) rectangle (\paperwidth,-.11\paperheight);
+ \UTheadline
+ \path (-3.2pt,-.16\paperheight) node[above right=0pt, line width=0pt,inner sep=0pt] {\pgfuseimage{logoSloth}};
+ \end{tikzpicture}
+}
+
+\defbeamertemplate{headline}{caes theme}{%
+ \begin{tikzpicture}
+ \getcoordinates
+ \path[use as bounding box] (0,0) rectangle (\paperwidth,-.11\paperheight);
+ \UTheadline
+ \end{tikzpicture}
+}
+
+% -- FOOTER --
+\defbeamertemplate{footline}{empty}{%
+ \leavevmode%
+ \begin{tikzpicture}[remember picture]
+ \path[clip,use as bounding box] (0,0) rectangle (\paperwidth,-.08\paperheight);
+ \end{tikzpicture}
+}
+\defbeamertemplate*{footline}{caes theme}{%
+ \leavevmode%
+ \begin{tikzpicture}[remember picture]
+ \path[clip,use as bounding box] (0,0) rectangle (\paperwidth,-.08\paperheight);
+ \draw[ut_orange,semithick] (.05\paperwidth,0) node[coordinate] (footerleft) {} -- node[coordinate] (footercenter) {} ++(.9\paperwidth,0pt) node [coordinate] (footerright) {};
+ \path (footerleft) node[below right=1ex and 0ex] {\inserttitle\ - \insertsubtitle};
+ \path (footercenter) node[below=1ex] {\insertshortdate};
+ \path (footerright) node[below left=1ex and 0ex] {\insertframenumber / \inserttotalframenumber};
+ \end{tikzpicture}
+}
+
+% -- BACKGROUND --
+\defbeamertemplate{background}{empty}{}%
+
+%\ifbeamer@theme@background@soc
+ \pgfdeclareimage[interpolate=true, width=.65\paperwidth]{soc_bg}{soc_bg}
+%\fi
+\defbeamertemplate*{background}{soc theme}{
+ \begin{tikzpicture}[remember picture, overlay]
+ \getcoordinates
+ % Custom background
+ \makeatletter
+ \ifbeamer@plainframe\else
+ \path (\paperwidth,-\paperheight) node[above left, inner sep=0pt, line width=0pt,rotate=-15,yshift=-20mm,xshift=5mm] {\pgfuseimage{soc_bg}};
+ \fi
+ \makeatother
+ \end{tikzpicture}
+}
+\defbeamertemplate{background}{electricity poles}{
+ \begin{tikzpicture}[remember picture, overlay]
+ \getcoordinates
+ % Custom background
+ \makeatletter
+ \ifbeamer@plainframe\else
+ \path (\paperwidth,-\paperheight) node[anchor=south east,inner sep=0pt, line width=0pt] {\pgfuseimage{logoPoles}};
+ \fi
+ \makeatother
+ \end{tikzpicture}
+}
+
+
+% -- Navigation symbols --
+\setbeamertemplate{navigation symbols}[vertical]
+\defbeamertemplate{navigation symbols}{none}{}
+
+% -- Frame title: default --
+\defbeamertemplate{frametitle}{noleft}{
+ \nointerlineskip
+ \begin{beamercolorbox}[wd=\paperwidth,ht=.115\paperheight,dp=0pt]{}
+ \begin{tikzpicture}
+ \node[anchor=base east, inner xsep=0pt] (frametitle) at (.93\paperwidth,.02\paperwidth) {\usebeamerfont{frametitle}\insertframetitle};
+ \path[use as bounding box] (0,0) rectangle (\paperwidth,.115\paperheight);
+ \node[coordinate] (grayline) at (.05\paperwidth,0) {};
+ \ifx\insertframesubtitle\@empty\else%
+ \node[inner xsep=1ex, anchor=north east] (subtitle) at (frametitle.base east) {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle};
+ \node[coordinate] (grayline) at (grayline |- subtitle.south) {};
+ \fi%
+ \begin{scope} % Lines
+ \pgfsetfading{LRfading}{\pgftransformshift{\pgfpoint{.5\paperwidth}{-.5\textheight}}}
+ \draw[gray!50,ultra thin] (grayline) -- +(.9\paperwidth,0);
+ \end{scope}
+ \end{tikzpicture}
+ \end{beamercolorbox}
+ \vskip-.25em %Line 110 beamerbaseframe.sty
+ \vskip-.2cm %Line 248 beamerbaseframe.sty
+ \vskip.02\paperwidth
+}
+\defbeamertemplate*{frametitle}{caes theme}{
+ \nointerlineskip
+ \begin{beamercolorbox}[wd=\paperwidth]{}
+
+ \begin{tikzpicture}
+ \node[anchor=base east, inner xsep=0pt] (frametitle) at (.93\paperwidth,.02\paperwidth) {\usebeamerfont{frametitle}\insertframetitle};
+ \node[coordinate] (grayline) at (.05\paperwidth,0) {};
+ \ifx\insertframesubtitle\@empty\else%
+ \node[inner xsep=1ex, inner ysep=0pt, anchor=base east] (subtitle) at ([yshift=-.04\paperwidth] frametitle.base east) {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle};
+ \node[coordinate] (grayline) at ([yshift=-0.02\paperwidth] grayline |- subtitle.base) {};
+ \fi%
+
+ \path[use as bounding box] (TL |- grayline.south) rectangle (\paperwidth,.115\paperheight);
+
+ \begin{scope} % Lines
+ \pgfsetfading{BRfading}{\pgftransformshift{\pgfpoint{.5\paperwidth}{-.5\textheight}}}
+ \draw[gray!50,ultra thin] (grayline) +(.9\paperwidth,0) -| +(0,-.5\textheight);
+ \end{scope}
+ \end{tikzpicture}
+ \end{beamercolorbox}
+ \vskip-.25em %Line 110 beamerbaseframe.sty
+ \vskip-.2cm %Line 248 beamerbaseframe.sty
+ \vskip.01\paperwidth
+}
+
+\setbeamersize{text margin left=0.07\paperwidth, text margin right=0.07\paperwidth}
+
+\makeatother
+
+\mode
+<all>
--- /dev/null
+%%
+%% beamerthemecaes.sty
+%%
+%% Copyright (C) 2008 CAES (http://caes.ewi.utwente.nl)
+%%
+%% Authors : Pascal Wolkotte
+%% Created On : March 15 2008
+%%
+%% $Author: wolkottept $
+%% $Date: 2008-03-14 10:07:37 +0100 (Fri, 14 Mar 2008) $
+%% $Revision: 40 $
+%% $HeadURL: https://svncaes/svn/general/templates/caes/trunk/caes_presentation.cls $
+%%
+
+\mode<presentation>
+
+\useoutertheme{caes}
+\useinnertheme{default}
+\useinnertheme{caes}
+\usecolortheme{caes}
+\usefonttheme{caes}
+
+%\setbeamertemplate{headline}[caes theme]
+
+\setbeamertemplate{headline}[chameleonB theme]
+\setbeamertemplate{footline}[caes theme]
+\setbeamertemplate{background}[soc theme]
+\setbeamertemplate{navigation symbols}[vertical]
+\setbeamercovered{transparent}
+
+\DeclareOptionBeamer{empty}{
+ \setbeamertemplate{background}[empty]
+ \setbeamertemplate{navigation symbols}[none]
+ \PassOptionsToPackage{navigation=false}{beamerouterthemecaes}
+}
+
+\ProcessOptionsBeamer
+
+\mode
+<all>
--- /dev/null
+%%\r
+%% caes_presentation.cls\r
+%%\r
+%% Copyright (C) 2008 CAES (http://caes.ewi.utwente.nl)\r
+%%\r
+%% Authors : Pascal Wolkotte\r
+%% Created On : March 13 2008\r
+%%\r
+%% $Author: bakkerv $\r
+%% $Date: 2008-03-25 10:31:52 +0100 (Tue, 25 Mar 2008) $\r
+%% $Revision: 45 $\r
+%% $HeadURL: https://ewi630/svn/general/templates/caes/trunk/caes_presentation.cls $\r
+%% \r
+\r
+% -- BASIC SETTINGS --\r
+\NeedsTeXFormat{LaTeX2e}\r
+\ProvidesClass{caes_presentation}[2008/03/13 Standard document class for presentations of the CAES group] % Name of this class-file\r
+\r
+\DeclareOption{empty}{\PassOptionsToPackage{\CurrentOption}{beamerthemecaes}}\r
+\DeclareOption{powerpoint}{\PassOptionsToPackage{\CurrentOption}{beamerthemecaes}}\r
+\DeclareOption{chameleonA}{\PassOptionsToPackage{\CurrentOption}{beamerthemecaes}}\r
+\DeclareOption{chameleonB}{\PassOptionsToPackage{\CurrentOption}{beamerthemecaes}}\r
+\DeclareOption{energy}{\PassOptionsToPackage{\CurrentOption}{beamerthemecaes}}\r
+\r
+\r
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}}\r
+%\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}}\r
+\ProcessOptions\relax\r
+\LoadClass[t,12pt,hyperref={unicode},notes=show]{beamer}\r
+\r
+\pdfpageattr {/Group << /S /Transparency /I true /CS /DeviceRGB>>} %Solves colorshift due to transparency in figures\r
+\RequirePackage{tikz}\r
+\RequirePackage{url}\r
+\r
+\usetheme{caes}\r
+\date{\today}\r
+\institute[University of Twente]{\raggedleft\r
+Computer Architecture for Embedded Systems (CAES) group\\\r
+Faculty of Electrical Engineering, Mathematics and Computer Science\\\r
+University of Twente\\\r
+\url{http://caes.ewi.utwente.nl} \hfill Enschede, The Netherlands}\r
+\r
+\makeatletter\r
+\def\caestitle{\maketitle}\r
+\def\maketitle{ {\setbeamertemplate{navigation symbols}[none]\ifbeamer@inframe\titlepage\else\frame[b]{\titlepage}\fi} }\r
+\makeatother\r
+\r
+%\RequirePackage{caes}\r
+\r
+\r
+% -- END OF CLASS --\r
-\documentclass[hyperref={unicode}]{beamer}
+\RequirePackage{atbegshi}
+\documentclass[empty]{caes_presentation}
%include talk.fmt
\include{preamble}
\title{\clash{}}
\subtitle{From Haskell To Hardware}
\author{Christiaan Baaij \& Matthijs Kooijman}
-\institute[University of Twente]
-{
- Computer Architecture for Embedded Systems \\
- Faculty of EEMCS \\
- University of Twente\\
-}
-\date{\today}
+\date{September 3, 2009}
\begin{document}
\item Import the module: CLasH.Translator
\item And call \emph{makeVHDLAnnotations ghc\_lib\_dir [files\_to\_translate]}
\end{itemize}
-Use customized GHC:
+Customized GHC:
\begin{itemize}
\item Call GHC with the --vhdl flag
\item Use the :vhdl command in GHCi
\item No Effort:\\
GHC API Parses, Typechecks and Desugars Haskell \pause
\item Hard.. sort of: \\
- Transform resulting Core, GHC's Intermediate Language,\linebreak to a normal form \pause
+ Transform resulting Core, GHC's Intermediate Language, to a normal form \pause
\item Easy: \\
Translate Normalized Core to synthesizable VHDL
\end{itemize}
\item Quick real demo
\end{itemize}
}
+\note{Virtuele demo}
\subsection{What is \texorpdfstring{\clash{}}{CLasH}}
\frame
\item Structural Description of a Mealy Machine
\end{itemize}
}
+\note[itemize]
+{
+\item Wij zijn wij
+\item \clash{} voor rapid prototyping
+\item Subset haskell vertaalbaar
+\item Mealy machine beschrijving
+}
+
\subsection{Mealy Machine}
\frame
{
\frametitle{Mealy Machine}
\begin{figure}
- \centerline{\includegraphics[width=\textwidth]{mealymachine}}
+ \centerline{\includegraphics[width=10cm]{mealymachine}}
\label{img:mealymachine}
\end{figure}
}
+\note{
+Voor wie het niet meer weet, dit is een mealy machine
+}
\frame
{
\begin{code}
mealyMachine ::
InputSignals ->
- {-"{\color<2->[rgb]{1,0,0}"-}State{-"}"-} ->
+ {-"{\color<2>[rgb]{1,0,0}"-}State{-"}"-} ->
(State, OutputSignals)
-mealyMachine inputs {-"{\color<2->[rgb]{1,0,0}"-}state{-"}"-} = ({-"{\color<3->[rgb]{0,0,1}"-}new_state{-"}"-}, output)
+mealyMachine inputs {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} = ({-"{\color<3>[rgb]{1,0,0}"-}new_state{-"}"-}, output)
where
- {-"{\color<3->[rgb]{0,0,1}"-}new_state{-"}"-} = logic {-"{\color<2->[rgb]{1,0,0}"-}state{-"}"-} input
- outputs = logic {-"{\color<2->[rgb]{1,0,0}"-}state{-"}"-} input
+ {-"{\color<3>[rgb]{1,0,0}"-}new_state{-"}"-} = logic {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} input
+ outputs = logic {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} input
\end{code}
}
\subsection{Simulation}
{
\frametitle{Simulating a Mealy Machine}
\begin{code}
-run func {-"{\color<2->[rgb]{1,0,0}"-}state{-"}"-} [] = []
-run func {-"{\color<2->[rgb]{1,0,0}"-}state{-"}"-} (i:input) = o:out
+run func {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} [] = []
+run func {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} (i:input) = o:out
where
- ({-"{\color<3->[rgb]{0,0,1}"-}state'{-"}"-}, o) = func {-"{\color<2->[rgb]{1,0,0}"-}state{-"}"-} i
- out = run func {-"{\color<3->[rgb]{0,0,1}"-}state'{-"}"-} input
+ ({-"{\color<3>[rgb]{1,0,0}"-}state'{-"}"-}, o) = func {-"{\color<2>[rgb]{1,0,0}"-}state{-"}"-} i
+ out = run func {-"{\color<3>[rgb]{1,0,0}"-}state'{-"}"-} input
\end{code}
}
\ No newline at end of file
-\mode<presentation>
-{
- \usetheme{Warsaw}
- \setbeamercovered{transparent}
-}
-
\usepackage[english]{babel}
\newcommand{\clash}[0]{C$\lambda$asH}
\ No newline at end of file
\frametitle{Some final words}
\begin{itemize}
\item Still a lot to do: make a bigger subset of Haskell translatable
- \item Real word designs work
+ \item Real world designs work
\item We bring functional expressivity to hardware designs
\end{itemize}
}
\frame{
-\centerline{Thank you for listening}
+\begin{figure}
+\Large{Thank you for listening}
+\end{figure}
}
\ No newline at end of file