Viewing coverage

There are four ways to view collected coverage:

  1. Terminal
  2. Coverage report (standalone HTML)
  3. Web viewer
  4. Electron desktop app (macOS, Windows, Linux)

The recommended workflow is to export a .bktgz archive from your testbench and open it in the viewer. Coverage is processed locally in the browser or desktop app — nothing is uploaded.


Terminal

Bucket can print a summary or full tables of coverage collected during a simulation. The summary view is useful at the end of a test run, or to summarise a regression after merging.

    ...
    readout = PointReader(context_hash).read(cvg)
    ConsoleWriter().write(readout)
    ...

ConsoleWriter options:

Parameter Default Description
axes False Print name and description of all axes for all coverpoints
goals False Print name and description of all goals for all coverpoints
points False Print hit count and goal for all buckets for each coverpoint
summary True Print a summary of hits for each coverpoint in the tree

From the command line:

python -m bucket write -r sql:./example.db console --summary
python -m bucket write -r archive:./run.bktgz console --points

See Exporting and merging coverage for the full -r readout syntax.

To measure how much of record A's coverage record B also covers:

python -m bucket compare --a archive:./a.bktgz --b archive:./b.bktgz
python -m bucket compare --a a.bktgz --b b.bktgz --metric hits
python -m bucket compare --a a.bktgz --b b.bktgz --metric full

--metric defaults to buckets: of the buckets A hit at least once, the percentage B also hit. hits uses goal-capped total hits (B only counts up to the hits A already has on each bucket). full uses buckets that met their goal. Illegal, ignore, and waived buckets are excluded. Both records must share a covertree definition. --a and --b use the same readout spec as -r, and -w applies a waiver file to both before comparing.

Stdout is one JSON object, for example {"denominator": 40, "metric": "buckets", "numerator": 29, "percentage": 72.5}. percentage is 100 * numerator / denominator, or 0 when the denominator is 0.


Coverage report

Bucket can write a human-readable, self-contained HTML document describing the coverage tree — point names, descriptions, motivations, tier and tags, axes and their values, goals, bucket counts, targets, per-tier/per-tag summary tables, and recorded results. It is intended for design/verification reviews: each covergroup and coverpoint is a clearly bounded, collapsible card, with a linked tree overview. On wide screens the tree becomes a sticky sidebar with a filter box, expand/collapse controls, and a highlight that tracks your scroll position (these enhancements degrade gracefully when scripts are unavailable). Hits are shown with colour-coded percentages when present; a readout with no recorded hits (a plan review before any run) drops the results entirely rather than printing 0% everywhere. Print it from the browser for a PDF.

The report always includes every section it knows about; the only options narrow which coverpoints appear (and cap how many axis values are listed).

python -m bucket write -r archive:./run.bktgz report -o coverage_report.html

# Focused review: one covergroup, high-priority tiers only
python -m bucket write -r archive:./run.bktgz report -o dogs.html --point "Pets.dogs" --max-tier 1

Or from Python:

from bucket.rw import ReportWriter

ReportWriter(output="coverage_report.html").write(readout)

Contiguous numeric axis values are collapsed into ranges for readability (e.g. 0..18 or universe_[00..39]).

The report itself is generated by the web viewer's shared report module, so node/npm and a Bucket source checkout (with npm install in viewer/) are required. A pip install of noodle-bucket does not include the viewer; export a .bktgz and open it in the hosted viewer or desktop app instead. In the viewer, use Generate report… (under More) for the HTML/JSON coverage report, optionally with unhit pattern analysis.

ReportWriter options (CLI flags use dashes, e.g. --max-tier):

Parameter Default Description
max_axis_values 64 Cap on listed values per axis (0 = unlimited)
max_tier None Only include coverpoints with tier <= this value
tags None Only include coverpoints with at least one of these tags
point None Only include coverpoints matching a dotted-path glob (e.g. Pets.dogs*); naming a covergroup selects its subtree

When filters are active the report notes them under the metadata table, and covergroup bucket counts and the rollup tables reflect only the included coverpoints.


Web viewer

The hosted viewer is available at https://noodle-bytes.github.io/bucket/

You can also generate a standalone HTML file that embeds the viewer (requires a source checkout and Node.js, not a pip install):

python -m bucket write -r archive:./run.bktgz html -o index.html

Open the HTML file in your browser, or load .bktgz archives directly in the hosted viewer.

Loading coverage

On the empty state, use Open File… or drag and drop one or more .bktgz files. To try the viewer without your own archive, click Try with example data — that opens a bundled two-record RISC-V demo and a sample waiver file (browse, Compare, and waived buckets; regenerate with python -m examples.riscv_stress demo). While coverage is loading, a progress overlay shows how many archives have been read and when the viewer is applying them to the session.

When more than one archive is selected in a single action, a dialog offers:

Option Result
Compare (two files only) Load each archive as its own record and open compare mode
Load individually Add each archive as separate loaded record(s)
Merge into one Merge all archives into a single in-session record
Cancel Abort the load

Loading 50 or more archives individually shows a warning that this may slow the viewer. Merged results exist only for the current session — use Export to save them.

Screenshot showing an example covertree loaded into the Bucket viewer

The navigation tree on the left can be expanded, collapsed, and searched.

Statistic Description
Goal Targets Total number of all bucket targets
Goal Hits Total number of hits (capped at each bucket's target)
Buckets target Number of targets (not their value, excluding illegal and ignore)
Buckets Hit Number of buckets with at least 1 hit
Buckets Full Number of fully saturated buckets (hits >= target)

Screenshot showing searching the covertree for the word 'chew'

The coverage tree search box matches point names and also accepts keywords: tag:name and tier:N. While typing tag:… or tier:…, matching values appear as clickable suggestions. Plain typing also suggests matching tags (and tiers when the token is numeric); choosing a suggestion inserts the tag: / tier: filter. Active search prunes the tree to matching coverpoints and their ancestors. Completed tag: / tier: keywords also drive the Summary table’s Tier and Tags column filters (name-only search stays tree-only).

Selecting a coverpoint shows its buckets, goals, hit counts, and hit percentage. Axis columns and goal names can be filtered; columns can be sorted. Summary views also support tier and tag filters, and can be shown as a table or donut chart.

Screenshot showing an example coverpoint

Screenshot showing an example coverpoint filter

Coverpoints with more than 50,000 buckets automatically use optimized large-table mode: a virtualized table with dropdown-based filtering and sorting. You can optionally enable full per-column features if needed.

Session management

Once coverage is loaded, the header provides:

Action Description
Load Append more .bktgz archives
Waivers Load / manage the waiver draft, or enter Create waivers mode on a coverpoint (see Coverage waivers)
Compare Enter compare mode when compatible records are available
More (⋮) Edit/export records, generate report, clear coverage
Clear Remove all loaded coverage from the session (also under More)

A single .bktgz archive can contain multiple records. The Edit dialog shows each record's source and lets you toggle which records contribute to the tree.

The current view is mirrored into the page URL (after the #), so copying the address — or clicking the link icon next to the breadcrumb — gives a link that reopens the same view: the selected coverpoint or group (as a dotted path such as n=top.dogs.chew_toys), the summary/coverpoint view (v=donut, v=pivot), the tree search text (q=…), and compare mode with its set filter and A/B records (c=1&cs=a_only&ca=run_a.bktgz&cb=run_b.bktgz). Parameters with default values are omitted. Opening a link before any coverage is loaded applies the view once matching archives are loaded; parameters that do not match the loaded coverage are ignored. Selecting nodes adds browser history entries, so the browser back button also steps through views.

Session persistence

Loaded coverage is remembered across reloads: file-backed archives are kept in the browser's IndexedDB storage (Electron keeps the file path and re-reads it), and merged records are stored as archives. On startup you are asked whether to restore the previous session; choosing Start fresh discards the stored copy. Archives over 200 MB are not stored and must be loaded again. Nothing leaves the browser. This can be turned off under Settings (which also clears the stored session), and Clear coverage removes the stored copy as well.

Generate report opens a dialog similar to compare reports:

Option Description
Format HTML (readable coverage report) or JSON
Coverage definition Any hit or Met goal — how “covered” is decided for analysis
Unhit pattern analysis Off, Largest only, Balanced, or All unhit — optional axis patterns describing the largest uncovered regions
Records Which loaded records to include (optionally merged first)

A short summary paragraph under the options updates as you change them. When pattern analysis is enabled, the HTML report includes an Unhit coverage patterns section before the usual coverpoint details.

Compare mode

Compare mode shows bucket-level differences between two coverage records that share the same covertree definition (def_sha).

To start compare:

  1. Load two .bktgz files together and choose Compare, or
  2. Load records individually, then click Compare in the header.

The compare toolbar lets you choose records A and B, a coverage definition (Any hit or Met goal), and a set filter:

Set filter Shows buckets where
A only Covered in A but not B
Both Covered in both
B only Covered in B but not A
Neither Covered in neither
All All valid buckets (use category filters in large tables)

Summary cards show counts and percentages for each category. While compare is active, the tree, summary table, and coverpoint tables add compare columns and category highlighting.

Use Generate report to export an HTML or JSON compare report. The report includes global statistics, asymmetric coverage patterns, coverpoints with differences, and per-category bucket lists.

To try compare locally:

python tools/gen_compare_fixtures.py

This writes compare_a.bktgz and compare_b.bktgz with the same covertree but different hit data.


Electron desktop app

The Electron app provides a native desktop experience for viewing .bktgz archives on macOS, Windows and Linux. See electron/README.md for build instructions.

Open archives via File > Open, drag and drop, double-click (when associated with the app), or Open Recent. The same load, compare, export, and session features are available as in the web viewer.



Prev: Reading and Writing
Back to index: Index