{"id":13649284,"url":"https://github.com/ghdl/ghdl-yosys-plugin","last_synced_at":"2026-01-27T01:31:47.624Z","repository":{"id":37751441,"uuid":"80494756","full_name":"ghdl/ghdl-yosys-plugin","owner":"ghdl","description":"VHDL synthesis (based on ghdl)","archived":false,"fork":false,"pushed_at":"2025-12-30T08:35:13.000Z","size":287,"stargazers_count":354,"open_issues_count":38,"forks_count":34,"subscribers_count":37,"default_branch":"master","last_synced_at":"2026-01-02T02:35:28.787Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"VHDL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghdl.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-01-31T05:41:26.000Z","updated_at":"2025-12-30T08:35:17.000Z","dependencies_parsed_at":"2025-12-21T17:04:14.135Z","dependency_job_id":null,"html_url":"https://github.com/ghdl/ghdl-yosys-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ghdl/ghdl-yosys-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghdl%2Fghdl-yosys-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghdl%2Fghdl-yosys-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghdl%2Fghdl-yosys-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghdl%2Fghdl-yosys-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghdl","download_url":"https://codeload.github.com/ghdl/ghdl-yosys-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghdl%2Fghdl-yosys-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28795468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"ssl_error","status_checked_at":"2026-01-27T01:07:06.974Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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:04:55.606Z","updated_at":"2026-01-27T01:31:47.619Z","avatar_url":"https://github.com/ghdl.png","language":"VHDL","funding_links":[],"categories":["VHDL","Circuit Compilers"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca title=\"GHDL synthesis documentation\" href=\"https://ghdl.github.io/ghdl/using/Synthesis.html\"\u003e\u003cimg src=\"https://img.shields.io/website.svg?label=ghdl.github.io%2Fghdl\u0026longCache=true\u0026style=flat-square\u0026url=http%3A%2F%2Fghdl.github.io%2Fghdl%2Findex.html\"\u003e\u003c/a\u003e\u003c!--\n  --\u003e\n  \u003ca title=\"Join the chat at https://gitter.im/ghdl1/Lobby\" href=\"https://gitter.im/ghdl1/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\"\u003e\u003cimg src=\"https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true\u0026style=flat-square\u0026logo=gitter\u0026logoColor=e8ecef\"\u003e\u003c/a\u003e\u003c!--\n  --\u003e\n  \u003ca title=\"Docker Images\" href=\"https://github.com/ghdl/docker\"\u003e\u003cimg src=\"https://img.shields.io/docker/pulls/ghdl/synth.svg?logo=docker\u0026logoColor=e8ecef\u0026style=flat-square\u0026label=docker\"\u003e\u003c/a\u003e\u003c!--\n  --\u003e\n  \u003ca title=\"'push' workflow Status\" href=\"https://github.com/ghdl/ghdl-yosys-plugin/actions/workflows/push.yml\"\u003e\u003cimg alt=\"'push' workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/ghdl/ghdl-yosys-plugin/push.yml?branch=master\u0026longCache=true\u0026style=flat-square\u0026label=push\u0026logo=Github%20Actions\u0026logoColor=fff\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# ghdl-yosys-plugin: VHDL synthesis (based on [GHDL](https://github.com/ghdl/ghdl) and [Yosys](https://github.com/YosysHQ/yosys))\n\n**This is experimental and work in progress!** See [ghdl.github.io/ghdl: Using/Synthesis](http://ghdl.github.io/ghdl/using/Synthesis.html).\n\n\u003e TODO: Create table with features of VHDL that are supported, WIP and pending.\n\n## Build as a module (shared library)\n\n- Get and install [Yosys](https://github.com/YosysHQ/yosys).\n- Get sources, build and install [GHDL](https://github.com/ghdl/ghdl). Ensure that GHDL is configured with synthesis features (enabled by default since v0.37). See [Building GHDL](https://github.com/ghdl/ghdl#building-ghdl).\n\n\u003e NOTE: GHDL must be built with at least version of 8 GNAT (`gnat-8`).\n\n\u003e HINT: The default build prefix is `/usr/local`. Sudo permission might be required to install tools there.\n\n- Get and build ghdl-yosys-plugin: `make`.\n\n\u003e HINT: If ghdl is not available in the PATH, set `GHDL` explicitly, e.g.: `make GHDL=/my/path/to/ghdl`.\n\nThe output is a shared library (`ghdl.so` on GNU/Linux), which can be used directly: `yosys -m ghdl.so`.\n\nTo install the module, the library must be copied to `YOSYS_PREFIX/share/yosys/plugins/ghdl.so`, where `YOSYS_PREFIX` is the installation path of yosys. This can be achieved through a make target: `make install`.\n\nAlternatively, the shared library can be copied/installed along with GHDL:\n\n```sh\ncp ghdl.so \"$GHDL_PREFIX/lib/ghdl_yosys.so\"\n\nyosys-config --exec mkdir -p --datdir/plugins\nyosys-config --exec ln -s \"$GHDL_PREFIX/lib/ghdl_yosys.so\" --datdir/plugins/ghdl.so\n```\n\n## Build as part of yosys (not recommended)\n\n- Get and build GHDL as in the previous section.\n\n- Get [Yosys](https://github.com/YosysHQ/yosys) sources.\n\n- Get ghdl-yosys-plugin and:\n  - Copy `src/*` to `yosys/frontends/ghdl`.\n  - Configure Yosys by adding (to) `Makefile.conf`:\n\n```makefile\nENABLE_GHDL := 1\nGHDL_PREFIX := \u003cghdl install dir\u003e\n```\n\n- Build and install Yosys.\n\n## Pre-built packages\n\nSome projects provide pre-built packages including GHDL, Yosys. Unless you have specific requirements (targeting a different arch, OS, build options...), we suggest using one of the following solutions before building ghdl-yosys-plugin from sources.\n\n- On Windows, there is a package group in [MSYS2](https://www.msys2.org/) repositories named [mingw-w64-x86_64-eda](https://packages.msys2.org/group/mingw-w64-x86_64-eda)|[mingw-w64-i686-eda](https://packages.msys2.org/group/mingw-w64-i686-eda). See [hdl/MINGW-packages](https://github.com/hdl/MINGW-packages).\n\n- On GNU/Linux, the [guix-science](https://codeberg.org/guix-science/guix-science) [guix](https://guix.gnu.org/) channel provides binaries for both ghdl and ghdl-yosys-plugin\n\n```sh\nguix install ghdl-llvm ghdl-yosys-plugin\n\n# use it as\nalias yosys='yosys -m ~/.guix-profile/lib/yosys/ghdl.so'\n```\n\n## Usage\n\nExample for IceStick, using GHDL, Yosys, nextpnr and icestorm:\n\n```sh\ncd examples/icestick/leds/\n\n# Analyse VHDL sources\nghdl -a leds.vhdl\nghdl -a spin1.vhdl\n\n# Synthesize the design.\n# NOTE: if GHDL is built as a module, set MODULE to '-m ghdl' or '-m path/to/ghdl.so',\n#       otherwise, unset it.\nyosys $MODULE -p 'ghdl leds; synth_ice40 -json leds.json'\n\n# P\u0026R\nnextpnr-ice40 --package hx1k --pcf leds.pcf --asc leds.asc --json leds.json\n\n# Generate bitstream\nicepack leds.asc leds.bin\n\n# Program FPGA\niceprog leds.bin\n```\n\nAlternatively, it is possible to analyze, elaborate and synthesize VHDL sources at once, instead of calling GHDL and Yosys in two steps. In this example:\n\n```\nyosys $MODULE -p 'ghdl leds.vhdl spin1.vhdl -e leds; synth_ice40 -json leds.json'\n```\n\nFinally, one may avoid analysis of individual source files in complex projects with help of [hdlmake](https://gitlab.com/ohwr/project/hdl-make)\n\n```\ncd examples/icestick/leds/\nhdlmake -f Makefile.mk\nmake -f Makefile.mk\n```\n\n## Containers\n\nContainer (aka Docker/Podman) image [`hdlc/ghdl:yosys`](https://hub.docker.com/r/hdlc/ghdl/tags) includes GHDL, Yosys and the ghdl-yosys-plugin module (shared library). These can be used to synthesize designs straightaway. For example:\n\n```sh\ndocker run --rm -t \\\n  -v $(pwd)/examples/icestick/leds:/src \\\n  -w /src \\\n  hdlc/ghdl:yosys \\\n  yosys -m ghdl -p 'ghdl leds.vhdl blink.vhdl -e leds; synth_ice40 -json leds.json'\n```\n\n\u003e In a system with [docker](https://docs.docker.com/install) installed, the image is automatically downloaded the first time invoked.\n\nFurthermore, the snippet above can be extended in order to P\u0026R the design with [nextpnr](https://github.com/YosysHQ/nextpnr) and generate a bitstream with [icestorm](https://github.com/cliffordwolf/icestorm) tools:\n\n```sh\ncd examples/icestick/leds/\n\nDOCKER_CMD=\"$(command -v winpty) docker run --rm -it -v /$(pwd)://wrk -w //wrk\"\n\n$DOCKER_CMD hdlc/ghdl:yosys    yosys -m ghdl -p 'ghdl leds.vhdl rotate4.vhdl -e leds; synth_ice40 -json leds.json'\n$DOCKER_CMD hdlc/nextpnr:ice40 nextpnr-ice40 --hx1k --json leds.json --pcf leds.pcf --asc leds.asc\n$DOCKER_CMD hdlc/icestorm      icepack leds.asc leds.bin\n\niceprog leds.bin\n```\n\nSee [hdl/containers](https://github.com/hdl/containers) for further info about containers including other EDA tools.\n\n\u003e NOTE: on GNU/Linux, it should be possible to use board programming tools through `hdlc/icestorm`. On Windows and macOS, accessing USB/COM ports of the host from containers is challenging. Therefore, board programming tools need to be available on the host. Windows users can find several board programming tools available as [MSYS2](https://www.msys2.org/) packages. See [mingw-w64-x86_64-eda](https://packages.msys2.org/group/mingw-w64-x86_64-eda)|[mingw-w64-i686-eda](https://packages.msys2.org/group/mingw-w64-i686-eda) and [hdl/MINGW-packages](https://github.com/hdl/MINGW-packages).\n\n## Guix containers\n\nAs an alternative, [guix](https://guix.gnu.org/) on the fly [shells](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html), provide custom, disposable containers.\n\nSynthesis with Yosys:\n\n```sh\nYS='ghdl leds.vhdl spin1.vhdl -e leds; synth_ice40 -json leds.json'\nMODULE='~/.guix-profile/lib/yosys/ghdl.so'\n\nguix shell -CP ghdl-yosys-plugin -- yosys -m $MODULE -p $YS\n```\n\nP\u0026R the design with [nextpnr](https://github.com/YosysHQ/nextpnr) and generate a bitstream with [icestorm](https://github.com/cliffordwolf/icestorm) tools:\n\n```sh\nguix shell -C nextpnr icestorm -- nextpnr-ice40 --hx1k --json leds.json --pcf leds.pcf --asc leds.asc \u0026\u0026 icepack leds.asc leds.bin\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghdl%2Fghdl-yosys-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghdl%2Fghdl-yosys-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghdl%2Fghdl-yosys-plugin/lists"}