Iff in covergroup

In reply to tech_savvy:

I don’t think this is allowed for covergroups but for coverpoints if you check the 2017 IEEE LRM sections:
19.3 Defining the coverage model: covergroup
covergroup_declaration ::= // from A.2.11
covergroup covergroup_identifier [ ( [ tf_port_list ] ) ] [ 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 = constant_expression
coverage_spec ::=
cover_point
| cover_cross
coverage_event ::=
clocking_event
| with function sample ( [ tf_port_list ] )
| @@( 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_tf_identifier
| hierarchical_block_identifier
| [ hierarchical_identifier. | class_scope ] method_identifier

There is no mention of iff**

19.5 Defining coverage points
The expression within the iff construct specifies an optional condition that disables coverage for that coverpoint. If the guard expression evaluates to false at a sampling point, the coverage point is ignored.
For example:

covergroup g4;
coverpoint s0 iff(!reset);
endgroup

In the preceding example, coverage point s0 is covered only if the value reset is false.
Maybe you need to explain what you want to achieve so people can provide you with more help

HTH,

-R