Hi Forum,
I am trying to generate inputs to hit the following transition bins in RTL
covergroup cg1 @(posedge clk);
coverpoint intr iff ( rst_n )
{
bins intr_rep_2 = ( 1'b1 => 1'b0 => 1'b1[->2:32] );
bins intr_rep_3 = ( 1'b1 => 1'b1[*2:16] => 1'b0 );
}
endgroup
covergorup cg2 @( posedge clk);
coverpoint intr iff ( rst_n )
{
bins intr_valid[2] = ( 1'b1[*1:2] , 1'b1[*3:8] );
}
endgroup
For cg1::intr_rep_2 to be covered, wouldn’t the following sampled value of intr be sufficient
1 → 0 → 1 → 0[*0:$] → 1
[A] Is there any significance of range ( [→3:32] ) in intr_rep_2 ?
As soon as ( 1’b1 => 1’b0 => 1’b1[->2] ) is sampled the bin is covered, wouldn’t the remaining range of 1’b1[→3:32] be essentially insignificant ?
In order to cover intr_rep_3 the sampled values for intr could be
(1) 1 → 1 → 1 → 0 // 1’b1 => 1’b1[*2] => 1’b0
(2) 1 → 1 → 1 → 1 → 0 // 1’b1 => 1’b1[*3] => 1’b0
(3) 1 → 1 → 1 → 1 → 1 → 0 // 1’b1 => 1’b1[*4] => 1’b0
Here I do see the significance of the range within the repetition operator
[B] For the 2 fixed bins in cg2, I am confused which bin represents which value ? Would the indexes be numbered 0 & 1 or 1 & 2 ?
Would intr_valid[1/2] represent 1’b1[*1:2] or 1’b1[*3:8] ?
In this case is the upper range of any significance ?
As soon as intr is sampled 1, the bin would be covered. If it’s sampled 1 twice then wouldn’t the tool report that the bin is covered twice ( instead of once via 1’b1[*2] ) ?