{"id":13644708,"url":"https://github.com/sequencer/chisel-panama-standalone-plugin","last_synced_at":"2025-03-14T03:11:47.545Z","repository":{"id":200363429,"uuid":"705335372","full_name":"sequencer/chisel-panama-standalone-plugin","owner":"sequencer","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-15T19:16:57.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T22:13:14.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sequencer.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":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-15T18:22:11.000Z","updated_at":"2023-10-16T02:32:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"e079473e-5d99-4f6c-8019-9b54a8e86214","html_url":"https://github.com/sequencer/chisel-panama-standalone-plugin","commit_stats":null,"previous_names":["sequencer/chisel-panama-standalone-plugin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencer%2Fchisel-panama-standalone-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencer%2Fchisel-panama-standalone-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencer%2Fchisel-panama-standalone-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencer%2Fchisel-panama-standalone-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sequencer","download_url":"https://codeload.github.com/sequencer/chisel-panama-standalone-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243515567,"owners_count":20303258,"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":[],"created_at":"2024-08-02T01:02:11.308Z","updated_at":"2025-03-14T03:11:47.522Z","avatar_url":"https://github.com/sequencer.png","language":"C++","readme":"# An experimental example of MLIR pass plugin for CIRCT dialect\nThis is an experimental example based on https://github.com/llvm/llvm-project/tree/main/mlir/examples/standalone for implementing pass pipeline for CIRCT dialects. \n\n[`standalone-switch-bar-foo`](https://github.com/uenoku/circt-standalone-plugin/blob/main/lib/Standalone/StandalonePasses.cpp) implements a tranformation to replace a wire `bar` with `foo`. \n## Building - Component Build\n\n```sh\nDIR=\u003cinstall path of CIRCT\u003e\ncd build\ncmake .. -GNinja -DCMAKE_CXX_COMPILER=clang++ \\\n        -DCMAKE_C_COMPILER=clang \\\n        -DCIRCT_DIR=$DIR/lib/cmake/circt \\\n        -DMLIR_DIR=$DIR/lib/cmake/mlir \\ \n        -DLLVM_DIR=$DIR/lib/cmake/llvm \\ \n        -DLLVM_ENABLE_ZSTD=Off\nninja check-standalone\nls build/StandalonePlugin.so\n```\n\nfirtool must be built on https://github.com/llvm/circt/tree/dev/hidetou/load-pass\n\n```sh\n$ cat foo.fir\ncircuit Bar: %[[\n  { \"target\": \"~Bar|Bar\u003ebar\", \"class\": \"firrtl.transforms.DontTouchAnnotation\"}\n]]\n  module Bar:\n    input w: UInt\u003c1\u003e\n    wire bar:UInt\u003c1\u003e\n    \n    bar \u003c= w\n\n$ firtool foo.fir\n// Generated by CIRCT firtool-1.56.1-118-g195ae0749\nmodule Bar(\n  input w\n);\n\n  wire bar = w;\nendmodule\n\n$ firtool foo.fir -load-pass-plugin=$PWD/build/lib/StandalonePlugin.so -low-firrtl-pass-plugin='firrtl.circuit(standalone-switch-bar-foo)'\n// Generated by CIRCT firtool-1.56.1-118-g195ae0749\nmodule Bar(\n  input w\n);\n\n  wire foo = w;\nendmodule\n```\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsequencer%2Fchisel-panama-standalone-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsequencer%2Fchisel-panama-standalone-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsequencer%2Fchisel-panama-standalone-plugin/lists"}