GHDL is architectured like a traditional compiler. It has:
a driver (sources in src/ghdldrv) to call the programs (compiler, assembler, linker) if needed.
a runtime library named GRT (sources in src/grt) to help execution at run-time. This ensures that execution is cycle-accurate.
a front-end (sources in src/vhdl) to parse and analyse VHDL. See Front-end and AST.
multiple back-ends to generate either code or netlists.
Three for simulation (sources are in src/ortho): mcode, LLVM and GCC. See Building GHDL from Sources.
Two for synthesis (sources in src/synth): –synth and Yosys plugin.
The architecture is modular and some of the components are available through the shared library
libghdl is used by the Yosys plugin, the Language Server Protocol (LSP) server, and to fill the data of
pyVHDLModel (see The pyVHDLModel Documentation).
The main work with regard to understanding the VHDL language is performed by the front-end, which is documented in the next section.