Coverage for a signal that's high for n clk cycles where n varies from 1 to 10?

Hello,

I’m looking to create a cover property (or properties that have bins which will cover signals being high for N cycles.
For eg, say a signal ‘vld’

How can I create a cover property using a sequence to check whether vld was high for 1, 2, 3 … N cycles (bins or properties for each). I was thinking of using $past and keep 10 variables for this but I know it won’t scale very well, not to mention the inefficiency and messy code.

Is there any easie/better way of doing this?

Also I did have a look at this but couldn’t understand the (1’b1, v=v-1’b1)[*1:$] part of it. Why is 1’b1 being subtracted?

Thanks in advance for the help!

In reply to ragTime:

To understand this let’s see full assertion as:

($rose(a), v=g) |-> (a==1'b1, v=v-1'b1)[*1:$] ##0 v==1'b0 ##0 a==1'b1;

Now [*1:] operator means "hold true until" v==1'b0 is matched. so basically the sequence before [*1:] is repeated unless v becomes 0, as v is a local variable it gets subtracted in sequence otherwise this assertion will never execute. You can think of it as a loop or a means to provide dynamic delays is signal checking. You need to do this only if no of cycles are not constant.

Regards,
Rohit