Convergent
Convergent

Reputation: 130

Unbounded (infinite) repetitions in transitions for covergroup bins

How can I define coverage bin for transition that might have many repetitions in it? What I'm trying to do is something like this:

bins st = (2=> 3[* 1:$] => 2);

Of course, this doesn't work. Simulators give error messages when compiling this line.

Edit: Simulators complain about $ symbol, they don't recognize it as "unbounded maximum". However when writing sequences, it is legal to use consecutive repetition operator as [* 1:$]. I hope next version of SystemVerilog makes it legal for covergroups too.

As a crude workaround, I substituted $ with a large number so it works fine for my case.

bins st = (2=> 3[* 1:1000] => 2);

Upvotes: 1

Views: 740

Answers (1)

dave_59
dave_59

Reputation: 42738

SystemVerilog transition bins were not designed to handle anything but simple transitions. Anything more complex should be modeled using a cover directive, or some combination of sequence.triggered() method and covergroup.

Upvotes: 1

Related Questions