From 43d50fb84915e330993e9ef04c1c380709b903e0 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 27 Jul 2009 15:37:33 +0200 Subject: [PATCH] Add some initial structure for the final report. This structure is far from final or complete, but serves to test the building infrastructure. Also, the State chapter contains some notes about possible content. --- Chapters/State.tex | 35 +++++++++++++++++++++++++++++++++++ Report.tex | 23 +++++++++++++++++++++++ Utils/Fonts.tex | 11 +++++++++++ Utils/Formats.tex | 17 +++++++++++++++++ Utils/Lambda.tex | 16 ++++++++++++++++ Utils/shortcuts.tex | 8 ++++++++ 6 files changed, 110 insertions(+) create mode 100644 Chapters/State.tex create mode 100644 Report.tex create mode 100644 Utils/Fonts.tex create mode 100644 Utils/Formats.tex create mode 100644 Utils/Lambda.tex create mode 100644 Utils/shortcuts.tex diff --git a/Chapters/State.tex b/Chapters/State.tex new file mode 100644 index 0000000..eab42c4 --- /dev/null +++ b/Chapters/State.tex @@ -0,0 +1,35 @@ +\chapter{State} + \section{Introduction} + Provide some examples + + \section{Approaches to state} + Explain impact of state (or rather, temporal behaviour) on function signature. + \subsection{Stream arguments and results} + \subsection{Explicit state arguments and results} + \section{Explicit state specification} + Note about semantic correctness of top level state. + + Note about automatic ``down-pushing'' of state. + + Note about explicit state specification as the best solution. + + Note about substates + + Note about conditions on state variables and checking them. + + \section{Explicit state implementation} + Note about ignoring (sub)state components. + + Note about extracting the state value from the return value. + + \section{Initial state} + How to specify the initial state? Cannot be done inside a hardware + function, since the initial state is its own state argument for the first + call (unless you add an explicit, synchronous reset port). + + External init state is natural for simulation. + + External init state works for hardware generation as well. + + Implementation issues: state splitting, linking input to output state, + checking usage constraints on state variables. diff --git a/Report.tex b/Report.tex new file mode 100644 index 0000000..bff1e2a --- /dev/null +++ b/Report.tex @@ -0,0 +1,23 @@ +\mainlanguage [en] +\setuppapersize[A4][A4] + +\input Utils/Fonts +\input Utils/Formats +\input Utils/Lambda + +\usetypescript [Custom] + +% Use our custom typeface +\switchtotypeface [Custom] [10pt] + +\starttext +% TODO: Proper title page +\title {From Haskell to Hardware - a Master's thesis} +Matthijs Kooijman + +\completecontent +\chapter{Introduction} +\input Chapters/State +\chapter{Normalization} +\chapter{VHDL generation} +\stoptext diff --git a/Utils/Fonts.tex b/Utils/Fonts.tex new file mode 100644 index 0000000..1d3974c --- /dev/null +++ b/Utils/Fonts.tex @@ -0,0 +1,11 @@ + +% Define a custom typescript. We could also have put the \definetypeface's +% directly in the script, without a typescript, but I guess this is more +% elegant... +\starttypescript[Custom] +% This is a sans font that supports greek symbols +\definetypeface [Custom] [ss] [sans] [iwona] [default] +\definetypeface [Custom] [rm] [serif] [antykwa-torunska] [default] +\definetypeface [Custom] [tt] [mono] [modern] [default] +\definetypeface [Custom] [mm] [math] [modern] [default] +\stoptypescript diff --git a/Utils/Formats.tex b/Utils/Formats.tex new file mode 100644 index 0000000..5dc0158 --- /dev/null +++ b/Utils/Formats.tex @@ -0,0 +1,17 @@ +% +% Defines some useful formatting environments. +% + +% A simple description format +\definedescription + [desc] + [location=hanging,hang=20,width=broad] + +% An (invisible) frame to hold some expression. Used to treat multiple lines +% as a single line and put it next to each other. +\define[1]\hiddenframe{ + % The align=right option really does left-alignment, but without it, + % all lines will end up on a single line. The strut=no option prevents + % a bunch of empty space at the start of the frame. + \framed[offset=0mm,location=middle,strut=no,align=right,frame=off]{#1} +} diff --git a/Utils/Lambda.tex b/Utils/Lambda.tex new file mode 100644 index 0000000..e4f2a1b --- /dev/null +++ b/Utils/Lambda.tex @@ -0,0 +1,16 @@ +% +% Some utilities for formatting (extended) lambda calculus and +% transformations. +% + +% Install the lambda calculus pretty-printer, as defined in pret-lam.lua. +\installprettytype [LAM] [LAM] +% Define \startlambda \stoplambda +\definetyping[lambda][option=LAM,style=sans] +% Define \lam{} (since \lambda is taken) +\definetype[lam][option=LAM,style=sans] + +% Install the transformation pretty-printer, as defined in pret-trans.lua. +\installprettytype [TRANS] [TRANS] +% Define \starttrans \stoptrans +\definetyping[trans][option=TRANS,style=normal,before=,after=] diff --git a/Utils/shortcuts.tex b/Utils/shortcuts.tex new file mode 100644 index 0000000..ecf4fed --- /dev/null +++ b/Utils/shortcuts.tex @@ -0,0 +1,8 @@ +% +% This file defines some useful shortcut commands +% + + +% A shortcut for italicized e.g. and i.e. +\define[0]\eg{{\em e.g.}} +\define[0]\ie{{\em i.e.}} -- 2.30.2