Infrastructure Runner
Documentation · Apache-2.0 licence
doris is a command-line tool that runs hardware verification flows. A project describes its designs and the flows each one takes part in with small, schema-checked config files. doris turns a requested run into a graph of steps, runs only the steps whose inputs have changed, and writes each job's result as versioned JSON with an HTML report.
doris is for hardware verification and design engineers who run checks such as lint and core-versus-model comparison across many designs, and want those runs to be reproducible, incremental and reported the same way every time. It is built around three properties:
- Config has a schema. Every file is checked when it is loaded, and a misspelt key is an error naming the file and line.
- Tool knowledge lives in doris. How to invoke a simulator or linter and read its output is defined once, in a tool plugin. A project's config describes only its designs and their options, with no command lines.
- Config is data, not a program. Loading config never runs a command or reads the environment, so a config means the same thing on every machine.
doris is not a UVM simulation regression runner: it drives simulators for TestRIG only.
| Flow | What it checks | Tools |
|---|---|---|
| TestRIG | A RISC-V core against a reference model, instruction by instruction | Xcelium or Verilator; the Sail model; IMC or doris's own coverage reporting |
| Lint | A design's RTL, as its FuseSoC core's lint target describes it |
Verilator, Verible, slang and AscentLint |
FuseSoC resolves every design's sources in both flows. Synthesis, CDC, RDC and formal flows are planned; the roadmap in the documentation lists them with everything else that is designed but not built.
- Linux only. doris relies on
/proc, process groups andflock. It needsgitonPATH, and expects the project to be a git checkout. - Bring your own tools. doris never installs or downloads a tool. Run it inside the project's own environment, where FuseSoC, the simulators and the linters are already on
PATH;doris checklists anything missing. Tool versions are part of each step's cache key, so changing a tool reruns the steps that use it. - Pre-release. doris is at version 0.1.0 and has not had its first release. Commands, options and file formats may still change.
- Versioned formats. Every config file names its format and version in a
schemakey (dv/project/1,dv/design/1,dv/testrig/1,dv/lint/1), as does every result file (dv/testrig-result/1,dv/lint-result/1). The tool plugin interface is the WIT packagedoris:plugin@0.1.0. - The cache outlives a doris upgrade. A cache key holds each plugin's hash and a key protocol that doris bumps by hand when it changes how it makes a key or reaches a verdict, not the doris version. A newer doris that changes neither reuses what an older one stored. One that does never hits the old entries, which
doris gccollects like any other.
doris is a Rust tool. Install a release with cargo install --locked doris. From a checkout, in the dev shell (nix develop, or direnv), build it with cargo build, or nix build for a release binary.
The flows so far are TestRIG and lint. From a repo with a project.hjson whose schema is dv/project/1, listing glob patterns for design.hjson files and flow config files such as testrig.hjson and lint.hjson under configs, inside the project's own dev shell so the tools are on PATH:
doris validate # check every config file loads and matches its schema
doris flows # designs and the flows they configure
doris check # check what every configured flow needs: tools on PATH, variables, licence pools
doris check testrig my_core # ... or just what this run needs
doris plan testrig my_core # the steps, commands and services, without running
doris run testrig my_core # run it; --until STEP stops early, --replay reruns saved traces
doris run testrig my_core --tests 5 # a shorter run: 5 tests per test group, not the config's tests.count
doris run testrig my_core --seed 42 # generate the tests seed 42 makes; a repeat is taken from the cache
doris run lint # lint every design with a lint config, with each linter it names; or name designs
doris run lint --debug # keep every step's whole working directory, logs included
doris clean --dry-run # list the working directories that were kept whole; without --dry-run, remove them
doris report view # serve the HTML reports and open them in the browser; `view RUN` opens one past run
doris report testrig # write the report pages again from the result filesUse -C DIR to run against a repo other than the current directory. Paths in doris's output are relative to the repo root, wherever it is run from. Each step works in scratch/doris/<flow>/<job>/<step>/, and the job's result is written to result.json next to them. A step that passed leaves only its declared outputs there. One that failed or did not complete keeps its whole directory, and doris run --debug keeps every step's; doris clean removes the directories that were kept. Counterexamples a run finds are kept in counterexamples/ there.
A run prints a line when each step starts and ends, with the time of day. Between them, a step that runs prints what it is doing: each service starting and listening, the command starting and ending, each service being stopped, and the result being cached.
Steps are cached in $XDG_CACHE_HOME/doris (~/.cache/doris): a step whose command, inputs, tool versions and upstream outputs haven't changed is not run again. doris plan shows which steps are cached, and doris run --rerun runs them all anyway. A generated TestRIG run is cached under its seed, so a run with a newly picked seed always runs; --replay runs are cached too.
Every run writes a GC root to the cache, which keeps the entries it used. The cache is cleaned by hand:
doris gc roots # the roots: one per run, with its age, size, revision and job count
doris gc --dry-run # what a collection would drop and free
doris gc # drop roots older than 30 days, then delete what no root reaches
doris gc --older-than 7d --max-size 100G # a shorter age limit, then oldest roots go until the cache fits
doris gc pin latest --name signoff # keep a run's entries whatever its age; unpin lets it age outThe newest root of each job on each branch is kept whatever its age, so a branch left for a month still has a warm cache. doris run --set gc.auto=age+size --set gc.max_size=100G collects after the run.
The full documentation is published at https://lowrisc.github.io/doris/ from main. It is built from the book in docs/: a user guide, a page for each flow and step, a command reference, the architecture, a developer guide, and a roadmap of what is designed but not built. nix run .#docs serves it locally, and nix build .#docs builds the site with the Rust API documentation under api/.
doris is licensed under the Apache License, Version 2.0. The vendored plotly.js and mermaid bundles keep their own licences, listed with their notices in THIRD_PARTY_NOTICES.md.