Home / Learn / Chip Design / What Is UVM?

On this pageWhat problem UVM solvesThe core ideasThe building blocksHow a test runsMechanisms that make reuse workVerification IPStrengthsCriticismsWhere UVM fitsCommon questionsRelated guides

What Is UVM?

UVM, the Universal Verification Methodology, is the standard framework for building the test environments used to verify chip designs. It is a library of base classes and a set of conventions, written in SystemVerilog, that defines how a testbench should be structured. Because nearly the whole industry uses it, verification components written by one team or supplier can be reused by another.

What problem UVM solves

Verifying a complex chip needs a large amount of test code, often more than the design itself. Before common methodologies existed, each company structured its testbenches differently. Code could not easily be shared between projects, engineers had to relearn the approach when they changed employer, and test components from IP suppliers did not fit together.

UVM gives everyone the same architecture. A component that follows it can be plugged into any UVM environment. It was published by the standards body Accellera in 2011, building on earlier methodologies, and later became IEEE standard 1800.2.

The core ideas

UVM rests on a few techniques.

  • Constrained random stimulus. Tests are generated automatically within rules that keep them legal. Thousands of varied scenarios can be produced from a short description.
  • Coverage-driven verification. Progress is measured by which scenarios have actually been exercised, and tests are steered toward the gaps.
  • Transaction-level modeling. Tests are written in terms of meaningful operations, such as “send this packet”, and separate components convert them into pin-level signals.
  • Separation of tests from the environment. The same environment supports many tests, and the same test can run in different environments.
  • Reuse. Components are written once and used at block level, chip level and in later projects.

The building blocks

A UVM testbench is assembled from standard component types.

ComponentRole
Sequence itemOne transaction, such as a bus read or a data packet
SequenceGenerates a series of transactions
SequencerPasses transactions from sequences to the driver
DriverConverts each transaction into signal activity on the design’s pins
MonitorWatches the pins and reconstructs transactions from what it sees
AgentGroups a sequencer, driver and monitor for one interface
ScoreboardCompares the design’s actual output with the expected output
EnvironmentContains the agents, scoreboards and other components
TestConfigures the environment and chooses which sequences to run

An agent is the main unit of reuse. One agent handles one interface, such as a particular bus. A testbench for a block with three interfaces uses three agents.

How a test runs

UVM divides a simulation into phases that run in a fixed order.

  • Build. Components are created and configured.
  • Connect. Components are wired to one another.
  • Run. Stimulus is applied and the design’s responses are checked. This is where simulation time advances.
  • Check and report. Final comparisons are made and results are summarized.

Because every component follows the same phases, parts written by different people start up and shut down in step.

Mechanisms that make reuse work

  • The factory. Components are created through a central mechanism that lets a test substitute a different version without editing the environment. A test can swap a normal driver for one that injects errors.
  • The configuration database. Settings are stored centrally and retrieved by components, so the same component can be configured differently in different places.
  • Transaction-level ports. Components communicate through standard connections, which keeps them independent of each other.
  • The register layer. A model of the design’s control registers lets tests read and write them by name and checks that the hardware matches.

Verification IP

One of the most practical consequences of UVM is the market for verification IP. These are ready-made UVM components for standard interfaces such as PCI Express, Ethernet or USB. They include the agent, protocol checks and coverage for the standard.

A team integrating such an interface can buy the verification IP and avoid writing a test environment for a specification that runs to thousands of pages.

Strengths

  • A common language. Engineers can move between projects and companies and find a familiar structure.
  • Reuse. Across blocks, across levels and across projects.
  • Thoroughness. Random stimulus reaches situations that hand-written tests would miss.
  • Measurability. Coverage shows what has and has not been tested.
  • Tool support. All major simulators support it.

Criticisms

  • Steep learning curve. UVM is large and relies on object-oriented programming, which is unfamiliar to many hardware engineers.
  • Overhead. Setting up an environment involves a lot of code before the first test runs. For small blocks this can feel excessive.
  • Debugging difficulty. The layers of abstraction can make it hard to trace a problem.
  • Simulation only. Standard UVM does not run directly on emulators or prototypes, which need additional techniques.

Simpler frameworks, including open-source ones based on Python, are used by some teams for smaller designs.

Where UVM fits

UVM is the main approach for simulation-based verification at block and subsystem level. It is complemented by formal verification for properties that can be proven, and by emulation for long tests with real software.

for the wider picture.

Common questions

Is UVM a programming language?

No. It is a library and a methodology built on SystemVerilog. Engineers write their testbenches in SystemVerilog using the classes UVM provides.

Do all chip companies use UVM?

Most use it for simulation-based verification of digital designs. Some smaller teams and some FPGA projects use lighter alternatives.

Is UVM used to design the chip?

No. It is used only for verification. The chip’s logic is written as RTL, and UVM builds the environment that tests it.

Related guides