Part 8 · Checking & Coverage · Intermediate

Functional Coverage in UVM Environments

Hub — subscribers, covergroups, bins/crosses, plan traceability, sampling discipline, and regression merge.

Overview

Functional coverage answers what was exercised , not whether it passed. A test can pass with zero coverage hits — it simply did not try the scenarios your verification plan requires. Collect coverage via uvm_subscriber on the monitor stream, tied to verification-plan features with named bins and crosses.

Functional coverage is distinct from code coverage. Code coverage measures which RTL lines toggled. Functional coverage measures whether specific protocol scenarios, register combinations, and FSM transitions occurred — the scenarios your verification plan defines as must-cover.

Sub-topics

  1. Coverage Subscriber — uvm_subscriber class, covergroup anatomy, env wiring.

  2. Bins, illegal_bins, ignore_bins — explicit bucket design and bin explosion.

  3. Crosses & Plan Traceability — feature IDs, FSM transitions, binsof filtering.

  4. Sampling Discipline — monitor vs driver, reset gating, response-only rules.

  5. Merge, Closure & report_phase — regression merge workflow and sign-off.

diagram
Legend: [COVER] [UVM]

  FUNCTIONAL COVERAGE DATA PATH

  monitor.ap ──► subscriber.analysis_export
                      │
                      ▼
                 write(bus_txn t)
                      │
                      ├─ in_reset?  return (skip)
                      ├─ t.kind != RESPONSE?  return (skip)
                      └─ cg.sample(t)
                            │
                            ▼
                       coverpoint bins updated
                            │
                            ▼
                       coverage database (UCDB/VDB)

Monitor vs driver — the golden rule

diagram
DRIVER stream              MONITOR stream [COVER]
  (stimulus intent)          (DUT-visible reality)

  seq_item_port              ap (analysis port)
       │                          │
       ▼                          ▼
  "I will write 0xFF"        "DUT saw write 0xFF, SLVERR=0"
  Wrong for coverage         Correct for coverage

  DUT may transform, drop, or error on driver intent.
  Coverage must measure what the DUT actually did.

Key takeaways

  • Sample DUT-visible monitor stream — not driver intent.

  • Name bins to match verification-plan feature IDs.

  • Closure requires regression merge across seeds, not single-run %.