Prelude package:clash-prelude

This module defines the explicitly clocked counterparts of the functions defined in Clash.Prelude.
Clash is a functional hardware description language that borrows both its syntax and semantics from the functional programming language Haskell. The merits of using a functional language to describe hardware comes from the fact that combinational circuits can be directly modeled as mathematical functions and that functional languages lend themselves very well at describing and (de-)composing mathematical functions. This package provides:
  • Prelude library containing datatypes and functions for circuit design
To use the library: For now, Clash.Prelude is also the best starting point for exploring the library. A preliminary version of a tutorial can be found in Clash.Tutorial. Some circuit examples can be found in Clash.Examples.
Clash: a functional hardware description language - Prelude library Clash is a functional hardware description language that borrows both its syntax and semantics from the functional programming language Haskell. The Clash compiler transforms these high-level descriptions to low-level synthesizable VHDL, Verilog, or SystemVerilog. Features of Clash:
  • Strongly typed, but with a very high degree of type inference, enabling both safe and fast prototyping using concise descriptions.
  • Interactive REPL: load your designs in an interpreter and easily test all your component without needing to setup a test bench.
  • Higher-order functions, with type inference, result in designs that are fully parametric by default.
  • Synchronous sequential circuit design based on streams of values, called Signals, lead to natural descriptions of feedback loops.
  • Support for multiple clock domains, with type safe clock domain crossing.
This package provides:
  • Prelude library containing datatypes and functions for circuit design
To use the library: A preliminary version of a tutorial can be found in Clash.Tutorial, for a general overview of the library you should however check out Clash.Prelude. Some circuit examples can be found in Clash.Examples.
Clash.HaskellPrelude re-exports most of the Haskell Prelude with the exception of those functions that the Clash API defines to work on Vec from Clash.Sized.Vector instead of on lists as the Haskell Prelude does. In addition, for the odd and even functions a type class called Parity is available at Clash.Class.Parity.