Hardware Reference
In-Depth Information
structurally exercised. It does not tell us whether some functionality is missing.
Functional coverage, however, derives for the most part its coverage targets from
the functional specification of the design.
18.1
Immediate and Deferred Coverage
The simplest form of functional coverage measurement can be obtained using
immediate and deferred cover statements. Like the immediate and deferred assert
statements, they can be placed in procedural code. The immediate cover is useful in
high-level functional models and test benches, while the deferred form is preferred
in RTL models because of its ability to filter out 0-width glitches. Given that the
argument to a cover statement is a Boolean expression and is associated with the
design model, it is mostly suitable to measure whether some specific expression
values, or their combinations have been encountered in the model. That is, like
immediate and deferred assert statements, they are closer to the implementation
level than to the purely functional level.
The syntactic form of the immediate and deferred cover statements is as follows:
cover ( expression ) statement_or_null
and
cover #0 ( expression ) statement_or_null
and
cover final ( expression ) statement_or_null 1
Notice that the action block is limited to an optional pass action block since there
is no notion of failure. In addition, as in deferred assertions, the action block of a
deferred cover statement is limited to a single subroutine call; that is, it cannot be a
block of statements. In the case of deferred final cover, like in deferred final asserts,
the action block may contain only passive statements. The coverage database will
record the total number of evaluations of the statement and the number of times
it succeeded (i.e., the expression evaluated true). The coverage database and the
analysis and presentation tools built around it play an important role in assessing
the quality of verification of the design. The tools usually provide means to merge
coverage information from different tests, indicate which areas of the design have
not yet been verified (or have no coverage collection statements), display the trend
in coverage over different tests and time, and present the information in a concise
and graphical manner.
In immediate covers, the statement in the pass action block executes immediately
upon success of the cover statement. In deferred cover statements, however, the pass
statement is limited to a single subroutine and is scheduled to execute in the Reactive
1 In fact, in both cases of deferred covers this should specify “subroutine call or null” due to the
restrictions placed on action blocks in deferred assertions.
Search WWH ::




Custom Search