Hello,<br>Can you give some brief notes on the new introduced clock-related stuff like Comp?<br><br>Thanks<br><br>--Bin Jin<br><br><div class="gmail_quote">On Wed, Mar 23, 2011 at 1:43 AM, Christiaan Baaij <span dir="ltr">&lt;<a href="mailto:christiaan.baaij@gmail.com">christiaan.baaij@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
<br>
I am pleased to announce an incremental update to CLaSH, version 0.1.3.0.<br>
<br>
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 &#39;traditional&#39; 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 &#39;trivially&#39; translated to RTL-style VHDL.<br>


<br>
The new version of CLaSH has the following updates:<br>
- Support for simulation and synthesis of multi-clock hardware [6]<br>
- Significant synthesis speed-up (4x to 10x)<br>
<br>
CLaSH already supported synthesis of:<br>
- User-defined Higher-Order functions [1]<br>
- User-defined ADTs (GADTs are not tested, but *might* work)<br>
- All of Haskell&#39;s choice constructs (Guards, Pattern Matching, etc.)<br>
- Lambda-abstraction / Anonymous Functions<br>
<br>
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].<br>


<br>
I recently gave a demo of CLaSH at the DATE&#39;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].<br>


<br>
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&#39;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 ;-)<br>


<br>
-- Christiaan Baaij<br>
<br>
<br>
[1] There is hard-coded support for a set of recursively defined higher-order functions such as map, fold, zipWith, etc.<br>
[2] <a href="http://clash.ewi.utwente.nl" target="_blank">http://clash.ewi.utwente.nl</a><br>
[3] <a href="http://hackage.haskell.org/package/clash-0.1.3.0" target="_blank">http://hackage.haskell.org/package/clash-0.1.3.0</a><br>
[4] <a href="http://github.com/christiaanb/DE1-Cyclone-II-FPGA-Board-Support-Package" target="_blank">http://github.com/christiaanb/DE1-Cyclone-II-FPGA-Board-Support-Package</a><br>
[5] <a href="http://caes.ewi.utwente.nl" target="_blank">http://caes.ewi.utwente.nl</a><br>
[6] Simulation does not show meta-stability, you will have to take care of synchronization (dual flipflop) yourself<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br>