clash-lib: Clash: a functional hardware description language - As a 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
Signal
s, lead to natural descriptions of feedback loops.Support for multiple clock domains, with type safe clock domain crossing.
This package provides:
The CoreHW internal language: SystemF + Letrec + Case-decomposition
The normalisation process that brings CoreHW in a normal form that can be converted to a netlist
Blackbox/Primitive Handling
Front-ends (for: parsing, typecheck, etc.) are provided by separate packages:
Prelude library: https://hackage.haskell.org/package/clash-prelude
[Skip to Readme]
Modules
[Index] [Quick Jump]
- Clash
- Annotations
- BitRepresentation
- Clash.Backend
- Core
- Clash.Core.DataCon
- Clash.Core.EqSolver
- Evaluator
- Clash.Core.FreeVars
- Clash.Core.HasFreeVars
- Clash.Core.HasType
- Clash.Core.Literal
- Clash.Core.Name
- Clash.Core.PartialEval
- Clash.Core.Pretty
- Clash.Core.Subst
- Clash.Core.Term
- Clash.Core.TermInfo
- Clash.Core.TermLiteral
- Clash.Core.TyCon
- Clash.Core.Type
- Clash.Core.TysPrim
- Clash.Core.Util
- Clash.Core.Var
- Clash.Core.VarEnv
- Data
- Clash.DataFiles
- Clash.Debug
- Clash.Driver
- Edalize
- Clash.Netlist
- Clash.Normalize
- Clash.Normalize.PrimitiveReductions
- Clash.Normalize.Primitives
- Clash.Normalize.Strategy
- Clash.Normalize.Transformations
- Clash.Normalize.Transformations.ANF
- Clash.Normalize.Transformations.Case
- Clash.Normalize.Transformations.Cast
- Clash.Normalize.Transformations.DEC
- Clash.Normalize.Transformations.EtaExpand
- Clash.Normalize.Transformations.Inline
- Clash.Normalize.Transformations.Letrec
- Clash.Normalize.Transformations.MultiPrim
- Clash.Normalize.Transformations.Reduce
- Clash.Normalize.Transformations.SeparateArgs
- Clash.Normalize.Transformations.Specialize
- Clash.Normalize.Transformations.XOptimize
- Clash.Normalize.Types
- Clash.Normalize.Util
- Clash.Pretty
- Primitives
- Annotations
- Clash.Primitives.DSL
- GHC
- Intel
- Clash.Primitives.Magic
- Sized
- Clash.Primitives.Types
- Clash.Primitives.Util
- Clash.Primitives.Verification
- Xilinx
- Rewrite
- Clash.Unique
- Clash.Util
- Verification
- Annotations
- Data
- Aeson
- Data.Aeson.Extra
- Text
- Prettyprint
- Aeson
- GHC
- BasicTypes
Flags
Manual Flags
Name | Description | Default |
---|---|---|
debug | Build a debug compiler | Disabled |
unittests | You can disable testing with unittests using `-f-unittests`. | Enabled |
doctests | You can disable testing with doctests using `-f-doctests`. | Enabled |
workaround-ghc-mmap-crash | Only use this flag when hit by GHC bug #19421. See clash-compiler PR #2444. | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- clash-lib-1.8.1.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.2, 0.2.0.1, 0.2.1, 0.2.2, 0.2.2.1, 0.3, 0.3.0.1, 0.3.0.2, 0.3.0.3, 0.3.0.4, 0.3.1, 0.3.2, 0.4, 0.4.1, 0.5, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.9, 0.5.10, 0.5.11, 0.5.12, 0.5.13, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8, 0.6.9, 0.6.10, 0.6.11, 0.6.12, 0.6.13, 0.6.14, 0.6.15, 0.6.16, 0.6.17, 0.6.18, 0.6.19, 0.6.20, 0.6.21, 0.7, 0.7.1, 0.99, 0.99.1, 0.99.2, 0.99.3, 1.0.0, 1.0.1, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.8.0, 1.8.1 (info) |
---|---|
Change log | CHANGELOG.md |
Dependencies | aeson (>=0.6.2.0 && <2.3), aeson-pretty (>=0.8 && <0.9), ansi-terminal (>=0.8.0.0 && <1.2), array, async (>=2.2.0 && <2.3), attoparsec (>=0.10.4.0 && <0.15), attoparsec-aeson (>=2.1 && <2.3), base (>=4.11 && <5), base16-bytestring (>=0.1.1 && <1.1), binary (>=0.8.5 && <0.11), bytestring (>=0.10.0.2 && <0.13), clash-lib, clash-prelude (==1.8.1), concurrent-supply (>=0.1.7 && <0.2), containers (>=0.5.0.0 && <0.8), cryptohash-sha256 (>=0.11 && <0.12), data-binary-ieee754 (>=0.4.4 && <0.6), data-default (>=0.7 && <0.8), deepseq (>=1.3.0.2 && <1.6), directory (>=1.2.0.1 && <1.4), dlist (>=0.8 && <1.1), docopt (>=0.7 && <0.8), exceptions (>=0.8.3 && <0.11.0), extra (>=1.6.17 && <1.8), filepath (>=1.3.0.1 && <1.6), ghc (>=8.6.0 && <9.9), ghc-bignum (>=1.0 && <1.4), ghc-boot-th, Glob, hashable (>=1.2.1.0 && <1.6), haskell-src-meta (>=0.8 && <0.9), hint (>=0.7 && <0.10), infinite-list (>=0.1 && <0.2), integer-gmp (>=1.0 && <1.1), lens (>=4.10 && <5.4), mtl (>=2.1.2 && <2.4), ordered-containers (>=0.2 && <0.3), pretty-show (>=1.9 && <2.0), prettyprinter (>=1.2.0.1 && <1.8), prettyprinter-interp (>=0.2 && <0.3), primitive (>=0.5.0.1 && <1.0), string-interpolate (>=0.3 && <0.4), stringsearch, template-haskell (>=2.8.0.0 && <2.22), temporary (>=1.2.1 && <1.4), terminal-size (>=0.3 && <0.4), text (>=1.2.2 && <2.2), time (>=1.4.0.1 && <1.15), transformers (>=0.5.2.0 && <0.7), trifecta (>=1.7.1.1 && <2.2), unordered-containers (>=0.2.3.3 && <0.3), vector (>=0.11 && <1.0), vector-binary-instances (>=0.2.3.5 && <0.3), yaml (>=0.11 && <0.12) [details] |
License | BSD-2-Clause |
Copyright | Copyright © 2012-2016, University of Twente, 2016-2019, Myrtle Software Ltd, 2017-2023, QBayLogic B.V., Google Inc. |
Author | The Clash Authors |
Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |
Revised | Revision 3 made by QBayLogic at 2024-07-07T08:46:15Z |
Category | Hardware |
Home page | https://clash-lang.org/ |
Bug tracker | https://github.com/clash-lang/clash-compiler/issues |
Source repo | head: git clone https://github.com/clash-lang/clash-compiler.git(clash-lib) |
Uploaded | by QBayLogic at 2023-11-11T00:46:03Z |
Distributions | Arch:1.8.1, NixOS:1.8.1 |
Reverse Dependencies | 10 direct, 0 indirect [details] |
Executables | static-files, v16-upgrade-primitives |
Downloads | 59790 total (47 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |