I know that Code Coverage is the right way to do toggle coverage. Doing that through Functional Coverage is a long stretch. But, for the sake of argument, I want to select a few signals and do toggle coverage through functional coverage. Will the following work?
bit[7:0] adr1;
covergroup gc @(posedge clk);
ac: coverpoint adr1
{
bins ar1 = (1’b0 => 1’b1 || 1’b1 => 1’b0);
}
endgroup
gc gcInst = new;
Thanks.
In reply to a72:
That gets interpreted as
bins ar1 = (1'b0 => (1'b1 || 1'b1) => 1'b0);
// resolves to
bins ar1 = (8'h00 => 8'h01 => 8'h00);
Which is probably not what you are expecting. See Bitwise toggle coverage for a bitvector | Verification Academy
In reply to dave_59:
Thanks Dave. I looked at the link you provided. I see the following:
bins tr = (1=> 0,0 => 1 ;}
So, is that the solution?
In reply to a72:
You have to create an array of covergroups instances, one for each bit.