overgroup_declaration ::= //
from Annex A.2.11
covergroup covergroup_identifier [ ( list_of_tf_proto_formals
) ] [ clocking_event coverage_event ] ;
{ coverage_spec_or_option ; }
endgroup [ : covergroup_identifier ]
coverage_spec_or_option ::=
{attribute_instance}
coverage_spec
| {attribute_instance}
coverage_option
coverage_option ::=
option.member_identifier = expression
| type_option.member_identifier = expression
coverage_spec ::=
cover_point
| cover_cross
coverage_event ::=
clocking_identifier
| @@( block_event_expression )
block_event_expression :: =
block_event_expression or block_event_expression
| begin hierarchical_btf_identifier
| end hierarchical_btf_identifier
hierarchical_btf_identifier :: =
hierarchical_task_identifier
| hierarchical_function_identifier
| hierarchical_block_identifier
| hierarchical _identifier { class_scope :: } method_identifier
If a clocking event is
specified, it defines the event at which coverage points are sampled. If the
clocking event is omitted, users must procedurally trigger the coverage
sampling. This is done via a the built-in sample()
method (see Section 20.7). Optionally, the strobe option can be used to modify the sampling behavior.
When the strobe option is not set (the default), a coverage point is sampled as soon as the instant
the clocking event takes place, as if the process
triggering the event were to call the built-in sample() method . If the
clocking event occurs multiple times in a time step, the coverage point will
also be sampled multiple times. The strobe option (see Section 20.6.1) can be
used to specify that coverage points are sampled at
the end of the time slot in the postponed
region, thereby filtering multiple clocking events so that only sample
per time slot is taken.
As an
alternative to a clocking event, a coverage group accepts a block event
expression to indicate that the coverage sample is to be triggered by the start
or the end of execution of a given named block, task, function, or class
method. Block event expressions that specify the begin keyword followed by a hierarchical
identifier denoting a named block, task, function, or class method shall be
triggered immediately before the corresponding block, task, function, or method
begins executing its first statement. Block event expressions that specify the end keyword followed by a hierarchical identifier denoting a named
block, task, function, or class method shall be triggered immediately after the
corresponding block, task, function, or method executes its last statement.
Block event expressions that specify the end of execution shall not be triggered if the
block, task, function, or method is disabled.