@hackage / clash-ghc

Clash: a functional hardware description language - GHC frontend

Latest1.10.0

About

Metadata

  • Last updated , by QBayLogic
  • License BSD-2-Clause
  • Categories Hardware
  • Maintained by: QBayLogic B.V. <devops@qbaylogic.com>

  • Lottery factor: 2

Links

Installation

Tested Compilers

  1. 9.10.3
  2. 9.8.4
  3. 9.6.7

Package Flags

Use the -f option with cabal commands to enable flags

    dynamic (off by default)

    Build Clash binaries with GHC flag `-dynamic`. This flag should only be used for packaging purposes. Installations using cabal should use `--enable-executable-dynamic`!

    use-ghc-paths (off by default)

    Locate the GHC core libraries using the `ghc-paths` package. Note: this flag may make binaries less relocatable, by hard-coding an absolute path to the core libraries.

    workaround-ghc-mmap-crash (off by default)

    Only use this flag when hit by GHC bug #19421. See clash-compiler PR #2444.

Readme

clash-ghc - Haskell/GHC front-end for the Clash compiler

  • See the LICENSE file for license and copyright details
  • Contains code from the GHC compiler, see the LICENSE_GHC file for license and copyright details pertaining to that code.

Clash - A functional hardware description language

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 (like VHDL), yet with a very high degree of type inference, enabling both safe and fast prototying using consise descriptions (like Verilog).

  • 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.

Open-source community

Clash benefits from an active community. Whether you need a question answered or want to contribute to open-source features, browse the features below to make the most of Clash.