{"id":13622043,"url":"https://github.com/llvm/circt","last_synced_at":"2025-05-14T03:11:56.593Z","repository":{"id":37063221,"uuid":"245072514","full_name":"llvm/circt","owner":"llvm","description":"Circuit IR Compilers and Tools","archived":false,"fork":false,"pushed_at":"2025-05-09T21:27:11.000Z","size":48734,"stargazers_count":1807,"open_issues_count":911,"forks_count":341,"subscribers_count":262,"default_branch":"main","last_synced_at":"2025-05-09T21:39:30.021Z","etag":null,"topics":["circt","llvm","mlir"],"latest_commit_sha":null,"homepage":"https://circt.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/llvm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-05T04:57:42.000Z","updated_at":"2025-05-09T17:15:35.000Z","dependencies_parsed_at":"2023-10-14T05:16:57.352Z","dependency_job_id":"419411da-99a8-4a69-b8c5-1654bebeeadc","html_url":"https://github.com/llvm/circt","commit_stats":{"total_commits":8974,"total_committers":148,"mean_commits":60.63513513513514,"dds":0.8749721417428126,"last_synced_commit":"2bd44c813a618352801bd129f526ee26ec9352c5"},"previous_names":[],"tags_count":202,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llvm%2Fcirct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llvm%2Fcirct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llvm%2Fcirct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llvm%2Fcirct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/llvm","download_url":"https://codeload.github.com/llvm/circt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253824546,"owners_count":21970042,"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":["circt","llvm","mlir"],"created_at":"2024-08-01T21:01:13.236Z","updated_at":"2025-05-14T03:11:56.549Z","avatar_url":"https://github.com/llvm.png","language":"C++","funding_links":[],"categories":["C++","开源项目","Circuit Compilers","Implements based on the underlying LLVM/MLIR compiler technology","Starchart","Semi Custom Design/ FPGAs","Open Source Git Repositories"],"sub_categories":["Hardware Description Languages","AI Compilation Frameworks"],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"docs/includes/img/circt-logo.svg\"/\u003e\u003c/p\u003e\n\n[![](https://github.com/llvm/circt/actions/workflows/buildAndTest.yml/badge.svg?event=push)](https://github.com/llvm/circt/actions?query=workflow%3A%22Build+and+Test%22)\n[![Nightly integration tests](https://github.com/llvm/circt/workflows/Nightly%20integration%20tests/badge.svg)](https://github.com/llvm/circt/actions?query=workflow%3A%22Nightly+integration+tests%22)\n\n# ⚡️ \"CIRCT\" / Circuit IR Compilers and Tools\n\n\"CIRCT\" stands for \"Circuit Intermediate Representations (IR) Compilers and Tools\".  One might also interpret\nit as the recursively as \"CIRCT IR Compiler and Tools\".  The T can be\nselectively expanded as Tool, Translator, Team, Technology, Target, Tree, Type,\n... we're ok with the ambiguity.\n\nThe CIRCT community is an open and welcoming community.  If you'd like to\nparticipate, you can do so in a number of different ways:\n\n1) Join our [Discourse Forum](https://llvm.discourse.group/c/Projects-that-want-to-become-official-LLVM-Projects/circt/) \non the LLVM Discourse server.  To get a \"mailing list\" like experience click the \nbell icon in the upper right and switch to \"Watching\".  It is also helpful to go \nto your Discourse profile, then the \"emails\" tab, and check \"Enable mailing list \nmode\".  You can also do chat with us on [CIRCT channel](https://discord.com/channels/636084430946959380/742572728787402763) \nof LLVM discord server.\n\n2) Join our weekly video chat.  Please see the\n[meeting notes document](https://docs.google.com/document/d/1fOSRdyZR2w75D87yU2Ma9h2-_lEPL4NxvhJGJd-s5pk/edit#)\nfor more information.\n\n3) Contribute code.  CIRCT follows all of the LLVM Policies: you can create pull\nrequests for the CIRCT repository, and gain commit access using the [standard LLVM policies](https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access).\n\n## Motivation\n\nThe EDA industry has well-known and widely used proprietary and open source\ntools.  However, these tools are inconsistent, have usability concerns, and were\nnot designed together into a common platform.  Furthermore\nthese tools are generally built with\n[Verilog](https://en.wikipedia.org/wiki/Verilog) (also\n[VHDL](https://en.wikipedia.org/wiki/VHDL)) as the IRs that they\ninterchange.  Verilog has well known design issues, and limitations, e.g.\nsuffering from poor location tracking support.\n\nThe CIRCT project is an (experimental!) effort looking to apply MLIR and\nthe LLVM development methodology to the domain of hardware design tools.  Many\nof us dream of having reusable infrastructure that is modular, uses\nlibrary-based design techniques, is more consistent, and builds on the best\npractices in compiler infrastructure and compiler design techniques.\n\nBy working together, we hope that we can build a new center of gravity to draw\ncontributions from the small (but enthusiastic!) community of people who work\non open hardware tooling.  In turn we hope this will propel open tools forward,\nenables new higher-level abstractions for hardware design, and\nperhaps some pieces may even be adopted by proprietary tools in time.\n\nFor more information, please see our longer [charter document](docs/Charter.md).\n\n## Setting this up\n\nThese commands can be used to setup CIRCT project:\n\n1) **Install Dependencies** of LLVM/MLIR according to [the\n  instructions](https://mlir.llvm.org/getting_started/), including cmake and \n  ninja.\n\n2) **Check out LLVM and CIRCT repos.**  CIRCT contains LLVM as a git\nsubmodule.  The LLVM repo here includes staged changes to MLIR which\nmay be necessary to support CIRCT.  It also represents the version of\nLLVM that has been tested.  MLIR is still changing relatively rapidly,\nso feel free to use the current version of LLVM, but APIs may have\nchanged.\n\n```\n$ git clone git@github.com:llvm/circt.git\n$ cd circt\n$ git submodule init\n$ git submodule update\n```\n\n*Note:* The repository is set up so that `git submodule update` performs a \nshallow clone, meaning it downloads just enough of the LLVM repository to check \nout the currently specified commit. If you wish to work with the full history of\nthe LLVM repository, you can manually \"unshallow\" the the submodule:\n\n```\n$ cd llvm\n$ git fetch --unshallow\n```\n\n3) **Build and test LLVM/MLIR:**\n\n```\n$ cd circt\n$ mkdir llvm/build\n$ cd llvm/build\n$ cmake -G Ninja ../llvm \\\n    -DLLVM_ENABLE_PROJECTS=\"mlir\" \\\n    -DLLVM_TARGETS_TO_BUILD=\"host\" \\\n    -DLLVM_ENABLE_ASSERTIONS=ON \\\n    -DCMAKE_BUILD_TYPE=DEBUG \\\n    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON\n$ ninja\n$ ninja check-mlir\n```\n\n4) **Build and test CIRCT:**\n\n```\n$ cd circt\n$ mkdir build\n$ cd build\n$ cmake -G Ninja .. \\\n    -DMLIR_DIR=$PWD/../llvm/build/lib/cmake/mlir \\\n    -DLLVM_DIR=$PWD/../llvm/build/lib/cmake/llvm \\\n    -DLLVM_ENABLE_ASSERTIONS=ON \\\n    -DCMAKE_BUILD_TYPE=DEBUG \\\n    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON\n$ ninja\n$ ninja check-circt\n$ ninja check-circt-integration # Run the integration tests.\n```\n\nThe `-DCMAKE_BUILD_TYPE=DEBUG` flag enables debug information, which makes the\nwhole tree compile slower, but allows you to step through code into the LLVM\nand MLIR frameworks. The `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` flag generates\na `build/compile_commands.json` file, which can be used by editors (or plugins)\nfor autocomplete and/or IDE-like features.\n\nTo get something that runs fast, use `-DCMAKE_BUILD_TYPE=Release` or\n`-DCMAKE_BUILD_TYPE=RelWithDebInfo` if you want to go fast and optionally if\nyou want debug info to go with it.  `Release` mode makes a very large difference\nin performance.\n\nConsult the [Getting Started](docs/GettingStarted.md) page for detailed \ninformation on configuring and compiling CIRCT.\n\nConsult the [Python Bindings](docs/PythonBindings.md) page if you are mainly\ninterested in using CIRCT from a Python prompt or script.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllvm%2Fcirct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllvm%2Fcirct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllvm%2Fcirct/lists"}