Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Vendored IP

Built: vendored IP is found like local IP, by the project file’s patterns, and a design from an upstream without config files gets a local directory of its own. See Vendored designs and Vendored IP.

Not built: lock files, package names and the package manifest are not read.

Origins and package names

  • Vendored IP has an origin. doris reads the matching *.lock.hjson to record the upstream URL and revision. doris ip shows it as a column, and results record it.
  • Names are qualified by package when they collide. If a local and a vendored design share a name, they are named <package>/<design>, such as lowrisc_ip/uart. A vendored block renamed on the way, as mocha’s rv_core_pkg is from rv_core_ibex, keeps the name its design.hjson declares.
  • A package attribute for filters (see Packages and variants), so a run can leave out everything vendored from one upstream.

Optional package manifest

A vendored tree can carry a small package.hjson (schema dv/package/1) at its root giving its package name and its own glob patterns for design and flow config files. The vendoring repo then includes it with one entry in its project file, instead of repeating the upstream’s layout:

packages: [
  {
    path: hw/vendor/lowrisc_ip
  }
]

Without a manifest, the package name defaults to the vendor file’s name (lowrisc_ip).

Later: vendoring in doris

doris could take over vendoring from util/vendor.py, about 800 lines of Python copied into each repo. doris needs the vendor and lock files anyway to find packages and record their origin, so owning the step that writes them is a small extension.

What it would add beyond vendor.py:

  • Drift checks. Confirm that a vendored tree still matches its lock file plus patches, so local edits made outside patch_dir are caught.
  • Generated overlay files. Write the design and flow config files for upstreams without them as part of vendoring, instead of keeping them by hand.
  • Package-aware updates. After an update, show which flow config files and filters it changed, and run the affected jobs with doris plan.

It would read the existing *.vendor.hjson and *.lock.hjson formats (upstream, mapping, patch_dir, patch_repo, exclude_from_upstream, only_subdir), so repos can switch without converting. This is not part of the first milestones: vendor.py also serves simulation and software, and works today.