var_1 changes from value 0 to 1 then from 1 to 2 and so on till 15 but not on consecutive sampling points. I sample on every clock cycle but the value might change after some arbitrary clk cycles. The transition coverage I write does not work. Can we write transition coverage for this case?
Hi,
var_1 changes from value 0 to 1 then from 1 to 2 and so on till 15 but not on consecutive sampling points. I sample on every clock cycle but the value might change after some arbitrary clk cycles. The transition coverage I write does not work. Can we write transition coverage for this case?
I see that the var_1_bin getting covered 100% but not the var_1_trans_bin.
Thanks.
I works for me, but this is very unpractical and non-scalable maybe you can try different approach if you elaborate further on what/why you want to achieve.
In your example, you are changing the value after each sampling condition. So you are hitting the transition coverage. But in my case, the value might not change after each sample. I do see that the values are coming in order from 0 to 15.
So that means you have a stimulus problem you are not providing the “right” test or sequencing.
I’m assuming you are randomizing things so it will be “difficult” to hit that specific condition/pattern.
-R
The issue is that the value does not change constantly at each sampling point. I sample at every posedge of clk but there is a iff clause to my coverpoint where I check the cover bins. Since the bins are getting hit at non-consecutive sampling point the transition bin is not getting covered.
You last comment is hard to understand without more details. You should be able to create an iff clause for the bin that is true only when var_1 transitions using $changed.
There is no transition bin syntax that allows for indefinite repetition. A cover directive has much more expressive syntax and would be much more scalable. But it requires a whole new area of learning SystemVerilog.
Also, you are not supposed to be using a covergroup as a checker, if this is just a counter, knowing that it had all the values 0-15 should be good enough for coverage.