Hardware Reference
In-Depth Information
be of interest to know which of the delays between a and b occurred. A simple
solution is to place the coverage statement in a generate loop spanning the 100
possible delay values:
Example 18.5.
for ( genvar i = 1; i <= 100; i++) begin : loop_delays
prop_cov4: cover property ( disable iff (reset)
@( posedge clk) a #-# s_nexttime [i] b
) $display(
"prop_cov4 success, time %t, delay %0d", $time, i
);
end : loop_delays
t
There will be 100 cover property statements to evaluate, each one triggering
on a and then searching for the occurrence of b at the exact time specified
by s_nexttime [i] . For small delay range values this is an acceptable solution.
However, for larger values, like in this example, it rapidly degrades the performance
in simulation. For FV, the performance impact may not be as heavy, as the individual
covers become targets for reachability analysis.
For simulation there is an alternative, simpler solution. We can combine the
power of temporal properties to detect patterns of signals over time with covergroups
to record data and characteristics of the signal patterns. First we provide a brief
introduction to the covergroup construct.
18.2.3
Covergroup
Coverage on properties and sequences is an excellent mechanism for detecting the
occurrence of some specific series of Boolean values. It is not as useful for collecting
data values, delays, etc. For that purpose the covergroup object is available in
SystemVerilog. Not only does it allow collecting information from simple temporal
sequences, but its main power is in collecting and correlating information from
multiple data points. The information sampling is triggered either by some clocking
event or by calling the sample method of the covergroup .
We do not present a detailed account of all the features of the covergroup
object. The reader can find further details in the LRM and also in [ 19 , 59 ]. We only
introduce a small set of features by means of an example to illustrate the usage of
covergroups jointly with cover properties to achieve an efficient implementation of
coverage collection with data. The coverage collection is triggered by the successes
of a cover property , and data collected from within the evaluation attempt of the
property is stored using a covergroup . First let us see an example of a covergroup
where sampling is triggered by a clock.
Search WWH ::




Custom Search