Docs: installation/source tree

This commit is contained in:
Krystine Sherwin 2024-01-18 13:52:32 +13:00
parent 93ceda5c63
commit 74d2c918cd
No known key found for this signature in database
1 changed files with 43 additions and 30 deletions

View File

@ -143,43 +143,56 @@ executable name).
Source tree and build system Source tree and build system
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. TODO:: check if source tree/build system details need updating
The Yosys source tree is organized into the following top-level The Yosys source tree is organized into the following top-level
directories: directories:
- | backends/ ``backends/``
| This directory contains a subdirectory for each of the backend modules. This directory contains a subdirectory for each of the backend modules.
- | frontends/ ``docs/``
| This directory contains a subdirectory for each of the frontend modules. Contains the source for this documentation, including images and sample code.
- | kernel/ ``examples/``
| This directory contains all the core functionality of Yosys. This includes Contains example code for using Yosys with some other tools including a demo
the functions and definitions for working with the RTLIL data structures of the Yosys Python api, and synthesizing for various toolchains such as
(rtlil.h and rtlil.cc), the main() function (driver.cc), the internal Intel and Anlogic.
framework for generating log messages (log.h and log.cc), the internal
framework for registering and calling passes (register.h and register.cc),
some core commands that are not really passes (select.cc, show.cc, …) and a
couple of other small utility libraries.
- | passes/ ``frontends/``
| This directory contains a subdirectory for each pass or group of passes. This directory contains a subdirectory for each of the frontend modules.
For example as of this writing the directory passes/opt/ contains the code
for seven passes: opt, opt_expr, opt_muxtree, opt_reduce, opt_rmdff,
opt_rmunused and opt_merge.
- | techlibs/ ``guidelines/``
| This directory contains simulation models and standard implementations for Contains developer guidelines, including the code of conduct and coding style
the cells from the internal cell library. guide.
- | tests/ ``kernel/``
| This directory contains a couple of test cases. Most of the smaller tests This directory contains all the core functionality of Yosys. This includes
are executed automatically when make test is called. The larger tests must the functions and definitions for working with the RTLIL data structures
be executed manually. Most of the larger tests require downloading external (``rtlil.{h|cc}``), the ``main()`` function (``driver.cc``), the internal
HDL source code and/or external tools. The tests range from comparing framework for generating log messages (``log.{h|cc}``), the internal
simulation results of the synthesized design to the original sources to framework for registering and calling passes (``register.{h|cc}``), some core
logic equivalence checking of entire CPU cores. commands that are not really passes (``select.cc``, ``show.cc``, …) and a
couple of other small utility libraries.
``libs/``
Libraries packaged with Yosys builds are contained in this folder. See
:doc:`/appendix/auxlibs`.
``misc/``
Other miscellany which doesn't fit anywhere else.
``passes/``
This directory contains a subdirectory for each pass or group of passes. For
example as of this writing the directory ``passes/hierarchy/`` contains the
code for three passes: :cmd:ref:`hierarchy`, :cmd:ref:`submod`, and
:cmd:ref:`uniquify`.
``techlibs/``
This directory contains simulation models and standard implementations for
the cells from the internal cell library.
``tests/``
This directory contains the suite of unit tests and regression tests used by
Yosys. See :doc:`/test_suites`.
The top-level Makefile includes ``frontends/*/Makefile.inc``, The top-level Makefile includes ``frontends/*/Makefile.inc``,
``passes/*/Makefile.inc`` and ``backends/*/Makefile.inc``. So when extending ``passes/*/Makefile.inc`` and ``backends/*/Makefile.inc``. So when extending
@ -189,7 +202,7 @@ automatically detects all commands linked with Yosys. So it is not needed to add
additional commands to a central list of commands. additional commands to a central list of commands.
Good starting points for reading example source code to learn how to write Good starting points for reading example source code to learn how to write
passes are ``passes/opt/opt_rmdff.cc`` and ``passes/opt/opt_merge.cc``. passes are ``passes/opt/opt_dff.cc`` and ``passes/opt/opt_merge.cc``.
See the top-level README file for a quick Getting Started guide and build See the top-level README file for a quick Getting Started guide and build
instructions. The Yosys build is based solely on Makefiles. instructions. The Yosys build is based solely on Makefiles.