Home

Awesome

<p align="center"> <img src="./doc/_static/logo.png"/> </p> <p align="center"> <a title="Documentation" href="https://ghdl.github.io/ghdl"><img src="https://img.shields.io/website.svg?label=ghdl.github.io%2Fghdl&longCache=true&style=flat-square&url=http%3A%2F%2Fghdl.github.io%2Fghdl%2Findex.html&logo=GitHub"></a><!-- --> <a title="Join the chat at https://gitter.im/ghdl1/Lobby" href="https://gitter.im/ghdl1/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img src="https://img.shields.io/badge/Chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef"></a><!-- --> <a title="Docker Images" href="https://github.com/ghdl/docker"><img src="https://img.shields.io/docker/pulls/ghdl/ghdl.svg?logo=docker&logoColor=e8ecef&style=flat-square&label=Docker"></a><!-- --> <a title="Releases" href="https://github.com/ghdl/ghdl/releases"><img src="https://img.shields.io/github/commits-since/ghdl/ghdl/latest.svg?longCache=true&style=flat-square&logo=GitHub"></a><!-- --> </p> <p align="center"> <a title="'Test' workflow Status" href="https://github.com/ghdl/ghdl/actions/workflows/Test.yml"><img alt="'Test' workflow Status" src="https://img.shields.io/github/actions/workflow/status/ghdl/ghdl/Test.yml?branch=master&longCache=true&style=flat-square&label=Test&logo=github%20actions&logoColor=fff"></a><!-- --> <a title="AppVeyor" href="https://ci.appveyor.com/project/tgingold/ghdl-psgys/history"><img src="https://img.shields.io/appveyor/ci/tgingold/ghdl-psgys/master.svg?logo=appveyor&logoColor=e8ecef&style=flat-square&label=Test"></a><!-- --> <a title="CII Best Practices" href="https://bestpractices.coreinfrastructure.org/en/projects/3157"><img src="https://img.shields.io/cii/percentage/3157??longCache=true&style=flat-square&label=CII&logo=Linux%20Foundation"></a><!-- --> </p>

This directory contains the sources of GHDL, the open-source analyzer, compiler, simulator and (experimental) synthesizer for VHDL, a Hardware Description Language (HDL). GHDL is not an interpreter: it allows you to analyse and elaborate sources for generating machine code from your design. Native program execution is the only way for high-speed simulation.

Table of Contents

Main features

Full support for the 1987, 1993, 2002 versions of the IEEE 1076 VHDL standard, and partial for the 2008 and 2019 revisions.

Partial support of PSL.

By using a code generator (LLVM, GCC or, x86_64/i386 only, a built-in one), it is much faster than any interpreted simulator. It can handle very large designs, such as leon3/grlib.

GHDL runs on GNU/Linux, Windows and macOS; on x86, x86_64, armv6/armv7/aarch32, aarch64 and ppc64. You can freely download nightly assets, use OCI images (aka Docker/Podman containers), or try building it on your own machine (see 'Getting GHDL' below).

Can write waveforms to GHW, VCD or FST files. Combined with a GUI-based waveform viewer and a good text editor, GHDL is a very powerful tool for writing, testing and simulating your code.

Co-simulation with foreign applications is supported through Verilog Procedural Interface (VPI) and/or VHPIDIRECT. See ghdl.github.io/ghdl-cosim.

Can synthesize arbitrarily complex VHDL designs into a VHDL 1993 netlist, which can be implicitly or explicitly used in open-source or vendor synthesis frameworks.

GHDL is free software:

Third-Party Integrations

GHDL is designed to integrate seamlessly with several popular open-source tools, allowing users to leverage additional capabilities for both simulation and synthesis workflows.

One of the key integrations is with Yosys, a leading open-source synthesis tool. Using the ghdl-yosys-plugin, GHDL can be used as a front-end for Yosys, enabling users to synthesize VHDL designs directly. This makes it possible to move from simulation to synthesis without leaving the GHDL environment, streamlining the design flow.

GHDL also integrates with cocotb, a coroutine-based co-simulation framework that allows Python-driven testing of VHDL designs. This is particularly useful for writing complex testbenches in Python and interacting with VHDL simulations in real-time.

For verification, GHDL supports integration with frameworks such as OSVVM, UVVM, and VUnit, providing users with a full suite of tools for verifying VHDL designs. These verification libraries enable advanced testing techniques like constrained random verification, functional coverage, and automated regression testing.

Together, these third-party integrations make GHDL a comprehensive tool for digital design, simulation, verification, and synthesis, suitable for both individual developers and large teams.

Getting GHDL

Benefits of Using GHDL

GHDL offers several advantages that make it a powerful tool for VHDL simulation and synthesis. One of the key benefits is its native code generation, which allows for faster simulation times compared to interpreted simulators. This performance boost is particularly noticeable in large and complex designs, where simulation speed can be a critical factor.

In addition to performance, GHDL is highly versatile. It supports multiple revisions of the VHDL standard, including the 1987, 1993, 2002, 2008, and 2019 versions. This wide range of compatibility makes GHDL suitable for legacy projects as well as cutting-edge designs. Whether you are working with older VHDL standards or the most recent revisions, GHDL provides the flexibility to handle them all.

Another important benefit is GHDL’s cross-platform support. It runs on major operating systems like Linux, Windows, and macOS, and supports various architectures such as x86, x86_64, ARM, and PPC64. This allows developers to use GHDL on a variety of hardware configurations, making it accessible to a broad range of users.

GHDL’s integration with popular open-source tools such as Yosys for synthesis and cocotb for verification further enhances its utility. These integrations allow users to extend GHDL’s capabilities beyond simulation, making it a comprehensive solution for VHDL design, verification, and synthesis workflows.

Contributing

GHDL welcomes contributions from the community. Whether you're interested in improving documentation, fixing bugs, or adding new features, there are many ways to get involved. Contributions are a great way to help improve the tool and to learn more about how GHDL works internally.

Here’s how you can start contributing:

  1. Find an issue to work on: Check out the open issues on the GitHub repository. Issues are often labeled by difficulty or type (e.g., "good first issue" for beginners). You can also propose your own ideas or enhancements.

  2. Fork and clone the repository: Once you’ve chosen an issue to work on, fork the GHDL repository to your own GitHub account. Clone the forked repository to your local machine to make changes.

  3. Create a new branch: It’s good practice to create a new branch for each issue or feature you’re working on. This helps keep your changes isolated and makes it easier for the maintainers to review your work.

  4. Submit a pull request: After making your changes and committing them to your branch, submit a pull request (PR) to the main GHDL repository. Be sure to include a clear description of what your PR addresses and any relevant context or testing steps.

For more detailed guidelines, refer to our Contributing Guide (when created), which includes coding standards, testing instructions, and best practices for making contributions.

Project structure

Regular users

Advanced users

<p align="center"> <a title="Codecov - Branch Coverage" href="https://codecov.io/gh/ghdl/ghdl"><img alt="Codecov - Branch Coverage" src="https://img.shields.io/codecov/c/github/ghdl/ghdl?longCache=true&style=flat-square&logo=Codecov&logoColor=fff"></a><!-- --> <a title="Codacy - Quality" href="https://app.codacy.com/gh/ghdl/ghdl/dashboard"><img alt="Codacy - Quality" src="https://img.shields.io/codacy/grade/dc4f2c76ba7e4f598389ab1f8d7d53e9?longCache=true&style=flat-square&logo=Codacy&logoColor=fff"></a><!-- --> <a title="Codacy - Coverage" href="https://app.codacy.com/gh/ghdl/ghdl/dashboard"><img alt="Codacy - Coverage" src="https://img.shields.io/codacy/coverage/dc4f2c76ba7e4f598389ab1f8d7d53e9?longCache=true&style=flat-square&logo=Codacy&logoColor=fff"></a><!-- --> </p>