tree: f0fabb8bfc151e269777a699e62c14f1548a4cb2 [path history] [tgz]
  1. bazel_embedded/
  2. cargo_raze/
  3. cc/
  4. freertos/
  5. go/
  6. lint/
  7. lowrisc_toolchain/
  8. protobuf/
  9. python/
  10. riscv-compliance/
  11. rust/
  12. README.md
third_party/README.md

OpenTitan //third_party

OpenTitan depends on a number of third party components. This directory consists of:

  • Bazel files describing how to acquire them from the Internet, and incorporate them into the OpenTitan workspace.
  • Glue code for plugging dependencies into first-party software.

Every dependency lives in a subdirectory; each subdirectory consists of at least three files:

  1. A (usually empty) BUILD file to specify that file as a Bazel package.
  2. A repos.bzl, which exports a macro called blah_repos() that can be called in the WORKSPACE to declare the remote repositories required for the dependency.
  3. A deps.bzl, which exports a macro called blah_deps() that uses the repositories created by blah_repos() to set up any other requirements of the dependency. It must be called in the WORKSPACE file after blah_repos() is called. Some dependencies can skip this step.

Thus, for each third party dependency, a stanza like the following should appear in the WORKSPACE:

load("//third_party/<dep>/repos.bzl", "<dep>_repos")
<dep>_repos()
load("//third_party/<dep>/deps.bzl", "<dep>_deps")
<dep>_deps()

In some cases, the BUILD file for the dependency will declare rules for tests, such as rv-compliance. As a rule of thumb, if a dependency is being pulled in specifically for some kind of test suite, the test rules should live in //third_party, where they can depend on other parts of the tree.

Third-party Silicon IP

Currently, silicon uses a separate vendoring mechanism: util/vendor.py. There are no concrete plans to migrate off of this script for hardware. This script should not be used for new software dependencies; instead, use the //third_party directory and Bazel repositories instead.