Specman coverage: How to cover only that some transition occurred?

280 views Asked by At

I need to make sure that at least 1 change occurred in a specific uint item X, i.e. X had 2 different values (it is unknown what specific values). Something like this:

cover some_event {
    item X : uint = some_uint using no_collect;
    transition X using when = (prev_X != X);
};

** The code causes compilation error

Is it possible to define such coverage in Specman? Thank you for your help

1

There are 1 answers

0
user3467290 On

what you wrote is almost accurate, but instead of "when" - use "ignore"

cover some_event is {
    item X : uint = some_uint using no_collect;        
    transition X using ignore = (prev_X == X);
};