Below are a few questions on Section 20 (Coverage) regarding the
specification of transitions and about the computation of coverage
statistics (i.e. how to compute the coverage values returned by the
predefined coverage methods).
Regarding computation of coverage,
1) What is the difference between 'cumulative' coverage and 'type'
coverage. These seem to be the same, however there are separate
predefined methods to access the cumulative or type coverage. What is
the difference between 'get_coverage()' and 'query()' or between
'get_inst_coverage()' and 'inst_query()' ?
The LRM refers to the 'cumulative coverage', but does not really define
how cumulative coverage is computed. Since the coverage numbers are
returned (computed) by predefined methods, the LRM should be clear as to
the computation of coverage numbers.
2) At the end of 20.4 the last two paragraphs and the embedded example
describe passing arguments to a constructor as a means to define a
generic coverage group. Modifying the example slightly to specify a
separate 'good' bin for each value yields the following example (the
only difference is the [] following good) :
covergroup gc (ref int ra, int low, int high ) @(posedge clk);
coverpoint ra // sample variable passed by reference
{
bins good[] = { [low : high] };
bins bad[] = default;
}
endgroup
...
int va, vb;
cg c1 = new( va, 0, 50 ); // cover variable va in the range 0 to 50
cg c2 = new( vb, 120, 600 ); // cover variable vb in the range 120 to
600
By default the covergroup (type) gc has the per_instance option set to
false (0). In this case how is the type coverage for gc computed since
each instance can have a different number of bins and the different sets
of values associated with the bins.
3) When computing the cumulative coverage, are the bin counts from
separate instances summed before comparison to the 'at_least' value to
determine if a particular bin is covered for the covergroup type (or
does the 'at_least' count need to be observed for each instance) ?
4) The last two paragraphs in 20.4 (mentioned in #2) belong in 20.2,
since they discuss (introduces) writing a generic coverage group,
whereas the topic of section 20.4 is coverage points.
Related to specification of transitions,
5) As shown in the text and example in 20.4.1, non-consecutive
repetition can be specified using [-> repeat_range ]. For example,
2 [ -> 3 ]
is the same as
... 2 => ... => 2 ... => 2
where the dots (...) represent any transition that does not contain the
value 2.
However, it appears that repetition is the only way to specify
non-consecutive transitions values. Is there any way to specify
non-consecutive transitions values that do not repeat? For example, is
there any way to specify the transition:
... 1 => ... => 2 ... => 3
where the dots (...) represent any sequence of values (including a null
sequence)?
Also it seems there isn't a way specify zero or more intervening
transitions. That is, the sequence of sampled values
2 5 2 2
would not match the transition specification "2 [ -> 3 ]" because
between the 2nd and 3rd '2', there isn't a "transition that does not
contain the value 2". The sequence
2 5 2 2 1 1 2
also does not match because the transitions between the required three
'2' values cannot contain a '2'.
Why introduce non-consecutive transitions if only for limited
repetitions of a value?
6) In attempting to matching transition sequences can matched sequences
overlap? Here are some examples:
Given the covergroup
coverpoint val
{
bins b2 = 2 [ -> 3:5] ; // 3 to 5 non-consecutive 2s
bins b3 = 3 [ -> 3:5] ; // 3 to 5 non-consecutive 3s
bins b4 = 4 [* 3]; // 3 consecutive 4s
}
Consider the following sequence of 12 sampled values (for val)
1 2 3 2 3 2 3 2 3 2 3 1
On the 6th sample, I believe the transition sequence for b2 is met and
it's bit count is incremented. Will the transition sequence for b3 be
met on the 7th sample? Similarly, will b2 be incremented on the 8th and
10th samples? Will b3 be incremented on the 9th and 11th samples?
For the following sequence of 6 sampled values
4 4 4 4 4 4
will the bin b4 be incremented on the 3rd, 4th, 5th and 6th sample (or
just the 3rd and 6th)?
- Ray
Received on Thu Mar 11 12:30:56 2004
This archive was generated by hypermail 2.1.8 : Thu Mar 11 2004 - 12:31:22 PST