{"id":13416903,"url":"https://github.com/clash-lang/clash-compiler","last_synced_at":"2025-05-14T10:06:48.115Z","repository":{"id":9327302,"uuid":"11172497","full_name":"clash-lang/clash-compiler","owner":"clash-lang","description":"Haskell to VHDL/Verilog/SystemVerilog compiler","archived":false,"fork":false,"pushed_at":"2025-05-10T10:31:11.000Z","size":20689,"stargazers_count":1497,"open_issues_count":366,"forks_count":159,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-05-14T01:32:14.472Z","etag":null,"topics":["asic","fpga","hardware-description-language","haskell","systemverilog","verilog","vhdl"],"latest_commit_sha":null,"homepage":"https://clash-lang.org/","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ga-wdi-boston/sql-references-join-tables","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clash-lang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-07-04T09:29:15.000Z","updated_at":"2025-05-12T20:07:26.000Z","dependencies_parsed_at":"2023-11-29T16:52:35.089Z","dependency_job_id":"2fa03d5f-48ba-4ddb-a094-ab76463de3ea","html_url":"https://github.com/clash-lang/clash-compiler","commit_stats":{"total_commits":5594,"total_committers":66,"mean_commits":84.75757575757575,"dds":"0.43725420092956735","last_synced_commit":"8a827e1e232b795a92da584c3e9cd51a46315680"},"previous_names":[],"tags_count":62,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clash-lang%2Fclash-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clash-lang%2Fclash-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clash-lang%2Fclash-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clash-lang%2Fclash-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clash-lang","download_url":"https://codeload.github.com/clash-lang/clash-compiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254119494,"owners_count":22017951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asic","fpga","hardware-description-language","haskell","systemverilog","verilog","vhdl"],"created_at":"2024-07-30T22:00:29.268Z","updated_at":"2025-05-14T10:06:48.108Z","avatar_url":"https://github.com/clash-lang.png","language":"Haskell","readme":"# Clash - A functional hardware description language\n\n[![Pipeline status](https://gitlab.com/clash-lang/clash-compiler/badges/master/pipeline.svg)](https://gitlab.com/clash-lang/clash-compiler/commits/master)\n[![Hackage](https://img.shields.io/hackage/v/clash-ghc.svg)](https://hackage.haskell.org/package/clash-ghc)\n[![Documentation Status](https://readthedocs.org/projects/clash-lang/badge/?version=latest)](https://clash-lang.readthedocs.io/en/latest/?badge=latest)\n\nClash is a functional hardware description language that borrows both\nits syntax and semantics from the functional programming language\nHaskell. The Clash compiler transforms these high-level descriptions to\nlow-level synthesizable VHDL, Verilog, or SystemVerilog.\n\nFeatures of Clash:\n\n  * Strongly typed, but with a very high degree of type inference, enabling both\n    safe and fast prototyping using concise descriptions.\n\n  * Interactive REPL: load your designs in an interpreter and easily test all\n    your component without needing to setup a test bench.\n\n  * Higher-order functions, with type inference, result in designs that are\n    fully parametric by default.\n\n  * Synchronous sequential circuit design based on streams of values, called\n    `Signal`s, lead to natural descriptions of feedback loops.\n\n  * Support for multiple clock domains, with type safe clock domain crossing.\n\n# Open-source community\nClash benefits from an active community. Whether you need a question answered or\nwant to contribute to open-source features, browse the features below to make\nthe most of Clash.\n\n- [Discourse: long form discussions and questions](https://clash-lang.discourse.group/)\n- [Discord: short form discussions and community chat room](https://discord.gg/rebGq25FB4)\n- [Slack: short form discussions and questions](https://functionalprogramming.slack.com/archives/CPGMJFF50)\n  (Invite yourself at [fpslack.com](https://fpslack.com))\n- [Github: issue tracker](https://github.com/clash-lang/clash-compiler/issues)\n\n# Get Clash\nCheck out [clash-lang.org/install](https://clash-lang.org/install/) to install the latest stable release of Clash, or to setup a Clash project.\n\n# Get Clash from source\nGet the source code using [Git](https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F) and enter the cloned directory:\n\n```bash\ngit clone git@github.com:clash-lang/clash-compiler.git\n\n# Alternatively, if you haven't setup SSH keys with GitHub:\n# git clone https://github.com/clash-lang/clash-compiler.git\n\ncd clash-compiler\n```\n\nTo check out a released version, use:\n\n```\ngit checkout v1.2.3\n```\n\nTo checkout a release _branch_ use:\n\n```\ngit checkout 1.2\n```\n\nNote that release branches might contain non-released patches.\n\n## GHC compatibility\n|      | Linux                           | Windows                         | macOS                           | Clash (released) | Clash (development version)\n|------|---------------------------------|---------------------------------|---------------------------------|------------------|------------------------------\n| 8.6  | \u0026#x2714;\u0026#xfe0f;                | \u0026#x2714;\u0026#xfe0f;                | \u0026#x2714;\u0026#xfe0f;                | 1.0 - 1.8        | \u0026#x274c;\n| 8.8  | \u0026#x2714;\u0026#xfe0f;                | \u0026#x274c;                        | \u0026#x2714;\u0026#xfe0f;                | 1.0 - 1.8        | \u0026#x274c;\n| 8.10 | \u0026#x2714;\u0026#xfe0f;                | \u0026#x2714;\u0026#xfe0f;                | \u0026#x274c;                        | 1.2 - 1.8        | \u0026#x2714;\u0026#xfe0f;\n| 9.0  | \u0026#x2714;\u0026#xfe0f;                | \u0026#x2714;\u0026#xfe0f;\u003csup\u003e2\u003c/sup\u003e    | \u0026#x2714;\u0026#xfe0f;                | 1.4 - 1.8        | \u0026#x2714;\u0026#xfe0f;\n| 9.2  | \u0026#x26a0;\u0026#xfe0f;\u003csup\u003e1\u003c/sup\u003e    | \u0026#x26a0;\u0026#xfe0f;\u003csup\u003e1\u003c/sup\u003e    | \u0026#x26a0;\u0026#xfe0f;\u003csup\u003e1\u003c/sup\u003e    | 1.8              | \u0026#x26a0;\u0026#xfe0f;\u003csup\u003e1\u003c/sup\u003e\n| 9.4  | \u0026#x26a0;\u0026#xfe0f;\u003csup\u003e3\u003c/sup\u003e ️   | \u0026#x26a0;\u0026#xfe0f;\u003csup\u003e3\u003c/sup\u003e    | ️\u0026#x26a0;\u0026#xfe0f;\u003csup\u003e3\u003c/sup\u003e ️   | 1.8              | \u0026#x2714;\u0026#xfe0f;\n| 9.6  | \u0026#x2714;\u0026#xfe0f;\u003csup\u003e3\u003c/sup\u003e    | \u0026#x2714;\u0026#xfe0f;\u003csup\u003e3,4\u003c/sup\u003e  | \u0026#x2714;\u0026#xfe0f;\u003csup\u003e3\u003c/sup\u003e    | 1.8              | \u0026#x2714;\u0026#xfe0f;\n| 9.8  | \u0026#x2714;\u0026#xfe0f;                | \u0026#x2714;\u0026#xfe0f;\u003csup\u003e4\u003c/sup\u003e    | \u0026#x2714;\u0026#xfe0f;                | 1.8              | ️\u0026#x2714;\u0026#xfe0f;\n| 9.10 | \u0026#x2714;\u0026#xfe0f;                | \u0026#x2714;\u0026#xfe0f;\u003csup\u003e4\u003c/sup\u003e    | \u0026#x2714;\u0026#xfe0f;                | 1.8              | ️\u0026#x2714;\u0026#xfe0f;\n\n\n\u003csup\u003e1\u003c/sup\u003e GHC 9.2 contains a regression, rendering Clash error messages indecipherable. This change was reverted in 9.4.\n\n\u003csup\u003e2\u003c/sup\u003e GHC 9.0.2 on Windows fails to compile `clash-cores`. We therefore don't run the Clash test suite on CI for this combination.\n\n\u003csup\u003e3\u003c/sup\u003e Clash starts extremely slowly when compiled with 9.4.8 up to and including 9.6.2. Consider downgrading to 9.4.7 or upgrading to 9.6.3 and up.\n\n\u003csup\u003e4\u003c/sup\u003e Clash starts extremely slowly on Windows with GHC 9.6 through 9.10, consider downgrading to 9.4.7\n\n## Cabal\nTo use Cabal you need both Cabal and GHC installed on your system. We recommend using [ghcup](https://www.haskell.org/ghcup/). For more information, see [https://www.haskell.org/downloads/](https://www.haskell.org/downloads/).\n\nTo run `clash` use:\n\n```\ncabal v2-run -- clash\n```\n\nIf this fails, make sure you've got an up-to-date package index:\n\n```\ncabal update\n```\n\n## Stack\n[Install Stack](https://docs.haskellstack.org/en/stable/install_and_upgrade/) and run:\n\n```\nstack run -- clash\n```\n## Nix\nOr [use Nix](https://nixos.org/nix/download.html) to get a shell with the `clash` and `clashi` binaries on your PATH:\n\n```bash\n# Start the default dev shell\nnix develop .\n\n# Start a dev shell with a specific GHC version\nnix develop .#ghc961\n```\n\nYou will need a modern version of nix with support for the new-style `nix`\ncommand and flakes (2.4 or newer). Support for these must still be manually\nenabled, this can be done by setting\n\n```\nexperimental-features = nix-command flakes\n```\n\nin your `nix.conf`.\n\nTo automatically enter and exit the `nix` environment on directory change, you\ncan install [`direnv`](https://direnv.net/) and\n[`nix-direnv`](https://github.com/nix-community/nix-direnv) and write the\nfollowing to a `.envrc` file in the root of this repository:\n\n```\nuse flake\n\nwatch_file nix/*\n```\n\nUpon adding or changing this file you must `direnv allow` in order for the file\nto be automatically loaded / reloaded on project changes.\n\nIndividual packages / applications can also be built or run using the `nix\nbuild` and `nix run` commands, i.e.\n\n```\nnix build .#clash-ghc\nnix run .#clashi\n```\n\n# Related libraries and initiatives\n\n* [Clashilator](https://github.com/gergoerdi/clashilator): tooling to integrate Clash with Verilator. Enables fast, multithreaded simulation by compiling Clash designs to C++.\n* [Clash Protocols](https://github.com/clash-lang/clash-protocols): experimental library for writing Clash circuits with bidirectional communication - such as AXI or Avalon.\n* [Clash Starters](https://github.com/clash-lang/clash-starters): starter projects to quickly get you up and running.\n* [Clash WaveDrom](https://github.com/expipiplus1/clash-wavedrom): generate wave diagrams from Clash using [WaveDrom](https://wavedrom.com/)\n\n# Projects built with Clash\n\n* [Contranomy](https://github.com/christiaanb/contranomy): a RISCV implementation verified using the [RISC-V Formal Verification Framework](https://github.com/SymbioticEDA/riscv-formal).\n* [Space Invaders](https://github.com/gergoerdi/clash-spaceinvaders): a Clash implementation of the 1978 Space Invaders arcade machine by Taito.\n","funding_links":[],"categories":["Meta HDL and Transpilers","Haskell","Circuit Compilers","Semi Custom Design/ FPGAs"],"sub_categories":["Hardware Description Languages"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclash-lang%2Fclash-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclash-lang%2Fclash-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclash-lang%2Fclash-compiler/lists"}