Coverage for even numbers only

I want to cover even points within a range from 0:63. I tried using the example in the link below but I got an error due to the word ‘item’ being undeclared
creating bins for only even numbers | Verification Academy
covergroup …

coverpoint even_only
{
bins even = even_only with { (item inside {[0:63]} ) && (item % 2 == 0)};
}

error message on the first {

expecting ( and found {

Rita

In reply to rediet.sebsebie:

Braces {}'s should be replaced with parenthesis ()'s.

coverpoint even_only
{
bins even [] = even_only with ( (item inside {[0:63]} ) && (item % 2 == 0));
}
1 Like