I am sampling a coverpoint based on Psel, but it looks like the Read bin and Read after Read gets hit. But for some reason i dont see the write bin getting hit. Here is the sample code. I see in the waves write access are going through.
covergroup APB_accesses_cg();
//option.per_instance = 1;
RW: coverpoint pwrite {
// bins read = {0};
bins write = {1};
// bins read_after_read = (0[*2]);
bins write_after_write = (1[*2]);
}
endgroup: APB_accesses_cg
APB_accesses_cg APB_protocol_cg;
initial begin
APB_protocol_cg = new();
end
sequence END_OF_APB_TRANSFER;
@(posedge pclk)
($rose(penable & pready),$display("coming here"));
endsequence: END_OF_APB_TRANSFER
cover property(END_OF_APB_TRANSFER) begin
if(psel == 1) begin
APB_protocol_cg.sample();
$display ("Entering here in covergroup");
end
end