ANN: clash-0.1.3.0 (Functional Hardware Descriptions)
Hello, I am pleased to announce an incremental update to CLaSH, version 0.1.3.0. CLaSH can translate a (semantic) subset of Haskell to RTL-style VHDL. Instead of being an embedded DSL like Lava or ForSyDe, CLaSH takes are more 'traditional' approach to synthesis/compilation. It uses the GHC API as a front-end for parsing, type-checking and desugaring the Haskell source. It then exhaustively applies a list of meaning-preserving transformations to the intermediate GHC Core representation until it is in the desired normal form. The normalized Core/System Fc is then 'trivially' translated to RTL-style VHDL. The new version of CLaSH has the following updates: - Support for simulation and synthesis of multi-clock hardware [6] - Significant synthesis speed-up (4x to 10x) CLaSH already supported synthesis of: - User-defined Higher-Order functions [1] - User-defined ADTs (GADTs are not tested, but *might* work) - All of Haskell's choice constructs (Guards, Pattern Matching, etc.) - Lambda-abstraction / Anonymous Functions You can use CLaSH as a library, but the use of the adapted GHC interpreter (added the :vhdl command) is recommended. The interpreter can be found on the CLaSH website [2], where you will also find examples, papers, tutorials, etc. The library can be downloaded from Hackage [3]. I recently gave a demo of CLaSH at the DATE'11 conference in grenoble, this demo already made use of the multi-clock feature (and is actually the only reference if you want to experiment with multi-clock hardware yourself). The source for the demo (audio spectrum analyzer programmed on an Altera Cyclone II FPGA board) can be downloaded from my github page [4]. Do note that CLaSH only works when you have the 6.12.* branch of GHC installed! I am currently analyzing the impact of the GHC API changes made in the 7.0.* brach, and hope to make the transition to the new API within the next month. Although the compiler is already used by 2 other phd's in our group [5], it is not a thoroughly tested product, so your coding style might not be anticipated by the current version of CLaSH ;-) -- Christiaan Baaij [1] There is hard-coded support for a set of recursively defined higher-order functions such as map, fold, zipWith, etc. [2] http://clash.ewi.utwente.nl [3] http://hackage.haskell.org/package/clash-0.1.3.0 [4] http://github.com/christiaanb/DE1-Cyclone-II-FPGA-Board-Support-Package [5] http://caes.ewi.utwente.nl [6] Simulation does not show meta-stability, you will have to take care of synchronization (dual flipflop) yourself
Dear Haskellers, I have tried to compile from my own work and from several sources a course in functional and logic programming, and the result is a prospect of a book (right now only in *Spanish*), which I have named "Programación declarativa". Perhaps someone can be interested in giving it a look. The book is big (more than 400pp and 2Mb) and eclectic in declarative topics (ranging from Scheme to Prolog), but Haskell has an ample treatment. Some parts of the book are even unfinished, but I think the book may be valuable for some people wishing to learn declarative programming through functional programming and Prolog. The book can be downloaded from: http://sites.google.com/site/writingsmhg/haskell/SpanishDeclarativeProgrammi... Corrections and suggestions are welcome. Bests, -- Dr Manuel Hernández Gutiérrez Profesor-Investigador, Oficina num. 14 Coordinador del Doctorado en Tecnologías de Cómputo Aplicado. Área de Estudios de Posgrado. Instituto de Computación Universidad Tecnológica de la Mixteca Km 2.5 de la Carretera a Acatlima Huajuapan de León, Oaxaca, México 69000 Tel. +52 (953) 53 2 03 99 extensión 200 Fax +52 (953) 53 2 02 14 www.utm.mx
I now also fixed the examples on the website [1] to work with version 0.1.3.0 of CLaSH :-) -- Christiaan [1] http://clash.ewi.utwente.nl On Mar 22, 2011, at 6:43 PM, Christiaan Baaij wrote:
Hello,
I am pleased to announce an incremental update to CLaSH, version 0.1.3.0.
CLaSH can translate a (semantic) subset of Haskell to RTL-style VHDL. Instead of being an embedded DSL like Lava or ForSyDe, CLaSH takes are more 'traditional' approach to synthesis/compilation. It uses the GHC API as a front-end for parsing, type-checking and desugaring the Haskell source. It then exhaustively applies a list of meaning-preserving transformations to the intermediate GHC Core representation until it is in the desired normal form. The normalized Core/System Fc is then 'trivially' translated to RTL-style VHDL.
The new version of CLaSH has the following updates: - Support for simulation and synthesis of multi-clock hardware [6] - Significant synthesis speed-up (4x to 10x)
CLaSH already supported synthesis of: - User-defined Higher-Order functions [1] - User-defined ADTs (GADTs are not tested, but *might* work) - All of Haskell's choice constructs (Guards, Pattern Matching, etc.) - Lambda-abstraction / Anonymous Functions
You can use CLaSH as a library, but the use of the adapted GHC interpreter (added the :vhdl command) is recommended. The interpreter can be found on the CLaSH website [2], where you will also find examples, papers, tutorials, etc. The library can be downloaded from Hackage [3].
I recently gave a demo of CLaSH at the DATE'11 conference in grenoble, this demo already made use of the multi-clock feature (and is actually the only reference if you want to experiment with multi-clock hardware yourself). The source for the demo (audio spectrum analyzer programmed on an Altera Cyclone II FPGA board) can be downloaded from my github page [4].
Do note that CLaSH only works when you have the 6.12.* branch of GHC installed! I am currently analyzing the impact of the GHC API changes made in the 7.0.* brach, and hope to make the transition to the new API within the next month. Although the compiler is already used by 2 other phd's in our group [5], it is not a thoroughly tested product, so your coding style might not be anticipated by the current version of CLaSH ;-)
-- Christiaan Baaij
[1] There is hard-coded support for a set of recursively defined higher-order functions such as map, fold, zipWith, etc. [2] http://clash.ewi.utwente.nl [3] http://hackage.haskell.org/package/clash-0.1.3.0 [4] http://github.com/christiaanb/DE1-Cyclone-II-FPGA-Board-Support-Package [5] http://caes.ewi.utwente.nl [6] Simulation does not show meta-stability, you will have to take care of synchronization (dual flipflop) yourself
participants (2)
-
Christiaan Baaij -
Manuel Hernandez