Question Regarding transitional coverage

Hi All,

I have a transition CG that is being coded as follows where is the @ signal is same as the signal that is sampled :

covergroup some_cg_func (string instComment) @( spy_interface_ins.sig_vrefiobufact);

  option.per_instance = 1;
  option.comment = instComment;

  AFE_DQCCPM_ins1_cp_imod_func_lvl_bl0_vrefiobufact : coverpoint ch0lp4afe_spy_interface_ins.sig_vrefiobufact iff((disable_analyzer===1'b0)&&(ch0lp4afe_spy_interface_ins.trans_ospid_init_complete===1'b1)) {
    bins AFE_DQCCPM_cp_ins1[] = ( 0=>1 ), ( 1=>0 );
  }

endgroup

I can see in the waveform that the signal is transitioning from 0 to 1 and 1 to 0 with disable_analyzer set to 0 and trans_ospid_init_complete set to 1 .

But in coverage I never see 1=>0 transition getting covered ? What could be the reason ? Thank you in advance .

Regards,
Asmita

In reply to asmitakulkarni:

I think its because you are sampling on the same signal on which you have CP.

Would you try to sample this CG with some clock and let us know.

I just tried this very simple example and it works for me. Are there any glitches or other timing related issues you have not told us about? Or maybe the signals you put in the waveform are not the same signals used by the covergroup.

module DUT;
   bit b, en;
   initial repeat (10) #5 b++;
   initial #20 en = 1;
endmodule 
module top;
   DUT U();
   covergroup cg @(U.b);
      option.per_instance = 1;
      coverpoint U.b iff (U.en) {
	 bins t[] = ( 0=>1 ), ( 1=>0 );
      }
   endgroup // cg
   cg cvg=new();
endmodule

In reply to dave_59:

Thanks Dave. Yes it does work for some cps and not for other . I checked the signals they seem to be same .
Could it be related to Simulator ?
Regards,
Asmita

In reply to Vinay Jain:

THanks Vinay . I can use some clock. But the transition does not occur on consecutive clocks .How do we write a CP wherein the transition does occur not consecutive clock cycles that I use for sampling ?

In reply to asmitakulkarni:

It could be the simulator, or it could be a race condition. But we can’t answer that without seeing all the code that stimulates the signals used in your covergroup.