Recommend installing python3-yaml as distro package

The Python yaml package (pyyaml) can optionally use a YAML parser/dumper
written in C called LibYAML. This library is roughly 10x faster than the
fallback implementation written in Python. Since fusesoc (and fusesoc
generators) use YAML quite extensively, switching to a faster YAML
implementation decreases build and simulation times measurably (10s of
seconds in my tests).

pip can install pyyaml with LibYAML support as long as the Python
development headers, a C compiler, and LibYAML are present. Or we can
avoid compiling the package on a user's machine, and use a precompiled
version provided by the distribution. That's what this patch is doing.
The pip version is still available as fallback in
python-requirements.txt for users not installing all requirements
from the apt-requirements.txt file (or the user guide, which uses this
information as well).

Signed-off-by: Philipp Wagner <phw@lowrisc.org>
1 file changed
tree: 59e9f18d450b2326bd16f0412763ddd81bb7427e
  1. .github/
  2. ci/
  3. doc/
  4. hw/
  5. site/
  6. sw/
  7. test/
  8. util/
  9. .clang-format
  10. .dockerignore
  11. .gitignore
  12. .style.yapf
  13. _index.md
  14. apt-requirements.txt
  15. azure-pipelines.yml
  16. check_tool_requirements.core
  17. CLA
  18. COMMITTERS
  19. CONTRIBUTING.md
  20. LICENSE
  21. meson.build
  22. meson_init.sh
  23. meson_options.txt
  24. python-requirements.txt
  25. README.md
  26. tool_requirements.py
  27. toolchain.txt
README.md

OpenTitan

OpenTitan logo

About the project

OpenTitan is an open source silicon Root of Trust (RoT) project. OpenTitan will make the silicon RoT design and implementation more transparent, trustworthy, and secure for enterprises, platform providers, and chip manufacturers. OpenTitan is administered by lowRISC CIC as a collaborative project to produce high quality, open IP for instantiation as a full-featured product. See the OpenTitan site and OpenTitan docs for more information about the project.

About this repository

This repository contains hardware, software and utilities written as part of the OpenTitan project. It is structured as monolithic repository, or “monorepo”, where all components live in one repository. It exists to enable collaboration across partners participating in the OpenTitan project.

Documentation

The project contains comprehensive documentation of all IPs and tools. You can either access it online or build it locally by following the steps below.

  1. Ensure that you have the required Python modules installed (to be executed in the repository root):
$ sudo apt install curl python3 python3-pip
$ pip3 install --user -r python-requirements.txt
  1. Execute the build script:
$ ./util/build_docs.py --preview

This compiles the documentation into ./build/docs and starts a local server, which allows you to access the documentation at http://127.0.0.1:1313.

How to contribute

Have a look at CONTRIBUTING for guidelines on how to contribute code to this repository.

Licensing

Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).