From: Christiaan Baaij Date: Mon, 15 Feb 2010 12:32:55 +0000 (+0100) Subject: Add 2 figures of a macc X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=831dd291ccb43d2adf8912961d8e5da153b5217f;p=matthijs%2Fmaster-project%2Fdsd-paper.git Add 2 figures of a macc --- diff --git a/Makefile b/Makefile index 3329679..f4d290c 100644 --- a/Makefile +++ b/Makefile @@ -3,3 +3,4 @@ all: clean: latexmk -CA + rm -rf *.pdf diff --git "a/c\316\273ash.lhs" "b/c\316\273ash.lhs" index f0eae84..6dd6520 100644 --- "a/c\316\273ash.lhs" +++ "b/c\316\273ash.lhs" @@ -122,7 +122,7 @@ % *** GRAPHICS RELATED PACKAGES *** % \ifCLASSINFOpdf - % \usepackage[pdftex]{graphicx} + \usepackage[pdftex]{graphicx} % declare the path(s) where your graphic files are % \graphicspath{{../pdf/}{../jpeg/}} % and their extensions so you won't have to specify these with @@ -520,7 +520,7 @@ functional hardware description language must eventually be converted into a netlist. This research also features a prototype translator called \CLaSH\ (pronounced: clash), which converts the Haskell code to equivalently behaving synthesizable \VHDL\ code, ready to be converted to an actual netlist format -by optimizing \VHDL\ synthesis tools. +by an optimizing \VHDL\ synthesis tools. \section{Hardware description in Haskell} @@ -533,14 +533,14 @@ by optimizing \VHDL\ synthesis tools. as a tuple), so having just a single output port does not create a limitation. - Each function application in turn becomes component instantiation. + Each function application in turn becomes a component instantiation. Here, the result of each argument expression is assigned to a signal, which is mapped to the corresponding input port. The output port of the function is also mapped to a signal, which is used as the result of the application itself. Since every top level function generates its own component, the - hierarchy of of function calls is reflected in the final \VHDL\ + hierarchy of function calls is reflected in the final \VHDL\ output as well, creating a hierarchical \VHDL\ description of the hardware. This separation in different components makes the resulting \VHDL\ output easier to read and debug. @@ -552,7 +552,17 @@ by optimizing \VHDL\ synthesis tools. mac a b c = add (mul a b) c \end{code} -\comment{TODO: Pretty picture} +\begin{figure} +\centerline{\includegraphics{mac}} +\caption{Combinatorial Multiply-Accumulate (curried)} +\label{img:mac-comb} +\end{figure} + +\begin{figure} +\centerline{\includegraphics{mac-nocurry}} +\caption{Combinatorial Multiply-Accumulate (uncurried)} +\label{img:mac-comb-nocurry} +\end{figure} \subsection{Choices} Although describing components and connections allows describing a diff --git a/latexmkrc b/latexmkrc index 153eca0..b6f5000 100644 --- a/latexmkrc +++ b/latexmkrc @@ -1,2 +1,7 @@ $pdflatex = 'lhs2TeX -v --poly < cλash.lhs > cλash.tex; pdflatex -file-line-error -halt-on-error -synctex=1 cλash.tex cλash.pdf'; -$clean_ext = "synctex.gz ptb tex"; \ No newline at end of file +$clean_ext = "synctex.gz ptb tex"; + +add_cus_dep( 'svg', 'pdf', 0, 'svg2pdf' ); +sub svg2pdf { + system("rsvg-convert --format=pdf < $_[0].svg > $_[0].pdf"); +} \ No newline at end of file diff --git a/mac-nocurry.svg b/mac-nocurry.svg new file mode 100644 index 0000000..fb46293 --- /dev/null +++ b/mac-nocurry.svg @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + mul + add + mac + + + (a,b,c) + a + c + + + + b + + diff --git a/mac.svg b/mac.svg new file mode 100644 index 0000000..1a74a1f --- /dev/null +++ b/mac.svg @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + mul + add + mac + + + + + + a + b + c + +