SystemVerilog Example Not specified

Generic Metric Analyzer

A compact UVM teaching sketch for collecting numeric observations and reporting count, sum, mean, minimum, and maximum.

Understanding the project

The idea in plain language.

Generic Metric Analyzer presents a compact pattern for adding measurements to a UVM environment. The checked-in metric object stores real-number observations and exposes common aggregate operations; the README and top-level example show the intended next layer, where an analyzer receives transactions and updates named metrics.

The useful idea is separation: a producer publishes transactions, an analyzer decides which values to measure, and each metric owns its calculation. The current public snapshot is an educational sketch rather than a complete reusable library.

Core capabilities

What the project can do.

  • Collects numeric observations in a reusable UVM object.
  • Provides measurement count, sum, mean, minimum, maximum, and removal of the latest observation.
  • Includes a top-level intended-usage sketch, package include file, and sample output.
  • Links to an EDA Playground version that can be run without a local simulator setup.

Typical workflow

How someone uses it.

  1. 1

    Create the metrics needed by a verification component during analyzer construction.

  2. 2

    Connect a monitor or other producer to the analyzer’s UVM analysis path.

  3. 3

    Extract the relevant numeric values in write(), call measure(), and report aggregate values when required.

Under the hood

Technology and design choices.

  • SystemVerilog
  • UVM
  • Analysis ports
  • Reusable metric objects
  • EDA Playground example

Important considerations

What to know before using it.

  • At the currently published revision, metric_analyzer.sv duplicates metric.sv and does not define the analyzer used by top.sv, so the checkout is not a verified runnable example.
  • sum() and max() return int even though measurements are real, which can truncate fractional values.
  • A production implementation still needs transaction typing, analysis connectivity, metric-name validation, reporting contracts, and automated tests.