Saturday, March 03, 2012

Coverage - Introduction

Coverage - Introduction

Functional verification comprises a large portion of the resources required to design and validate a complex system. Often, the validation must be comprehensive without redundant effort. To minimize wasted effort, coverage is used as a guide for directing verification resources by identifying tested and untested portions of the design. Coverage is defined as the percentage of verification objectives that have been met. It is used as a metric for evaluating the progress of a verification project in order to reduce the number of simulation cycles spent in verifying a design.

Defining the coverage model: covergroup

The covergroup construct encapsulates the specification of a coverage model. Each covergroup specification can include the following components:

» A clocking event that synchronizes the sampling of coverage points
» A set of coverage points
» Cross coverage between coverage points
» Optional formal arguments
» Coverage options
A covergroup instance can be created via the new() operator.

A covergroup can contain one or more coverage points. A coverage point can be a variable or an expression.

Each coverage point includes a set of bins associated with its sampled values or its value-transitions. The bins can be explicitly defined by the user or automatically created by the tool.

enum { red, green, blue } color;
bit[3:0] pixel;
covergroupg1@(posedgeclk);
coverpoint color;
coverpoint pixel;
AxC: cross color, pixel;
endgroup

Using covergroup in classes:

A coverage group within a class definition, the covergroup provides a simple way to cover a subset of the class properties. In class xyz, defined below, members a and b are covered using an embedded

covergroup:
class abc; bit [3:0] a;
int b;
bit c;
covergroup cov1 @c ;
coverpoint a ;
coverpoint b ;
endgroup
function new(); cov1 = new;
endfunction
endclass

No comments:

Post a Comment

Popular Posts