Tutorials
FUNCTIONAL COVERAGE
Functional Coverage :
OpenVera is able to monitor all states and state transitions, as well as changes to variables and expressions.By setting up a number of monitor bins that correspond to states, transitions, and expression changes, Vera is able to track activity in the simulation. Each time a user-specified activity occurs, a counter associated with the bin is incremented.
Coverage Group
The coverage_group construct specifies the coverage model. It is defined either at the top level (referred to as "standalone"), or defined in a class (referred to as "embedded") The syntax is the same for both.
EXAMPLE : Coverage group
class MyClass
{
bit [0:7] m_x, m_y;
coverage_group cov1
{
sample_event = @(posedge CLOCK);
sample m_x, m_y;
}
}
Sample_event:
sample_event defines when (or frequency at which) the coverage objects are sampled.
EXAMPLE : Sampling event
sample_event = wait_var(open_vera_variable);
sample_event = sync(ALL | ANY, some_OpenVera_event);
Coverage_point
Cover point define the points that are sampled by the coverage_group. They are declared using the sample construct of a coverage_group.
EXAMPLE : Cover point
class MyClass
{
bit [0:7] m_x, m_y;
coverage_group cov1
{
sample_event = @(posedge CLOCK);
sample m_x, m_y;
}
}
Cross Coverage :
cross coverage is crossing subsets of the coverage points being sampled by a coverage_group. Crosses of coverage points of a coverage_group can be specified using the cross construct.
EXAMPLE : cross coverage:
class MyClass
{
bit [0:7] m_x, m_y;
coverage_group cov1
{
sample_event = @(posedge CLOCK);
sample m_x, m_y;
cross cxy (m_x,m_y);
}
}