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

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"]
PieceOwnsPage
ConfigTyped files, checked against a schema as they loadConfig and the repo model
Repo modelWhich designs exist, which are tops, and the contexts a design is run inConfig and the repo model
FlowThe shape of one kind of work: its steps, how they connect, and its result formatFlows and tools
Tool pluginOne tool: how to invoke it and how to read its outputTool plugins
StepOne command with declared inputs and outputs. The unit that is run and cachedSteps and execution
ExecutorRunning a job’s step graph: cache check, services, command, completion and verdictSteps and execution
CacheStep results by key, and the GC roots that keep themCache and results
Result filesThe record of each job. Reports are made from them and nothing elseCache and results

What is built

AreaBuilt
FlowsTestRIG and lint
ToolsSimulators: Xcelium, Verilator. Reference model: Sail. Coverage: IMC, and doris’s own for Verilator. Linters: Verilator, Verible, slang, AscentLint
ConfigProject, 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 modelTops, a top’s own designs, shared designs, and contexts for lint
Selecting a runDesigns and job IDs, exactly or as globs, filters on every attribute but package and variant, tags, named filter sets, --failed, --jobs-from and --until
StepsSteps 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
ExecutionLocal 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
CachePer user, keyed on content, with GC roots, collection by age and size, and pinning
ResultsA result format for each flow, HTML reports, and doris report view for the latest and past runs
Working directoriesCleaned when each step ends, by how it ended. doris run --debug keeps them, and doris clean removes those that were kept
SettingsLayered 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 plan therefore shows exactly what doris run will 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. -j and the gc.* settings are not part of any cache key.

In summary

PieceIn doris
ConfigTyped files with a schema. No substitution, nothing run while loading
Tool definitionsOne plugin per tool, built in or installed. A project vendors none
Unit of workA step: argv, environment, working directory, declared inputs and outputs
What runsConfig files found by pattern. A top’s blocks come from the FuseSoC cores
ReuseEvery step is cached by the content of its inputs
Pass and failCompletion checks, then a judge that works on parsed output

doris drives simulators for TestRIG only; it is not a UVM simulation regression runner.