Binding Covergroups

I want to create a separate module whose port list matches my interface, and then create a covergroup in the module based on the port list. Next, I want to bind this module with my interface with the hopes that my covergroup gets exercised. Is this possible and good practice?

In reply to sparsh.gupta:

Yes it is possible. Yes it is a good practice.

In reply to sparsh.gupta:

Note that the LRM does not allow modules to be bound into interfaces, only other interfaces. So just change your module to an interface and everything should work.

This is a separate question as opposed to this thread. I want to know is there a way to debug the cover groups i.e to confirm that code written for covergroups and coverpoint is working correctly as per the signals defined from the waves perhaps.

In reply to sparsh.gupta:

You could try to write assertions to debug the problem. But I think this is not a good idea. If you feel your functional coverage numbers are too small, simply modify your constraints in the sequences or add more sequences.

In reply to chr_sue:
But I can’t know if what I have written is working how I intended it to be by adding more sequences right? Just for an instance let’s say if I want to know that all my opcodes are encountered in my instruction stream. I can see them in the waves, how can I ensure that coverpoint I have written achieves that.

In reply to sparsh.gupta:

If your coverpoint was never hit this can happen for 2 reasons:
(1) your coverpoin is not well defined.
(2) you did not stimulate the corresponding coverage.

In both directions you have to investigate. If you get only a few hits you have to add more sequences stumulating the corresponding coverage.