Module 8: Protocol Projects | Intermediate UVM

Intermediate Capstone Planning

Turn a protocol specification into an executable UVM verification plan, architecture, test strategy, and measurable completion criteria.

Learning objectives

  • Translate DUT requirements into concrete verification scenarios and measurable checks.
  • Choose appropriate UVM agents, sequences, scoreboards, predictors, assertions, and coverage components.
  • Define the boundaries between protocol-specific agents and system-level environment logic.
  • Plan deterministic, negative, constrained-random, reset, and integration scenarios.
  • Define coverage and exit criteria that provide evidence of verification completeness.
  • Produce an implementation plan that can be executed in Lesson 80.

Step 1: Start with the DUT behavior

A capstone should begin with the behavior that must be verified, not with the UVM classes you already know how to write. Start by extracting requirements from the protocol or DUT specification.

For each important requirement, identify four things:

  • Stimulus: what must the testbench cause?
  • Observation: what evidence proves the DUT responded?
  • Check: what determines pass or fail?
  • Coverage: how will you know the scenario was exercised?
Requirement:


A register write enables packet reception.
An accepted packet is processed.
The DUT generates an interrupt when processing completes.

Verification mapping:

Stimulus:
Register configuration + packet transaction

Observation:
Register monitor + packet monitor + IRQ monitor

Check:
Register state + packet response + interrupt behavior

Coverage:
Configuration mode × packet type × interrupt outcome

This mapping prevents the common mistake of writing tests first and discovering later that there is no reliable way to determine whether the DUT behaved correctly.

Step 2: Define the capstone architecture

Use the architecture patterns developed throughout the previous lessons. Keep protocol behavior inside reusable agents and place relationships between interfaces at the environment level.

capstone_env


|
+-- register_agent
|     +-- sequencer
|     +-- driver
|     +-- monitor
|
+-- data_agent
|     +-- sequencer
|     +-- driver
|     +-- monitor
|
+-- interrupt_agent
|     +-- monitor
|
+-- predictor / reference_model
|
+-- scoreboard
|
+-- coverage_subscriber
|
+-- assertions
|
+-- virtual_sequencer
|
+-- environment configuration

The exact architecture depends on the DUT. Do not add components simply because they are available in UVM. Every component should have a specific verification responsibility.

Architecture rule: a protocol agent owns protocol mechanics; the environment owns relationships between interfaces; the test and virtual sequences define scenario intent.

Step 3: Decide what belongs in each layer

A good capstone makes ownership explicit. Consider the following separation:

Layer Primary responsibility Example
Sequence Scenario intent and stimulus Configure DUT and send packets
Agent Protocol-specific behavior Drive and monitor APB transactions
Predictor Generate expected behavior Predict expected response data
Scoreboard Compare expected and actual behavior Match responses by transaction ID
Assertion Local temporal/protocol rule Response must follow request timing
Coverage Measure exercised behavior Mode × operation × response
Environment Integrate verification components Connect agents and system-level checkers

If one class starts accumulating register access, packet generation, interrupt checking, coverage sampling, and scoreboard logic, the architecture is probably mixing responsibilities.

Step 4: Build the scenario matrix

Before implementing dozens of tests, create a small scenario matrix. This exposes missing requirements and gives the capstone a deliberate test strategy.

Scenario Stimulus Expected result Priority
Basic operation Valid request Correct response Smoke
Back-to-back traffic Continuous requests No lost or reordered transactions High
Invalid operation Protocol-defined error Error response/status High
Reset during activity Mid-test reset Defined recovery behavior High
Maximum load Heavy traffic Performance requirement met Medium

The matrix should include both normal and abnormal behavior. A capstone that only tests successful transactions is incomplete for most real verification environments.

Step 5: Plan the checking strategy

Decide what each verification mechanism will prove. Do not force every requirement into the scoreboard.

  • Protocol assertions: local timing and handshake legality.
  • Reference model: algorithmic expected behavior.
  • Scoreboard: expected-versus-actual transaction comparison.
  • Performance checker: latency and throughput requirements.
  • RAL checks: register access, reset values, and field behavior where applicable.
  • Coverage: evidence that important scenarios and combinations were exercised.

This separation makes failures easier to interpret. For example, an assertion might detect an illegal handshake while the scoreboard later reports a missing transaction. The first failure is likely more useful for root-cause analysis.

Step 6: Plan the sequence hierarchy

Use the sequence structure from earlier lessons instead of creating one giant sequence. Separate reusable protocol sequences from higher-level scenarios.

base_sequence


|
+-- reset_sequence
|
+-- register_sequence
|     +-- configure_sequence
|     +-- status_read_sequence
|
+-- data_sequence
|     +-- basic_data_sequence
|     +-- burst_data_sequence
|     +-- error_data_sequence
|
+-- virtual_sequence
+-- smoke_sequence
+-- reset_recovery_sequence
+-- stress_sequence
+-- negative_sequence

The virtual sequence should coordinate agents when the scenario spans multiple interfaces. Individual protocol sequences should remain reusable independently.

Step 7: Plan reset and error behavior

Reset and negative testing should be designed before implementation because they can change the state of every major verification component.

Document what happens to:

  • Outstanding scoreboard expectations.
  • Reference-model state.
  • Partial monitor transactions.
  • Pending interrupts.
  • Register-model state.
  • Performance measurements.
  • Expected errors and recovery conditions.
Important: never assume that reset means "clear everything." The correct behavior depends on the DUT specification. Some state may be retained, some may be reset, and some outstanding operations may have defined completion or cancellation behavior.

Step 8: Define the coverage model

Convert important verification dimensions into measurable coverage. Start with the requirements rather than creating arbitrary coverpoints.

Example coverage plan:


coverpoint operation_type;
coverpoint operating_mode;
coverpoint response_status;
coverpoint interrupt_enabled;

cross operation_type, response_status;
cross operating_mode, interrupt_enabled;

Avoid crossing every field. High-cardinality crosses can produce large numbers of bins without adding useful information. Choose relationships that correspond to meaningful verification questions.

Step 9: Define completion criteria

"The tests passed" is not a sufficient capstone completion criterion. Define objective evidence for both correctness and coverage.

  • All planned smoke scenarios pass.
  • Required negative scenarios produce the expected behavior.
  • Reset and recovery scenarios pass.
  • Scoreboard has no unexplained mismatches or outstanding transactions.
  • Required assertions pass.
  • Performance requirements pass where applicable.
  • Required functional coverage targets are reached or justified.
  • Known coverage holes have documented explanations or follow-up actions.
  • At least one seeded random regression is reproducible.

Coverage closure and correctness are related but different. High coverage does not prove that the DUT is correct, and a passing test does not prove that important scenarios were exercised.

Step 10: Turn the plan into an implementation backlog

The final planning step is to turn the verification plan into small implementation tasks. This makes Lesson 80 an engineering exercise rather than an open-ended coding session.

Capstone implementation backlog


[ ] DUT interface and configuration
[ ] Agent configuration objects
[ ] Active/passive agent construction
[ ] Protocol sequences
[ ] Virtual sequencer
[ ] Virtual sequences
[ ] Monitor transaction definitions
[ ] Predictor/reference model
[ ] Scoreboard
[ ] Assertions
[ ] Functional coverage
[ ] Reset scenario
[ ] Negative/error scenario
[ ] Performance scenario
[ ] Smoke test
[ ] Seeded random test
[ ] Regression command/configuration
[ ] Final coverage and results report

Order the work so that dependencies are built first. For example, the scoreboard cannot provide useful end-to-end checking until the monitor transaction semantics and TLM connections are established.

Capstone architecture review

Before implementation, review the design using these questions:

  1. Can every important requirement be mapped to stimulus and observable evidence?
  2. Does every interface have an appropriate active or passive agent?
  3. Are cross-interface relationships checked at the environment level?
  4. Can the expected behavior be generated independently from the DUT?
  5. Are transaction IDs and ordering rules sufficient for the scoreboard?
  6. Are reset and error semantics explicitly defined?
  7. Can every planned coverage item be intentionally exercised?
  8. Can a failing random test be reproduced from its metadata?
  9. Are completion criteria measurable?

Try it yourself

Create a one-page verification plan for your capstone DUT. Your plan should contain:

  1. At least five functional requirements.
  2. The UVM agents required for each interface.
  3. A simple environment architecture.
  4. A scenario matrix containing normal, negative, reset, and stress scenarios.
  5. The expected scoreboard/reference-model strategy.
  6. At least three assertions or temporal checks.
  7. At least four meaningful coverage dimensions and two useful crosses.
  8. A performance requirement if the DUT has measurable timing behavior.
  9. A list of regression metadata that must be preserved.
  10. Explicit exit criteria for declaring the capstone complete.
Challenge: take one requirement that initially looks vague—for example, "verify reliable interrupt handling"—and decompose it into stimulus, observation, checking, coverage, reset behavior, and completion criteria. If you cannot explain how the requirement will be measured, the implementation plan is not ready yet.

Knowledge check

  1. Why should a capstone verification plan begin with DUT requirements rather than UVM components?
  2. Which component should normally own the relationship between transactions from two different protocol agents?
  3. When should a virtual sequence be used instead of placing all stimulus in one protocol sequence?
  4. Why are reset semantics important to the scoreboard and reference model?
  5. What evidence is needed before declaring a capstone complete?
Self-check: if your plan names a UVM component but cannot state what verification requirement that component proves, revisit the architecture. The capstone should be requirement-driven, not component-driven.

Key takeaways

  • Start with requirements and map each requirement to stimulus, observation, checking, and coverage.
  • Keep protocol mechanics inside agents and system-level relationships inside the environment.
  • Use virtual sequences to coordinate scenarios that span multiple agents.
  • Plan functional, negative, reset, integration, and performance scenarios before implementation.
  • Define scoreboard, assertion, reference-model, and coverage responsibilities explicitly.
  • Make regression reproducibility and completion criteria part of the capstone plan.
  • A good plan should make Lesson 80 implementation predictable rather than open-ended.