1 \chapter[chap:context]{Context}
2 An obvious question that arises when starting any research is \quote{Hasn't
3 this been done before?} Using a functional language for describing hardware
4 is not a new idea at all. In fact, there has been research into functional
5 hardware description even before the conventional hardware description
6 languages were created. However, functional languages were not nearly as
7 advanced as they are now, and functional hardware description never really
10 Recently, there have been some renewed efforts, especially using the Haskell
11 language. Examples are Lava, ForSyde, ..., which are all a form of an
12 embedded domain specific language. Each of these have a slightly different
13 approach, but all of these do some trickery inside the Haskell language
14 itself, meaning you write a program that generates a hardware circuit,
15 instead of describing the circuit directly (either by running the haskell
16 code after compilation, or using Template Haskell to inspect parts of the
17 code you have written). This allows the full power of Haskell for generating
18 a circuit, but only it also creates severe limitations in the use of the
19 language (you can't use case statements in Lava, since they would be
20 executed only once during circuit generation) and extra notational overhead.
25 Advantages over conventional HDLs
28 - Easy to transform / optimize / etc.
30 Advantages over existing FHDLs
32 - Full Haskell available
35 Disadvantages over existing FHDLs
36 - More work to implement advanced things