1

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);
Convergent
  • 130
  • 9

1 Answers1

1

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.

dave_59
  • 39,096
  • 3
  • 24
  • 63