In reply to dave_59:
Hi Dave ,
Your code invoked an interest to understand the Region where sampling occurs :
I tried 2 variations ::
// Code 1 ::
bit [1:0] a ;
bit clk ;
covergroup cg1 @( posedge clk ) ;
a_auto : coverpoint a ;
endgroup
cg1 cg_1 = new() ;
initial forever #5 clk = !clk ;
always @ ( posedge clk ) a <= a + 1 ;
// CODE2 ::
bit c;
initial
repeat (2)
begin
c <= !c; @c;
end
covergroup cg @(posedge c);
coverpoint c // For 0 -> 1 transition , c would be sampled 1
{
bins bs[2] = {0,1};
}
endgroup
cg cgi = new ;
For 1st case : 3 bins corresponding to values of a = 0 , 1 , 2 are covered .
For 2nd case : bin corresponding to value of bs[1] is covered .
Can I say the coverpoint expression in sampled in Active region ?