Architecture
This part describes how doris is put together: the pieces, what each one owns, and the rules that hold between them. Everything in it is built. What is designed but not built is in the Roadmap, and each page here ends with a link to the matching roadmap page.
The user guide says how to use each piece. This part says why it has the shape it has. Code layout maps the same pieces onto the source tree.
The pieces
flowchart LR
config["<b>Config files</b><br/>project, design, flow"] --> repo["<b>Repo model</b><br/>designs, tops, contexts"]
repo --> plan["<b>Flow</b><br/>plans jobs of steps"]
tools["<b>Tool plugins</b><br/>behind capabilities"] -- invocations --> plan
plan --> exec["<b>Executor</b><br/>runs the step graph"]
cache["<b>Cache</b><br/>entries and GC roots"] <--> exec
exec --> results["<b>Result files</b><br/>versioned JSON"]
results --> reports["<b>Reports</b><br/>HTML"]
| Piece | Owns | Page |
|---|---|---|
| Config | Typed files, checked against a schema as they load | Config and the repo model |
| Repo model | Which designs exist, which are tops, and the contexts a design is run in | Config and the repo model |
| Flow | The shape of one kind of work: its steps, how they connect, and its result format | Flows and tools |
| Tool plugin | One tool: how to invoke it and how to read its output | Tool plugins |
| Step | One command with declared inputs and outputs. The unit that is run and cached | Steps and execution |
| Executor | Running a job’s step graph: cache check, services, command, completion and verdict | Steps and execution |
| Cache | Step results by key, and the GC roots that keep them | Cache and results |
| Result files | The record of each job. Reports are made from them and nothing else | Cache and results |
What is built
| Area | Built |
|---|---|
| Flows | TestRIG and lint |
| Tools | Simulators: Xcelium, Verilator. Reference model: Sail. Coverage: IMC, and doris’s own for Verilator. Linters: Verilator, Verible, slang, AscentLint |
| Config | Project, design and flow config files in HJSON, TOML or JSON, tools bound to each flow’s roles with defaults in the project file, and doris validate |
| Repo model | Tops, a top’s own designs, shared designs, and contexts for lint |
| Selecting a run | Designs and job IDs, exactly or as globs, filters on every attribute but package and variant, tags, named filter sets, --failed, --jobs-from and --until |
| Steps | Steps that depend on each other through the artefacts they read, with prechecks, services, completion checks, pass and fail patterns, parse functions, judges on their results and debug outputs. Cache units and composite steps, which no flow uses yet |
| Execution | Local only. The steps of every job scheduled together, up to -j at once and within the resource pools: threads, memory, disk and licences, enforced with cgroups if the settings say so, and threads pinned to CPUs if they say that. Every step measured, in a cgroup of its own where it can be |
| Cache | Per user, keyed on content, with GC roots, collection by age and size, and pinning |
| Results | A result format for each flow, HTML reports, and doris report view for the latest and past runs |
| Working directories | Cleaned when each step ends, by how it ended. doris run --debug keeps them, and doris clean removes those that were kept |
| Settings | Layered settings files, --settings, -j and --set, read by every command, with limits from the system and user files and doris settings |
Principles
These hold across every piece. The later pages give the rules that follow from each.
- Config is plain, typed data. A config file is checked against a schema when it loads. Loading never runs a command or reads the environment, so a config means the same thing on every machine. There is no variable substitution.
- Tool knowledge lives in plugins. How to invoke a tool and read its output is one plugin, which doris embeds or a site installs. A project’s config describes the design and its options, and carries no command lines.
- A flow never names a tool. It asks for a capability, such as a simulator or a linter, and config says which tool provides it: the project file binds a default for every design, and a design’s flow config file can replace it.
- Planning is separate from running. A plan is made from config alone: no command is run and nothing is read from the machine.
doris plantherefore shows exactly whatdoris runwill do. - A step describes everything needed to run it. Its command, environment, working directory, inputs and outputs are declared, which is what lets it be cached, and would let it run elsewhere.
- Completion and verdict are kept apart. A tool that crashed says nothing about the design, so it is a step error and never a failure.
- The result file is the record. Reports are made from result files only, so a report can be made again by a later doris.
- How a run is carried out never changes its result.
-jand thegc.*settings are not part of any cache key.
In summary
| Piece | In doris |
|---|---|
| Config | Typed files with a schema. No substitution, nothing run while loading |
| Tool definitions | One plugin per tool, built in or installed. A project vendors none |
| Unit of work | A step: argv, environment, working directory, declared inputs and outputs |
| What runs | Config files found by pattern. A top’s blocks come from the FuseSoC cores |
| Reuse | Every step is cached by the content of its inputs |
| Pass and fail | Completion checks, then a judge that works on parsed output |
doris drives simulators for TestRIG only; it is not a UVM simulation regression runner.